public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Eli Schwartz <eschwartz93@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [RFC PATCH 04/10] net-print/cups-browsed: new package, add 2.0.0
Date: Tue,  5 Dec 2023 00:20:29 -0500	[thread overview]
Message-ID: <20231205052550.3150055-5-eschwartz93@gmail.com> (raw)
In-Reply-To: <20231205052550.3150055-1-eschwartz93@gmail.com>

Part of the CUPS v3 evolution. Now, cups-filters has been split out into
multiple sub-packages. This contains the standalone browsed component.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
---
 net-print/cups-browsed/Manifest               |  1 +
 .../cups-browsed/cups-browsed-2.0.0.ebuild    | 63 +++++++++++++++++++
 ...d.c-Fix-build-with-avahi-disabled-20.patch | 34 ++++++++++
 net-print/cups-browsed/metadata.xml           | 11 ++++
 4 files changed, 109 insertions(+)
 create mode 100644 net-print/cups-browsed/Manifest
 create mode 100644 net-print/cups-browsed/cups-browsed-2.0.0.ebuild
 create mode 100644 net-print/cups-browsed/files/0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch
 create mode 100644 net-print/cups-browsed/metadata.xml

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>
-- 
2.41.0



  parent reply	other threads:[~2023-12-05  5:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  5:20 [gentoo-dev] [RFC PATCH 00/10] Upgrading cups-filters to 2.0.0 Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 01/10] net-print/libcupsfilters: new package, add 2.0.0 Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 02/10] net-print/libppd: " Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 03/10] net-print/cups-filters: " Eli Schwartz
2023-12-05  5:20 ` Eli Schwartz [this message]
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 05/10] net-print/cups-meta: new package, add 1 Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 06/10] net-print/cups: drop cyclic dependency on cups-filters Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 07/10] net-print/cups: re-enable tests Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 08/10] net-print/cups: avoid running unittests in src_compile Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 09/10] net-print/cups-browsed: restrict tests Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 10/10] net-print/cups-filters: " Eli Schwartz
2023-12-05 21:51 ` [gentoo-dev] [RFC PATCH 00/10] Upgrading cups-filters to 2.0.0 James Le Cuirot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231205052550.3150055-5-eschwartz93@gmail.com \
    --to=eschwartz93@gmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox