Merge pull request #101031 from r-burns/spooles

spooles: fix build on darwin
This commit is contained in:
Robert Scott 2020-10-19 19:07:03 +01:00 committed by GitHub
commit c873f13eac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

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

View file

@ -166,7 +166,7 @@ index f014c7d..7c8042a 100755
#cd MPI ; make lib #cd MPI ; make lib
-#cd MT ; make lib -#cd MT ; 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 + ln -s libspooles.so.2.2 libspooles.so
global : global :