aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--textproc/mifluz/Makefile14
-rw-r--r--textproc/mifluz/files/patch-configure52
-rw-r--r--textproc/mifluz/files/patch-db_db_int.h15
-rw-r--r--textproc/mifluz/files/patch-mifluz_WordCursorOne.cc11
-rw-r--r--textproc/mifluz/files/patch-mifluz_WordDBCache.h13
-rw-r--r--textproc/mifluz/files/patch-search_WordKeySemantic.cc11
-rw-r--r--textproc/mifluz/files/patch-search_WordResults.cc25
7 files changed, 130 insertions, 11 deletions
diff --git a/textproc/mifluz/Makefile b/textproc/mifluz/Makefile
index 46d5b01478f1..4fb37feb766f 100644
--- a/textproc/mifluz/Makefile
+++ b/textproc/mifluz/Makefile
@@ -19,9 +19,9 @@ USE_ICONV= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-libiconv-prefix=${LOCALBASE} --without-unac
USE_LDCONFIG= yes
+USE_AUTOTOOLS= libtool:15
USE_BISON= build
-USE_GCC= 2.95
MAN1= htdb_dump.1 htdb_stat.1 htdb_load.1 mifluzdump.1 mifluzload.1 \
mifluzsearch.1 mifluzdict.1
@@ -35,7 +35,9 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
post-patch:
@${REINPLACE_CMD} 's|-D_THREAD_SAFE -pthread|${PTHREAD_CFLAGS}|g ; \
- s|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
+ s|-lpthread|${PTHREAD_LIBS}|g ;\
+ s|echo aout|echo elf|g' \
+ ${WRKSRC}/configure
post-install:
@${SED} -e "s:%%PREFIX%%:${PREFIX}:g" ${PKGDIR}/pkg-message > \
@@ -44,10 +46,4 @@ post-install:
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN= fails to install
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/textproc/mifluz/files/patch-configure b/textproc/mifluz/files/patch-configure
index 23cb43a29ff9..1b383922de08 100644
--- a/textproc/mifluz/files/patch-configure
+++ b/textproc/mifluz/files/patch-configure
@@ -1,5 +1,5 @@
---- configure.orig Mon Jul 23 21:55:39 2001
-+++ configure Mon Jul 29 22:29:47 2002
+--- configure.orig 2001-07-23 14:55:39.000000000 +0200
++++ configure 2007-11-22 11:39:14.000000000 +0100
@@ -5982,6 +5982,7 @@
# This can be used to rebuild libtool when needed
@@ -8,3 +8,51 @@
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+@@ -6322,7 +6323,7 @@
+ LIBS="-lipc $LIBS";;
+ bsdi*) optimize_def="-O2";;
+ freebsd*) optimize_def="-O2"
+- CPPFLAGS="-D_THREAD_SAFE -pthread $CPPFLAGS";;
++ CPPFLAGS=" $CPPFLAGS";;
+ hpux*) CPPFLAGS="-D_REENTRANT $CPPFLAGS";;
+ irix*) optimize_def="-O2"
+ CPPFLAGS="-D_SGI_MP_SOURCE $CPPFLAGS";;
+@@ -7851,7 +7852,7 @@
+
+ fi
+ if test "$db_cv_mutex" = no; then
+-LIBS="-lpthread $LIBS"
++LIBS="-pthread $LIBS"
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+ else
+@@ -8354,7 +8355,7 @@
+ #define HAVE_MUTEX_PTHREADS 1
+ EOF
+ ;;
+-POSIX/pthreads/library) LIBS="-lpthread $LIBS"
++POSIX/pthreads/library) LIBS="-pthread $LIBS"
+ cat >> confdefs.h <<\EOF
+ #define HAVE_MUTEX_PTHREAD 1
+ EOF
+@@ -9702,16 +9703,16 @@
+ fi
+ done
+
+-ac_safe=`echo "fstream.h" | sed 'y%./+-%__p_%'`
+-echo $ac_n "checking for fstream.h""... $ac_c" 1>&6
+-echo "configure:9708: checking for fstream.h" >&5
++ac_safe=`echo "fstream" | sed 'y%./+-%__p_%'`
++echo $ac_n "checking for fstream""... $ac_c" 1>&6
++echo "configure:9708: checking for fstream" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+ #line 9713 "configure"
+ #include "confdefs.h"
+-#include <fstream.h>
++#include <fstream>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:9718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
diff --git a/textproc/mifluz/files/patch-db_db_int.h b/textproc/mifluz/files/patch-db_db_int.h
new file mode 100644
index 000000000000..8cdb2d6699fe
--- /dev/null
+++ b/textproc/mifluz/files/patch-db_db_int.h
@@ -0,0 +1,15 @@
+--- db/db_int.h.orig 2007-11-22 12:18:53.000000000 +0100
++++ db/db_int.h 2007-11-22 12:24:32.000000000 +0100
+@@ -108,10 +108,10 @@
+ * an array.
+ */
+ #undef SSZ
+-#define SSZ(name, field) ((int)&(((name *)0)->field))
++#define SSZ(name, field) ((size_t)&(((name *)0)->field))
+
+ #undef SSZA
+-#define SSZA(name, field) ((int)&(((name *)0)->field[0]))
++#define SSZA(name, field) ((size_t)&(((name *)0)->field[0]))
+
+ /*
+ * Print an address as a u_long (a u_long is the largest type we can print
diff --git a/textproc/mifluz/files/patch-mifluz_WordCursorOne.cc b/textproc/mifluz/files/patch-mifluz_WordCursorOne.cc
new file mode 100644
index 000000000000..00136dff8fed
--- /dev/null
+++ b/textproc/mifluz/files/patch-mifluz_WordCursorOne.cc
@@ -0,0 +1,11 @@
+--- mifluz/WordCursorOne.cc.orig 2007-11-22 11:41:12.000000000 +0100
++++ mifluz/WordCursorOne.cc 2007-11-22 11:41:27.000000000 +0100
+@@ -44,7 +44,7 @@
+ }
+
+ // *****************************************************************************
+-WordCursorOne::WordCursorOne(WordList *words, const WordKey &searchKey, int action = HTDIG_WORDLIST_WALKER) :
++WordCursorOne::WordCursorOne(WordList *words, const WordKey &searchKey, int action) :
+ WordCursor(words->GetContext()),
+ prefixKey(words->GetContext())
+ {
diff --git a/textproc/mifluz/files/patch-mifluz_WordDBCache.h b/textproc/mifluz/files/patch-mifluz_WordDBCache.h
new file mode 100644
index 000000000000..003a663fc357
--- /dev/null
+++ b/textproc/mifluz/files/patch-mifluz_WordDBCache.h
@@ -0,0 +1,13 @@
+--- mifluz/WordDBCache.h.orig 2007-11-22 12:12:34.000000000 +0100
++++ mifluz/WordDBCache.h 2007-11-22 12:15:53.000000000 +0100
+@@ -149,8 +149,8 @@
+ inline int Absolute() {
+ int i;
+ for(i = 0; i < entries_length; i++) {
+- entries[i].key = pool + (int)(entries[i].key);
+- entries[i].data = pool + (int)(entries[i].data);
++ entries[i].key = pool + (long)(entries[i].key);
++ entries[i].data = pool + (long)(entries[i].data);
+ }
+ return OK;
+ }
diff --git a/textproc/mifluz/files/patch-search_WordKeySemantic.cc b/textproc/mifluz/files/patch-search_WordKeySemantic.cc
new file mode 100644
index 000000000000..cd72f8f857ab
--- /dev/null
+++ b/textproc/mifluz/files/patch-search_WordKeySemantic.cc
@@ -0,0 +1,11 @@
+--- search/WordKeySemantic.cc.orig 2007-11-22 11:42:09.000000000 +0100
++++ search/WordKeySemantic.cc 2007-11-22 11:42:58.000000000 +0100
+@@ -134,7 +134,7 @@
+ }
+ }
+
+-int WordKeySemantic::LocationCompare(const WordKey& expected, const WordKey& actual, int proximity = 0)
++int WordKeySemantic::LocationCompare(const WordKey& expected, const WordKey& actual, int proximity)
+ {
+ int ret = 1;
+
diff --git a/textproc/mifluz/files/patch-search_WordResults.cc b/textproc/mifluz/files/patch-search_WordResults.cc
new file mode 100644
index 000000000000..327abfc3bc0d
--- /dev/null
+++ b/textproc/mifluz/files/patch-search_WordResults.cc
@@ -0,0 +1,25 @@
+--- search/WordResults.cc.orig 2007-11-22 12:37:28.000000000 +0100
++++ search/WordResults.cc 2007-11-22 12:39:52.000000000 +0100
+@@ -25,11 +25,11 @@
+
+ static int wordResults_cmp(const DBT* a, const DBT* b)
+ {
+- int length = (int)a->app_private;
++ size_t length = (size_t)a->app_private;
+
+ WordKeyNum* a_values = (WordKeyNum*)a->data;
+ WordKeyNum* b_values = (WordKeyNum*)b->data;
+- for(int i = 0; i < length; i++) {
++ for(size_t i = 0; i < length; i++) {
+ if(a_values[i] != b_values[i]) {
+ return a_values[i] > b_values[i] ? 1 : -1;
+ }
+@@ -198,7 +198,7 @@
+ }
+
+ if((error = ranked->set_re_len(ranked, sizeof(WordKeyNum) * document_length)) != 0) {
+- fprintf(stderr, "WordResults::Open ranked->set_re_len(%d) failed: %s\n", sizeof(WordKeyNum) * document_length, CDB_db_strerror(error));
++ fprintf(stderr, "WordResults::Open ranked->set_re_len(%lu) failed: %s\n", sizeof(WordKeyNum) * document_length, CDB_db_strerror(error));
+ return NOTOK;
+ }
+