From 6ac8f6473263d1d9bf4ced6e43fe2a84558f281f Mon Sep 17 00:00:00 2001 From: atatat Date: Thu, 15 Jul 2004 04:05:40 +0000 Subject: Put the config.h.in patch into its own patch file and add more to it that forces varargs to be used on NetBSD. Some gcc 3.3 instances (specifically 3.3.3nb1 on NetBSD/alpha) fail one of the configure tests making it think we don't have sprintf() (and therefore no varargs) causing unmentionably evil things to be done instead. This usually leads to core dumps. Fix a pointer-to-integer cast warning by casting to long in between. The actual use case is harmless, but the compiler can't tell that. Bump PKGREVISION to 1 for the gcc workaround (affects at least NetBSD/alpha which can now build a better screen). Addresses PR pkg/25937. --- misc/screen/Makefile | 3 ++- misc/screen/distinfo | 6 ++++-- misc/screen/patches/patch-ab | 35 +++++++++++++++++++++++++++++++++++ misc/screen/patches/patch-ac | 17 +++++++++++++++++ misc/screen/patches/patch-aj | 19 ++----------------- 5 files changed, 60 insertions(+), 20 deletions(-) create mode 100644 misc/screen/patches/patch-ab create mode 100644 misc/screen/patches/patch-ac (limited to 'misc') diff --git a/misc/screen/Makefile b/misc/screen/Makefile index 6d761bf629b..ab428274153 100644 --- a/misc/screen/Makefile +++ b/misc/screen/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.52 2004/01/06 16:30:39 wiz Exp $ +# $NetBSD: Makefile,v 1.53 2004/07/15 04:05:40 atatat Exp $ DISTNAME= screen-4.0.2 +PKGREVISION= 1 CATEGORIES= misc MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \ ${MASTER_SITE_GNU:=screen/} diff --git a/misc/screen/distinfo b/misc/screen/distinfo index 2f758d16803..fa4d82d8734 100644 --- a/misc/screen/distinfo +++ b/misc/screen/distinfo @@ -1,11 +1,13 @@ -$NetBSD: distinfo,v 1.20 2004/06/16 21:35:00 christos Exp $ +$NetBSD: distinfo,v 1.21 2004/07/15 04:05:40 atatat Exp $ SHA1 (screen-4.0.2.tar.gz) = 461eb9d5edc211e1480d7b5e94d89c4d9ba3643f Size (screen-4.0.2.tar.gz) = 840519 bytes SHA1 (patch-aa) = f3f56a45dc7ab55db41b1a8d16a26134691280b1 +SHA1 (patch-ab) = ed01aebff6ff60160431d33a215dca191de0e570 +SHA1 (patch-ac) = 4eb492cd7cf9cf0df11337e91dc8f55f440de761 SHA1 (patch-ae) = dcdbb1ca08e36308f5659a90a5b6f31fb3a45691 SHA1 (patch-ai) = a3d2c7d2ef3db9deb7a5e70ed7f906efd3196af6 -SHA1 (patch-aj) = 0ad615b41ce61175a157eeb984b02de3cb9507ef +SHA1 (patch-aj) = 1d672a9e3290d68137ea5b9400410fbba63c22eb SHA1 (patch-ak) = 20254505d621a994befc2e1bfef56c9291d09fe6 SHA1 (patch-al) = 6ee93058847f3894a886346676e4a613c0bd134e SHA1 (patch-am) = 5fdc32f33ebbb5385292919f6cd01bedc30491d9 diff --git a/misc/screen/patches/patch-ab b/misc/screen/patches/patch-ab new file mode 100644 index 00000000000..5fe19832331 --- /dev/null +++ b/misc/screen/patches/patch-ab @@ -0,0 +1,35 @@ +$NetBSD: patch-ab,v 1.10 2004/07/15 04:05:40 atatat Exp $ + +1. Check sys/stropts.h header +2. Always use varargs on NetBSD + +--- config.h.in.orig 2003-12-05 08:59:39.000000000 -0500 ++++ config.h.in +@@ -431,6 +431,11 @@ + #undef HAVE_DIRENT_H + + /* ++ * Define HAVE_SYS_STROPTS_H if your system has ++ */ ++#undef HAVE_SYS_STROPTS_H ++ ++/* + * If your system has getutent(), pututline(), etc. to write to the + * utmp file, define GETUTENT. + */ +@@ -514,6 +519,15 @@ + */ + #undef USEVARARGS + ++#ifdef __NetBSD__ ++/* ++ * XXX gcc 3.3 on some NetBSD platforms fails the configure test for this ++ * so force it on anyway. ++ */ ++#undef USEVARARGS ++#define USEVARARGS ++#endif ++ + /* + * If your system has strerror() define this. + */ diff --git a/misc/screen/patches/patch-ac b/misc/screen/patches/patch-ac new file mode 100644 index 00000000000..f4c336def64 --- /dev/null +++ b/misc/screen/patches/patch-ac @@ -0,0 +1,17 @@ +$NetBSD: patch-ac,v 1.8 2004/07/15 04:05:40 atatat Exp $ + +Cast to long before int when casting a pointer. It still "loses +precision" but in this case it doesn't matter and it quiets the +compiler. + +--- process.c.orig 2003-09-18 08:53:54.000000000 -0400 ++++ process.c +@@ -5466,7 +5466,7 @@ char *data; /* dummy */ + *buf = 0; + return; + } +- act.nr = (int)data; ++ act.nr = (int)(long)data; + act.args = noargs; + act.argl = 0; + DoAction(&act, -1); diff --git a/misc/screen/patches/patch-aj b/misc/screen/patches/patch-aj index e8cfd8e9dc7..e6e00af9ccf 100644 --- a/misc/screen/patches/patch-aj +++ b/misc/screen/patches/patch-aj @@ -1,7 +1,6 @@ -$NetBSD: patch-aj,v 1.2 2004/06/16 21:35:00 christos Exp $ +$NetBSD: patch-aj,v 1.3 2004/07/15 04:05:40 atatat Exp $ -1. Detect getutent correctly on NetBSD with utmpx. -2. Check sys/stropts.h header +Detect getutent correctly on NetBSD with utmpx. --- configure.in.orig 2003-06-03 07:58:24.000000000 -0400 +++ configure.in 2004-06-16 16:11:55.000000000 -0400 @@ -31,17 +30,3 @@ $NetBSD: patch-aj,v 1.2 2004/06/16 21:35:00 christos Exp $ AC_MSG_CHECKING(for setenv) AC_TRY_LINK(,[setenv((char *)0,(char *)0);unsetenv((char *)0);], AC_MSG_RESULT(yes);AC_DEFINE(USESETENV), ---- config.h.in.orig 2003-12-05 08:59:39.000000000 -0500 -+++ config.h.in 2004-06-16 15:58:52.000000000 -0400 -@@ -431,6 +431,11 @@ - #undef HAVE_DIRENT_H - - /* -+ * Define HAVE_SYS_STROPTS_H if your system has -+ */ -+#undef HAVE_SYS_STROPTS_H -+ -+/* - * If your system has getutent(), pututline(), etc. to write to the - * utmp file, define GETUTENT. - */ -- cgit v1.2.3