ports/118197: [patch] textproc/mifluz unbreak fix install + upgrade to use GCC 4.2
Pietro Cerutti
gahr at gahr.ch
Thu Nov 22 12:50:01 UTC 2007
>Number: 118197
>Category: ports
>Synopsis: [patch] textproc/mifluz unbreak fix install + upgrade to use GCC 4.2
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Nov 22 12:50:00 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Pietro Cerutti
>Release: FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD 8.0-CURRENT #12: Tue Nov 20 17:46:40 CET 2007
root at gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034
>Description:
Fixes include:
- correctly build with GCC 4.2
- support for 64 bits platforms
- installation issue due to objformat removal (thanks miwi)
- tested on:
6.2-RELEASE-p6 i386
7.0-BETA3 sparc64
8.0-CURRENT i386
>How-To-Repeat:
cd /usr/ports/textproc/mifluz && make
>Fix:
--- _mifluz.diff begins here ---
--- Makefile.orig 2007-11-22 13:18:38.000000000 +0100
+++ Makefile 2007-11-22 13:19:57.000000000 +0100
@@ -19,9 +19,9 @@
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 @@
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 @@
@${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>
--- /dev/null 2007-11-22 11:44:00.000000000 +0100
+++ files/patch-mifluz_WordCursorOne.cc 2007-11-22 11:41:55.000000000 +0100
@@ -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())
+ {
--- /dev/null 2007-11-22 11:44:00.000000000 +0100
+++ files/patch-search_WordKeySemantic.cc 2007-11-22 11:43:24.000000000 +0100
@@ -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;
+
--- files/patch-configure.orig 2007-11-22 11:53:50.000000000 +0100
+++ files/patch-configure 2007-11-22 11:51:46.000000000 +0100
@@ -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; }
--- /dev/null 2007-11-22 12:22:00.000000000 +0100
+++ files/patch-mifluz_WordDBCache.h 2007-11-22 12:16:38.000000000 +0100
@@ -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;
+ }
--- /dev/null 2007-11-22 12:22:00.000000000 +0100
+++ files/patch-db_db_int.h 2007-11-22 12:25:42.000000000 +0100
@@ -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
--- /dev/null 2007-11-22 12:36:55.000000000 +0100
+++ files/patch-search_WordResults.cc 2007-11-22 12:40:16.000000000 +0100
@@ -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;
+ }
+
--- _mifluz.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list