File tree Expand file tree Collapse file tree 1 file changed +11
-19
lines changed
pkgs/by-name/sd/SDL_compat Expand file tree Collapse file tree 1 file changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,17 @@ stdenv.mkDerivation (finalAttrs: {
5252 ]
5353 ++ lib . optionals openglSupport [ libGLU ] ;
5454
55+ postPatch = ''
56+ substituteInPlace CMakeLists.txt \
57+ --replace-fail 'set(CMAKE_SKIP_RPATH TRUE)' 'set(CMAKE_SKIP_RPATH FALSE)'
58+ '' ;
59+
60+ dontPatchELF = true ; # don't strip rpath
61+
62+ cmakeFlags = [
63+ ( lib . cmakeFeature "CMAKE_INSTALL_RPATH" ( lib . makeLibraryPath [ sdl2-compat ] ) )
64+ ] ;
65+
5566 enableParallelBuilding = true ;
5667
5768 postInstall = ''
@@ -66,25 +77,6 @@ stdenv.mkDerivation (finalAttrs: {
6677 patches = [ ./find-headers.patch ] ;
6778 setupHook = ./setup-hook.sh ;
6879
69- postFixup = ''
70- for lib in $out/lib/*${ stdenv . hostPlatform . extensions . sharedLibrary } * ; do
71- if [[ -L "$lib" ]]; then
72- ${
73- if stdenv . hostPlatform . isDarwin then
74- ''
75- install_name_tool ${
76- lib . strings . concatMapStrings ( x : " -add_rpath ${ lib . makeLibraryPath [ x ] } " ) finalAttrs . buildInputs
77- } "$lib"
78- ''
79- else
80- ''
81- patchelf --set-rpath "$(patchelf --print-rpath $lib):${ lib . makeLibraryPath finalAttrs . buildInputs } " "$lib"
82- ''
83- }
84- fi
85- done
86- '' ;
87-
8880 meta = {
8981 homepage = "https://www.libsdl.org/" ;
9082 description = "Cross-platform multimedia library - build SDL 1.2 applications against 2.0" ;
You can’t perform that action at this time.
0 commit comments