Skip to content

Instantly share code, notes, and snippets.

@matthiasr
Created February 12, 2011 00:01
Show Gist options
  • Save matthiasr/823307 to your computer and use it in GitHub Desktop.
Save matthiasr/823307 to your computer and use it in GitHub Desktop.
patch for pkgsrc/misc/screen: use utmpx on current DragonFly
commit 4bb5d970f11f92a0ee8a8e21fe326ec9bf201961
Author: Matthias Rampke <matthias@rampke.de>
Date: Sat Feb 12 01:00:30 2011 +0100
screen: use utmpx on current DragonFly
diff --git a/misc/screen/Makefile b/misc/screen/Makefile
index 4f5f952..fced101 100644
--- a/misc/screen/Makefile
+++ b/misc/screen/Makefile
@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.82 2010/03/07 15:13:37 zafer Exp $
DISTNAME= screen-4.0.3
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= misc shells
MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \
http://people.freebsd.org/~cy/distfiles/
diff --git a/misc/screen/distinfo b/misc/screen/distinfo
index 5c28ae9..5847adc 100644
--- a/misc/screen/distinfo
+++ b/misc/screen/distinfo
@@ -8,9 +8,9 @@ SHA1 (patch-ab) = f4fc914ad9c48cb83cf3633630cb83e4a8e90ff5
SHA1 (patch-ac) = 36a1f3e465b511dc795ee9e7f016416b5312d6f0
SHA1 (patch-ae) = dcdbb1ca08e36308f5659a90a5b6f31fb3a45691
SHA1 (patch-ah) = 10af05907e368af17fa3bb5e24101aa4d260ab8a
-SHA1 (patch-ai) = 6d01c6c5bebfefc5c2cd4d3c642205eedbc6b155
-SHA1 (patch-aj) = 7cb56d912aa40a4840a9a690394dcf50b0dd319d
-SHA1 (patch-ak) = 5b2fe45dc82f9ed36256b06f27bffafe3071769d
+SHA1 (patch-ai) = 2b97624aebf4031162110223b4a10eb7ff33ede7
+SHA1 (patch-aj) = 00af999fb18e4e38b5980cb0ccbcb3d06730e3a9
+SHA1 (patch-ak) = 99cfe7b23bd7b10dc36f94b5191bbc0430db8d46
SHA1 (patch-al) = 6ee93058847f3894a886346676e4a613c0bd134e
SHA1 (patch-am) = 5fdc32f33ebbb5385292919f6cd01bedc30491d9
SHA1 (patch-an) = 44712ae5875c60eac0d4d6ba5cc3731dbfd4458b
diff --git a/misc/screen/patches/patch-ai b/misc/screen/patches/patch-ai
index 6d8f128..a6a2da7 100644
--- a/misc/screen/patches/patch-ai
+++ b/misc/screen/patches/patch-ai
@@ -12,18 +12,21 @@ $NetBSD$
#ifndef HAVE_STRERROR
/* No macros, please */
#undef strerror
-@@ -260,9 +257,15 @@ extern int errno;
+@@ -260,9 +257,18 @@ extern int errno;
#endif
#if defined(UTMPOK) || defined(BUGGYGETLOGIN)
-# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)
+# if (defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)) \
-+ || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000))
++ || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \
++ || (defined(__DragonFly_version) && (__DragonFly_version >= 200902))
# include <utmpx.h>
-# define UTMPFILE UTMPX_FILE
+# ifdef __NetBSD__
+# define UTMPFILE _PATH_UTMPX
+# define NetBSD_UTMP
++# elif defined(__DragonFly_version)
++# define UTMPFILE _PATH_UTMPX
+# else
+# define UTMPFILE UTMPX_FILE
+# endif
diff --git a/misc/screen/patches/patch-aj b/misc/screen/patches/patch-aj
index b3333d9..14e4e22 100644
--- a/misc/screen/patches/patch-aj
+++ b/misc/screen/patches/patch-aj
@@ -15,24 +15,25 @@ crash on 64-bit architectures.
main()
{
exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
-@@ -815,9 +817,15 @@
+@@ -815,9 +817,16 @@
AC_TRY_LINK([
#include <time.h> /* to get time_t on SCO */
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#include <sys/param.h>
+#if (defined(SVR4) && !defined(DGUX)) \
-+ || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000))
++ || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \
++ || (defined(__DragonFly_version) && (__DragonFly_version >= 200902))
#include <utmpx.h>
#define utmp utmpx
-+# ifdef __NetBSD__
++# if defined(__NetBSD__) || defined(__DragonFly_version
+# define pututline pututxline
+# define getutent getutxent
+# endif
#else
#include <utmp.h>
#endif
-@@ -1209,6 +1217,7 @@
+@@ -1209,6 +1218,7 @@
AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no))
AC_HEADER_DIRENT
diff --git a/misc/screen/patches/patch-ak b/misc/screen/patches/patch-ak
index 610b1f7..e4ffb9b 100644
--- a/misc/screen/patches/patch-ak
+++ b/misc/screen/patches/patch-ak
@@ -14,24 +14,25 @@ crash on 64-bit architectures.
main()
{
exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
-@@ -5572,9 +5574,15 @@
+@@ -5572,9 +5574,16 @@
#include <time.h> /* to get time_t on SCO */
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#include <sys/param.h>
+#if (defined(SVR4) && !defined(DGUX)) \
-+ || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000))
++ || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \
++ || (defined(__DragonFly_version) && (__DragonFly_version >= 200902))
#include <utmpx.h>
#define utmp utmpx
-+# ifdef __NetBSD__
++# if defined(__NetBSD__) || defined(__DragonFly_version)
+# define pututline pututxline
+# define getutent getutxent
+# endif
#else
#include <utmp.h>
#endif
-@@ -7502,6 +7510,148 @@
+@@ -7502,6 +7511,148 @@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment