diff options
author | schmonz <schmonz@pkgsrc.org> | 2008-07-27 04:06:00 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2008-07-27 04:06:00 +0000 |
commit | e16b509e2d2e24a6ba8d87eec8cd028e53c236c5 (patch) | |
tree | 2fa37eafcbe917a8d6e12b872e366f9e67ea3fde /textproc/xapian-omega/patches | |
parent | 605bca5323b80d1ee50877ef7df848c92c583395 (diff) | |
download | pkgsrc-e16b509e2d2e24a6ba8d87eec8cd028e53c236c5.tar.gz |
Fix build on NetBSD (4.0, at least): include <signal.h> and avoid
RLIMIT_AS on systems without it. Also fix path to Perl interpreter
in installed scripts, and as a result, bump PKGREVISION.
Diffstat (limited to 'textproc/xapian-omega/patches')
-rw-r--r-- | textproc/xapian-omega/patches/patch-ac | 14 | ||||
-rw-r--r-- | textproc/xapian-omega/patches/patch-ad | 23 | ||||
-rw-r--r-- | textproc/xapian-omega/patches/patch-ae | 76 | ||||
-rw-r--r-- | textproc/xapian-omega/patches/patch-af | 22 |
4 files changed, 135 insertions, 0 deletions
diff --git a/textproc/xapian-omega/patches/patch-ac b/textproc/xapian-omega/patches/patch-ac new file mode 100644 index 00000000000..076d7210b62 --- /dev/null +++ b/textproc/xapian-omega/patches/patch-ac @@ -0,0 +1,14 @@ +$NetBSD: patch-ac,v 1.1 2008/07/27 04:06:00 schmonz Exp $ + +--- config.h.in.orig 2008-07-16 00:46:58.000000000 -0400 ++++ config.h.in +@@ -45,6 +45,9 @@ + /* Define to 1 if you have the `pstat_getdynamic' function. */ + #undef HAVE_PSTAT_GETDYNAMIC + ++/* Define to 1 if you have RLIMIT_AS for setrlimit(). */ ++#undef HAVE_RLIMIT_AS ++ + /* Define to 1 if you have the `setrlimit' function. */ + #undef HAVE_SETRLIMIT + diff --git a/textproc/xapian-omega/patches/patch-ad b/textproc/xapian-omega/patches/patch-ad new file mode 100644 index 00000000000..8665517cb17 --- /dev/null +++ b/textproc/xapian-omega/patches/patch-ad @@ -0,0 +1,23 @@ +$NetBSD: patch-ad,v 1.1 2008/07/27 04:06:00 schmonz Exp $ + +--- configure.ac.orig 2008-07-16 00:42:17.000000000 -0400 ++++ configure.ac +@@ -108,6 +108,18 @@ dnl omindex uses fork(), socketpair(), a + dnl limits on filter programs. + AC_CHECK_FUNCS([mmap fork setrlimit socketpair sysmp pstat_getdynamic]) + ++dnl * Do we have RLIMIT_AS? ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++ #include <sys/types.h> ++ #include <sys/time.h> ++ #include <sys/resource.h> ++]], [[ ++ struct rlimit r; ++ getrlimit(RLIMIT_AS, &r); ++]])],[ ++ AC_DEFINE(HAVE_RLIMIT_AS,, Define if you have RLIMIT_AS for setrlimit()) ++],[]) ++ + dnl Check that snprintf actually works as it's meant to. + dnl + dnl Linux 'man snprintf' warns: diff --git a/textproc/xapian-omega/patches/patch-ae b/textproc/xapian-omega/patches/patch-ae new file mode 100644 index 00000000000..c9bcc35561c --- /dev/null +++ b/textproc/xapian-omega/patches/patch-ae @@ -0,0 +1,76 @@ +$NetBSD: patch-ae,v 1.1 2008/07/27 04:06:00 schmonz Exp $ + +--- configure.orig 2008-07-26 23:26:32.000000000 -0400 ++++ configure +@@ -15850,6 +15850,62 @@ fi + done + + ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++ #include <sys/types.h> ++ #include <sys/time.h> ++ #include <sys/resource.h> ++ ++int ++main () ++{ ++ ++ struct rlimit r; ++ getrlimit(RLIMIT_AS, &r); ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" ++$as_echo "$ac_try_echo") >&5 ++ (eval "$ac_compile") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ++ ++cat >>confdefs.h <<\_ACEOF ++#define HAVE_RLIMIT_AS /**/ ++_ACEOF ++ ++ ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + { $as_echo "$as_me:$LINENO: checking for working ISO C90 conforming snprintf" >&5 + $as_echo_n "checking for working ISO C90 conforming snprintf... " >&6; } + ac_cv_func_snprintf_noniso=no +@@ -17492,6 +17548,8 @@ do + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ++ : Avoid regenerating within pkgsrc ++ exit 0 + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; diff --git a/textproc/xapian-omega/patches/patch-af b/textproc/xapian-omega/patches/patch-af new file mode 100644 index 00000000000..d0371f066e3 --- /dev/null +++ b/textproc/xapian-omega/patches/patch-af @@ -0,0 +1,22 @@ +$NetBSD: patch-af,v 1.1 2008/07/27 04:06:00 schmonz Exp $ + +--- runfilter.cc.orig 2008-07-16 00:42:17.000000000 -0400 ++++ runfilter.cc +@@ -39,6 +39,7 @@ + #ifdef HAVE_SYS_SOCKET_H + # include <sys/socket.h> + #endif ++#include <signal.h> + #include "safeunistd.h" + + #include "freemem.h" +@@ -94,7 +95,9 @@ stdout_to_string(const string &cmd) + if (mem > 0) { + mem = (mem / 8) * 7; + struct rlimit ram_limit = { mem, RLIM_INFINITY } ; ++#ifdef HAVE_RLIMIT_AS + setrlimit(RLIMIT_AS, &ram_limit); ++#endif + } + + execl("/bin/sh", "/bin/sh", "-c", cmd.c_str(), (void*)NULL); |