aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/libgksu
diff options
context:
space:
mode:
authorbsam <bsam@FreeBSD.org>2011-05-15 02:49:26 +0800
committerbsam <bsam@FreeBSD.org>2011-05-15 02:49:26 +0800
commit54a74860d8fe6868f7529dca939958aa3c23b297 (patch)
treeb979799a73035fd3d138b43fba146bd83a9828fc /sysutils/libgksu
parent40d239ffdb40aebec260ca8bf3b8a9b9977dda12 (diff)
downloadfreebsd-ports-gnome-54a74860d8fe6868f7529dca939958aa3c23b297.tar.gz
freebsd-ports-gnome-54a74860d8fe6868f7529dca939958aa3c23b297.tar.zst
freebsd-ports-gnome-54a74860d8fe6868f7529dca939958aa3c23b297.zip
. update sysutils/gksu to version 2.0.2; [1]
. update sysutils/libgksu to version 2.0.9; [1] . fix timing bug in the program when running on slower / single core systems; [1] . fix a bug in libgksu, which calls tcdrain() on the master side of a pty. [2] PR: 156401 [1], 141149 [2] Submitted by: Kris Moore <kris@pcbsd.org> [1], john hood <jh@sandstorm.net>, sandstorm-ni@sandstorm.net [2]
Diffstat (limited to 'sysutils/libgksu')
-rw-r--r--sysutils/libgksu/Makefile14
-rw-r--r--sysutils/libgksu/distinfo4
-rw-r--r--sysutils/libgksu/files/patch-Makefile.in28
-rw-r--r--sysutils/libgksu/files/patch-libgksu_Makefile.in28
-rw-r--r--sysutils/libgksu/files/patch-libgksu_gksu-context.c100
-rw-r--r--sysutils/libgksu/files/patch-libgksu_gksu-run-helper.c21
-rw-r--r--sysutils/libgksu/files/patch-libgksu_libgksu.c75
-rw-r--r--sysutils/libgksu/files/patch-libgksu_test-gksu.c11
-rw-r--r--sysutils/libgksu/pkg-plist42
9 files changed, 155 insertions, 168 deletions
diff --git a/sysutils/libgksu/Makefile b/sysutils/libgksu/Makefile
index 7866661a5315..fcfee747224d 100644
--- a/sysutils/libgksu/Makefile
+++ b/sysutils/libgksu/Makefile
@@ -6,22 +6,26 @@
#
PORTNAME= libgksu
-PORTVERSION= 1.3.8
-PORTREVISION= 3
+PORTVERSION= 2.0.9
CATEGORIES= sysutils
-MASTER_SITES= http://people.debian.org/~kov/gksu/old_stuff/libgksu1.2/
-DISTNAME= ${PORTNAME}1.2-${PORTVERSION}
+MASTER_SITES= http://people.debian.org/~kov/gksu/
MAINTAINER= bsam@FreeBSD.org
COMMENT= Library providing su and sudo functionality
+LIB_DEPENDS= gtop-2.0.7:${PORTSDIR}/devel/libgtop \
+ glade-2.0:${PORTSDIR}/devel/libglade2 \
+ gcr.0:${PORTSDIR}/security/gnome-keyring \
+ startup-notification-1.0:${PORTSDIR}/x11/startup-notification
RUN_DEPENDS= xauth:${PORTSDIR}/x11/xauth \
sudo:${PORTSDIR}/security/sudo
-USE_GNOME= pkgconfig glib20
+USE_GNOME= pkgconfig glib20 gconf2
USE_LDCONFIG= yes
CONFIGURE_ARGS= --enable-gtk-doc=no
GNU_CONFIGURE= yes
+GCONF_SCHEMAS= gksu.schemas
+USE_GMAKE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
diff --git a/sysutils/libgksu/distinfo b/sysutils/libgksu/distinfo
index b7a428417da4..3c72e92d4aaa 100644
--- a/sysutils/libgksu/distinfo
+++ b/sysutils/libgksu/distinfo
@@ -1,2 +1,2 @@
-SHA256 (libgksu1.2-1.3.8.tar.gz) = 7da12cd310d38f25962bd69590bdfa58ae436e6f97955220b371c7573561a49e
-SIZE (libgksu1.2-1.3.8.tar.gz) = 594567
+SHA256 (libgksu-2.0.9.tar.gz) = b8d3a2d012b2fa3d578be2d0c8d533cd5227c361c1da29a768f013106fa39627
+SIZE (libgksu-2.0.9.tar.gz) = 516246
diff --git a/sysutils/libgksu/files/patch-Makefile.in b/sysutils/libgksu/files/patch-Makefile.in
index 1c77c7fbde5d..70877f8829af 100644
--- a/sysutils/libgksu/files/patch-Makefile.in
+++ b/sysutils/libgksu/files/patch-Makefile.in
@@ -1,11 +1,19 @@
---- Makefile.in.orig Thu Sep 30 20:39:24 2004
-+++ Makefile.in Fri Oct 1 16:00:27 2004
-@@ -171,7 +171,7 @@
+--- Makefile.in.o 2011-04-13 15:10:53.221097086 +0000
++++ Makefile.in 2011-04-13 15:11:33.181096740 +0000
+@@ -747,11 +747,11 @@
+ @INTLTOOL_SCHEMAS_RULE@
- DISTCLEANFILES = *~
-
--SUBDIRS = m4 intl po libgksu docs
-+SUBDIRS = m4 intl po libgksu
- DIST_SUBDIRS = $(SUBDIRS)
-
- ACLOCAL_AMFLAGS = -I m4
+ @GCONF_SCHEMAS_INSTALL_TRUE@install-data-local:
+-@GCONF_SCHEMAS_INSTALL_TRUE@ if test -z "$(DESTDIR)" ; then \
+-@GCONF_SCHEMAS_INSTALL_TRUE@ for p in $(schemas_DATA) ; do \
+-@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$$p ; \
+-@GCONF_SCHEMAS_INSTALL_TRUE@ done \
+-@GCONF_SCHEMAS_INSTALL_TRUE@ fi
++@GCONF_SCHEMAS_INSTALL_TRUE@ if test -z "$(DESTDIR)" ; then \
++@GCONF_SCHEMAS_INSTALL_TRUE@ for p in $(schemas_DATA) ; do \
++@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$$p ; \
++@GCONF_SCHEMAS_INSTALL_TRUE@ done \
++@GCONF_SCHEMAS_INSTALL_TRUE@ fi
+ @GCONF_SCHEMAS_INSTALL_FALSE@install-data-local:
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/sysutils/libgksu/files/patch-libgksu_Makefile.in b/sysutils/libgksu/files/patch-libgksu_Makefile.in
index 277091349a07..6d0a436a03f6 100644
--- a/sysutils/libgksu/files/patch-libgksu_Makefile.in
+++ b/sysutils/libgksu/files/patch-libgksu_Makefile.in
@@ -1,20 +1,20 @@
---- libgksu/Makefile.in.orig Tue Sep 7 21:51:54 2004
-+++ libgksu/Makefile.in Fri Nov 5 00:43:20 2004
-@@ -168,7 +168,7 @@
- sharedstatedir = @sharedstatedir@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
+--- libgksu/Makefile.in.o 2011-04-11 13:45:10.938246716 -0400
++++ libgksu/Makefile.in 2011-04-11 13:46:36.384246142 -0400
+@@ -266,7 +266,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
-AM_CFLAGS = -g -O2 -Wall
+AM_CFLAGS = $(CFLAGS)
- INCLUDES = `pkg-config --cflags glib-2.0`
+ INCLUDES = ${LIBGKSU_CFLAGS}
AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" -DDATA_DIR=\"$(datadir)\" -DPREFIX=\"$(prefix)\"
- LTPACKAGE = $(shell echo ${PACKAGE} | sed s,.,_,g)
-@@ -185,7 +185,7 @@
-
- include_HEADERS = gksu.h gksu-context.h
-
+ lib_LTLIBRARIES = libgksu2.la
+@@ -280,7 +280,7 @@
+ ${LIBGKSU_LIBS} $(am__append_1)
+ noinst_HEADERS = defines.h
+ include_HEADERS = gksu.h libgksu.h
-pkgconfigdir = ${libdir}/pkgconfig
+pkgconfigdir = ${prefix}/libdata/pkgconfig
- pkgconfig_DATA = ${PACKAGE}.pc
- pkglib_PROGRAMS = gksu-run-helper
+ pkgconfig_DATA = libgksu2.pc
gksu_run_helper_LDFLAGS = `pkg-config --libs glib-2.0`
+ gksu_run_helper_SOURCES = gksu-run-helper.c
diff --git a/sysutils/libgksu/files/patch-libgksu_gksu-context.c b/sysutils/libgksu/files/patch-libgksu_gksu-context.c
deleted file mode 100644
index a95096c75fd8..000000000000
--- a/sysutils/libgksu/files/patch-libgksu_gksu-context.c
+++ /dev/null
@@ -1,100 +0,0 @@
---- libgksu/gksu-context.c.orig Mon May 1 01:08:30 2006
-+++ libgksu/gksu-context.c Mon May 22 14:06:23 2006
-@@ -23,9 +23,14 @@
- #include <unistd.h>
- #include <string.h>
- #include <fcntl.h>
--#include <pty.h>
--#include <pwd.h>
-+
- #include <sys/types.h>
-+#include <sys/ioctl.h>
-+#include <termios.h>
-+#include <libutil.h>
-+#include <signal.h>
-+
-+#include <pwd.h>
- #include <sys/wait.h>
- #include <sys/stat.h>
- #include <sys/select.h>
-@@ -455,6 +460,7 @@
- gchar *tmp = NULL;
- gchar **tmpv = NULL;
- gchar *display = NULL;
-+ size_t r;
-
- /* avoid problems with "network" DISPLAY's */
- display = g_strdup (getenv ("DISPLAY"));
-@@ -484,6 +490,7 @@
- "head -1 | awk '{ print $3 }'",
- xauth_bin,
- context->display);
-+
- if ((xauth_output = popen (tmp, "r")) == NULL)
- {
- fprintf (stderr,
-@@ -491,8 +498,8 @@
- strerror(errno));
- return 1;
- }
-- fread (xauth, sizeof(char), 256, xauth_output);
-- xauth[strlen(xauth) - 1] = '\0';
-+ r = fread (xauth, sizeof(char), 256, xauth_output);
-+ xauth[r] = '\0';
- pclose (xauth_output);
- g_free (tmp);
-
-@@ -650,7 +657,7 @@
- {
- gchar **cmd = g_malloc (sizeof(gchar*)*7);
-
-- cmd[i] = g_strdup ("/bin/su"); i++;
-+ cmd[i] = g_strdup ("/usr/bin/su"); i++;
- if (context->login_shell)
- {
- cmd[i] = g_strdup ("-"); i++;
-@@ -671,7 +678,7 @@
- if (execv (cmd[0], cmd) == -1)
- {
- fprintf (stderr,
-- _("Unable to run /bin/su: %s"),
-+ _("Unable to run /usr/bin/su: %s"),
- strerror(errno));
-
- for (i = 0 ; cmd[i] != NULL ; i++)
-@@ -808,7 +815,7 @@
- {
- gchar **cmd = g_malloc (sizeof(gchar*)*7);
-
-- cmd[i] = g_strdup ("/bin/su"); i++;
-+ cmd[i] = g_strdup ("/usr/bin/su"); i++;
- if (context->login_shell)
- {
- cmd[i] = g_strdup ("-"); i++;
-@@ -830,7 +837,7 @@
- if (execv (cmd[0], cmd) == -1)
- {
- fprintf (stderr,
-- _("Unable to run /bin/su: %s"),
-+ _("Unable to run /usr/bin/su: %s"),
- strerror(errno));
- }
-
-@@ -1097,7 +1104,7 @@
- argcount = 0;
-
- /* sudo binary */
-- cmd[argcount] = g_strdup("/usr/bin/sudo");
-+ cmd[argcount] = g_strdup("/usr/local/bin/sudo");
- argcount++;
-
- /* Make sudo read from STDIN */
-@@ -1276,7 +1283,7 @@
- argcount = 0;
-
- /* sudo binary */
-- cmd[argcount] = g_strdup("/usr/bin/sudo");
-+ cmd[argcount] = g_strdup("/usr/local/bin/sudo");
- argcount++;
-
- if (!context->keep_env)
diff --git a/sysutils/libgksu/files/patch-libgksu_gksu-run-helper.c b/sysutils/libgksu/files/patch-libgksu_gksu-run-helper.c
new file mode 100644
index 000000000000..24a450197adb
--- /dev/null
+++ b/sysutils/libgksu/files/patch-libgksu_gksu-run-helper.c
@@ -0,0 +1,21 @@
+--- libgksu/gksu-run-helper.c.o 2011-04-12 16:47:38.000000000 +0000
++++ libgksu/gksu-run-helper.c 2011-04-12 16:49:14.000000000 +0000
+@@ -110,6 +110,7 @@
+ return 1;
+ }
+
++ sleep(2);
+ fprintf (stderr, "gksu: waiting\n");
+
+ xauth_file = g_strdup_printf ("%s/.Xauthority",
+@@ -159,8 +160,8 @@
+ /* find out where the xauth binary is located */
+ if (g_file_test ("/usr/bin/xauth", G_FILE_TEST_IS_EXECUTABLE))
+ xauth_bin = "/usr/bin/xauth";
+- else if (g_file_test ("/usr/X11R6/bin/xauth", G_FILE_TEST_IS_EXECUTABLE))
+- xauth_bin = "/usr/X11R6/bin/xauth";
++ else if (g_file_test ("/usr/local/bin/xauth", G_FILE_TEST_IS_EXECUTABLE))
++ xauth_bin = "/usr/local/bin/xauth";
+ else
+ {
+ fprintf (stderr,
diff --git a/sysutils/libgksu/files/patch-libgksu_libgksu.c b/sysutils/libgksu/files/patch-libgksu_libgksu.c
new file mode 100644
index 000000000000..04721eb3c936
--- /dev/null
+++ b/sysutils/libgksu/files/patch-libgksu_libgksu.c
@@ -0,0 +1,75 @@
+--- libgksu/libgksu.c.orig 2009-03-04 18:53:02.000000000 +0000
++++ libgksu/libgksu.c 2011-04-12 16:45:53.000000000 +0000
+@@ -23,13 +23,15 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <fcntl.h>
+-#include <pty.h>
+ #include <pwd.h>
++#include <sys/ioctl.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
+ #include <sys/select.h>
+ #include <errno.h>
++#include <termios.h>
++#include <libutil.h>
+
+ #include <glibtop.h>
+ #include <glibtop/procstate.h>
+@@ -1089,8 +1091,8 @@
+ gchar *xauth = g_new0 (gchar, 256);
+
+ /* find out where the xauth binary is located */
+- if (g_file_test ("/usr/bin/xauth", G_FILE_TEST_IS_EXECUTABLE))
+- xauth_bin = "/usr/bin/xauth";
++ if (g_file_test ("/usr/local/bin/xauth", G_FILE_TEST_IS_EXECUTABLE))
++ xauth_bin = "/usr/local/bin/xauth";
+ else if (g_file_test ("/usr/X11R6/bin/xauth", G_FILE_TEST_IS_EXECUTABLE))
+ xauth_bin = "/usr/X11R6/bin/xauth";
+ else
+@@ -1976,7 +1978,7 @@
+ gchar **cmd = g_malloc (sizeof(gchar*)*7);
+
+ setsid(); // make us session leader
+- cmd[i] = g_strdup ("/bin/su"); i++;
++ cmd[i] = g_strdup ("/usr/bin/su"); i++;
+ if (context->login_shell)
+ {
+ cmd[i] = g_strdup ("-"); i++;
+@@ -1998,7 +2000,7 @@
+ if (execv (cmd[0], cmd) == -1)
+ {
+ fprintf (stderr,
+- "Unable to run /bin/su: %s",
++ "Unable to run /usr/bin/su: %s",
+ strerror(errno));
+ }
+
+@@ -2190,8 +2192,6 @@
+ write (fdpty, line, strlen(line));
+ g_free (line);
+
+- tcdrain (fdpty);
+-
+ bzero (buf, 256);
+ read (fdpty, buf, 255);
+
+@@ -2503,7 +2503,7 @@
+ if (context->always_ask_password)
+ {
+ gint exit_status;
+- g_spawn_command_line_sync("/usr/bin/sudo -K", NULL, NULL, &exit_status, NULL);
++ g_spawn_command_line_sync("/usr/local/bin/sudo -K", NULL, NULL, &exit_status, NULL);
+ }
+
+
+@@ -2533,7 +2533,7 @@
+ argcount = 0;
+
+ /* sudo binary */
+- cmd[argcount] = g_strdup("/usr/bin/sudo");
++ cmd[argcount] = g_strdup("/usr/local/bin/sudo");
+ argcount++;
+
+ if (!context->keep_env)
diff --git a/sysutils/libgksu/files/patch-libgksu_test-gksu.c b/sysutils/libgksu/files/patch-libgksu_test-gksu.c
deleted file mode 100644
index 13adf16fcc82..000000000000
--- a/sysutils/libgksu/files/patch-libgksu_test-gksu.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- libgksu/test-gksu.c.orig Thu Sep 30 20:40:04 2004
-+++ libgksu/test-gksu.c Thu Sep 30 17:39:36 2004
-@@ -34,7 +34,7 @@
- context = gksu_context_new ();
-
- gksu_context_set_debug (context, TRUE);
-- gksu_context_set_command (context, "/usr/bin/X11/xterm");
-+ gksu_context_set_command (context, "/usr/X11R6/bin/xterm");
-
- password = getpass ("Type the root password: ");
- gksu_context_set_password (context, password);
diff --git a/sysutils/libgksu/pkg-plist b/sysutils/libgksu/pkg-plist
index 573699c69399..981f4d26185f 100644
--- a/sysutils/libgksu/pkg-plist
+++ b/sysutils/libgksu/pkg-plist
@@ -1,26 +1,16 @@
-include/libgksu1.2/gksu-context.h
-include/libgksu1.2/gksu.h
-lib/libgksu1.2.a
-lib/libgksu1.2.la
-lib/libgksu1.2.so
-lib/libgksu1.2.so.0
-lib/libgksu1.2/gksu-run-helper
-libdata/pkgconfig/libgksu1.2.pc
-share/locale/ca/LC_MESSAGES/libgksu1.2.mo
-share/locale/da/LC_MESSAGES/libgksu1.2.mo
-share/locale/de/LC_MESSAGES/libgksu1.2.mo
-share/locale/es/LC_MESSAGES/libgksu1.2.mo
-share/locale/it/LC_MESSAGES/libgksu1.2.mo
-share/locale/pt_BR/LC_MESSAGES/libgksu1.2.mo
-share/locale/ru/LC_MESSAGES/libgksu1.2.mo
-share/locale/sv/LC_MESSAGES/libgksu1.2.mo
-share/locale/cs/LC_MESSAGES/libgksu1.2.mo
-share/locale/nl/LC_MESSAGES/libgksu1.2.mo
-share/locale/eu/LC_MESSAGES/libgksu1.2.mo
-share/locale/pl/LC_MESSAGES/libgksu1.2.mo
-share/locale/hu/LC_MESSAGES/libgksu1.2.mo
-share/locale/ro/LC_MESSAGES/libgksu1.2.mo
-share/locale/nb/LC_MESSAGES/libgksu1.2.mo
-share/locale/sk/LC_MESSAGES/libgksu1.2.mo
-@dirrm lib/libgksu1.2
-@dirrm include/libgksu1.2
+bin/gksu-properties
+include/libgksu/gksu.h
+include/libgksu/libgksu.h
+lib/libgksu2.a
+lib/libgksu2.la
+lib/libgksu2.so
+lib/libgksu2.so.0
+lib/libgksu/gksu-run-helper
+libdata/pkgconfig/libgksu2.pc
+share/applications/gksu-properties.desktop
+share/libgksu/gksu-properties.glade
+share/pixmaps/gksu.png
+@dirrm share/libgksu
+@dirrm lib/libgksu
+@dirrm include/libgksu
+@dirrmtry share/applications