The build system of sitecopy uses 'uname' to determine the operating
system for which it compiles sitecopy. However, on non-Linux hosts, this
leads to wrong results.

Fixes Darwin (tested on Mac OS 10.7 Lion).

Signed-off-by: Bernhard Walle <bernh...@bwalle.de>
---
 patches/sitecopy-0.16.6/autoconf-neon-darwin.diff |   44 +++++++++++++++++++++
 patches/sitecopy-0.16.6/autogen.sh                |    1 +
 patches/sitecopy-0.16.6/series                    |    1 +
 3 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100644 patches/sitecopy-0.16.6/autoconf-neon-darwin.diff
 create mode 120000 patches/sitecopy-0.16.6/autogen.sh

diff --git a/patches/sitecopy-0.16.6/autoconf-neon-darwin.diff 
b/patches/sitecopy-0.16.6/autoconf-neon-darwin.diff
new file mode 100644
index 0000000..245f684
--- /dev/null
+++ b/patches/sitecopy-0.16.6/autoconf-neon-darwin.diff
@@ -0,0 +1,44 @@
+---
+ m4/neon/neon.m4 |   23 +++++++++++------------
+ 1 file changed, 11 insertions(+), 12 deletions(-)
+
+--- a/m4/neon/neon.m4
++++ b/m4/neon/neon.m4
+@@ -410,19 +410,17 @@ fi
+ ])
+ 
+ AC_DEFUN([NE_CHECK_OS], [
+-# Check for Darwin, which needs extra cpp and linker flags.
+-AC_CACHE_CHECK([for uname], ne_cv_os_uname, [
+- ne_cv_os_uname=`uname -s 2>/dev/null`
+-])
+ 
+-if test "$ne_cv_os_uname" = "Darwin"; then
+-  CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
+-  LDFLAGS="$LDFLAGS -flat_namespace" 
+-  # poll has various issues in various Darwin releases
+-  if test x${ac_cv_func_poll+set} != xset; then
+-    ac_cv_func_poll=no
+-  fi
+-fi
++case "$host_os" in
++  darwin*)
++    CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
++    LDFLAGS="$LDFLAGS -flat_namespace"
++    # poll has various issues in various Darwin releases
++    if test x${ac_cv_func_poll+set} != xset; then
++      ac_cv_func_poll=no
++    fi
++    ;;
++esac
+ ])
+ 
+ AC_DEFUN([NEON_COMMON_CHECKS], [
+@@ -431,6 +429,7 @@ AC_DEFUN([NEON_COMMON_CHECKS], [
+ # is used.
+ 
+ AC_REQUIRE([AC_PROG_CC])
++AC_REQUIRE([AC_CANONICAL_SYSTEM])
+ AC_REQUIRE([AC_ISC_POSIX])
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_C_CONST])
diff --git a/patches/sitecopy-0.16.6/autogen.sh 
b/patches/sitecopy-0.16.6/autogen.sh
new file mode 120000
index 0000000..9f8a4cb
--- /dev/null
+++ b/patches/sitecopy-0.16.6/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/sitecopy-0.16.6/series b/patches/sitecopy-0.16.6/series
index c295b75..f84ad01 100644
--- a/patches/sitecopy-0.16.6/series
+++ b/patches/sitecopy-0.16.6/series
@@ -1 +1,2 @@
 sitecopy-neon-openssl.diff
+autoconf-neon-darwin.diff
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to