diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-12-18 07:50:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-12-18 07:50:03 +0000 |
commit | f8730c9e91ed2ce341e231c5adffb5f003f77678 (patch) | |
tree | b4ecbb2994744fab3e10498bf64ef81d01ca550d /net-print/cups-browsed | |
parent | 3e02de9a64a4e3d1f1af271a9da7ff7bbf8d86c8 (diff) |
gentoo auto-resync : 18:12:2023 - 07:50:03
Diffstat (limited to 'net-print/cups-browsed')
5 files changed, 141 insertions, 0 deletions
diff --git a/net-print/cups-browsed/Manifest b/net-print/cups-browsed/Manifest new file mode 100644 index 000000000000..499e5ad6529b --- /dev/null +++ b/net-print/cups-browsed/Manifest @@ -0,0 +1,5 @@ +AUX 0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch 915 BLAKE2B 2349ba5021b42ab896cf277c64052c1e593fe3e6ec0665ab20476aaede23290f83d6ec58e8ed8402c29f9cece0fd7c79c294512410213fe731455c1b76337592 SHA512 2c5f75b748477cd19711c7ab2c6b158de94cc14ee4e0344e303b1e7f2e3c07ee0b3c04d110896d8db9d94486a9d80c0643e79a70fe6b1d1e27c7b0d910628be7 +AUX cups-browsed.init.d 150 BLAKE2B c2098766ae08b38dead0a5bab2e30e1728ab93aa98e74edb6e20f8a885b62189f1368a041c4430ad24a1b92f0ae9cb317ac3390767db0a54ca1532022d44b0bd SHA512 c8a74ad0e5cfd3b565c12eeca50a55b7a6aa3ac92c689fc6632e2a6df5033e6fa7f16ce6c9c2cbf607ad4bd09453ab7d47448cdd04ad8c7e35f0e584b6d96d38 +DIST cups-browsed-2.0.0.tar.xz 426132 BLAKE2B e1724c03302d61cf131c8886a95f6ad8f0236b134f1deaadb783fa185141b83cd8ac5c5d993ded37d04c7fd806c5cde157a792a90a2f372075f24a5bd2423dc5 SHA512 592493ef82c65b2418b86b555c4d24bdf352f78516993a021d106240b8c399fd9f4fcc27e396e895d94da889a97f2bbc5e96bfa92c58c8be80802ee8df43db80 +EBUILD cups-browsed-2.0.0.ebuild 2162 BLAKE2B 5d0312bb43d906f2884fffd7bd686c397e8cfb15c7e1925bf4268f6a4d6125bc011f227d220881eba92f8f1733d149cc8370f279815d9d8d709521d09ea78aa8 SHA512 3c53fe086d3cf6ebcb2a268a385bb5fd10b97ef76682e2bdc4ca3388cef5b8a9561d9fe6c7d783656274aecbb4eda7c9893daafeb741c17f9f710179a919e56f +MISC metadata.xml 350 BLAKE2B d469f8a462c27bb1f22454a0141a67a6ac9c4c06058bf50576fd4d8324371042805464135777838a7ee787185c0f37e2ab06de00db9645b5737dcada51464f22 SHA512 53832a79e75d4ffb1896d3a984709cd06294b82ed7a0cab9a2c958a8fabf7d2d4252f09b4302336a42dbd3afd079b1688b86d04e63efbca5ee5065ac56c793ce 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..0232d57c8b51 --- /dev/null +++ b/net-print/cups-browsed/cups-browsed-2.0.0.ebuild @@ -0,0 +1,82 @@ +# 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 +" + +# The tests are new since the split out of cups-filters. Actually running them +# seems to be challenging. You need: +# - cups tools that are USE-optional +# - running avahi-daemon (as root!) +# - disable portage's pid-sandbox, which interferes with avahi +# - ipptool still fails to connect to port 8xxx +# +# If anything fails, a `while true` loop fails to successfully launch and break +# out of the loop, leading to a hang. Until there's an obvious recipe for +# successfully running the tests, restrict it. +RESTRICT="test" + +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_test() { + # Requires avahi running. Hangs forever if not available. + avahi-daemon --check 2>/dev/null || die "no running avahi daemon found, cannot run tests" + + default +} + +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/files/cups-browsed.init.d b/net-print/cups-browsed/files/cups-browsed.init.d new file mode 100644 index 000000000000..4fea546a05ca --- /dev/null +++ b/net-print/cups-browsed/files/cups-browsed.init.d @@ -0,0 +1,9 @@ +#!/sbin/openrc-run + +pidfile="/run/cups-browsed.pid" +command="/usr/sbin/cups-browsed" +command_background="true" + +depend() { + need cupsd avahi-daemon +} 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> |