summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/archivers/sharutils
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@viric.name>2012-10-27 14:46:36 +0200
committerLluís Batlle i Rossell <viric@viric.name>2012-11-08 19:38:24 +0100
commit16dbe75e57cc52aa8dab4724efb837db7244ed0b (patch)
tree37391bd531345ab629fbaa2983573996a05b6ed1 /pkgs/tools/archivers/sharutils
parent86fa903f6c3be1b9d59c94931db1e771b4ac96f0 (diff)
sharutils: making them crossbuild, thanks to a patch.
Patch taken from: http://repository.timesys.com/buildsources/s/sharutils/sharutils-4.11.1/sharutils-4.11.1-cross-binary-mode-popen.patch after a google search for the guilty part of 'configure'.
Diffstat (limited to 'pkgs/tools/archivers/sharutils')
-rw-r--r--pkgs/tools/archivers/sharutils/default.nix4
-rw-r--r--pkgs/tools/archivers/sharutils/sharutils-4.11.1-cross-binary-mode-popen.patch63
2 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix
index 15b8ead7d38b..2773e112a49b 100644
--- a/pkgs/tools/archivers/sharutils/default.nix
+++ b/pkgs/tools/archivers/sharutils/default.nix
@@ -13,6 +13,10 @@ stdenv.mkDerivation rec {
doCheck = true;
+ crossAttrs = {
+ patches = [ ./sharutils-4.11.1-cross-binary-mode-popen.patch ];
+ };
+
meta = {
description = "GNU Sharutils, tools for remote synchronization and `shell archives'";
diff --git a/pkgs/tools/archivers/sharutils/sharutils-4.11.1-cross-binary-mode-popen.patch b/pkgs/tools/archivers/sharutils/sharutils-4.11.1-cross-binary-mode-popen.patch
new file mode 100644
index 000000000000..f05eab251d4c
--- /dev/null
+++ b/pkgs/tools/archivers/sharutils/sharutils-4.11.1-cross-binary-mode-popen.patch
@@ -0,0 +1,63 @@
+diff -Naur sharutils-4.11.1.orig/configure sharutils-4.11.1/configure
+--- sharutils-4.11.1.orig/configure 2011-06-20 11:07:40.000000000 -0400
++++ sharutils-4.11.1/configure 2011-06-20 11:09:30.000000000 -0400
+@@ -26962,33 +26962,33 @@
+ CATALOGS="$new_CATALOGS"
+ fi
+
+-if test "$cross_compiling" = yes; then :
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
+-See \`config.log' for more details" "$LINENO" 5; }
+-else
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-int
+-main ()
+-{
+- FILE * fp = popen ("date", "rb");
+- exit (fp == NULL);
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_run "$LINENO"; then :
+-
++#if test "$cross_compiling" = yes; then :
++# { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++#as_fn_error $? "cannot run test program while cross compiling
++#See \`config.log' for more details" "$LINENO" 5; }
++#else
++# cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++#/* end confdefs.h. */
++#
++#int
++#main ()
++#{
++# FILE * fp = popen ("date", "rb");
++# exit (fp == NULL);
++# ;
++# return 0;
++#}
++#_ACEOF
++#if ac_fn_c_try_run "$LINENO"; then :
++#
+ $as_echo "#define BINARY_MODE_POPEN 1" >>confdefs.h
+-
+-
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+- conftest.$ac_objext conftest.beam conftest.$ac_ext
+-fi
++#
++#
++#fi
++#rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++# conftest.$ac_objext conftest.beam conftest.$ac_ext
++#fi
+
+
+