spooles: fix build on darwin

This commit is contained in:
Ryan Burns 2020-10-18 13:05:33 -07:00
parent 1bae8e2b28
commit c04219a9d5
2 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
./spooles.patch
];
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace makefile --replace '-Wl,-soname' '-Wl,-install_name'
'';
buildPhase = ''
make lib
'';

View File

@ -166,7 +166,7 @@ index f014c7d..7c8042a 100755
#cd MPI ; make lib
-#cd MT ; make lib
+ cd MT ; make lib
+ gcc -shared */*/*.lo -Wl,-soname,libspooles.so.2.2 -o libspooles.so.2.2 -lpthread -lm
+ $(CC) -shared */*/*.lo -Wl,-soname,libspooles.so.2.2 -o libspooles.so.2.2 -lpthread -lm
+ ln -s libspooles.so.2.2 libspooles.so
global :