mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-24 09:25:01 +00:00
- Fix build on -stable
- Utilize USE_GETOPT_LONG - Utilize NOPORTDOCS PR: 51895 Submitted by: Ports Fury
This commit is contained in:
parent
1dbdf894f8
commit
7b3f5df25b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=80803
@ -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>
|
||||
|
@ -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
|
24
net/gspoof/files/patch-callback.c
Normal file
24
net/gspoof/files/patch-callback.c
Normal file
@ -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;
|
26
net/gspoof/files/patch-console.c
Normal file
26
net/gspoof/files/patch-console.c
Normal file
@ -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))
|
||||
{
|
@ -1 +1,3 @@
|
||||
bin/gspoof
|
||||
%%PORTDOCS%%share/doc/gspoof/README
|
||||
%%PORTDOCS%%@dirrm share/doc/gspoof
|
||||
|
Loading…
Reference in New Issue
Block a user