libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.
zlib License
433 stars 146 forks source link

MinGW development package Makefile is missing sed instructions for its pkgconfig #475

Closed oblivioncth closed 10 months ago

oblivioncth commented 1 year ago

I was going to make a PR for this, but I couldn't for the life of me discern how this file was generated by searching through the source and repo history. So, I apologize if perhaps this issue has already been addressed, but as far as I can tell it hasn't.

This is specifically referring to the consumer Makefile within the MinGW development package, which in the most recent release is located at the root of SDL2_mixer-devel-2.6.2-mingw.zip.

The equivalent Makefile of the primary SDL2 library has the following sed command under the install-package section:

install-package:
            (...)
        sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/sdl2.pc >$(prefix)/lib/pkgconfig/sdl2.pc; \
            (...)

which of course updates the pkgconfig for the lib so that the prefix entry points to the correct location after installing.

The aforementioned SDL_mixer version of the Makefile is missing this however, and has such, no matter how the file is used the installed package config will always used the default prefix value of /opt/local/i686-w64-mingw32. If for example one installed the development libraries with make native, they get installed to /usr with the prefix in the pkgconfig then pointing to the wrong location in /opt. This causes any consumers that try to locate the MinGW lib via its '.pc' to experience errors during linking or related auto tests.

I believe the SDL_mixer equivalent should be:

install-package:
            (...)
        sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/SDL2_mixer.pc >$(prefix)/lib/pkgconfig/SDL2_mixer.pc; \
            (...)

I'm just not sure where to enact this change.

madebr commented 1 year ago

Path fixups for the released tarballs are not stored in-repo. @slouken maintains them in private https://github.com/libsdl-org/SDL/pull/5727#issuecomment-1146450181

oblivioncth commented 1 year ago

Ah, I figured it must have been something done manually or at least outside this repository.

So then it seems like this was originally addressed for SDL, just not SDL_mixer.

oblivioncth commented 1 year ago

Sorry for the link spam. My PR for that repo has gone through a bit of a gauntlet due to force pushes in the upstream repo.

slouken commented 10 months ago

This is fixed for the next release of the satellite libraries, thanks!