From cff0adfc1b36fb099cb4ae1d382ece0f6b335e31 Mon Sep 17 00:00:00 2001 From: Sergey Vinokurov Date: Mon, 11 Sep 2023 00:06:23 +0100 Subject: [PATCH 1/2] SDL: put only SDL-related paths in SDL_LIB_PATH Putting everything that has lib/ directory is redundant and bloats environment for projects with many dependencies. --- pkgs/development/libraries/SDL/setup-hook.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/SDL/setup-hook.sh b/pkgs/development/libraries/SDL/setup-hook.sh index 553e8553a77f..095053a49528 100644 --- a/pkgs/development/libraries/SDL/setup-hook.sh +++ b/pkgs/development/libraries/SDL/setup-hook.sh @@ -1,9 +1,9 @@ addSDLPath () { if [ -e "$1/include/SDL" ]; then export SDL_PATH="${SDL_PATH-}${SDL_PATH:+ }$1/include/SDL" - fi - if [ -e "$1/lib" ]; then - export SDL_LIB_PATH="${SDL_LIB_PATH-}${SDL_LIB_PATH:+ }-L$1/lib" + if [ -e "$1/lib" ]; then + export SDL_LIB_PATH="${SDL_LIB_PATH-}${SDL_LIB_PATH:+ }-L$1/lib" + fi fi } From 8b2816a1b0110b6f7187a99ef961d7a97b110197 Mon Sep 17 00:00:00 2001 From: Sergey Vinokurov Date: Wed, 22 Nov 2023 21:43:21 +0000 Subject: [PATCH 2/2] =?UTF-8?q?SDL:=20note=20that=20sdl=20hook=20won?= =?UTF-8?q?=E2=80=99t=20work=20with=20split=20dev=20packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/libraries/SDL/setup-hook.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/SDL/setup-hook.sh b/pkgs/development/libraries/SDL/setup-hook.sh index 095053a49528..df5ef1bc7e97 100644 --- a/pkgs/development/libraries/SDL/setup-hook.sh +++ b/pkgs/development/libraries/SDL/setup-hook.sh @@ -1,6 +1,12 @@ addSDLPath () { if [ -e "$1/include/SDL" ]; then export SDL_PATH="${SDL_PATH-}${SDL_PATH:+ }$1/include/SDL" + # NB this doesn’t work with split dev packages because different packages + # will contain "include/SDL/" and "lib/" directories. + # + # However the SDL_LIB_PATH is consumed by SDL itself and serves to locate + # libraries like SDL2_mixer, SDL2_image, etc which are not split-package + # so the check above will only trigger on them. if [ -e "$1/lib" ]; then export SDL_LIB_PATH="${SDL_LIB_PATH-}${SDL_LIB_PATH:+ }-L$1/lib" fi