duktape: force link shared library against libm
This commit is contained in:
parent
9a56cdb0c9
commit
51169259a0
|
@ -8,20 +8,16 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-kPjS+otVZ8aJmDDd7ywD88J5YLEayiIvoXqnrGE8KJA=";
|
sha256 = "sha256-kPjS+otVZ8aJmDDd7ywD88J5YLEayiIvoXqnrGE8KJA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://github.com/svaarala/duktape/issues/2464
|
||||||
|
LDFLAGS = [ "-lm" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ validatePkgConfig ];
|
nativeBuildInputs = [ validatePkgConfig ];
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace Makefile.sharedlibrary \
|
|
||||||
--replace 'gcc' '${stdenv.cc.targetPrefix}cc' \
|
|
||||||
--replace 'g++' '${stdenv.cc.targetPrefix}c++'
|
|
||||||
substituteInPlace Makefile.cmdline \
|
|
||||||
--replace 'gcc' '${stdenv.cc.targetPrefix}cc' \
|
|
||||||
--replace 'g++' '${stdenv.cc.targetPrefix}c++'
|
|
||||||
'';
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
make -f Makefile.sharedlibrary
|
make -f Makefile.sharedlibrary
|
||||||
make -f Makefile.cmdline
|
make -f Makefile.cmdline
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -d $out/bin
|
install -d $out/bin
|
||||||
install -m755 duk $out/bin/
|
install -m755 duk $out/bin/
|
||||||
|
@ -30,6 +26,7 @@ stdenv.mkDerivation rec {
|
||||||
make -f Makefile.sharedlibrary install INSTALL_PREFIX=$out
|
make -f Makefile.sharedlibrary install INSTALL_PREFIX=$out
|
||||||
substituteAll ${./duktape.pc.in} $out/lib/pkgconfig/duktape.pc
|
substituteAll ${./duktape.pc.in} $out/lib/pkgconfig/duktape.pc
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue