aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2003-05-12 16:12:41 +0800
committerijliao <ijliao@FreeBSD.org>2003-05-12 16:12:41 +0800
commit919735d6ddb698610cb57c4997f4564b967b4a42 (patch)
tree3c10cf9c662670a6de019a09a3abb8b92df4a362 /net
parentb584b0614ec53862c635c4406ecce6a6e70d594e (diff)
downloadfreebsd-ports-gnome-919735d6ddb698610cb57c4997f4564b967b4a42.tar.gz
freebsd-ports-gnome-919735d6ddb698610cb57c4997f4564b967b4a42.tar.zst
freebsd-ports-gnome-919735d6ddb698610cb57c4997f4564b967b4a42.zip
- Fix build on -stable
- Utilize USE_GETOPT_LONG - Utilize NOPORTDOCS PR: 51895 Submitted by: Ports Fury
Diffstat (limited to 'net')
-rw-r--r--net/gspoof/Makefile15
-rw-r--r--net/gspoof/files/patch-Makefile8
-rw-r--r--net/gspoof/files/patch-callback.c24
-rw-r--r--net/gspoof/files/patch-console.c26
-rw-r--r--net/gspoof/pkg-plist2
5 files changed, 63 insertions, 12 deletions
diff --git a/net/gspoof/Makefile b/net/gspoof/Makefile
index 5159ab82d1dc..58796f3f5b11 100644
--- a/net/gspoof/Makefile
+++ b/net/gspoof/Makefile
@@ -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 @@ COMMENT= Console/GTK+ TCP/IP Packets Forger
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 --git a/net/gspoof/files/patch-Makefile b/net/gspoof/files/patch-Makefile
deleted file mode 100644
index cbc43ab7c4a9..000000000000
--- a/net/gspoof/files/patch-Makefile
+++ /dev/null
@@ -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 --git a/net/gspoof/files/patch-callback.c b/net/gspoof/files/patch-callback.c
new file mode 100644
index 000000000000..d1c9e09981de
--- /dev/null
+++ b/net/gspoof/files/patch-callback.c
@@ -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 --git a/net/gspoof/files/patch-console.c b/net/gspoof/files/patch-console.c
new file mode 100644
index 000000000000..79b02c981e84
--- /dev/null
+++ b/net/gspoof/files/patch-console.c
@@ -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 --git a/net/gspoof/pkg-plist b/net/gspoof/pkg-plist
index 4a7d986a32c1..4e521e96b689 100644
--- a/net/gspoof/pkg-plist
+++ b/net/gspoof/pkg-plist
@@ -1 +1,3 @@
bin/gspoof
+%%PORTDOCS%%share/doc/gspoof/README
+%%PORTDOCS%%@dirrm share/doc/gspoof