summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2023-11-09 19:33:17 -0500
committerSam James <sam@gentoo.org>2023-12-18 03:53:21 +0000
commit023cf4bb702d50efb263b6287e9cf4df8c0367dc (patch)
tree8987d5813f5cd550ea52d4c6a5e87c0b735b9cf1 /net-print
parentnet-print/cups-filters: add 2.0.0 (diff)
downloadgentoo-023cf4bb702d50efb263b6287e9cf4df8c0367dc.tar.gz
gentoo-023cf4bb702d50efb263b6287e9cf4df8c0367dc.tar.bz2
gentoo-023cf4bb702d50efb263b6287e9cf4df8c0367dc.zip
net-print/cups-browsed: new package, add 2.0.0
Part of the CUPS v3 evolution. Now, cups-filters has been split out into multiple sub-packages. This contains the standalone browsed component. Bug: https://bugs.gentoo.org/914586 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-print')
-rw-r--r--net-print/cups-browsed/Manifest1
-rw-r--r--net-print/cups-browsed/cups-browsed-2.0.0.ebuild63
-rw-r--r--net-print/cups-browsed/files/0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch34
-rw-r--r--net-print/cups-browsed/metadata.xml11
4 files changed, 109 insertions, 0 deletions
diff --git a/net-print/cups-browsed/Manifest b/net-print/cups-browsed/Manifest
new file mode 100644
index 000000000000..e9a2ce2398ba
--- /dev/null
+++ b/net-print/cups-browsed/Manifest
@@ -0,0 +1 @@
+DIST cups-browsed-2.0.0.tar.xz 426132 BLAKE2B e1724c03302d61cf131c8886a95f6ad8f0236b134f1deaadb783fa185141b83cd8ac5c5d993ded37d04c7fd806c5cde157a792a90a2f372075f24a5bd2423dc5 SHA512 592493ef82c65b2418b86b555c4d24bdf352f78516993a021d106240b8c399fd9f4fcc27e396e895d94da889a97f2bbc5e96bfa92c58c8be80802ee8df43db80
diff --git a/net-print/cups-browsed/cups-browsed-2.0.0.ebuild b/net-print/cups-browsed/cups-browsed-2.0.0.ebuild
new file mode 100644
index 000000000000..6baeb697f2cd
--- /dev/null
+++ b/net-print/cups-browsed/cups-browsed-2.0.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd
+
+DESCRIPTION="helper daemon to browse for remote CUPS queues and IPP network printers"
+HOMEPAGE="https://github.com/OpenPrinting/cups-browsed"
+SRC_URI="https://github.com/OpenPrinting/cups-browsed/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="ldap test zeroconf"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-libs/glib:2
+ >=net-print/cups-2
+ >=net-print/cups-filters-2.0.0
+ ldap? ( net-nds/openldap:= )
+ test? ( net-print/cups[zeroconf] )
+ zeroconf? ( net-dns/avahi[dbus] )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/gdbus-codegen
+ >=sys-devel/gettext-0.18.3
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ --localstatedir="${EPREFIX}"/var
+ --with-browseremoteprotocols=DNSSD,CUPS
+ --with-cups-rundir="${EPREFIX}"/run/cups
+ --with-rcdir=no
+
+ $(use_enable ldap)
+ $(use_enable zeroconf avahi)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ cp "${FILESDIR}"/cups-browsed.init.d "${T}"/cups-browsed || die
+
+ if ! use zeroconf ; then
+ sed -i -e 's:need cupsd avahi-daemon:need cupsd:g' "${T}"/cups-browsed || die
+ sed -i -e 's:cups\.service avahi-daemon\.service:cups.service:g' "${S}"/daemon/cups-browsed.service || die
+ fi
+
+ doinitd "${T}"/cups-browsed
+ systemd_dounit "${S}"/daemon/cups-browsed.service
+
+}
diff --git a/net-print/cups-browsed/files/0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch b/net-print/cups-browsed/files/0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch
new file mode 100644
index 000000000000..f72d3919c037
--- /dev/null
+++ b/net-print/cups-browsed/files/0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch
@@ -0,0 +1,34 @@
+Upstream: https://github.com/OpenPrinting/cups-browsed/commit/08af74bfbf9aa8ccab45a2ee74e95951839756ba.patch
+From 08af74bfbf9aa8ccab45a2ee74e95951839756ba Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Wed, 27 Sep 2023 13:01:46 +0200
+Subject: [PATCH] cups-browsed.c: Fix build with avahi disabled (#20)
+
+Fixes #19
+---
+ daemon/cups-browsed.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/daemon/cups-browsed.c b/daemon/cups-browsed.c
+index b06461b4..c1e64fab 100644
+--- a/daemon/cups-browsed.c
++++ b/daemon/cups-browsed.c
+@@ -400,6 +400,7 @@ typedef struct pagesize_count_s
+ int count;
+ } pagesize_count_t;
+
++#ifdef HAVE_AVAHI
+ typedef struct resolver_args_s
+ {
+ AvahiIfIndex interface;
+@@ -414,6 +415,7 @@ typedef struct resolver_args_s
+ AvahiLookupResultFlags flags;
+ void* userdata;
+ } resolver_args_t;
++#endif // HAVE_AVAHI
+
+ typedef struct create_args_s
+ {
+--
+2.41.0
+
diff --git a/net-print/cups-browsed/metadata.xml b/net-print/cups-browsed/metadata.xml
new file mode 100644
index 000000000000..1b9a77a07ab0
--- /dev/null
+++ b/net-print/cups-browsed/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>printing@gentoo.org</email>
+ <name>Gentoo Printing Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">OpenPrinting/cups-browsed</remote-id>
+ </upstream>
+</pkgmetadata>