mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-07 20:53:22 +00:00
Merge pull request #182430 from NickCao/duktape
duktape: force link shared library against libm
This commit is contained in:
commit
42ca9bef09
@ -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 New Issue
Block a user