libspatialindex: fix on Darwin
Recent bump to 2.1.0 changed the soversion from 7 to 8. It broke python3-rtree as follows: OSError: Could not load libspatialindex_c library Instead of bumping the version in postFixup, disable rpath in cmake instructions. Co-Authored-By: Reno Dakota <paparodeo@proton.me>
This commit is contained in:
parent
c7f73ed1ad
commit
17c76b0312
11
pkgs/by-name/li/libspatialindex/no-rpath-for-darwin.diff
Normal file
11
pkgs/by-name/li/libspatialindex/no-rpath-for-darwin.diff
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -248,7 +248,7 @@ if(HAVE_BCOPY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
-if(APPLE)
|
||||||
|
+if(FALSE)
|
||||||
|
set(MACOSX_RPATH ON)
|
||||||
|
set_target_properties(spatialindex spatialindex_c
|
||||||
|
PROPERTIES INSTALL_NAME_DIR "@rpath")
|
||||||
@ -3,7 +3,6 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
cmake,
|
cmake,
|
||||||
fixDarwinDylibNames,
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
@ -17,11 +16,15 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-a2CzRLHdQMnVhHZhwYsye4X644r8gp1m6vU2CJpSRpU=";
|
hash = "sha256-a2CzRLHdQMnVhHZhwYsye4X644r8gp1m6vU2CJpSRpU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./no-rpath-for-darwin.diff
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs test/
|
patchShebangs test/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
|
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
|
||||||
@ -37,10 +40,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
||||||
install_name_tool -change "@rpath/libspatialindex.7.dylib" "$out/lib/libspatialindex.7.dylib" $out/lib/libspatialindex_c.dylib
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Extensible spatial index library in C++";
|
description = "Extensible spatial index library in C++";
|
||||||
homepage = "https://libspatialindex.org";
|
homepage = "https://libspatialindex.org";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user