From 93f41f5ad35b0f0d110bb537d178de78d5d13b47 Mon Sep 17 00:00:00 2001 From: Marco Maggesi Date: Wed, 6 Jun 2012 21:44:20 +0000 Subject: [PATCH] Fix build of apr on darwin svn path=/nixpkgs/trunk/; revision=34374 --- .../libraries/apr/darwin_fix_configure.patch | 17 +++++++++++++++++ pkgs/development/libraries/apr/default.nix | 6 ++++++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/development/libraries/apr/darwin_fix_configure.patch diff --git a/pkgs/development/libraries/apr/darwin_fix_configure.patch b/pkgs/development/libraries/apr/darwin_fix_configure.patch new file mode 100644 index 000000000000..84d3f2078700 --- /dev/null +++ b/pkgs/development/libraries/apr/darwin_fix_configure.patch @@ -0,0 +1,17 @@ +diff -Nuar apr-1.4.6/configure apr-1.4.6-darwin-fix-configure/configure +--- apr-1.4.6/configure 2012-02-08 00:17:57.000000000 +0100 ++++ apr-1.4.6-darwin-fix-configure/configure 2012-06-06 23:08:56.000000000 +0200 +@@ -6854,10 +6854,10 @@ + *-apple-darwin*) + + if test "x$CPPFLAGS" = "x"; then +- test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp\"" +- CPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp" ++ test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK\"" ++ CPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK" + else +- apr_addto_bugger="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp" ++ apr_addto_bugger="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $CPPFLAGS; do diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix index a0b9017d35fe..8c3d5c03496e 100644 --- a/pkgs/development/libraries/apr/default.nix +++ b/pkgs/development/libraries/apr/default.nix @@ -1,5 +1,9 @@ { stdenv, fetchurl }: +let + inherit (stdenv.lib) optionals; +in + stdenv.mkDerivation rec { name = "apr-1.4.6"; @@ -8,6 +12,8 @@ stdenv.mkDerivation rec { md5 = "ffee70a111fd07372982b0550bbb14b7"; }; + patches = optionals stdenv.isDarwin [ ./darwin_fix_configure.patch ]; + configureFlags = # Don't use accept4 because it's only supported on Linux >= 2.6.28. [ "apr_cv_accept4=no" ]