File: Avoid-hard-coding-libdir-in-sdl2-config.patch

package info (click to toggle)
sdl2-compat 2.32.56%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 53,748 kB
  • sloc: ansic: 93,460; python: 1,549; sh: 569; makefile: 45; javascript: 21; cpp: 11
file content (45 lines) | stat: -rw-r--r-- 1,612 bytes parent folder | download | duplicates (3)
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