ports/126441: textproc/isearch fix build with gcc4.2

Pedro F. Giffuni giffunip at tutopia.com
Mon Aug 11 04:20:02 UTC 2008


>Number:         126441
>Category:       ports
>Synopsis:       textproc/isearch fix build with gcc4.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 11 04:20:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Pedro F. Giffuni
>Release:        7.0-Release
>Organization:
>Environment:
FreeBSD kakumen.cable.net.co 7.0-RELEASE-p3 FreeBSD 7.0-RELEASE-p3 #0: Fri Aug  8 16:42:27 COT 2008     root at kakumen.cable.net.co:/usr/src/sys/amd64/compile/GENERIC  amd64
>Description:
- Fix build with gcc4.2 and amd64: remove -fwritable-strings.
- Remove GNU_CONFIGURE since it was doing nothing: respect CXX CXXFLAGS.
- Clean some warnings related to deprecated C++ headers.
>How-To-Repeat:

>Fix:
diff -ruN isearch.orig/Makefile isearch/Makefile
--- isearch.orig/Makefile	2008-08-10 19:57:16.000000000 -0500
+++ isearch/Makefile	2008-08-10 23:07:08.000000000 -0500
@@ -1,6 +1,6 @@
 # New ports collection makefile for:   isearch
 # Date created:			21 Sept 1996
-# Whom:				Pedro
+# Whom:				Pedro Giffuni
 #
 # $FreeBSD: ports/textproc/isearch/Makefile,v 1.21 2007/09/30 09:49:40 linimon Exp $
 #
@@ -14,7 +14,6 @@
 MAINTAINER=	pmarquis at pobox.com
 COMMENT=	Text Search Engine by CNIDR
 
-GNU_CONFIGURE=	yes
 MAKE_ARGS=	INSTALL=${PREFIX}/bin
 
 post-install:
