diff options
author | danfe <danfe@FreeBSD.org> | 2005-01-25 16:45:46 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2005-01-25 16:45:46 +0800 |
commit | 3d708d7039df9e3fd4bcc656c16f6b07acadeaf4 (patch) | |
tree | ba45a388fa01056e0fe4829dd9185f0c9a3f263e /net | |
parent | d3275d255b80775491d9d887a7d77e11cad9c9bc (diff) | |
download | freebsd-ports-gnome-3d708d7039df9e3fd4bcc656c16f6b07acadeaf4.tar.gz freebsd-ports-gnome-3d708d7039df9e3fd4bcc656c16f6b07acadeaf4.tar.zst freebsd-ports-gnome-3d708d7039df9e3fd4bcc656c16f6b07acadeaf4.zip |
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/Makefile | 18 | ||||
-rw-r--r-- | net/tn3270/files/patch-commands.c | 44 |
2 files changed, 56 insertions, 6 deletions
diff --git a/net/tn3270/Makefile b/net/tn3270/Makefile index a89043410bdd..a526768d18c3 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 000000000000..b65745915aef --- /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) { + ; + } |