1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-17 10:24:15 +00:00
nixpkgs/pkgs/development/libraries/SDL/find-headers.patch
Puck Meerburg 1038cd5ad8 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.
2019-10-23 13:22:07 +00:00

27 lines
997 B
Diff

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)
- echo -I@includedir@/SDL @SDL_CFLAGS@
+ SDL_CFLAGS=""
+ for i in @includedir@/SDL $SDL_PATH; do
+ SDL_CFLAGS="$SDL_CFLAGS -I$i"
+ done
+ 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@ $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