summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/system-config-printer')
-rw-r--r--app-admin/system-config-printer/files/system-config-printer-1.5.18-fix-debugprint-exception.patch22
-rw-r--r--app-admin/system-config-printer/system-config-printer-1.5.18-r1.ebuild92
2 files changed, 114 insertions, 0 deletions
diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.18-fix-debugprint-exception.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.18-fix-debugprint-exception.patch
new file mode 100644
index 000000000000..829166ad9d8e
--- /dev/null
+++ b/app-admin/system-config-printer/files/system-config-printer-1.5.18-fix-debugprint-exception.patch
@@ -0,0 +1,22 @@
+From 399b3334d6519639cfe7f1c0457e2475b8ee5230 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Thu, 13 Oct 2022 14:03:37 +0200
+Subject: [PATCH] Fix debugprint() in options.py (fixes #291)
+
+---
+ options.py | 2 +-
+ 1 file changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/options.py b/options.py
+index d756f98dc..d7c236deb 100644
+--- a/options.py
++++ b/options.py
+@@ -423,7 +423,7 @@ def __init__(self, name, value, supported, on_change):
+ debugprint("Unknown value for %s: %s" % (name, value))
+ debugprint("Choices: %s" % (supported))
+ if len(supported) > 0:
+- debugprint("Selecting from choices:", supported[0])
++ debugprint("Selecting from choices: %s" % supported[0])
+ self.selector.set_active(0)
+ self.selector.connect("changed", self.changed)
+
diff --git a/app-admin/system-config-printer/system-config-printer-1.5.18-r1.ebuild b/app-admin/system-config-printer/system-config-printer-1.5.18-r1.ebuild
new file mode 100644
index 000000000000..0c83ac608bfc
--- /dev/null
+++ b/app-admin/system-config-printer/system-config-printer-1.5.18-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="xml(+)"
+inherit python-single-r1 systemd udev xdg
+
+DESCRIPTION="Graphical user interface for CUPS administration"
+HOMEPAGE="https://github.com/OpenPrinting/system-config-printer"
+SRC_URI="https://github.com/OpenPrinting/${PN}/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86"
+IUSE="keyring policykit"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# Needs cups running, bug 284005
+RESTRICT="test"
+
+# Additional unhandled dependencies
+# gnome-extra/gnome-packagekit[${PYTHON_USEDEP}] with pygobject:2 ?
+# python samba client: smbc
+# selinux: needed for troubleshooting
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-libs/glib:2
+ net-print/cups[dbus]
+ virtual/libusb:1
+ >=virtual/udev-172
+ x11-libs/gtk+:3[introspection]
+ x11-libs/libnotify[introspection]
+ x11-libs/pango[introspection]
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ >=app-text/xmlto-0.0.22
+ dev-perl/XML-Parser
+ dev-util/desktop-file-utils
+ >=sys-devel/gettext-0.20
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ $(python_gen_cond_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/pycups[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/urllib3[${PYTHON_USEDEP}]
+ ')
+ keyring? ( app-crypt/libsecret[introspection] )
+ policykit? ( net-print/cups-pk-helper )
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-debugprint-exception.patch" ) # git master (1.5.19)
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-xmlto
+ --enable-nls
+ --with-desktop-vendor=Gentoo
+ --with-udev-rules
+ --with-systemdsystemunitdir=$(systemd_get_systemunitdir)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ default
+ python_optimize cupshelpers
+}
+
+src_install() {
+ default
+ python_fix_shebang "${ED}"
+ python_optimize
+ python_domodule cupshelpers
+}
+
+pkg_postinst() {
+ udev_reload
+}
+
+pkg_postrm() {
+ udev_reload
+}