SDL: Add library paths of all SDL sub-packages to sdl-config
Because of how nixpkgs works, all the SDL-umbrella libraries are in different folders. On a usual system, when using `sdl-config --libs`, this means that SDL_gfx would also be on the linker path. Some packages seem to depend on this being the case.
This commit is contained in:
parent
b4ce8c3642
commit
1038cd5ad8
2 changed files with 16 additions and 5 deletions
|
@ -1,7 +1,8 @@
|
|||
diff -ru3 SDL-1.2.15/sdl-config.in SDL-1.2.15-new/sdl-config.in
|
||||
--- SDL-1.2.15/sdl-config.in 2012-01-19 10:30:06.000000000 +0400
|
||||
+++ SDL-1.2.15-new/sdl-config.in 2016-08-22 05:32:52.716397920 +0300
|
||||
@@ -42,7 +42,11 @@
|
||||
diff --git a/sdl-config.in b/sdl-config.in
|
||||
index e0fcc0c..bf7928a 100644
|
||||
--- a/sdl-config.in
|
||||
+++ b/sdl-config.in
|
||||
@@ -42,14 +42,18 @@ while test $# -gt 0; do
|
||||
echo @SDL_VERSION@
|
||||
;;
|
||||
--cflags)
|
||||
|
@ -13,4 +14,13 @@ diff -ru3 SDL-1.2.15/sdl-config.in SDL-1.2.15-new/sdl-config.in
|
|||
+ echo $SDL_CFLAGS @SDL_CFLAGS@
|
||||
;;
|
||||
@ENABLE_SHARED_TRUE@ --libs)
|
||||
@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
|
||||
-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
|
||||
+@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ $SDL_LIB_PATH
|
||||
@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_RLD_FLAGS@ @SDL_STATIC_LIBS@
|
||||
+@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ $SDL_LIB_PATH
|
||||
@ENABLE_STATIC_TRUE@ ;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
addSDLPath () {
|
||||
if [ -e "$1/include/SDL" ]; then
|
||||
export SDL_PATH="$SDL_PATH $1/include/SDL"
|
||||
export SDL_LIB_PATH="$SDL_LIB_PATH -L$1/lib"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue