Merge #56143: luajit, lmdb, knot-resolver: cross-fixes
This commit is contained in:
commit
e52396ce2c
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, fetchurl
|
{ stdenv, lib, fetchurl, buildPackages
|
||||||
, name ? "luajit-${version}"
|
, name ? "luajit-${version}"
|
||||||
, isStable
|
, isStable
|
||||||
, sha256
|
, sha256
|
||||||
@ -20,24 +20,23 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
luaversion = "5.1";
|
luaversion = "5.1";
|
||||||
|
|
||||||
patchPhase = ''
|
postPatch = ''
|
||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile --replace ldconfig :
|
||||||
--replace /usr/local "$out"
|
|
||||||
|
|
||||||
substituteInPlace src/Makefile --replace gcc cc
|
|
||||||
'' + stdenv.lib.optionalString (stdenv.cc.libc != null)
|
|
||||||
''
|
|
||||||
substituteInPlace Makefile \
|
|
||||||
--replace ldconfig ${stdenv.cc.libc.bin or stdenv.cc.libc}/bin/ldconfig
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = false;
|
configurePhase = false;
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"PREFIX=$(out)"
|
||||||
|
"DEFAULT_CC=cc"
|
||||||
|
"CROSS=${stdenv.cc.targetPrefix}"
|
||||||
|
# TODO: when pointer size differs, we would need e.g. -m32
|
||||||
|
"HOST_CC=${buildPackages.stdenv.cc}/bin/cc"
|
||||||
|
];
|
||||||
buildFlags = [ "amalg" ]; # Build highly optimized version
|
buildFlags = [ "amalg" ]; # Build highly optimized version
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
installPhase = ''
|
postInstall = ''
|
||||||
make install PREFIX="$out"
|
|
||||||
( cd "$out/include"; ln -s luajit-*/* . )
|
( cd "$out/include"; ln -s luajit-*/* . )
|
||||||
ln -s "$out"/bin/luajit-* "$out"/bin/lua
|
ln -s "$out"/bin/luajit-* "$out"/bin/lua
|
||||||
''
|
''
|
||||||
|
@ -18,7 +18,11 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
outputs = [ "bin" "out" "dev" ];
|
outputs = [ "bin" "out" "dev" ];
|
||||||
|
|
||||||
makeFlags = [ "prefix=$(out)" "CC=cc" ]
|
makeFlags = [
|
||||||
|
"prefix=$(out)"
|
||||||
|
"CC=${stdenv.cc.targetPrefix}cc"
|
||||||
|
"AR=${stdenv.cc.targetPrefix}ar"
|
||||||
|
]
|
||||||
++ stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so";
|
++ stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so";
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
@ -19,6 +19,11 @@ unwrapped = stdenv.mkDerivation rec {
|
|||||||
sha256 = "d1396888ec3a63f19dccdf2b7dbcb0d16a5d8642766824b47f4c21be90ce362b";
|
sha256 = "d1396888ec3a63f19dccdf2b7dbcb0d16a5d8642766824b47f4c21be90ce362b";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Short-lived cross fix, as upstream is migrating to meson anyway.
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace platform.mk --replace "objdump" "$OBJDUMP"
|
||||||
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
configurePhase = "patchShebangs scripts/";
|
configurePhase = "patchShebangs scripts/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user