summaryrefslogtreecommitdiff
path: root/sysutils/consolekit
diff options
context:
space:
mode:
authorhasso <hasso@pkgsrc.org>2008-11-25 13:40:05 +0000
committerhasso <hasso@pkgsrc.org>2008-11-25 13:40:05 +0000
commit7eea5d0dece3ebfbab99e2cf69b5c19f745fae18 (patch)
tree3082d3bde4b1064be459648f7b99d106f8e9c836 /sysutils/consolekit
parent6cf13b5b8b751ce7ae9531de56cec701c95b5474 (diff)
downloadpkgsrc-7eea5d0dece3ebfbab99e2cf69b5c19f745fae18.tar.gz
Make it build/work in DragonFly.
Diffstat (limited to 'sysutils/consolekit')
-rw-r--r--sysutils/consolekit/Makefile3
-rw-r--r--sysutils/consolekit/distinfo7
-rw-r--r--sysutils/consolekit/patches/patch-aa21
-rw-r--r--sysutils/consolekit/patches/patch-ae22
-rw-r--r--sysutils/consolekit/patches/patch-af89
5 files changed, 120 insertions, 22 deletions
diff --git a/sysutils/consolekit/Makefile b/sysutils/consolekit/Makefile
index d0f99f46176..831f84eeb72 100644
--- a/sysutils/consolekit/Makefile
+++ b/sysutils/consolekit/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2008/11/23 19:24:21 jmcneill Exp $
+# $NetBSD: Makefile,v 1.4 2008/11/25 13:40:05 hasso Exp $
#
CONSOLEKIT_VER= 0.3.0
@@ -47,4 +47,5 @@ pre-configure:
.include "../../security/policykit/buildlink3.mk"
.include "../../sysutils/dbus/buildlink3.mk"
.include "../../sysutils/dbus-glib/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/consolekit/distinfo b/sysutils/consolekit/distinfo
index 006f5ece302..7ece488a58b 100644
--- a/sysutils/consolekit/distinfo
+++ b/sysutils/consolekit/distinfo
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.3 2008/11/23 19:24:21 jmcneill Exp $
+$NetBSD: distinfo,v 1.4 2008/11/25 13:40:05 hasso Exp $
SHA1 (ConsoleKit-0.3.0.tar.bz2) = e3b6156622cc14ebca7382a55b8ed15f2f2bad98
RMD160 (ConsoleKit-0.3.0.tar.bz2) = 7a1ebd2f4bfb65690e70138c9923c3fd2fcaf671
Size (ConsoleKit-0.3.0.tar.bz2) = 393694 bytes
-SHA1 (patch-aa) = 859ccbad31b941b78d4fe9e65fa766c672a717f2
+SHA1 (patch-aa) = 881a105efecdb123a8df306c5bf3adeb60be6613
SHA1 (patch-ab) = 2e9fe9de1f27c635a4eefa77af8322cb8a02ab35
SHA1 (patch-ac) = 0595a9cd1c4013eb4761e044b4b4b01b613f7d2b
SHA1 (patch-ad) = a1c1a1d0452945550065da3eac2390318c1eb7be
-SHA1 (patch-ae) = c3109e124f36da52cd04091bee00be6a5716d98a
+SHA1 (patch-ae) = 0b5bea5260b8595fc9dfef6340ff47b1545b0bec
+SHA1 (patch-af) = ad854bcde3f8defefb476ccec3f68e64d4c055ec
diff --git a/sysutils/consolekit/patches/patch-aa b/sysutils/consolekit/patches/patch-aa
index b84b7c1996f..9a22664b5f2 100644
--- a/sysutils/consolekit/patches/patch-aa
+++ b/sysutils/consolekit/patches/patch-aa
@@ -1,18 +1,21 @@
-$NetBSD: patch-aa,v 1.1.1.1 2008/11/22 03:32:22 jmcneill Exp $
+$NetBSD: patch-aa,v 1.2 2008/11/25 13:40:05 hasso Exp $
---- configure.ac.orig 2008-07-30 20:35:53.000000000 -0400
-+++ configure.ac
-@@ -189,6 +189,9 @@ case "$host" in
- ;;
+--- configure.ac.orig 2008-07-31 03:35:53 +0300
++++ configure.ac 2008-11-25 14:57:21 +0200
+@@ -190,12 +190,20 @@ case "$host" in
*-*-solaris*)
CK_BACKEND="solaris"
-+ ;;
+ ;;
+ *-*-netbsd*)
+ CK_BACKEND="netbsd"
- ;;
++ ;;
++ *-*-dragonfly*)
++ CK_BACKEND="freebsd"
++ KVM_LIBS="-lkvm"
++ ;;
esac
-@@ -196,6 +199,7 @@ AC_SUBST(KVM_LIBS)
+ AC_SUBST(KVM_LIBS)
AM_CONDITIONAL(CK_COMPILE_LINUX, test x$CK_BACKEND = xlinux, [Compiling for Linux])
AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for FreeBSD])
@@ -20,7 +23,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2008/11/22 03:32:22 jmcneill Exp $
AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris])
AC_SUBST(CK_BACKEND)
-@@ -441,4 +445,4 @@ if test x${have_polkit} = xno -a x${msg_
+@@ -441,4 +449,4 @@ if test x${have_polkit} = xno -a x${msg_
echo " a huge SECURITY HOLE. I repeat: YOU NEED TO EDIT THE FILE"
echo " ConsoleKit.conf to match your distro/site to avoid NASTY SECURITY HOLES."
echo ""
diff --git a/sysutils/consolekit/patches/patch-ae b/sysutils/consolekit/patches/patch-ae
index fe7dbbe2f8f..7681ef67486 100644
--- a/sysutils/consolekit/patches/patch-ae
+++ b/sysutils/consolekit/patches/patch-ae
@@ -1,7 +1,7 @@
-$NetBSD: patch-ae,v 1.3 2008/11/23 19:24:21 jmcneill Exp $
+$NetBSD: patch-ae,v 1.4 2008/11/25 13:40:05 hasso Exp $
---- src/ck-sysdeps-unix.c.orig 2008-01-23 09:30:44.000000000 -0500
-+++ src/ck-sysdeps-unix.c 2008-11-23 13:51:19.000000000 -0500
+--- src/ck-sysdeps-unix.c.orig 2008-01-23 16:30:44 +0200
++++ src/ck-sysdeps-unix.c 2008-11-25 12:34:32 +0200
@@ -35,6 +35,11 @@
#include <linux/kd.h>
#endif
@@ -40,7 +40,7 @@ $NetBSD: patch-ae,v 1.3 2008/11/23 19:24:21 jmcneill Exp $
/* Adapted from dbus-sysdeps-unix.c:_dbus_read_credentials_socket() */
gboolean
ck_get_socket_peer_credentials (int socket_fd,
-@@ -99,7 +123,16 @@
+@@ -99,7 +123,16 @@ ck_get_socket_peer_credentials (int
if (ucred != NULL) {
ucred_free (ucred);
}
@@ -58,25 +58,29 @@ $NetBSD: patch-ae,v 1.3 2008/11/23 19:24:21 jmcneill Exp $
g_warning ("Socket credentials not supported on this OS\n");
#endif
-@@ -126,7 +159,7 @@
+@@ -126,17 +159,17 @@ ck_get_socket_peer_credentials (int
gboolean
ck_fd_is_a_console (int fd)
{
-#ifdef __linux__
+#if defined(__linux__) || defined(__NetBSD__)
struct vt_stat vts;
- #elif defined(__FreeBSD__)
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
int vers;
-@@ -134,7 +167,7 @@
+ #endif
int kb_ok;
errno = 0;
-#ifdef __linux__
+#if defined(__linux__) || defined(__NetBSD__)
kb_ok = (ioctl (fd, VT_GETSTATE, &vts) == 0);
- #elif defined(__FreeBSD__)
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
kb_ok = (ioctl (fd, CONS_GETVERS, &vers) == 0);
-@@ -184,6 +217,14 @@
+ #else
+ kb_ok = 1;
+@@ -184,6 +217,14 @@ ck_get_a_console_fd (void)
}
#endif
diff --git a/sysutils/consolekit/patches/patch-af b/sysutils/consolekit/patches/patch-af
new file mode 100644
index 00000000000..00cd122c704
--- /dev/null
+++ b/sysutils/consolekit/patches/patch-af
@@ -0,0 +1,89 @@
+$NetBSD: patch-af,v 1.1 2008/11/25 13:40:05 hasso Exp $
+
+--- src/ck-sysdeps-freebsd.c.orig 2008-11-25 14:43:51 +0200
++++ src/ck-sysdeps-freebsd.c 2008-11-25 14:50:24 +0200
+@@ -151,14 +151,38 @@ stat2proc (pid_t pid,
+ return FALSE;
+ }
+
++#ifdef __DragonFly__
++ num = MAXCOMLEN;
++#else
+ num = OCOMMLEN;
++#endif
+ if (num >= sizeof P->cmd) {
+ num = sizeof P->cmd - 1;
+ }
+
++#ifdef __DragonFly__
++ memcpy (P->cmd, p.kp_comm, num);
++#else
+ memcpy (P->cmd, p.ki_ocomm, num);
++#endif
+
+ P->cmd[num] = '\0';
++#ifdef __DragonFly__
++ P->pid = p.kp_pid;
++ P->ppid = p.kp_ppid;
++ P->pgrp = p.kp_pgid;
++ P->session = p.kp_sid;
++ P->rss = p.kp_vm_rssize;
++ P->vsize = p.kp_vm_map_size;
++ P->start_time = p.kp_start.tv_sec;
++ P->wchan = (unsigned long) p.kp_lwp.kl_wchan;
++ P->state = p.kp_stat;
++ P->nice = p.kp_nice;
++ P->flags = p.kp_flags;
++ P->tpgid = p.kp_tpgid;
++ P->processor = p.kp_lwp.kl_cpuid;
++ P->nlwp = p.kp_nthreads;
++#else
+ P->pid = p.ki_pid;
+ P->ppid = p.ki_ppid;
+ P->pgrp = p.ki_pgid;
+@@ -173,19 +197,33 @@ stat2proc (pid_t pid,
+ P->tpgid = p.ki_tpgid;
+ P->processor = p.ki_oncpu;
+ P->nlwp = p.ki_numthreads;
++#endif
+
+ /* we like it Linux-encoded :-) */
++#ifdef __DragonFly__
++ tty_maj = major (p.kp_tdev);
++ tty_min = minor (p.kp_tdev);
++#else
+ tty_maj = major (p.ki_tdev);
+ tty_min = minor (p.ki_tdev);
++#endif
+ P->tty = DEV_ENCODE (tty_maj,tty_min);
+
+ snprintf (P->tty_text, sizeof P->tty_text, "%3d,%-3d", tty_maj, tty_min);
+
++#ifdef __DragonFly__
++ if (p.kp_tdev != NODEV && (ttname = devname (p.kp_tdev, S_IFCHR)) != NULL) {
++#else
+ if (p.ki_tdev != NODEV && (ttname = devname (p.ki_tdev, S_IFCHR)) != NULL) {
++#endif
+ memcpy (P->tty_text, ttname, sizeof P->tty_text);
+ }
+
++#ifdef __DragonFly__
++ if (p.kp_tdev == NODEV) {
++#else
+ if (p.ki_tdev == NODEV) {
++#endif
+ memcpy (P->tty_text, " ? ", sizeof P->tty_text);
+ }
+
+@@ -308,7 +346,11 @@ ck_unix_pid_get_uid (pid_t pid)
+ res = get_kinfo_proc (pid, &p);
+
+ if (res) {
++#ifdef __DragonFly__
++ uid = p.kp_uid;
++#else
+ uid = p.ki_uid;
++#endif
+ }
+
+ return uid;