pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/xapian-omega Fix build on NetBSD (4.0, at lea...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4eedf15c55ed
branches:  trunk
changeset: 545118:4eedf15c55ed
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sun Jul 27 04:06:00 2008 +0000

description:
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:

 textproc/xapian-omega/Makefile         |   5 +-
 textproc/xapian-omega/distinfo         |   6 ++-
 textproc/xapian-omega/patches/patch-ac |  14 ++++++
 textproc/xapian-omega/patches/patch-ad |  23 ++++++++++
 textproc/xapian-omega/patches/patch-ae |  76 ++++++++++++++++++++++++++++++++++
 textproc/xapian-omega/patches/patch-af |  22 +++++++++
 6 files changed, 144 insertions(+), 2 deletions(-)

diffs (189 lines):

diff -r c14b6b577366 -r 4eedf15c55ed textproc/xapian-omega/Makefile
--- a/textproc/xapian-omega/Makefile    Sun Jul 27 00:11:05 2008 +0000
+++ b/textproc/xapian-omega/Makefile    Sun Jul 27 04:06:00 2008 +0000
@@ -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 @@
 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 -r c14b6b577366 -r 4eedf15c55ed textproc/xapian-omega/distinfo
--- a/textproc/xapian-omega/distinfo    Sun Jul 27 00:11:05 2008 +0000
+++ b/textproc/xapian-omega/distinfo    Sun Jul 27 04:06:00 2008 +0000
@@ -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 -r c14b6b577366 -r 4eedf15c55ed textproc/xapian-omega/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/xapian-omega/patches/patch-ac    Sun Jul 27 04:06:00 2008 +0000
@@ -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 -r c14b6b577366 -r 4eedf15c55ed textproc/xapian-omega/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/xapian-omega/patches/patch-ad    Sun Jul 27 04:06:00 2008 +0000
@@ -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 -r c14b6b577366 -r 4eedf15c55ed textproc/xapian-omega/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/xapian-omega/patches/patch-ae    Sun Jul 27 04:06:00 2008 +0000
@@ -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 -r c14b6b577366 -r 4eedf15c55ed textproc/xapian-omega/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/xapian-omega/patches/patch-af    Sun Jul 27 04:06:00 2008 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index