Bug 95926

Summary: [NEW PORT]: net/bittwist
Product: Ports & Packages Reporter: Wesley Shields <wxs>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.shar none

Description Wesley Shields 2006-04-17 16:10:21 UTC
A libpcap-based ethernet packet generator, capable of replaying traffic
from a pcap file, and an editor to allow you to change the contents of a
trace file on the fly.

How-To-Repeat: N/A
Comment 1 Sergey Matveychuk freebsd_committer freebsd_triage 2006-04-17 20:31:52 UTC
Does not build on 4.11:

===>  Building for bittwist-0.7
gcc -O2 -g src/bittwist.c -o src/bittwist -I/usr/local/include
-L/usr/local/lib -lm -lpcap
In file included from src/bittwist.h:24,
                 from src/bittwist.c:21:
src/def.h:156: redefinition of `in_addr_t'
/usr/include/sys/types.h:76: `in_addr_t' previously declared here
src/bittwist.c: In function `main':
src/bittwist.c:49: syntax error before `char'
src/bittwist.c:56: `cp' undeclared (first use in this function)
src/bittwist.c:56: (Each undeclared identifier is reported only once
src/bittwist.c:56: for each function it appears in.)
src/bittwist.c:62: `c' undeclared (first use in this function)
src/bittwist.c:65: `devptr' undeclared (first use in this function)
src/bittwist.c:68: `i' undeclared (first use in this function)
src/bittwist.c:81: `device' undeclared (first use in this function)
src/bittwist.c:91: `loop' undeclared (first use in this function)
src/bittwist.c:65: warning: unreachable code at beginning of switch
statement
*** Error code 1

Stop in /work/a/ports/net/bittwist/work/bittwist-0.7.
*** Error code 1

Stop in /a/ports/net/bittwist.

-- 
Dixi.
Sem.
Comment 2 Sergey Matveychuk freebsd_committer freebsd_triage 2006-04-17 20:32:33 UTC
State Changed
From-To: open->feedback

Ask for submitter fix.
Comment 3 Wesley Shields 2006-04-18 17:15:20 UTC
On Mon, Apr 17, 2006 at 11:31:52PM +0400, Sergey Matveychuk wrote:
> Does not build on 4.11:
> 
> ===>  Building for bittwist-0.7
> gcc -O2 -g src/bittwist.c -o src/bittwist -I/usr/local/include
> -L/usr/local/lib -lm -lpcap
> In file included from src/bittwist.h:24,
>                  from src/bittwist.c:21:
> src/def.h:156: redefinition of `in_addr_t'
> /usr/include/sys/types.h:76: `in_addr_t' previously declared here
> src/bittwist.c: In function `main':
> src/bittwist.c:49: syntax error before `char'
> src/bittwist.c:56: `cp' undeclared (first use in this function)
> src/bittwist.c:56: (Each undeclared identifier is reported only once
> src/bittwist.c:56: for each function it appears in.)
> src/bittwist.c:62: `c' undeclared (first use in this function)
> src/bittwist.c:65: `devptr' undeclared (first use in this function)
> src/bittwist.c:68: `i' undeclared (first use in this function)
> src/bittwist.c:81: `device' undeclared (first use in this function)
> src/bittwist.c:91: `loop' undeclared (first use in this function)
> src/bittwist.c:65: warning: unreachable code at beginning of switch
> statement
> *** Error code 1
> 
> Stop in /work/a/ports/net/bittwist/work/bittwist-0.7.
> *** Error code 1
> 
> Stop in /a/ports/net/bittwist.
> 
> -- 
> Dixi.
> Sem.

I've attached a shar that marks it ignored on OSVERSION < 50000.  I
initially had a patch to fix the duplicate definition but it also uses
round() which is not in 4.x.  It's easier to just mark it as IGNORE for
4.x.

Here's the shar:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	bittwist
#	bittwist/distinfo
#	bittwist/pkg-plist
#	bittwist/Makefile
#	bittwist/pkg-descr
#
echo c - bittwist
mkdir -p bittwist > /dev/null 2>&1
echo x - bittwist/distinfo
sed 's/^X//' >bittwist/distinfo << 'END-of-bittwist/distinfo'
XMD5 (bittwist-bsd-0.7.tar.gz) = fdb365f25903c1c49f973cdcb26868b5
XSHA256 (bittwist-bsd-0.7.tar.gz) = 62060b58b41bb6e8affbf10ea28408562faf5e77a2f180be3528bbde08a7a685
XSIZE (bittwist-bsd-0.7.tar.gz) = 38755
END-of-bittwist/distinfo
echo x - bittwist/pkg-plist
sed 's/^X//' >bittwist/pkg-plist << 'END-of-bittwist/pkg-plist'
Xbin/bittwist
Xbin/bittwistb
Xbin/bittwiste
END-of-bittwist/pkg-plist
echo x - bittwist/Makefile
sed 's/^X//' >bittwist/Makefile << 'END-of-bittwist/Makefile'
X# New ports collection makefile for:	bittwist
X# Date created:			17 April 2006
X# Whom:				Wesley Shields <wxs@csh.rit.edu>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	bittwist
XPORTVERSION=	0.7
XCATEGORIES=	net
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
XDISTNAME=	${PORTNAME}-bsd-${PORTVERSION}
X
XMAINTAINER=	wxs@csh.rit.edu
XCOMMENT=	Libpcap-based Ethernet packet generator, with PCAP editor
X
XWRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}
X
XMAN1=	bittwist.1 bittwistb.1 bittwiste.1
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 500000
XIGNORE=	does not build under 4.x
X.endif
X
X.include <bsd.port.post.mk>
END-of-bittwist/Makefile
echo x - bittwist/pkg-descr
sed 's/^X//' >bittwist/pkg-descr << 'END-of-bittwist/pkg-descr'
XA libpcap-based ethernet packet generator, capable of replaying traffic
Xfrom a pcap file, and an editor to allow you to change the contents of a
Xtrace file on the fly.
X
XWWW: http://bittwist.sourceforge.net
END-of-bittwist/pkg-descr
exit
Comment 4 Sergey Matveychuk freebsd_committer freebsd_triage 2006-04-18 18:56:25 UTC
State Changed
From-To: feedback->closed

New port added. Thanks!