ports/148451: [patch] net/xprobe: mark MAKE_JOBS_SAFE, fix build with gcc45

Anonymous swell.k at gmail.com
Thu Jul 8 18:00:15 UTC 2010


>Number:         148451
>Category:       ports
>Synopsis:       [patch] net/xprobe: mark MAKE_JOBS_SAFE, fix build with gcc45
>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:   Thu Jul 08 18:00:13 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
>Description:
- fix Makefile.in and mark MAKE_JOBS_SAFE
- use GNU_CONFIGURE, both configure scripts are autoconf generated
- remove pre-configure, configure script already uses
  AC_CONFIG_SUBDIRS("libs-external/USI++/src")
- remove -O0 hack, 7.x uses gcc42 and 6.x uses gcc34
- fix building with g++45
- don't overwrite xprobe2.conf on install
- fix Makefile.in and remove do-install
- don't strip(1) binaries unconditionally, prefer STRIP in INSTALL_PROGRAM
>How-To-Repeat:
>Fix:
--- a.diff begins here ---
Index: net/xprobe/Makefile
===================================================================
RCS file: /a/.cvsup/ports/net/xprobe/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- net/xprobe/Makefile	22 Aug 2009 00:31:49 -0000	1.12
+++ net/xprobe/Makefile	8 Jul 2010 17:41:22 -0000
@@ -13,21 +13,16 @@ MASTER_SITES=	SF/xprobe/${PORTNAME}/Xpro
 MAINTAINER=	wxs at FreeBSD.org
 COMMENT=	ICMP active OS fingerprint scanner
 
-HAS_CONFIGURE=	yes
+GNU_CONFIGURE=	yes
+CONFIGURE_ENV=	INSTALL=${INSTALL}
+MAKE_JOBS_SAFE=	yes
 
 MAN1=		xprobe2.1
 
-pre-configure:
-	( cd ${WRKSRC}/libs-external/USI++/src ; CFLAGS="${CFLAGS}" ./configure --prefix=${PREFIX} ${CONFIGURE_TARGET} )
-
-# force -O0 for these modules otherwise gcc 3.3.3 20031106 dies with internal error
-post-configure:
-	@${FIND} ${WRKSRC}/src/xpmodules/os_probe -name Makefile | ${XARGS} ${REINPLACE_CMD} -e 's|${CFLAGS}|-O0|'
-
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/src/xprobe2 ${PREFIX}/bin
-	${INSTALL} -d ${PREFIX}/etc/xprobe2
-	${INSTALL_DATA} ${WRKSRC}/etc/xprobe2.conf ${PREFIX}/etc/xprobe2
-	${INSTALL_MAN} ${WRKSRC}/docs/xprobe2.1 ${PREFIX}/man/man1
+post-install:	.SILENT
+	if [ ! -f ${ETCDIR}/${PORTNAME}.conf ]; then \
+		${INSTALL_DATA} ${ETCDIR}/${PORTNAME}.conf.sample \
+			${ETCDIR}/${PORTNAME}.conf; \
+	fi
 
 .include <bsd.port.mk>
Index: net/xprobe/pkg-plist
===================================================================
RCS file: /a/.cvsup/ports/net/xprobe/pkg-plist,v
retrieving revision 1.3
diff -u -p -r1.3 pkg-plist
--- net/xprobe/pkg-plist	14 Mar 2004 01:06:34 -0000	1.3
+++ net/xprobe/pkg-plist	8 Jul 2010 10:25:35 -0000
@@ -1,3 +1,5 @@
 bin/xprobe2
