1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
From: Simon McVittie <smcv@debian.org>
Date: Mon, 7 Aug 2023 18:38:26 +0100
Subject: Avoid hard-coding libdir in sdl2-config
This makes the -dev package multiarch co-installable, allowing compilation
of SDL programs for more than one architecture on the same system.
This is not an upstreamable change, since it relies on the Debian-specific
assumption that we are installing the library into a directory on the
linker's default search path.
Adapted from an earlier patch by Gianfranco Costamagna.
Co-authored-by: Gianfranco Costamagna <locutusofborg@debian.org>
Forwarded: not-needed
---
sdl2-config.in | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sdl2-config.in b/sdl2-config.in
index d21b1b2..cea0910 100755
--- a/sdl2-config.in
+++ b/sdl2-config.in
@@ -10,7 +10,6 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
exec_prefix_set=no
-libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
@ENABLE_STATIC_FALSE@usage="\
@@ -53,11 +52,11 @@ while test $# -gt 0; do
echo -I${includedir}/SDL2 @SDL_CFLAGS@
;;
@ENABLE_SHARED_TRUE@ --libs)
-@ENABLE_SHARED_TRUE@ echo -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@
+@ENABLE_SHARED_TRUE@ echo @SDL_RLD_FLAGS@ @SDL_LIBS@
@ENABLE_SHARED_TRUE@ ;;
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
-@ENABLE_STATIC_TRUE@ echo -L${libdir} @SDL_LIBS@ @SDL_STATIC_LIBS@
+@ENABLE_STATIC_TRUE@ echo @SDL_LIBS@ @SDL_STATIC_LIBS@
@ENABLE_STATIC_TRUE@ ;;
*)
echo "${usage}" 1>&2
|