ports/51895: Update port: net/gspoof
KATO Tsuguru
tkato at prontomail.com
Tue May 6 21:30:15 UTC 2003
>Number: 51895
>Category: ports
>Synopsis: Update port: net/gspoof
>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: Tue May 06 14:30:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: KATO Tsuguru
>Release: FreeBSD 4.8-RELEASE i386
>Organization:
>Environment:
>Description:
- Fix build on -stable
- Utilize USE_GETOPT_LONG
- Utilize NOPORTDOCS
New file:
files/patch-callback.c
files/patch-console.c
Remove file:
files/patch-Makefile
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/net/gspoof/Makefile net/gspoof/Makefile
--- /usr/ports/net/gspoof/Makefile Mon Apr 21 12:25:14 2003
+++ net/gspoof/Makefile Wed May 7 04:03:25 2003
@@ -8,6 +8,7 @@
PORTNAME= gspoof
PORTVERSION= 2.1.1
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -17,16 +18,22 @@
BUILD_DEPENDS= ${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet-devel
-USE_REINPLACE= yes
-USE_GNOME= gtk12
WRKSRC= ${WRKDIR}/${PORTNAME}
+
+USE_GETOPT_LONG= yes
+USE_GNOME= gtk12
+USE_REINPLACE= yes
+MAKE_ARGS= CC="${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
ALL_TARGET= gtk
-CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
post-patch:
- @${REINPLACE_CMD} -e "s|gtk-config|${GTK_CONFIG}|g" ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e "s|gtk-config|\$${GTK_CONFIG}|g" ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/gspoof ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+.endif
.include <bsd.port.mk>
diff -urN /usr/ports/net/gspoof/files/patch-Makefile net/gspoof/files/patch-Makefile
--- /usr/ports/net/gspoof/files/patch-Makefile Wed Jan 29 13:17:37 2003
+++ net/gspoof/files/patch-Makefile Thu Jan 1 09:00:00 1970
@@ -1,8 +0,0 @@
---- Makefile.orig Wed Sep 25 03:17:31 2002
-+++ Makefile Wed Jan 29 12:04:47 2003
-@@ -1,4 +1,4 @@
--CC := gcc -O3 -ansi -Wall
-+CC+= ${CFLAGS}
- VERSION = "Gspoof -< Console/GTK+ TCP/IP Packets Forger v. 2.1.1 >-"
- GSRC = main.c interface.c callbacks.c console.c common.c
- CSRC = cmain.c console.c common.c
diff -urN /usr/ports/net/gspoof/files/patch-callback.c net/gspoof/files/patch-callback.c
--- /usr/ports/net/gspoof/files/patch-callback.c Thu Jan 1 09:00:00 1970
+++ net/gspoof/files/patch-callback.c Wed May 7 03:57:15 2003
@@ -0,0 +1,24 @@
+--- callbacks.c.orig Wed Sep 25 04:19:53 2002
++++ callbacks.c Wed May 7 03:40:18 2003
+@@ -194,13 +194,21 @@
+ return;
+ }
+
++#ifdef __FreeBSD__
++ if (atoi (gtk_entry_get_text (GTK_ENTRY(tcp_seq_txt))) > 4294970000 || atoi (gtk_entry_get_text (GTK_ENTRY(tcp_seq_txt))) < 0)
++#else
+ if (atoll (gtk_entry_get_text (GTK_ENTRY(tcp_seq_txt))) > 4294970000 || atoi (gtk_entry_get_text (GTK_ENTRY(tcp_seq_txt))) < 0)
++#endif
+ {
+ info ("Error: sequence number is not valid, it must be between 0 and 2^32-1\n");
+ return;
+ }
+
++#ifdef __FreeBSD__
++ if (atoi (gtk_entry_get_text (GTK_ENTRY(tcp_ack_txt))) > 4294970000 || atoi (gtk_entry_get_text (GTK_ENTRY(tcp_ack_txt))) < 0)
++#else
+ if (atoll (gtk_entry_get_text (GTK_ENTRY(tcp_ack_txt))) > 4294970000 || atoi (gtk_entry_get_text (GTK_ENTRY(tcp_ack_txt))) < 0)
++#endif
+ {
+ info ("Error: acknowledgement number is not valid, it must be between 0 and 2^32-1\n");
+ return;
diff -urN /usr/ports/net/gspoof/files/patch-console.c net/gspoof/files/patch-console.c
--- /usr/ports/net/gspoof/files/patch-console.c Thu Jan 1 09:00:00 1970
+++ net/gspoof/files/patch-console.c Wed May 7 03:56:41 2003
@@ -0,0 +1,26 @@
+--- console.c.orig Wed Sep 25 04:20:25 2002
++++ console.c Wed May 7 03:42:30 2003
+@@ -333,7 +333,11 @@
+ fgets(value, 20, stdin);
+ seq = atol(value);
+ }
++#ifdef __FreeBSD__
++ while (atoi(value) < 0 || atoi(value) > 4294970000);
++#else
+ while (atoi(value) < 0 || atoll(value) > 4294970000);
++#endif
+ }
+ else if (!strcmp ("3.5", cmd))
+ {
+@@ -343,7 +347,11 @@
+ fgets(value, 20, stdin);
+ ack = atol(value);
+ }
++#ifdef __FreeBSD__
++ while (atoi(value) < 0 || atoi(value) > 4294970000);
++#else
+ while (atoi(value) < 0 || atoll(value) > 4294970000);
++#endif
+ }
+ else if (!strcmp ("3.6", cmd))
+ {
diff -urN /usr/ports/net/gspoof/pkg-plist net/gspoof/pkg-plist
--- /usr/ports/net/gspoof/pkg-plist Wed Jan 29 13:17:36 2003
+++ net/gspoof/pkg-plist Wed May 7 04:07:38 2003
@@ -1 +1,3 @@
bin/gspoof
+%%PORTDOCS%%share/doc/gspoof/README
+%%PORTDOCS%%@dirrm share/doc/gspoof
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list