-etc/xprobe2/xprobe2.conf
- at dirrm etc/xprobe2
+ at unexec if cmp -s %D/%%ETCDIR%%/xprobe2.conf.sample %D/%%ETCDIR%%/xprobe2.conf; then rm -f %D/%%ETCDIR%%/xprobe2.conf; fi
+%%ETCDIR%%/xprobe2.conf.sample
+ at exec if [ ! -f %D/%%ETCDIR%%/xprobe2.conf ]; then cp -p %D/%F %B/xprobe2.conf; fi
+ at dirrm %%ETCDIR%%
Index: net/xprobe/files/patch-Makefile.in
===================================================================
RCS file: net/xprobe/files/patch-Makefile.in
diff -N net/xprobe/files/patch-Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/xprobe/files/patch-Makefile.in	8 Jul 2010 10:23:25 -0000
@@ -0,0 +1,30 @@
+--- Makefile.in~
++++ Makefile.in
+@@ -43,8 +40,8 @@ SIG=md5sum -b
+ 
+ 
+ all: 
+-	cd libs-external/USI++/src; ${MAKE}
+-	cd src; ${MAKE}
++	(cd libs-external/USI++/src; ${MAKE})
++	(cd src; ${MAKE})
+ 
+ 
+ clean:
+@@ -55,11 +52,11 @@ distclean: clean
+ 	cd libs-external/USI++/src; ${MAKE} distclean
+ 	cd src; ${MAKE} distclean
+ install: src/xprobe2
+-	$(INSTALL_PROGRAM) -d $(DESTDIR)/$(bindir)
+-	$(INSTALL_PROGRAM) -d $(DESTDIR)/$(mandir)/man1
+-	$(INSTALL_PROGRAM) -d $(DESTDIR)/$(sysconfdir)/xprobe2
+-	$(INSTALL_PROGRAM) -m 0755 src/xprobe2 $(DESTDIR)/$(bindir)
+-	$(INSTALL_PROGRAM) -m 0444 etc/xprobe2.conf $(DESTDIR)/$(sysconfdir)/xprobe2
++	$(INSTALL) -d $(DESTDIR)/$(bindir)
++	$(INSTALL) -d $(DESTDIR)/$(mandir)/man1
++	$(INSTALL) -d $(DESTDIR)/$(sysconfdir)/xprobe2
++	$(INSTALL_PROGRAM) src/xprobe2 $(DESTDIR)/$(bindir)
++	$(INSTALL_DATA) etc/xprobe2.conf $(DESTDIR)/$(sysconfdir)/xprobe2/xprobe2.conf.sample
+ 	$(INSTALL_DATA) docs/xprobe2.1 $(DESTDIR)/$(mandir)/man1
+ 
+ configure: configure.in
Index: net/xprobe/files/patch-libs-external-USI++-src-ip.cc
===================================================================
RCS file: net/xprobe/files/patch-libs-external-USI++-src-ip.cc
diff -N net/xprobe/files/patch-libs-external-USI++-src-ip.cc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/xprobe/files/patch-libs-external-USI++-src-ip.cc	8 Jul 2010 10:08:11 -0000
@@ -0,0 +1,10 @@
+--- libs-external/USI++/src/ip.cc~
++++ libs-external/USI++/src/ip.cc
+@@ -15,6 +15,7 @@
+ #include "config.h"
+ #include <iostream>
+ #include <string.h>
++#include <cstdlib>
+ #include <errno.h>
+ #include <new>
+ #include <vector>
Index: net/xprobe/files/patch-libs-external-USI++-src-misc.cc
===================================================================
RCS file: net/xprobe/files/patch-libs-external-USI++-src-misc.cc
diff -N net/xprobe/files/patch-libs-external-USI++-src-misc.cc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/xprobe/files/patch-libs-external-USI++-src-misc.cc	8 Jul 2010 10:08:24 -0000
@@ -0,0 +1,10 @@
+--- libs-external/USI++/src/misc.cc~
++++ libs-external/USI++/src/misc.cc
+@@ -1,6 +1,7 @@
+ #include "usi++/usi++"
+ #include "usi++/usi-structs.h"
+ #include <string.h>
++#include <cstdlib>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <errno.h>
Index: net/xprobe/files/patch-libs-external-USI++-src-usi++-tcp.h
===================================================================
RCS file: net/xprobe/files/patch-libs-external-USI++-src-usi++-tcp.h
diff -N net/xprobe/files/patch-libs-external-USI++-src-usi++-tcp.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/xprobe/files/patch-libs-external-USI++-src-usi++-tcp.h	8 Jul 2010 10:06:39 -0000
@@ -0,0 +1,11 @@
+--- libs-external/USI++/usi++/tcp.h~
++++ libs-external/USI++/usi++/tcp.h
+@@ -12,6 +12,8 @@
+ #ifndef _TCP_H_
+ #define _TCP_H_
+ 
++#include <cstring>
++
+ #include "usi-structs.h"
+ #include "datalink.h"
+ #include "ip.h"
Index: net/xprobe/files/patch-src-Makefile.in
===================================================================
RCS file: net/xprobe/files/patch-src-Makefile.in
diff -N net/xprobe/files/patch-src-Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ net/xprobe/files/patch-src-Makefile.in	8 Jul 2010 10:16:58 -0000
@@ -0,0 +1,10 @@
+--- src/Makefile.in~
++++ src/Makefile.in
+@@ -49,7 +49,6 @@ all: lib xprobe2
+ 
+ xprobe2: $(OBJS) modules
+ 	$(CXX) $(CFLAGS) $(OBJS) $(MODOBJS) -o $@ $(LDFLAGS) $(LIBS)
+-	strip $@    
+ 
+ modules:
+ 	cd xpmodules; ${MAKE}    
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list