leveldb: fix static building
1. The Makefile is long gone and the patch in not needed anymore. 2. For some reason LEVELDB_BUILD_BENCHMARKS=OFF is necessary when building statically. (Note: this has always been of for the shared build)
This commit is contained in:
parent
bfa6f1553a
commit
76492d0c26
|
@ -38,13 +38,9 @@ stdenv.mkDerivation rec {
|
||||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||||
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
||||||
"-DLEVELDB_BUILD_TESTS=OFF"
|
"-DLEVELDB_BUILD_TESTS=OFF"
|
||||||
|
"-DLEVELDB_BUILD_BENCHMARKS=OFF"
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = lib.optionalString stdenv.hostPlatform.isStatic ''
|
|
||||||
# remove shared objects from "all" target
|
|
||||||
sed -i '/^all:/ s/$(SHARED_LIBS) $(SHARED_PROGRAMS)//' Makefile
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
substituteInPlace "$out"/lib/cmake/leveldb/leveldbTargets.cmake \
|
substituteInPlace "$out"/lib/cmake/leveldb/leveldbTargets.cmake \
|
||||||
--replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES "'$dev'"'
|
--replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES "'$dev'"'
|
||||||
|
|
Loading…
Reference in a new issue