pspdev / psp-packages

https://pspdev.github.io/psp-packages/
The Unlicense
26 stars 14 forks source link

add libmpg123 #112

Open humbertodias opened 8 months ago

humbertodias commented 8 months ago

Would be possible to add the library libmpg123? https://www.mpg123.de/download/mpg123-1.32.5.tar.bz2

Thanks

sharkwouter commented 8 months ago

There was once a port of libmpg123 for PSP and the code is still out there, but I've tried and I wasn't able to get it to build. This would require some work.

What do you need this library for? SDL2_mixer does not require it anymore to do MP3 playback, out version supports it without it.

tpimh commented 8 months ago

It seems that mpg123 removed the support for PSP in version 1.32.0. This could mean that version 1.31.3 can be built (or the target was broken for a long time and nobody was maintaining it). There might be more up-to-date forks, so feel free to post all your findings here.

sharkwouter commented 8 months ago

Yeah, I have tried building that last version before. It does requires changes to build with the current toolchain. I went even further back to when the PSP support was added, but that also did not build. I did this about a year ago, though, I don't know if anything changed.

tpimh commented 4 months ago

I managed to build mpg123 for PSP, but there's a catch.

Yes, the port was broken for some time. The latest version that can be compiled without modification is 1.22.4 (2015-08-12), not 1.31.3 (2023-03-19). The latest version that was verified to work though was 1.4.3 (2008-05-22), and I didn't test any of the binaries that I have compiled. The patch that is included in the port is not needed with modern toolchain.

The catch is simple: the port includes config.h, but doesn't include mpg123.h generated for PSP, and configure script doesn't work with PSP cross-toolchain, so you will have to configure with your host compiler, and that would generate a header that can be then used to compile for PSP. Obviously, such hack is not acceptable for inclusion in a PSPBUILD, so a better solution is needed.

But yes, it builds, don't know if it works.

P.S. do not really know where the port (and later one update for it) is coming from. This is the only message from the port author (aka wbb) that I could find in the mpg123 mailing list: [mpg123-devel] PSP.