public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-print/cups-browsed/files/, net-print/cups-browsed/
@ 2023-12-18  3:54 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2023-12-18  3:54 UTC (permalink / raw
  To: gentoo-commits

commit:     023cf4bb702d50efb263b6287e9cf4df8c0367dc
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Fri Nov 10 00:33:17 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 18 03:53:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=023cf4bb

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 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-print/cups-browsed/Manifest                    |  1 +
 net-print/cups-browsed/cups-browsed-2.0.0.ebuild   | 63 ++++++++++++++++++++++
 ...rowsed.c-Fix-build-with-avahi-disabled-20.patch | 34 ++++++++++++
 net-print/cups-browsed/metadata.xml                | 11 ++++
 4 files changed, 109 insertions(+)

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>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-18  3:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-18  3:54 [gentoo-commits] repo/gentoo:master commit in: net-print/cups-browsed/files/, net-print/cups-browsed/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox