From 4bc05312551360c642be42bcfd8cb35b2dc4722e Mon Sep 17 00:00:00 2001 From: jasper Date: Thu, 17 Jan 2008 18:45:56 +0000 Subject: [PATCH] re-import libgksu 2.0.5 This library comes from the gksu program. It provides a simple API to use su and sudo in programs that need to execute tasks as other user. It provides X authentication facilities for running programs in a X session. ok martynas@ --- sysutils/libgksu/Makefile | 49 +++++++++++++++++++ sysutils/libgksu/distinfo | 5 ++ .../libgksu/patches/patch-libgksu_Makefile_in | 12 +++++ .../libgksu/patches/patch-libgksu_libgksu_c | 34 +++++++++++++ sysutils/libgksu/pkg/DESCR | 4 ++ sysutils/libgksu/pkg/PFRAG.shared | 2 + sysutils/libgksu/pkg/PLIST | 49 +++++++++++++++++++ 7 files changed, 155 insertions(+) create mode 100644 sysutils/libgksu/Makefile create mode 100644 sysutils/libgksu/distinfo create mode 100644 sysutils/libgksu/patches/patch-libgksu_Makefile_in create mode 100644 sysutils/libgksu/patches/patch-libgksu_libgksu_c create mode 100644 sysutils/libgksu/pkg/DESCR create mode 100644 sysutils/libgksu/pkg/PFRAG.shared create mode 100644 sysutils/libgksu/pkg/PLIST diff --git a/sysutils/libgksu/Makefile b/sysutils/libgksu/Makefile new file mode 100644 index 00000000000..ef2095f747c --- /dev/null +++ b/sysutils/libgksu/Makefile @@ -0,0 +1,49 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2008/01/17 18:45:56 jasper Exp $ + +COMMENT= library providing su and sudo functionality + +DISTNAME= libgksu-2.0.5 +SHARED_LIBS= gksu2 0.0 # .0.1 +CATEGORIES= sysutils + +HOMEPAGE= http://www.nongnu.org/gksu/ + +# LGPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +WANTLIB= ICE ORBit-2 SM X11 Xau Xcomposite Xcursor Xdamage Xdmcp \ + Xext Xfixes Xi Xinerama Xrandr Xrender atk-1.0 c cairo \ + dbus-1 expat fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0 \ + glib-2.0 glitz gmodule-2.0 gobject-2.0 gthread-2.0 \ + gtk-x11-2.0 kvm m pango-1.0 pangocairo-1.0 pangoft2-1.0 \ + pcre png pthread util xml2 z + +MASTER_SITES= http://people.debian.org/~kov/gksu/ + +MODULES= devel/gettext \ + textproc/intltool + +LIB_DEPENDS= gconf-2::devel/gconf2 \ + gtop-2.0::devel/libgtop2 \ + glade-2.0::devel/libglade2 \ + startup-notification-1::devel/startup-notification \ + gnome-keyring::x11/gnome/keyring +RUN_DEPENDS= ::devel/desktop-file-utils + +USE_X11= Yes +USE_LIBTOOL= Yes +USE_GMAKE= Yes + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --with-gconf-schema-file-dir=${LOCALBASE}/share/schemas/gksu2 \ + --enable-gtk-doc="no" +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" + +post-extract: + @perl -pi -e 's,/bin/su,/usr/bin/su,g' ${WRKSRC}/po/*.po + +.include diff --git a/sysutils/libgksu/distinfo b/sysutils/libgksu/distinfo new file mode 100644 index 00000000000..bc37214594b --- /dev/null +++ b/sysutils/libgksu/distinfo @@ -0,0 +1,5 @@ +MD5 (libgksu-2.0.5.tar.gz) = k/YSWHUetzlnISgfj3hMRg== +RMD160 (libgksu-2.0.5.tar.gz) = RjtcVv+r2bjsk9IECLEQ4N8Iwao= +SHA1 (libgksu-2.0.5.tar.gz) = oZlHhn2L/2I6vZu2whNQmALHUEs= +SHA256 (libgksu-2.0.5.tar.gz) = 56IDULmq3Dp57OT3D7wrxfSDYGPa/VDK52uY4SIhOD8= +SIZE (libgksu-2.0.5.tar.gz) = 497012 diff --git a/sysutils/libgksu/patches/patch-libgksu_Makefile_in b/sysutils/libgksu/patches/patch-libgksu_Makefile_in new file mode 100644 index 00000000000..2be91a0e422 --- /dev/null +++ b/sysutils/libgksu/patches/patch-libgksu_Makefile_in @@ -0,0 +1,12 @@ +$OpenBSD: patch-libgksu_Makefile_in,v 1.1.1.1 2008/01/17 18:45:56 jasper Exp $ +--- libgksu/Makefile.in.orig Sat Dec 15 23:22:23 2007 ++++ libgksu/Makefile.in Sat Dec 15 23:22:36 2007 +@@ -264,7 +264,7 @@ sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ +-AM_CFLAGS = -g -O2 -Wall ++AM_CFLAGS = + INCLUDES = ${LIBGKSU_CFLAGS} + AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\" -DDATA_DIR=\"$(datadir)\" -DPREFIX=\"$(prefix)\" + lib_LTLIBRARIES = libgksu2.la diff --git a/sysutils/libgksu/patches/patch-libgksu_libgksu_c b/sysutils/libgksu/patches/patch-libgksu_libgksu_c new file mode 100644 index 00000000000..52b925be0a0 --- /dev/null +++ b/sysutils/libgksu/patches/patch-libgksu_libgksu_c @@ -0,0 +1,34 @@ +$OpenBSD: patch-libgksu_libgksu_c,v 1.1.1.1 2008/01/17 18:45:56 jasper Exp $ +--- libgksu/libgksu.c.orig Sun Jun 10 20:28:43 2007 ++++ libgksu/libgksu.c Sat Dec 15 22:12:24 2007 +@@ -23,7 +23,12 @@ + #include + #include + #include ++#ifdef __OpenBSD__ ++#include ++#include ++#else + #include ++#endif + #include + #include + #include +@@ -1897,7 +1902,7 @@ gksu_su_full (GksuContext *context, + 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++; +@@ -1919,7 +1924,7 @@ gksu_su_full (GksuContext *context, + if (execv (cmd[0], cmd) == -1) + { + fprintf (stderr, +- "Unable to run /bin/su: %s", ++ "Unable to run /usr/bin/su: %s", + strerror(errno)); + } + diff --git a/sysutils/libgksu/pkg/DESCR b/sysutils/libgksu/pkg/DESCR new file mode 100644 index 00000000000..86b0636ffce --- /dev/null +++ b/sysutils/libgksu/pkg/DESCR @@ -0,0 +1,4 @@ +This library comes from the gksu program. It provides a simple API to +use su and sudo in programs that need to execute tasks as other user. It +provides X authentication facilities for running programs in a X +session. diff --git a/sysutils/libgksu/pkg/PFRAG.shared b/sysutils/libgksu/pkg/PFRAG.shared new file mode 100644 index 00000000000..8ac046dd666 --- /dev/null +++ b/sysutils/libgksu/pkg/PFRAG.shared @@ -0,0 +1,2 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2008/01/17 18:45:56 jasper Exp $ +@lib lib/libgksu2.so.${LIBgksu2_VERSION} diff --git a/sysutils/libgksu/pkg/PLIST b/sysutils/libgksu/pkg/PLIST new file mode 100644 index 00000000000..aa86b1f658c --- /dev/null +++ b/sysutils/libgksu/pkg/PLIST @@ -0,0 +1,49 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2008/01/17 18:45:56 jasper Exp $ +%%SHARED%% +bin/gksu-properties +include/libgksu/ +include/libgksu/gksu.h +include/libgksu/libgksu.h +lib/libgksu/ +lib/libgksu/gksu-run-helper +lib/libgksu2.a +lib/libgksu2.la +lib/pkgconfig/ +lib/pkgconfig/libgksu2.pc +share/applications/ +share/applications/gksu-properties.desktop +share/libgksu/ +share/libgksu/gksu-properties.glade +share/locale/ca/LC_MESSAGES/libgksu.mo +share/locale/cs/LC_MESSAGES/libgksu.mo +share/locale/da/LC_MESSAGES/libgksu.mo +share/locale/de/LC_MESSAGES/libgksu.mo +share/locale/es/LC_MESSAGES/libgksu.mo +share/locale/eu/ +share/locale/eu/LC_MESSAGES/ +share/locale/eu/LC_MESSAGES/libgksu.mo +share/locale/fr/LC_MESSAGES/libgksu.mo +share/locale/hu/LC_MESSAGES/libgksu.mo +share/locale/it/LC_MESSAGES/libgksu.mo +share/locale/ko/LC_MESSAGES/libgksu.mo +share/locale/lt/ +share/locale/lt/LC_MESSAGES/ +share/locale/lt/LC_MESSAGES/libgksu.mo +share/locale/nb/LC_MESSAGES/libgksu.mo +share/locale/nl/LC_MESSAGES/libgksu.mo +share/locale/pl/LC_MESSAGES/libgksu.mo +share/locale/pt_BR/LC_MESSAGES/libgksu.mo +share/locale/ro/LC_MESSAGES/libgksu.mo +share/locale/ru/LC_MESSAGES/libgksu.mo +share/locale/sk/LC_MESSAGES/libgksu.mo +share/locale/sv/LC_MESSAGES/libgksu.mo +share/locale/zh_CN/LC_MESSAGES/libgksu.mo +share/pixmaps/ +share/pixmaps/gksu.png +@unexec GCONF_CONFIG_SOURCE=`%D/bin/gconftool-2 --get-default-source` %D/bin/gconftool-2 --makefile-uninstall-rule %D/share/schemas/gksu2/*.schemas > /dev/null +share/schemas/ +share/schemas/gksu2/ +share/schemas/gksu2/gksu.schemas +@exec GCONF_CONFIG_SOURCE=`%D/bin/gconftool-2 --get-default-source` %D/bin/gconftool-2 --makefile-install-rule %D/share/schemas/gksu2/*.schemas > /dev/null +@exec %D/bin/update-desktop-database +@unexec %D/bin/update-desktop-database