summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2005-01-25 08:45:46 +0000
committerdanfe <danfe@FreeBSD.org>2005-01-25 08:45:46 +0000
commit3d708d7039df9e3fd4bcc656c16f6b07acadeaf4 (patch)
treeba45a388fa01056e0fe4829dd9185f0c9a3f263e /net
parentd3275d255b80775491d9d887a7d77e11cad9c9bc (diff)
downloadFreeBSD-ports-3d708d7039df9e3fd4bcc656c16f6b07acadeaf4.zip
FreeBSD-ports-3d708d7039df9e3fd4bcc656c16f6b07acadeaf4.tar.gz
Unbreak on recent FreeBSD versions:
- Avoid <varagrs.h> usage in vafor of <stdarg.h> - Correctly detect `libtelnet' location
Diffstat (limited to 'net')
-rw-r--r--net/tn3270/Makefile18
-rw-r--r--net/tn3270/files/patch-commands.c44
2 files changed, 56 insertions, 6 deletions
diff --git a/net/tn3270/Makefile b/net/tn3270/Makefile
index a890434..a526768 100644
--- a/net/tn3270/Makefile
+++ b/net/tn3270/Makefile
@@ -20,12 +20,12 @@ MAN1= tn3270.1 mset.1
MAN5= map3270.5
MANCOMPRESSED= maybe
-LIBTELNETDIR?= /usr/src/lib/libtelnet
-
-.include <bsd.port.pre.mk>
+OLD_LIBTELNETDIR= /usr/src/contrib/telnet
-.if ${OSVERSION} >= 500113
-BROKEN= "Does not compile on FreeBSD ${OSVERSION}"
+.if exists(${OLD_LIBTELNETDIR})
+LIBTELNETDIR?= /usr/src/contrib/telnet/libtelnet
+.else
+LIBTELNETDIR?= /usr/src/lib/libtelnet
.endif
post-extract:
@@ -36,6 +36,12 @@ post-extract:
exit 1; \
fi
${CP} -rp ${LIBTELNETDIR} ${WRKSRC}
+.if exists(${OLD_LIBTELNETDIR})
+ ${CP} ${LIBTELNETDIR}/../arpa/telnet.h ${WRKSRC}/libtelnet
+ ${SED} -E '/^(TELNETDIR|\.PATH|CFLAGS|INCS)/d' \
+ ${LIBTELNETDIR}/../../../lib/libtelnet/Makefile > \
+ ${WRKSRC}/libtelnet/Makefile
+.endif
do-configure:
${ECHO_CMD} "BINDIR= ${PREFIX}/bin" > ${WRKDIR}/Makefile.inc
@@ -45,4 +51,4 @@ do-build:
${MAKE} depend; \
${MAKE} all
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net/tn3270/files/patch-commands.c b/net/tn3270/files/patch-commands.c
new file mode 100644
index 0000000..b657459
--- /dev/null
+++ b/net/tn3270/files/patch-commands.c
@@ -0,0 +1,44 @@
+--- telnet/commands.c.orig Tue Aug 31 01:52:04 1999
++++ telnet/commands.c Tue Jan 25 14:15:56 2005
+@@ -55,7 +55,7 @@
+ #include <netdb.h>
+ #include <ctype.h>
+ #include <pwd.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include <errno.h>
+
+ #include <arpa/telnet.h>
+@@ -95,7 +95,9 @@
+ extern char **genget();
+ extern int Ambiguous();
+
+-static call();
++typedef int (*intrtn_t)();
++
++static call(intrtn_t routine, ...);
+
+ typedef struct {
+ char *name; /* command name */
+@@ -2452,19 +2454,14 @@
+ * Call routine with argc, argv set from args (terminated by 0).
+ */
+
+- /*VARARGS1*/
+ static
+-call(va_alist)
+- va_dcl
++call(intrtn_t routine, ...)
+ {
+ va_list ap;
+- typedef int (*intrtn_t)();
+- intrtn_t routine;
+ char *args[100];
+ int argno = 0;
+
+- va_start(ap);
+- routine = (va_arg(ap, intrtn_t));
++ va_start(ap, routine);
+ while ((args[argno++] = va_arg(ap, char *)) != 0) {
+ ;
+ }
OpenPOWER on IntegriCloud