Merge pull request #96896 from kampka/hspell
hspell: fix cross-platform build issues
This commit is contained in:
commit
5ca647b244
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, perl, zlib }:
|
||||
{ stdenv, fetchurl, perl, zlib, buildPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${passthru.pname}-${passthru.version}";
|
||||
|
@ -16,7 +16,18 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
patchPhase = ''patchShebangs .'';
|
||||
buildInputs = [ perl zlib ];
|
||||
preBuild = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
make CC=${buildPackages.stdenv.cc}/bin/cc find_sizes
|
||||
mv find_sizes find_sizes_build
|
||||
make clean
|
||||
|
||||
substituteInPlace Makefile --replace "./find_sizes" "./find_sizes_build"
|
||||
substituteInPlace Makefile --replace "ar cr" "${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar cr"
|
||||
substituteInPlace Makefile --replace "ranlib" "${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
|
||||
substituteInPlace Makefile --replace "STRIP=strip" "STRIP=${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
|
||||
'';
|
||||
nativeBuildInputs = [ perl zlib ];
|
||||
# buildInputs = [ zlib ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Hebrew spell checker";
|
||||
|
|
Loading…
Reference in a new issue