ports/96273: [MAINTAINER]: Unbreak net/bittwist on 5.x.
Wesley Shields
wxs at csh.rit.edu
Mon Apr 24 18:20:29 UTC 2006
>Number: 96273
>Category: ports
>Synopsis: [MAINTAINER]: Unbreak net/bittwist on 5.x.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Apr 24 18:20:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Wesley Shields
>Release: FreeBSD 6.0-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD syn 6.0-RELEASE-p2 FreeBSD 6.0-RELEASE-p2 #1: Wed Jan 11 11:57:33 EST 2006 root at syn:/usr/obj/usr/src/sys/GENERIC i386
>Description:
net/bittwist uses round() which is only available in 5.3 and higher. It
also depends upon a relatively recent version of libpcap which only
exists in the base of 6.0 and up[1]. The attached patch marks it as
broken on 5.2 and lower, and depends on net/libpcap for 5.3 up to 6.0.
While I'm here it also incorporates a patch to fix up the hardcoding of
CFLAGS and CC in the port's Makefile[2].
I guess this will teach me to keep a 5.x VM handy. :(
[1]: Pointed out to me by Kris Kennaway via pointyhat.
[2]: Pointed out to me by Kris Kennaway.
>How-To-Repeat:
N/A
>Fix:
diff -ruN net/bittwist.orig/Makefile net/bittwist/Makefile
--- net/bittwist.orig/Makefile Mon Apr 24 14:05:44 2006
+++ net/bittwist/Makefile Mon Apr 24 13:37:54 2006
@@ -21,8 +21,15 @@
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 500000
-IGNORE= does not build under 4.x
+# 5.3 is the first version to have round().
+.if ${OSVERSION} < 503001
+IGNORE= does not build under 5.2 and older (no round())
+.endif
+
+# 5.3 and up do not have a new enough libpcap but does have round().
+# 6.0 and up have both a new enough libpcap and round().
+.if ${OSVERSION} >= 503001 && ${OSVERSION} < 600100
+BUILD_DEPENDS= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap
.endif
.include <bsd.port.post.mk>
diff -ruN net/bittwist.orig/files/patch-Makefile net/bittwist/files/patch-Makefile
--- net/bittwist.orig/files/patch-Makefile Thu Jan 1 00:00:00 1970
+++ net/bittwist/files/patch-Makefile Mon Apr 24 11:43:19 2006
@@ -0,0 +1,16 @@
+--- Makefile.orig Mon Apr 24 11:41:57 2006
++++ Makefile Mon Apr 24 11:42:54 2006
+@@ -5,10 +5,11 @@
+ bindir = ${exec_prefix}/bin
+ mandir = ${prefix}/man/man1
+
+-CC = gcc
++CC ?= gcc
+ DEBUG = -g
+ #CFLAGS = -O2 -Wall $(DEBUG)
+-CFLAGS = -O2 $(DEBUG)
++CFLAGS ?= -O2
++CFLAGS += ${DEBUG}
+ SRC = src
+ DOC = doc
+
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list