summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-07-05 09:09:03 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-07-05 09:09:03 +0000
commitf953ecd2a27613b2c624c0c30900d9500b6e253a (patch)
treede8b094c1c63f7bc1c4851d925dfdad660ee8c4e /app-admin/system-config-printer-common
parentVersion bump (thanks idl0r, bug 397491), PMASKED until the libpng14 issue get... (diff)
downloadgentoo-2-f953ecd2a27613b2c624c0c30900d9500b6e253a.tar.gz
gentoo-2-f953ecd2a27613b2c624c0c30900d9500b6e253a.tar.bz2
gentoo-2-f953ecd2a27613b2c624c0c30900d9500b6e253a.zip
Fix compability with sys-fs/udev >= 185 wrt #423423 by Maksim Melnikau
(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/system-config-printer-common')
-rw-r--r--app-admin/system-config-printer-common/ChangeLog9
-rw-r--r--app-admin/system-config-printer-common/files/system-config-printer-common-1.3.9-udev185.patch45
-rw-r--r--app-admin/system-config-printer-common/system-config-printer-common-1.3.9-r3.ebuild93
3 files changed, 146 insertions, 1 deletions
diff --git a/app-admin/system-config-printer-common/ChangeLog b/app-admin/system-config-printer-common/ChangeLog
index a62d1851c056..54ead48d8beb 100644
--- a/app-admin/system-config-printer-common/ChangeLog
+++ b/app-admin/system-config-printer-common/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-admin/system-config-printer-common
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/system-config-printer-common/ChangeLog,v 1.73 2012/06/25 07:57:31 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/system-config-printer-common/ChangeLog,v 1.74 2012/07/05 09:09:03 ssuominen Exp $
+
+*system-config-printer-common-1.3.9-r3 (05 Jul 2012)
+
+ 05 Jul 2012; Samuli Suominen <ssuominen@gentoo.org>
+ +system-config-printer-common-1.3.9-r3.ebuild,
+ +files/system-config-printer-common-1.3.9-udev185.patch:
+ Fix compability with sys-fs/udev >= 185 wrt #423423 by Maksim Melnikau
25 Jun 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
system-config-printer-common-1.3.9-r2.ebuild:
diff --git a/app-admin/system-config-printer-common/files/system-config-printer-common-1.3.9-udev185.patch b/app-admin/system-config-printer-common/files/system-config-printer-common-1.3.9-udev185.patch
new file mode 100644
index 000000000000..7be5547229f2
--- /dev/null
+++ b/app-admin/system-config-printer-common/files/system-config-printer-common-1.3.9-udev185.patch
@@ -0,0 +1,45 @@
+From cbacff0c9f7e3e6549c9b33a42e805a935db36e6 Mon Sep 17 00:00:00 2001
+From: Jiri Popelka <jpopelka@redhat.com>
+Date: Tue, 5 Jun 2012 14:28:36 +0200
+Subject: [PATCH] udev: replace udev_get_sys_path() with hard-coded "/sys"
+ (trac #223)
+
+udev_get_sys_path() is no longer provided by libudev
+---
+ udev/udev-configure-printer.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c
+index 1d89f9a..8d349e4 100644
+--- a/udev/udev-configure-printer.c
++++ b/udev/udev-configure-printer.c
+@@ -451,7 +451,6 @@ device_id_from_devpath (const char *devpath,
+ struct usb_uri_map_entry *entry;
+ struct udev *udev;
+ struct udev_device *dev, *parent_dev = NULL;
+- const char *sys;
+ const char *idVendorStr, *idProductStr, *serial;
+ char *end;
+ unsigned long idVendor, idProduct;
+@@ -500,8 +499,7 @@ device_id_from_devpath (const char *devpath,
+ *dest = '\0';
+ }
+
+- sys = udev_get_sys_path (udev);
+- syslen = strlen (sys);
++ syslen = strlen ("/sys");
+ devpathlen = strlen (devpath);
+ syspath = malloc (syslen + devpathlen + 1);
+ if (syspath == NULL)
+@@ -511,7 +509,7 @@ device_id_from_devpath (const char *devpath,
+ exit (1);
+ }
+
+- memcpy (syspath, sys, syslen);
++ memcpy (syspath, "/sys", syslen);
+ memcpy (syspath + syslen, devpath, devpathlen);
+ syspath[syslen + devpathlen] = '\0';
+
+--
+1.7.10.2
+
diff --git a/app-admin/system-config-printer-common/system-config-printer-common-1.3.9-r3.ebuild b/app-admin/system-config-printer-common/system-config-printer-common-1.3.9-r3.ebuild
new file mode 100644
index 000000000000..381fe5728eab
--- /dev/null
+++ b/app-admin/system-config-printer-common/system-config-printer-common-1.3.9-r3.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/system-config-printer-common/system-config-printer-common-1.3.9-r3.ebuild,v 1.1 2012/07/05 09:09:03 ssuominen Exp $
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.6"
+WANT_AUTOMAKE="1.11"
+
+inherit autotools eutils python
+
+MY_P=${PN%-common}-${PV}
+
+DESCRIPTION="Common modules of Red Hat's printer administration tool"
+HOMEPAGE="http://cyberelk.net/tim/software/system-config-printer/"
+SRC_URI="http://cyberelk.net/tim/data/${PN/-common}/${PV%.*}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
+SLOT="0"
+IUSE="doc policykit"
+
+# Needs cups running, bug 284005
+RESTRICT="test"
+
+# system-config-printer split since 1.1.3
+COMMON_DEPEND="
+ >=dev-libs/glib-2
+ dev-libs/libxml2[python]
+ dev-python/dbus-python
+ >=dev-python/pycups-1.9.60
+ dev-python/pycurl
+ >=dev-python/pygobject-2.21.5:2
+ >=net-print/cups-1.4.6[dbus]
+ >=sys-fs/udev-164-r2
+ virtual/libusb:0
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ doc? ( dev-python/epydoc )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<app-admin/system-config-printer-gnome-${PV}
+ policykit? ( >=sys-auth/polkit-0.104-r1 )
+"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.3.9-split.patch \
+ "${FILESDIR}"/${PN}-1.3.9-cups_filters_path.patch \
+ "${FILESDIR}"/${PN}-1.3.9-udev185.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-nls \
+ --with-udev-rules
+}
+
+src_compile() {
+ emake
+ use doc && emake html
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ udevhelperdir=/lib/udev \
+ udevrulesdir=/lib/udev/rules.d \
+ install
+
+ dodoc AUTHORS ChangeLog README
+ use doc && dohtml -r html/
+
+ python_convert_shebangs -q -r $(python_get_version) "${ED}"
+}
+
+pkg_postinst() {
+ python_mod_optimize cupshelpers
+}
+
+pkg_postrm() {
+ python_mod_cleanup cupshelpers /usr/share/system-config-printer
+}