summaryrefslogtreecommitdiff
path: root/textproc/xapian-omega
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2008-07-27 04:06:00 +0000
committerschmonz <schmonz@pkgsrc.org>2008-07-27 04:06:00 +0000
commite16b509e2d2e24a6ba8d87eec8cd028e53c236c5 (patch)
tree2fa37eafcbe917a8d6e12b872e366f9e67ea3fde /textproc/xapian-omega
parent605bca5323b80d1ee50877ef7df848c92c583395 (diff)
downloadpkgsrc-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')
-rw-r--r--textproc/xapian-omega/Makefile5
-rw-r--r--textproc/xapian-omega/distinfo6
-rw-r--r--textproc/xapian-omega/patches/patch-ac14
-rw-r--r--textproc/xapian-omega/patches/patch-ad23
-rw-r--r--textproc/xapian-omega/patches/patch-ae76
-rw-r--r--textproc/xapian-omega/patches/patch-af22
6 files changed, 144 insertions, 2 deletions
diff --git a/textproc/xapian-omega/Makefile b/textproc/xapian-omega/Makefile
index d92d5dc59c7..fe84f7816ca 100644
--- a/textproc/xapian-omega/Makefile
+++ b/textproc/xapian-omega/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/07/26 23:37:29 schmonz Exp $
+# $NetBSD: Makefile,v 1.2 2008/07/27 04:06:00 schmonz Exp $
#
DISTNAME= xapian-omega-1.0.7
+PKGREVISION= 1
CATEGORIES= textproc
MASTER_SITES= http://oligarchy.co.uk/xapian/1.0.7/
@@ -14,6 +15,8 @@ CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
USE_LIBTOOL= yes
USE_LANGUAGES= c c++
+REPLACE_PERL= dbi2omega htdig2omega mbox2omega
+
SUBST_CLASSES+= files
SUBST_STAGE.files= do-configure
SUBST_FILES.files= omega.conf
diff --git a/textproc/xapian-omega/distinfo b/textproc/xapian-omega/distinfo
index 406eb17b25b..20f5c921ca0 100644
--- a/textproc/xapian-omega/distinfo
+++ b/textproc/xapian-omega/distinfo
@@ -1,7 +1,11 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/07/26 23:37:29 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2008/07/27 04:06:00 schmonz Exp $
SHA1 (xapian-omega-1.0.7.tar.gz) = a765c1d26f82bb25f4d1844757c0dddbc25a9f0d
RMD160 (xapian-omega-1.0.7.tar.gz) = 28d3171dd426e692b85e0ee4329bb4a7c0d4879e
Size (xapian-omega-1.0.7.tar.gz) = 498784 bytes
SHA1 (patch-aa) = ce457e51d62ecc8833b1f1f7b9aaeddf6f39bf98
SHA1 (patch-ab) = 6e845f6a61d7e36715b4a1bde217ff31ea0999e5
+SHA1 (patch-ac) = e8c47ba1e3853f54d8fffc90d55318b7d3c2047f
+SHA1 (patch-ad) = 1aa0b8d7a3a78d96edd087669ff46b76d1420a19
+SHA1 (patch-ae) = 1ebbce6ca463f12575baafef3a1acd3c2640bb5b
+SHA1 (patch-af) = 9f7536a6f3eb4001043acf010ba600b1803480c6
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);