@@ -23,10 +22,4 @@
 	${INSTALL_MAN} ${WRKSRC}/html/*.html ${DOCSDIR}
 .endif
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN=		Does not compile with GCC 4.2
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN isearch.orig/files/patch-Makefile isearch/files/patch-Makefile
--- isearch.orig/files/patch-Makefile	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-Makefile	2008-08-10 22:45:12.000000000 -0500
@@ -0,0 +1,53 @@
+--- Makefile.orig	2000-10-12 15:55:56.000000000 -0500
++++ Makefile	2008-08-10 22:44:02.000000000 -0500
+@@ -23,9 +23,9 @@
+ #
+ # Compiler
+ #
+-CC=g++
++CC=${CXX}
+ 
+-DTCC=g++
++DTCC=${CXX}
+ #CC=/sw/CenterLine/bin/CC
+ 
+ #
+@@ -45,7 +45,7 @@
+ #
+ # for Linux
+ #
+-CFLAGS=-O2 -DUNIX -fwritable-strings
++CFLAGS+=-O2 -DUNIX ${CXXFLAGS}
+ #CFLAGS=-g -fwritable-strings -Wall -Wno-unused -DUNIX # -DVERBOSE -DDEBUG
+ 
+ #
+@@ -76,8 +76,8 @@
+ #
+ # Where should I install executables (make install)?
+ #
+-INSTALL=/usr/local/bin
+-CGI_INSTALL=/home/httpd/cgi-bin
++INSTALL=${PREFIX}/bin
++CGI_INSTALL=${PREFIX}/www/cgi-bin
+ 
+ #
+ # Executables Directory
+@@ -189,12 +189,12 @@
+ 
+ install:
+ 	@echo "*** Copying Isearch executables to $(INSTALL) ***"
+-	cp $(BIN_DIR)/Iindex $(INSTALL)
+-	cp $(BIN_DIR)/Isearch $(INSTALL)
+-	cp $(BIN_DIR)/Iutil $(INSTALL)
+-	cp $(BIN_DIR)/Iget $(INSTALL)
+-	cp $(BIN_DIR)/zsearch $(INSTALL)
+-	cp $(BIN_DIR)/zpresent $(INSTALL)
++	install -s $(BIN_DIR)/Iindex $(INSTALL)
++	install -s $(BIN_DIR)/Isearch $(INSTALL)
++	install -s $(BIN_DIR)/Iutil $(INSTALL)
++	install -s $(BIN_DIR)/Iget $(INSTALL)
++	install -s $(BIN_DIR)/zsearch $(INSTALL)
++	install -s $(BIN_DIR)/zpresent $(INSTALL)
+ 	@echo ""
+ 	@echo "To install Isearch-cgi, cd into the Isearch-cgi directory"
+ 	@echo "Then run the configure script"
diff -ruN isearch.orig/files/patch-doctype+Makefile isearch/files/patch-doctype+Makefile
--- isearch.orig/files/patch-doctype+Makefile	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-doctype+Makefile	2008-08-10 20:23:08.000000000 -0500
@@ -0,0 +1,20 @@
+--- doctype/Makefile.orig	2008-08-10 20:21:14.000000000 -0500
++++ doctype/Makefile	2008-08-10 20:22:13.000000000 -0500
+@@ -2,7 +2,7 @@
+ #
+ # Compiler
+ #
+-CC=g++
++CC=${CXX}
+ 
+ #
+ # Compiler Flags
+@@ -13,7 +13,7 @@
+ 
+ #CFLAGS=-DUNIX -O2
+ #CFLAGS=-g -DUNIX -Wall -O2
+-CFLAGS=-g -DUNIX -Wall -D__CSTRING__
++CFLAGS= -DUNIX -D__CSTRING__
+ 
+ #
+ # Source Files Directory
diff -ruN isearch.orig/files/patch-src+string::hxx isearch/files/patch-src+string::hxx
--- isearch.orig/files/patch-src+string::hxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src+string::hxx	2008-08-10 20:51:01.000000000 -0500
@@ -0,0 +1,12 @@
+--- src/string.hxx.orig	2008-08-10 20:45:33.000000000 -0500
++++ src/string.hxx	2008-08-10 20:46:39.000000000 -0500
+@@ -44,7 +44,8 @@
+ #define STRING_HXX
+ 
+ #include <string.h>
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ #include "gdt.h"
+ #include "defs.hxx"
+ 
diff -ruN isearch.orig/files/patch-src::Iindex.cxx isearch/files/patch-src::Iindex.cxx
--- isearch.orig/files/patch-src::Iindex.cxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src::Iindex.cxx	2008-08-10 22:53:47.000000000 -0500
@@ -0,0 +1,11 @@
+--- src/Iindex.cxx.orig	2008-08-10 22:50:36.000000000 -0500
++++ src/Iindex.cxx	2008-08-10 22:52:14.000000000 -0500
+@@ -170,7 +170,7 @@
+ 	}
+       }
+       if (Found) {
+-	Offset = (GPTYPE)((UINT4)Found - (UINT4)Buffer);
++	Offset = (GPTYPE)((UINT8)Found - (UINT8)Buffer);
+ 	/* the separator marks the beginning of the next 
+ 	   record. (offset - 1), then marks the end of 
+ 	   the current record. we must make sure that the
diff -ruN isearch.orig/files/patch-src::fc.hxx isearch/files/patch-src::fc.hxx
--- isearch.orig/files/patch-src::fc.hxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src::fc.hxx	2008-08-10 20:48:57.000000000 -0500
@@ -0,0 +1,12 @@
+--- src/fc.hxx.orig	2008-08-10 20:45:08.000000000 -0500
++++ src/fc.hxx	2008-08-10 20:47:33.000000000 -0500
+@@ -8,7 +8,8 @@
+ #ifndef FC_HXX
+ #define FC_HXX
+ 
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ /*
+ #include "defs.hxx"
+ */
diff -ruN isearch.orig/files/patch-src::fct.cxx isearch/files/patch-src::fct.cxx
--- isearch.orig/files/patch-src::fct.cxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src::fct.cxx	2008-08-10 21:06:17.000000000 -0500
@@ -0,0 +1,12 @@
+--- src/fct.cxx.orig	2008-08-10 21:01:26.000000000 -0500
++++ src/fct.cxx	2008-08-10 21:05:15.000000000 -0500
+@@ -6,7 +6,8 @@
+ @@@*/
+ 
+ #include <stdlib.h>
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ 
+ #include "defs.hxx"
+ #include "string.hxx"
diff -ruN isearch.orig/files/patch-src::intlist.cxx isearch/files/patch-src::intlist.cxx
--- isearch.orig/files/patch-src::intlist.cxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src::intlist.cxx	2008-08-10 21:06:49.000000000 -0500
@@ -0,0 +1,12 @@
+--- src/intlist.cxx.orig	2008-08-10 21:01:51.000000000 -0500
++++ src/intlist.cxx	2008-08-10 21:03:34.000000000 -0500
+@@ -47,7 +47,8 @@
+ 
+ #include <stdlib.h>
+ #include <time.h>
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ 
+ #include "intlist.hxx"
+ 
diff -ruN isearch.orig/files/patch-src::intlist.hxx isearch/files/patch-src::intlist.hxx
--- isearch.orig/files/patch-src::intlist.hxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src::intlist.hxx	2008-08-10 20:49:50.000000000 -0500
@@ -0,0 +1,12 @@
+--- src/intlist.hxx.orig	2008-08-10 20:45:21.000000000 -0500
++++ src/intlist.hxx	2008-08-10 20:47:28.000000000 -0500
+@@ -50,7 +50,8 @@
+ 
+ #include <stdlib.h>
+ #include <time.h>
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ 
+ #include "gdt.h"
+ #include "defs.hxx"
diff -ruN isearch.orig/files/patch-src::mergeunit.hxx isearch/files/patch-src::mergeunit.hxx
--- isearch.orig/files/patch-src::mergeunit.hxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src::mergeunit.hxx	2008-08-10 22:36:54.000000000 -0500
@@ -0,0 +1,10 @@
+--- src/mergeunit.hxx.orig	1998-05-12 16:49:13.000000000 +0000
++++ src/mergeunit.hxx	2007-12-01 16:40:09.000000000 +0000
+@@ -49,6 +49,7 @@ Author:		Jim Fullton, MCNC/CNIDR
+ 
+ #include "defs.hxx"
+ #include "idbobj.hxx"
++#include "filemap.hxx"
+ 
+ #define LIM 10000
+ 
diff -ruN isearch.orig/files/patch-src::nlist.cxx isearch/files/patch-src::nlist.cxx
--- isearch.orig/files/patch-src::nlist.cxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src::nlist.cxx	2008-08-10 21:07:07.000000000 -0500
@@ -0,0 +1,12 @@
+--- src/nlist.cxx.orig	2008-08-10 21:02:00.000000000 -0500
++++ src/nlist.cxx	2008-08-10 21:03:22.000000000 -0500
+@@ -45,7 +45,8 @@
+ @@@*/
+ 
+ #include <stdlib.h>
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ 
+ #include "nlist.hxx"
+ 
diff -ruN isearch.orig/files/patch-src::opstack.hxx isearch/files/patch-src::opstack.hxx
--- isearch.orig/files/patch-src::opstack.hxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src::opstack.hxx	2008-08-10 22:36:32.000000000 -0500
@@ -0,0 +1,11 @@
+--- src/opstack.hxx.orig	1996-12-21 00:41:10.000000000 +0000
++++ src/opstack.hxx	2007-12-01 16:38:59.000000000 +0000
+@@ -57,7 +57,7 @@ public:
+ 	OPSTACK& operator<<(OPOBJ* Op);
+ 	POPOBJ operator>>(POPOBJ& OpPtr);
+  	PIRSET operator>>(PIRSET& OpPtr);
+-	void OPSTACK::Reverse();
++	void Reverse();
+ 	~OPSTACK();
+ private:
+ 	void Push(OPOBJ& Op);
diff -ruN isearch.orig/files/patch-src::registry.cxx isearch/files/patch-src::registry.cxx
--- isearch.orig/files/patch-src::registry.cxx	1969-12-31 19:00:00.000000000 -0500
+++ isearch/files/patch-src::registry.cxx	2008-08-10 20:58:18.000000000 -0500
@@ -0,0 +1,13 @@
+--- src/registry.cxx.orig	2008-08-10 20:54:13.000000000 -0500
++++ src/registry.cxx	2008-08-10 20:58:13.000000000 -0500
+@@ -40,8 +40,9 @@
+ Author:		Nassib Nassar, nrn at cnidr.org
+ @@@*/
+ 
+-#include <fstream.h>
+ #include <stdlib.h>
++#include <fstream>
++using namespace std;
+ 
+ #include "registry.hxx"
+ 
diff -ruN isearch.orig/files/patch-src::string.cxx isearch/files/patch-src::string.cxx
--- isearch.orig/files/patch-src::string.cxx	2008-08-10 19:57:16.000000000 -0500
+++ isearch/files/patch-src::string.cxx	2008-08-10 20:56:43.000000000 -0500
@@ -1,6 +1,18 @@
---- src/string.cxx.orig	Sun Dec 15 09:27:00 2002
-+++ src/string.cxx	Sun Dec 15 09:27:20 2002
-@@ -574,7 +574,7 @@
+--- src/string.cxx.orig	2000-10-31 01:22:09.000000000 -0500
++++ src/string.cxx	2008-08-10 20:55:59.000000000 -0500
+@@ -45,9 +45,10 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <fstream.h>
+ #include <ctype.h>
+ #include <sys/stat.h>
++#include <fstream>
++using namespace std;
+ 
+ #ifdef UNIX
+ #include <unistd.h>
+@@ -574,7 +575,7 @@
  
  // can this be const STRING& ?
  ostream& operator<<(ostream& os, const STRING& str) {


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list