Codebase list libsdl2-mixer / 91ddd9e
Drop patches, applied upstream Simon McVittie 1 year, 9 months ago
3 changed file(s) with 0 addition(s) and 206 deletion(s). Raw diff Collapse all Expand all
+0
-176
debian/patches/autotools-Move-mandatory-dependencies-from-EXTRA_LDFLAGS-.patch less more
0 From: Simon McVittie <smcv@collabora.com>
1 Date: Fri, 17 Jun 2022 12:10:20 +0100
2 Subject: autotools: Move mandatory dependencies from EXTRA_LDFLAGS to
3 MIXER_LIBS
4
5 Autotools variables whose names end with _LDFLAGS are usually for
6 linker options such as -Wl,--export-dynamic which would not be
7 appropriate to copy into the pkg-config or CMake metadata.
8
9 Move these dependencies into a separate _LIBS variable, which is
10 conventionally a list of -L and -l options (only) and *can* be copied
11 into pkg-config or CMake metadata. This follows the same pattern as
12 IMG_LIBS and TTF_LIBS in SDL_image and SDL_ttf.
13
14 Exclude SDL_LIBS from this, because the CMake metadata has a special
15 case for finding SDL, and linking to a different SDL causes link failure
16 on our macOS CI. Link SDL via $(SDL_LIBS) instead.
17
18 Signed-off-by: Simon McVittie <smcv@collabora.com>
19 Forwarded: https://github.com/libsdl-org/SDL_mixer/pull/412
20 ---
21 Makefile.in | 3 ++-
22 configure.ac | 27 ++++++++++++++-------------
23 2 files changed, 16 insertions(+), 14 deletions(-)
24
25 diff --git a/Makefile.in b/Makefile.in
26 index ae88591..006a8fb 100644
27 --- a/Makefile.in
28 +++ b/Makefile.in
29 @@ -25,6 +25,7 @@ CFLAGS = @BUILD_CFLAGS@
30 EXTRA_CFLAGS = @EXTRA_CFLAGS@
31 LDFLAGS = @BUILD_LDFLAGS@
32 EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
33 +MIXER_LIBS = @MIXER_LIBS@
34 LIBTOOL = @LIBTOOL@
35 INSTALL = @INSTALL@
36 AR = @AR@
37 @@ -94,7 +95,7 @@ $(objects)/.created:
38 .PHONY: all install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
39
40 $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
41 - $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
42 + $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) $(SDL_LIBS) $(MIXER_LIBS)
43
44 $(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
45 $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(objects)/$(TARGET) $(SDL_LIBS) $(LDFLAGS)
46 diff --git a/configure.ac b/configure.ac
47 index 8d4e5de..7b4f201 100644
48 --- a/configure.ac
49 +++ b/configure.ac
50 @@ -111,6 +111,7 @@ BUILD_CFLAGS="$CFLAGS $CPPFLAGS -I$srcdir/include -I$srcdir/src -I$srcdir/src/co
51 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
52 BUILD_LDFLAGS="$LDFLAGS"
53 EXTRA_LDFLAGS="$BASE_LDFLAGS"
54 +MIXER_LIBS=
55 ## These are common directories to find software packages
56 #for path in /usr/freeware /usr/pkg /usr/local; do
57 # if test -d $path/include; then
58 @@ -279,7 +280,6 @@ AM_PATH_SDL2($SDL_VERSION,
59 AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
60 )
61 EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS"
62 -EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SDL_LIBS"
63
64 dnl check for GCC warning options
65 CheckWarnAll
66 @@ -367,7 +367,7 @@ if test x$enable_music_mod = xyes -a x$enable_music_mod_modplug = xyes; then
67 echo "-- dynamic libmodplug -> $modplug_lib"
68 EXTRA_CFLAGS="$EXTRA_CFLAGS -DMODPLUG_DYNAMIC=\\\"$modplug_lib\\\""
69 else
70 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MODPLUG_LIBS"
71 + MIXER_LIBS="$MIXER_LIBS $MODPLUG_LIBS"
72 if test x$have_libmodplug_pc = xyes; then
73 PC_REQUIRES="$PC_REQUIRES libmodplug"
74 else
75 @@ -426,7 +426,7 @@ if test x$enable_music_mod = xyes -a x$enable_music_mod_xmp = xyes; then
76 echo "-- dynamic libxmp -> $xmp_lib"
77 EXTRA_CFLAGS="$EXTRA_CFLAGS -DXMP_DYNAMIC=\\\"$xmp_lib\\\""
78 else
79 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $XMP_LIBS"
80 + MIXER_LIBS="$MIXER_LIBS $XMP_LIBS"
81 if test x$have_libxmp_pc = xyes; then
82 PC_REQUIRES="$PC_REQUIRES lib$xmplib"
83 else
84 @@ -476,17 +476,17 @@ if test x$enable_music_midi = xyes; then
85 case "$host" in
86 *-*-cygwin* | *-*-mingw*)
87 use_music_midi_native=yes
88 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lwinmm"
89 + MIXER_LIBS="$MIXER_LIBS -lwinmm"
90 PC_LIBS="$PC_LIBS -lwinmm"
91 ;;
92 *-*-darwin*)
93 use_music_midi_native=yes
94 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,CoreServices"
95 + MIXER_LIBS="$MIXER_LIBS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,CoreServices"
96 PC_LIBS="$PC_LIBS -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,CoreServices"
97 ;;
98 *-*-haiku*)
99 use_music_midi_native=yes_cpp
100 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmidi"
101 + MIXER_LIBS="$MIXER_LIBS -lmidi"
102 PC_LIBS="$PC_LIBS -lmidi"
103 ;;
104 esac
105 @@ -540,7 +540,7 @@ if test x$enable_music_midi = xyes; then
106 echo "-- dynamic libfluidsynth -> $fluidsynth_lib"
107 EXTRA_CFLAGS="$EXTRA_CFLAGS -DFLUIDSYNTH_DYNAMIC=\\\"$fluidsynth_lib\\\""
108 else
109 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FLUIDSYNTH_LIBS"
110 + MIXER_LIBS="$MIXER_LIBS $FLUIDSYNTH_LIBS"
111 if test x$have_fluidsynth_pc = xyes; then
112 PC_REQUIRES="$PC_REQUIRES fluidsynth"
113 else
114 @@ -615,7 +615,7 @@ if test x$enable_music_ogg = xyes -a x$enable_music_ogg_vorbis = xyes; then
115 echo "-- dynamic libvorbisfile -> $ogg_lib"
116 EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
117 else
118 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $VORBIS_LIBS"
119 + MIXER_LIBS="$MIXER_LIBS $VORBIS_LIBS"
120 if test x$have_ogg_pc = xyes; then
121 PC_REQUIRES="$PC_REQUIRES vorbisfile"
122 else
123 @@ -671,7 +671,7 @@ if test x$enable_music_ogg = xyes -a x$enable_music_ogg_tremor = xyes; then
124 echo "-- dynamic libvorbisidec -> $ogg_lib"
125 EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_DYNAMIC=\\\"$ogg_lib\\\""
126 else
127 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $TREMOR_LIBS"
128 + MIXER_LIBS="$MIXER_LIBS $TREMOR_LIBS"
129 if test x$have_tremor_pc = xyes; then
130 PC_REQUIRES="$PC_REQUIRES vorbisidec"
131 else
132 @@ -758,7 +758,7 @@ if test x$enable_music_flac = xyes -a x$enable_music_flac_libflac = xyes; then
133 echo "-- dynamic libFLAC -> $flac_lib"
134 EXTRA_CFLAGS="$EXTRA_CFLAGS -DFLAC_DYNAMIC=\\\"$flac_lib\\\""
135 else
136 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FLAC_LIBS"
137 + MIXER_LIBS="$MIXER_LIBS $FLAC_LIBS"
138 if test x$have_flac_pc = xyes; then
139 PC_REQUIRES="$PC_REQUIRES flac"
140 else
141 @@ -824,7 +824,7 @@ if test x$enable_music_mp3 = xyes -a x$enable_music_mp3_mpg123 = xyes; then
142 echo "-- dynamic libmpg123 -> $mpg123_lib"
143 EXTRA_CFLAGS="$EXTRA_CFLAGS -DMPG123_DYNAMIC=\\\"$mpg123_lib\\\""
144 else
145 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MPG123_LIBS"
146 + MIXER_LIBS="$MIXER_LIBS $MPG123_LIBS"
147 if test x$have_mpg123_pc = xyes; then
148 PC_REQUIRES="$PC_REQUIRES libmpg123"
149 else
150 @@ -881,7 +881,7 @@ if test x$enable_music_opus = xyes; then
151 echo "-- dynamic opusfile -> $opusfile_lib"
152 EXTRA_CFLAGS="$EXTRA_CFLAGS -DOPUS_DYNAMIC=\\\"$opusfile_lib\\\""
153 else
154 - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $OPUSFILE_LIBS"
155 + MIXER_LIBS="$MIXER_LIBS $OPUSFILE_LIBS"
156 if test x$have_opusfile_pc = xyes; then
157 PC_REQUIRES="$PC_REQUIRES opusfile"
158 else
159 @@ -898,7 +898,7 @@ fi
160 dnl check for LD --no-undefined option
161 CheckNoUndef
162
163 -EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBM"
164 +MIXER_LIBS="$MIXER_LIBS $LIBM"
165
166 OBJECTS=`echo $SOURCES`
167 DEPENDS=`echo $SOURCES`
168 @@ -959,6 +959,7 @@ AC_SUBST(BUILD_CFLAGS)
169 AC_SUBST(EXTRA_CFLAGS)
170 AC_SUBST(BUILD_LDFLAGS)
171 AC_SUBST(EXTRA_LDFLAGS)
172 +AC_SUBST(MIXER_LIBS)
173 AC_SUBST(EXE)
174 AC_SUBST(SDL_VERSION)
175 AC_SUBST(SDL_CFLAGS)
+0
-28
debian/patches/sdl2_mixer-config.cmake.in-Use-MIXER_LIBS-for-static-link.patch less more
0 From: Simon McVittie <smcv@collabora.com>
1 Date: Fri, 17 Jun 2022 12:10:23 +0100
2 Subject: sdl2_mixer-config.cmake.in: Use MIXER_LIBS for static linking
3
4 We can't rely on all mandatory dependencies being in PC_LIBS, because
5 if we found a dependency such as libflac via pkg-config, we would have
6 put the name of the pkg-config module in PC_REQUIRES instead.
7
8 Resolves: https://github.com/libsdl-org/SDL_mixer/issues/411
9 Signed-off-by: Simon McVittie <smcv@collabora.com>
10 Forwarded: https://github.com/libsdl-org/SDL_mixer/pull/412
11 ---
12 sdl2_mixer-config.cmake.in | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15 diff --git a/sdl2_mixer-config.cmake.in b/sdl2_mixer-config.cmake.in
16 index 8211fa3..b7eba61 100644
17 --- a/sdl2_mixer-config.cmake.in
18 +++ b/sdl2_mixer-config.cmake.in
19 @@ -71,7 +71,7 @@ set(exec_prefix "@exec_prefix@")
20 set(bindir "@bindir@")
21 set(includedir "@includedir@")
22 set(libdir "@libdir@")
23 -set(_sdl2mixer_extra_static_libraries "@PC_LIBS@")
24 +set(_sdl2mixer_extra_static_libraries "@MIXER_LIBS@ @PC_LIBS@")
25 string(STRIP "${_sdl2mixer_extra_static_libraries}" _sdl2mixer_extra_static_libraries)
26
27 set(_sdl2mixer_bindir "${bindir}")
+0
-2
debian/patches/series less more
0 autotools-Move-mandatory-dependencies-from-EXTRA_LDFLAGS-.patch
1 sdl2_mixer-config.cmake.in-Use-MIXER_LIBS-for-static-link.patch