kumquat-buildroot/package/sdl_mixer/0001-Add-Libs.private-field-to-pkg-config-file.patch
Gleb Mazovetskiy c8e27f3baa package/sdl_mixer: update to latest git tree
The latest officially released version of SDL_mixer is 1.2.12, released
in 2012. Since then, there have been many bugfixes on master.

SDL's canonical source is now on GitHub. This commit points to the
SDL-1.2 branch from 15 Mar 2021.

Signed-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>
[yann.morin.1998@free.fr:
  - use full-length commit hash
  - two spaces in hash file
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-03-21 10:39:49 +01:00

64 lines
2.4 KiB
Diff

From abf3a1b9c9cdacb574c2b9cdbf3f2a5e18c39ab9 Mon Sep 17 00:00:00 2001
From: Rodrigo Rebello <rprebello@gmail.com>
Date: Mon, 29 Feb 2016 22:53:49 -0300
Subject: [PATCH 1/1] Add 'Libs.private' field to pkg-config file
In order to support static linking, SDL_mixer.pc should include a
'Libs.private' field listing all the libraries that SDL_mixer requires.
This patch adds such a field and also modifies configure.ac so that
EXTRA_LDFLAGS (which is now also used as the value of 'Libs.private')
no longer includes SDL_LIBS. This is done so as to prevent libraries
required by SDL from being listed twice when 'pkg-config --libs --static
SDL_mixer' is run (they're already shown because of the 'Requires: sdl'
line in SDL_mixer.pc). Makefile.in is also adjusted accordingly.
Upstream status: submitted
https://bugzilla.libsdl.org/show_bug.cgi?id=3278
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
---
Makefile.in | 2 +-
SDL_mixer.pc.in | 1 +
configure.ac | 1 -
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 027a99b..18015a2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -61,7 +61,7 @@ $(objects):
.PHONY: all install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist
$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
- $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(SDL_LIBS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
$(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET)
$(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(LDFLAGS) $(objects)/$(TARGET)
diff --git a/SDL_mixer.pc.in b/SDL_mixer.pc.in
index 1c4965d..d793521 100644
--- a/SDL_mixer.pc.in
+++ b/SDL_mixer.pc.in
@@ -8,5 +8,6 @@ Description: mixer library for Simple DirectMedia Layer
Version: @VERSION@
Requires: sdl >= @SDL_VERSION@
Libs: -L${libdir} -lSDL_mixer
+Libs.private: @EXTRA_LDFLAGS@
Cflags: -I${includedir}/SDL
diff --git a/configure.ac b/configure.ac
index 01a3d83..3ad3b4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -200,7 +200,6 @@ AM_PATH_SDL($SDL_VERSION,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS"
-EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SDL_LIBS"
dnl Check for math library
AC_CHECK_LIB(m, pow, [LIBM="-lm"])
--
2.27.0