summaryrefslogtreecommitdiff
path: root/x11/mcookie
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2016-09-20 08:00:51 +0000
committerwiz <wiz@pkgsrc.org>2016-09-20 08:00:51 +0000
commit29aac8ace6d94441231fbb386127142b16d98ffd (patch)
tree7536261079de3fc8436a70629ff339c6de203f50 /x11/mcookie
parent6fbdca40a38470609766594de92b2abda92e9e65 (diff)
downloadpkgsrc-29aac8ace6d94441231fbb386127142b16d98ffd.tar.gz
Import mcookie-2.28 as x11/mcookie.
mcookie generates a 128-bit random hexadecimal number for use with the X authority system.
Diffstat (limited to 'x11/mcookie')
-rw-r--r--x11/mcookie/DESCR2
-rw-r--r--x11/mcookie/Makefile27
-rw-r--r--x11/mcookie/PLIST3
-rw-r--r--x11/mcookie/distinfo11
-rw-r--r--x11/mcookie/patches/patch-configure24
-rw-r--r--x11/mcookie/patches/patch-include_setproctitle.h17
-rw-r--r--x11/mcookie/patches/patch-include_ttyutils.h20
-rw-r--r--x11/mcookie/patches/patch-lib_ismounted.c15
-rw-r--r--x11/mcookie/patches/patch-lib_setproctitle.c35
9 files changed, 154 insertions, 0 deletions
diff --git a/x11/mcookie/DESCR b/x11/mcookie/DESCR
new file mode 100644
index 00000000000..6520620b86f
--- /dev/null
+++ b/x11/mcookie/DESCR
@@ -0,0 +1,2 @@
+mcookie generates a 128-bit random hexadecimal number for use with
+the X authority system.
diff --git a/x11/mcookie/Makefile b/x11/mcookie/Makefile
new file mode 100644
index 00000000000..bafb6c3d508
--- /dev/null
+++ b/x11/mcookie/Makefile
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1 2016/09/20 08:00:51 wiz Exp $
+
+DISTNAME= util-linux-2.28
+PKGNAME= ${DISTNAME:S/util-linux/mcookie/}
+CATEGORIES= sysutils
+MASTER_SITES= https://www.kernel.org/pub/linux/utils/util-linux/v${PKGVERSION_NOREV}/
+EXTRACT_SUFX= .tar.xz
+
+MAINTAINER= reed@reedmedia.net
+#HOMEPAGE
+COMMENT= Tool for creating cookies for xauth(1)
+LICENSE= public-domain
+
+BUILD_TARGET= mcookie
+EXTRACT_USING= bsdtar
+
+GNU_CONFIGURE= yes
+INFO_FILES= yes
+USE_TOOLS+= bsdtar gmake
+INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/mcookie ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/misc-utils/mcookie.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/x11/mcookie/PLIST b/x11/mcookie/PLIST
new file mode 100644
index 00000000000..64b32c68f21
--- /dev/null
+++ b/x11/mcookie/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2016/09/20 08:00:51 wiz Exp $
+bin/mcookie
+man/man1/mcookie.1
diff --git a/x11/mcookie/distinfo b/x11/mcookie/distinfo
new file mode 100644
index 00000000000..334cd9587e8
--- /dev/null
+++ b/x11/mcookie/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2016/09/20 08:00:51 wiz Exp $
+
+SHA1 (util-linux-2.28.tar.xz) = 9720d4ea99f8aff018ea6732dcc5c1fc853f39b3
+RMD160 (util-linux-2.28.tar.xz) = aee0dcd454aac1418dbbcda9651dc64da08bf13a
+SHA512 (util-linux-2.28.tar.xz) = a1f911bdfda5985de87105d39501e501a5f9ec0fe6a433e3f2fed9a80e104342bb4a7e0e6dc9b7d677d5429249f05b343cb5370b0ea0e068dc889699d4ec1f8a
+Size (util-linux-2.28.tar.xz) = 4119560 bytes
+SHA1 (patch-configure) = 35fda45cc85efa49ac422fbca9e5b7b6329fda33
+SHA1 (patch-include_setproctitle.h) = deb06015ca459886f82e22eaf6596ff79799b02a
+SHA1 (patch-include_ttyutils.h) = 304b7e09b601685c35c6033a95622e50979586ea
+SHA1 (patch-lib_ismounted.c) = f880372aca259fdba0b30ecf38e5d9bb79e6c5d8
+SHA1 (patch-lib_setproctitle.c) = 2b6415d9fa484ba1969aa36610b695ba04d0a603
diff --git a/x11/mcookie/patches/patch-configure b/x11/mcookie/patches/patch-configure
new file mode 100644
index 00000000000..c0963d4b7e3
--- /dev/null
+++ b/x11/mcookie/patches/patch-configure
@@ -0,0 +1,24 @@
+$NetBSD: patch-configure,v 1.1 2016/09/20 08:00:51 wiz Exp $
+
+Fix unportable test(1) operator.
+
+--- configure.orig 2016-04-12 10:34:01.000000000 +0000
++++ configure
+@@ -20780,7 +20780,7 @@ else
+ fi
+
+
+-if test "x$enable_libmount_force_mountinfo" == xyes; then :
++if test "x$enable_libmount_force_mountinfo" = xyes; then :
+
+
+ $as_echo "#define USE_LIBMOUNT_FORCE_MOUNTINFO 1" >>confdefs.h
+@@ -28664,7 +28664,7 @@ else
+ fi
+
+
+-if test "x$enable_usrdir_path" == xyes; then :
++if test "x$enable_usrdir_path" = xyes; then :
+
+
+ $as_echo "#define USE_USRDIR_PATHS_ONLY 1" >>confdefs.h
diff --git a/x11/mcookie/patches/patch-include_setproctitle.h b/x11/mcookie/patches/patch-include_setproctitle.h
new file mode 100644
index 00000000000..de634659b39
--- /dev/null
+++ b/x11/mcookie/patches/patch-include_setproctitle.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-include_setproctitle.h,v 1.1 2016/09/20 08:00:51 wiz Exp $
+
+Remove setproctitle, conflicts with NetBSD version and not used
+in mcookie.
+
+--- include/setproctitle.h.orig 2015-04-07 09:12:31.000000000 +0000
++++ include/setproctitle.h
+@@ -1,7 +1,8 @@
+ #ifndef UTIL_LINUX_SETPROCTITLE_H
+ #define UTIL_LINUX_SETPROCTITLE_H
+
++#include <stdlib.h>
++
+ extern void initproctitle (int argc, char **argv);
+-extern void setproctitle (const char *prog, const char *txt);
+
+ #endif
diff --git a/x11/mcookie/patches/patch-include_ttyutils.h b/x11/mcookie/patches/patch-include_ttyutils.h
new file mode 100644
index 00000000000..70c36809748
--- /dev/null
+++ b/x11/mcookie/patches/patch-include_ttyutils.h
@@ -0,0 +1,20 @@
+$NetBSD: patch-include_ttyutils.h,v 1.1 2016/09/20 08:00:51 wiz Exp $
+
+Define values if missing.
+
+--- include/ttyutils.h.orig 2016-01-06 10:50:36.000000000 +0000
++++ include/ttyutils.h
+@@ -114,6 +114,13 @@ static inline void reset_virtual_console
+ # define FFDLY 0
+ #endif
+
++#ifndef TAB0
++#define TAB0 0
++#endif
++#ifndef TABDLY
++#define TABDLY 0
++#endif
++
+ tp->c_iflag |= (BRKINT | ICRNL | IMAXBEL);
+ tp->c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP);
+ tp->c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);
diff --git a/x11/mcookie/patches/patch-lib_ismounted.c b/x11/mcookie/patches/patch-lib_ismounted.c
new file mode 100644
index 00000000000..ac6b5789973
--- /dev/null
+++ b/x11/mcookie/patches/patch-lib_ismounted.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_ismounted.c,v 1.1 2016/09/20 08:00:51 wiz Exp $
+
+Fix build on NetBSD.
+
+--- lib/ismounted.c.orig 2016-03-08 13:26:33.000000000 +0000
++++ lib/ismounted.c
+@@ -214,7 +214,7 @@ static int check_mntent(const char *file
+ static int check_getmntinfo(const char *file, int *mount_flags,
+ char *mtpt, int mtlen)
+ {
+- struct statfs *mp;
++ struct statvfs *mp;
+ int len, n;
+ const char *s1;
+ char *s2;
diff --git a/x11/mcookie/patches/patch-lib_setproctitle.c b/x11/mcookie/patches/patch-lib_setproctitle.c
new file mode 100644
index 00000000000..bba435d68e1
--- /dev/null
+++ b/x11/mcookie/patches/patch-lib_setproctitle.c
@@ -0,0 +1,35 @@
+$NetBSD: patch-lib_setproctitle.c,v 1.1 2016/09/20 08:00:51 wiz Exp $
+
+Remove setproctitle, conflicts with NetBSD version and not used
+in mcookie.
+
+--- lib/setproctitle.c.orig 2016-03-08 12:00:42.000000000 +0000
++++ lib/setproctitle.c
+@@ -48,27 +48,3 @@ void initproctitle (int argc, char **arg
+ else
+ argv_lth = argv0[argc-1] + strlen(argv0[argc-1]) - argv0[0];
+ }
+-
+-void setproctitle (const char *prog, const char *txt)
+-{
+- int i;
+- char buf[SPT_BUFSIZE];
+-
+- if (!argv0)
+- return;
+-
+- if (strlen(prog) + strlen(txt) + 5 > SPT_BUFSIZE)
+- return;
+-
+- sprintf(buf, "%s -- %s", prog, txt);
+-
+- i = strlen(buf);
+- if (i > argv_lth - 2) {
+- i = argv_lth - 2;
+- buf[i] = '\0';
+- }
+- memset(argv0[0], '\0', argv_lth); /* clear the memory area */
+- strcpy(argv0[0], buf);
+-
+- argv0[1] = NULL;
+-}