runit: Enable cross-compilation

This commit is contained in:
Ben Gamari 2017-10-29 14:00:31 -04:00 committed by John Ericson
parent d8c744b862
commit 6971c503af
2 changed files with 24 additions and 2 deletions

@ -13,6 +13,10 @@ stdenv.mkDerivation rec {
sha256 = "065s8w62r6chjjs6m9hapcagy33m75nlnxb69vg0f4ngn061dl3g";
};
patches = [
./fix-ar-ranlib.patch
];
outputs = [ "out" "man" ];
sourceRoot = "admin/${name}";
@ -34,8 +38,8 @@ stdenv.mkDerivation rec {
cd src
# Both of these are originally hard-coded to gcc
echo cc > conf-cc
echo cc > conf-ld
echo ${stdenv.cc.targetPrefix}cc > conf-cc
echo ${stdenv.cc.targetPrefix}cc > conf-ld
'';
installPhase = ''

@ -0,0 +1,18 @@
--- runit-2.1.2/src/print-ar.sh
+++ runit-2.1.2/src/print-ar.sh
@@ -1,7 +1,7 @@
cat warn-auto.sh
echo 'main="$1"; shift'
echo 'rm -f "$main"'
-echo 'ar cr "$main" ${1+"$@"}'
+echo '$AR cr "$main" ${1+"$@"}'
case "`cat systype`" in
sunos-5.*) ;;
unix_sv*) ;;
@@ -10,5 +10,5 @@ case "`cat systype`" in
dgux-*) ;;
hp-ux-*) ;;
sco*) ;;
- *) echo 'ranlib "$main"' ;;
+ *) echo '$RANLIB "$main"' ;;
esac