diff options
Diffstat (limited to 'net-print')
-rw-r--r-- | net-print/Manifest.gz | bin | 5756 -> 6414 bytes | |||
-rw-r--r-- | net-print/cups-browsed/Manifest | 5 | ||||
-rw-r--r-- | net-print/cups-browsed/cups-browsed-2.0.0.ebuild | 82 | ||||
-rw-r--r-- | net-print/cups-browsed/files/0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch | 34 | ||||
-rw-r--r-- | net-print/cups-browsed/files/cups-browsed.init.d | 9 | ||||
-rw-r--r-- | net-print/cups-browsed/metadata.xml | 11 | ||||
-rw-r--r-- | net-print/cups-filters/Manifest | 2 | ||||
-rw-r--r-- | net-print/cups-filters/cups-filters-2.0.0.ebuild | 54 | ||||
-rw-r--r-- | net-print/cups-meta/Manifest | 2 | ||||
-rw-r--r-- | net-print/cups-meta/cups-meta-1.ebuild | 23 | ||||
-rw-r--r-- | net-print/cups-meta/metadata.xml | 14 | ||||
-rw-r--r-- | net-print/cups/Manifest | 1 | ||||
-rw-r--r-- | net-print/cups/cups-2.4.7-r2.ebuild | 320 | ||||
-rw-r--r-- | net-print/libcupsfilters/Manifest | 3 | ||||
-rw-r--r-- | net-print/libcupsfilters/libcupsfilters-2.0.0-r1.ebuild | 61 | ||||
-rw-r--r-- | net-print/libcupsfilters/metadata.xml | 14 | ||||
-rw-r--r-- | net-print/libppd/Manifest | 3 | ||||
-rw-r--r-- | net-print/libppd/libppd-2.0.0.ebuild | 52 | ||||
-rw-r--r-- | net-print/libppd/metadata.xml | 14 |
19 files changed, 704 insertions, 0 deletions
diff --git a/net-print/Manifest.gz b/net-print/Manifest.gz Binary files differindex f05de90b2613..2ef1c30925fe 100644 --- a/net-print/Manifest.gz +++ b/net-print/Manifest.gz 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> diff --git a/net-print/cups-filters/Manifest b/net-print/cups-filters/Manifest index 47f32e6b704f..669a1871b88a 100644 --- a/net-print/cups-filters/Manifest +++ b/net-print/cups-filters/Manifest @@ -2,6 +2,8 @@ AUX cups-browsed.init.d-r2 150 BLAKE2B c2098766ae08b38dead0a5bab2e30e1728ab93aa9 AUX cups-filters-1.28.17-CVE-2023-24805.patch 7284 BLAKE2B fb7a6ec5a872381e2319a836e2bbb7f31d3635fd5fd38b44db28616cd18d0332d2ca8af36028a8ba8b0f405f144065779bffb15c1f07dbb6ee6118e01583185a SHA512 108282a8414591187789d87d8da22d261fda0e2cb0dae2e6fcbde320cee0b6fb79c2f616947ee297a58237f3c630b593d4f5b668cf8df2d5cb5c755cb0470211 AUX cups-filters-1.28.17-c++17.patch 1066 BLAKE2B 149001a37c5799210a7cbc6c79ab1b87917f937c4f9d61c1955d18588e0b6c27e17430613f4c35e50cabf485ad381bc8e1f4c6f8a4afa14a7e9ab5e1f9acf291 SHA512 f78038c6e173490a9096ae1c7e22476e33187317738db680c43333738c7dad29d441d7c78ed2d8adc389444ef5c4694002e403f5e54855216d4000ac791752b0 DIST cups-filters-1.28.17.tar.xz 1516052 BLAKE2B 87258391901d55d9e59b06d54603d014e54d224a373529bd70fcd38cded9dc96c88ca73bcea63d7633c065caea3f9e3274cd450aec5f1bd90130d9a88c0d3421 SHA512 320544a48206165581adafb28dbef58f39c66bebd3641be3d180a692605349d9e6af6d464044db9f7bda17a67f4a079370d8cc880cd7873d684b2209882deb35 +DIST cups-filters-2.0.0.tar.xz 447648 BLAKE2B be5e2aab4eb921aa67bfcc93aa5f95a9f1fe1a269ed73d18273a0e9a3e816187e9e32750ba6521c3ab083c3c7b7a60bb1fa679e16d4a5917f911a4ba8d4b7207 SHA512 fc8ba3bbf92d5ede295884023d1c42422c4c250dbbf21c948f160a04ded3259784df4bd17eea64492f9417f866e566be1a9fcde47d29655cd4204ef4cc7af134 EBUILD cups-filters-1.28.17-r2.ebuild 3672 BLAKE2B d52324c5021068f7b5f118c3bc1c6639bf3c93a8eba02102d999b3346fae6de385c67999e4bb4f145dd62ba6c20e52ae5db6fe6fe1b6711e5693b39248ea85e7 SHA512 7ca881f23c825a8163943c1a0478e2123ea1103f8e1448d11fae4044c43db7daade85679d06bfa9a041638dc7570d1d502aedd6eed1dc2780686e11c9073eaa8 EBUILD cups-filters-1.28.17.ebuild 3657 BLAKE2B ab7d43196ae1fa0c19f945cd5cd5858b9fd956270f8fb02fedc514c451ed6beb8be5181dbcda7a5038aef863eaf7b88b1f5d18744c014c7b09383c17e2dba61b SHA512 a511251105363682cbc5caf7699ca1fe3930f972212eb8342c398e224eaa898a5fe122fcd5ab1f2aafa3339e3fd0637542a44c2881621a791c04e164055e6cec +EBUILD cups-filters-2.0.0.ebuild 1362 BLAKE2B 9f367e8bcf1898557900d62f4ca82a30e1e033fa333f0fc507fa60c84e1b7429aa637e68b9414a07f2853386180bbb28aeff2b3e267e484768a13cc15d9c04c1 SHA512 ff75b00cd42dcb095a7b426dfea7562d832c3ea3701a62b0e5f45fa4460e16c7b5a7e09b0908c0b456a6f24f07a149403fe6e5cadf6ce9ec2ccb6caa96de9c8d MISC metadata.xml 585 BLAKE2B c3ae887bff09343b882156b9020c185a9bd0d7bfabee240c71d714b8811761ef23176e4ee71f731022103a3da2255e1683b7ac4aca0f677afd994de5bedc96ca SHA512 313722d8912f26c1a7754a837b1d64dd122ac005cd9bb644ae65cac7b7a442845b25befa7891669abbf43011e9958988a6ad084dfa6ed393decbd198e852b196 diff --git a/net-print/cups-filters/cups-filters-2.0.0.ebuild b/net-print/cups-filters/cups-filters-2.0.0.ebuild new file mode 100644 index 000000000000..e07acf911895 --- /dev/null +++ b/net-print/cups-filters/cups-filters-2.0.0.ebuild @@ -0,0 +1,54 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Cups filters" +HOMEPAGE="https://wiki.linuxfoundation.org/openprinting/cups-filters" +SRC_URI="https://github.com/OpenPrinting/cups-filters/releases/download/${PV}/${P}.tar.xz" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="+foomatic" +#IUSE="" +KEYWORDS="~amd64" + +RDEPEND=" + net-print/libcupsfilters + net-print/libppd + >=net-print/cups-1.7.3 +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=sys-devel/gettext-0.18.3 + virtual/pkgconfig +" + +# The tests are composed of: +# - built program +# - test case itself: filter/test.sh +# +# The latter is not wired up, and it becomes immediately evident why. +# Bow to this reality and don't claim we can run anything. As a side +# effect, don't compile in src_test, that which we never use. +RESTRICT="test" + +src_configure() { + local myeconfargs=( + --enable-imagefilters + --enable-driverless + --enable-poppler + --localstatedir="${EPREFIX}"/var + --with-fontdir="fonts/conf.avail" + # cups-browsed is split out and avahi is not needed for filters + # https://github.com/OpenPrinting/cups-filters/pull/558 + --disable-avahi + # These are just probed for the path. Always enable them. + --with-gs-path="${EPREFIX}"/usr/bin/gs + --with-mutool-path="${EPREFIX}"/usr/bin/mutool + + $(use_enable foomatic) + ) + + econf "${myeconfargs[@]}" +} diff --git a/net-print/cups-meta/Manifest b/net-print/cups-meta/Manifest new file mode 100644 index 000000000000..541bc8702299 --- /dev/null +++ b/net-print/cups-meta/Manifest @@ -0,0 +1,2 @@ +EBUILD cups-meta-1.ebuild 612 BLAKE2B a0f56fd0352104e429a5ca6c07025f55c31426a7f841ba1b6c2ae34cea6e06035fbf7a35b5fbee94f5192bf5e11881776e05b6c2cb448dc9b1f55276761bc7a5 SHA512 70e8729a6b01c6a696f8dcd9ca1e02c63e6b6bfb7b9918874461a43ff964d09815ad81743bcc12a209fdda577db26be4e7f8c9b89ef98b5eaf60fd6dc3a05a9e +MISC metadata.xml 571 BLAKE2B a4a8482afa7c787f26b83743d67acce88f9315cd0ca8b58e5516c459bdacd619fa1ec80cd7da0750401ee3d75f6e7b06807c19a977aa91287934212b876ae8e9 SHA512 ba1c34a1acffbf35e404a14bfc4a83b2c48de274119cb5800920f7511ff054759d954f6fe8254de0c144fb28f7c69abf0e00c334b1407883e787ab338e005f26 diff --git a/net-print/cups-meta/cups-meta-1.ebuild b/net-print/cups-meta/cups-meta-1.ebuild new file mode 100644 index 000000000000..865ef6ab6d0e --- /dev/null +++ b/net-print/cups-meta/cups-meta-1.ebuild @@ -0,0 +1,23 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Metapackage for a fully configured cups printer setup" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" + +LICENSE="metapackage" +SLOT="0" +IUSE="+browsed +foomatic pdf +postscript +poppler zeroconf" +KEYWORDS="~amd64" + +RDEPEND=" + net-print/cups[zeroconf?] + net-print/libppd[postscript?,poppler?] + net-print/libcupsfilters[pdf?,poppler?] + net-print/cups-filters[foomatic?] + + browsed? ( net-print/cups-browsed ) + pdf? ( app-text/mupdf ) + postscript? ( >=app-text/ghostscript-gpl-9.09[cups] ) +" diff --git a/net-print/cups-meta/metadata.xml b/net-print/cups-meta/metadata.xml new file mode 100644 index 000000000000..45b1ab54c522 --- /dev/null +++ b/net-print/cups-meta/metadata.xml @@ -0,0 +1,14 @@ +<?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> + <stabilize-allarches/> + <use> + <flag name="browsed">Include support for the cups-browsed daemon.</flag> + <flag name="foomatic">Include support for the foomatic-rip printer driver. Strongly recommended.</flag> + <flag name="poppler">Include support for the <pkg>app-text/poppler</pkg> filters.</flag> + </use> +</pkgmetadata> diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest index 0cd3ac180b20..44e3f57e59b5 100644 --- a/net-print/cups/Manifest +++ b/net-print/cups/Manifest @@ -5,5 +5,6 @@ DIST cups-2.4.6-source.tar.gz 8135135 BLAKE2B 4e61112ddaa46f20b1cfcb8f523dd07ba7 DIST cups-2.4.7-source.tar.gz 8134809 BLAKE2B d81de62cff37c576ef8fb125b97568c2d86602cec6151d7030552fad421d7bc77a5df1e860d5ac5a241e739cc0d1fe5fcac44b8451ad2fc4dc675cf74fd41382 SHA512 914b574ff6d85de9f3471528b52d4a436c484c441f47651846e1bdfa00aec26774efd416ff466216d2bccf468f8a797b1e0d666b5c82abc87e77550ce8b00d39 EBUILD cups-2.4.6.ebuild 9552 BLAKE2B 04227d32d232dabbf378d9dd4c254b04bf582e41c569295c50db2990b23f14824287c5158f792da2b9a64d146883b5c8b096f7fc55f88ffdc3b1288293def759 SHA512 4d8e8028a98f338d6775ee3ca07490efdfcd5f9ac9ca4a6fa59405045e25e2280598bab302b6d2cbc6c69878253cba035dbcee8a6f09c6c989ffc62d78408406 EBUILD cups-2.4.7-r1.ebuild 9467 BLAKE2B f4d2c631a5c5af07ea5cbf525cf80353d60f46b37273f9b4a58def9a26cd3de5f733a87f4108b513be5a20cb1a33add83d428e9c35fd5a5c175e15e45052bfa6 SHA512 d0ddd06b8d121533025e5c74124fab77240e820e79ed189200e20f3faa60c1cf8ca3b29453cf74e733da673206fb5855a926e0bcb50f27269395a349a0f906dd +EBUILD cups-2.4.7-r2.ebuild 9580 BLAKE2B 66eb2850c32905d465dfc4531df9a4766a4c07de41aa74320df9fb1ceec0a971db62b0b220fe1c4698f731deab4dfbcb5a7d84d43043fcbab630ea09fe3eff85 SHA512 4e80733952ebee85a873f869a9b337ea36c28bbfd1f26a40f13f55af0ea47e7177bfce44298f54f952361f9220f5910dec71c6af9fd7d8025ff9ddffbfd61752 EBUILD cups-9999.ebuild 9475 BLAKE2B 6a86ce8658096636175e5f324e4d19b6ab2023f002495e6bff79f18122ea1bb7332bfdc9c642d26022a50ec72e9dd3d1d0f7329b92fc49e3da7abf038835fc92 SHA512 e0ece558491f66bcbd78fa4c10a84ef58b58a17fac7ce1f6a5fd6c6a6e7c2163b671b178da22fe92883c90a79a391f2f0735cd1f920fcac0e6e12f4c9b6b6077 MISC metadata.xml 527 BLAKE2B 04a32175e666165226eaa97785a6b9e4b779644e352c503a4653870631f28089dddbaaa3db3143f09a1d97c7f57952e4d760d64005eafacb379c23035fe9ad19 SHA512 136c81a99b501ffcedfd71f4425ba556292b79abc0ac819d336d2c845401775955b8cd72e6194f02f4c48d0cd26bc93ee7c94c7438228b49410daca80a159523 diff --git a/net-print/cups/cups-2.4.7-r2.ebuild b/net-print/cups/cups-2.4.7-r2.ebuild new file mode 100644 index 000000000000..d8a193a64337 --- /dev/null +++ b/net-print/cups/cups-2.4.7-r2.ebuild @@ -0,0 +1,320 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs + +MY_PV="${PV/_beta/b}" +MY_PV="${MY_PV/_rc/rc}" +MY_PV="${MY_PV/_p/op}" +MY_P="${PN}-${MY_PV}" + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git" + [[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999} +else + SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz" + if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64" + fi +fi + +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="The Common Unix Printing System" +HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="acl dbus debug kerberos openssl pam selinux static-libs systemd test usb X xinetd zeroconf" + +RESTRICT="!test? ( test )" + +BDEPEND=" + acct-group/lp + acct-group/lpadmin + virtual/pkgconfig +" +COMMON_DEPEND=" + app-text/libpaper:= + sys-libs/zlib + acl? ( + kernel_linux? ( + sys-apps/acl + sys-apps/attr + ) + ) + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + pam? ( sys-libs/pam ) + !pam? ( virtual/libcrypt:= ) + !openssl? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) + openssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] ) + systemd? ( sys-apps/systemd ) + usb? ( virtual/libusb:1 ) + X? ( x11-misc/xdg-utils ) + xinetd? ( sys-apps/xinetd ) + zeroconf? ( >=net-dns/avahi-0.6.31-r2[dbus,${MULTILIB_USEDEP}] ) +" +# if libcupsfilters is installed, more tests are run. They fail without at least one of the two formats enabled. +DEPEND=" + ${COMMON_DEPEND} + test? ( || ( net-print/libcupsfilters[jpeg] net-print/libcupsfilters[png] ) ) +" +RDEPEND=" + ${COMMON_DEPEND} + acct-group/lp + acct-group/lpadmin + selinux? ( sec-policy/selinux-cups ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2.4.1-nostrip.patch" + "${FILESDIR}/${PN}-2.4.1-user-AR.patch" +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/cups-config +) + +pkg_setup() { + if use kernel_linux; then + linux-info_pkg_setup + if ! linux_config_exists; then + ewarn "Can't check the linux kernel configuration." + ewarn "You might have some incompatible options enabled." + else + # Recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug #501122) + if use usb; then + if linux_chkconfig_present USB_PRINTER; then + elog "Your USB printers will be managed via libusb. In case you run into problems, " + elog "please try disabling USB_PRINTER support in your kernel or blacklisting the" + elog "usblp kernel module." + elog "Alternatively, just disable the usb useflag for cups (your printer will still work)." + fi + else + if ! linux_chkconfig_present USB_PRINTER; then + ewarn "If you plan to use USB printers you should enable the USB_PRINTER" + ewarn "support in your kernel." + ewarn "Please enable it:" + ewarn " CONFIG_USB_PRINTER=y" + ewarn "in /usr/src/linux/.config or" + ewarn " Device Drivers --->" + ewarn " USB support --->" + ewarn " [*] USB Printer support" + ewarn "Alternatively, enable the usb useflag for cups and use the libusb code." + fi + fi + fi + fi +} + +src_prepare() { + default + + # Remove ".SILENT" rule for verbose output (bug #524338). + sed 's#^.SILENT:##g' -i Makedefs.in || die + + # Remove redefinition of _FORTIFY_SOURCE (bug #907683) + sed 's#-D_FORTIFY_SOURCE=3##g' -i config-scripts/cups-compiler.m4 || die + + AT_M4DIR="config-scripts" eautoreconf + + # Custom Makefiles + multilib_copy_sources +} + +multilib_src_configure() { + export DSOFLAGS="${LDFLAGS}" + + # Explicitly specify compiler wrt bug #524340 + # + # Need to override KRB5CONFIG for proper flags + # https://github.com/apple/cups/issues/4423 + local myeconfargs=( + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config + --libdir="${EPREFIX}"/usr/$(get_libdir) + --localstatedir="${EPREFIX}"/var + # Follow Fedora permission setting + --with-cupsd-file-perm=0755 + --with-exe-file-perm=755 + --with-log-file-perm=0640 + # Used by Debian, also prevents printers from getting + # disabled and users not knowing how to re-enable them + --with-error-policy=retry-job + # Used in Debian and Fedora + --enable-sync-on-close + # + --with-rundir="${EPREFIX}"/run/cups + --with-pkgconfpath="${EPREFIX}"/usr/$(get_libdir)/pkgconfig + --with-cups-user=lp + --with-cups-group=lp + --with-docdir="${EPREFIX}"/usr/share/cups/html + # See bug #863221 for adding root + --with-system-groups="root lpadmin" + --with-xinetd="${EPREFIX}"/etc/xinetd.d + $(multilib_native_use_enable acl) + $(use_enable dbus) + $(use_enable debug) + $(use_enable debug debug-guards) + $(use_enable debug debug-printfs) + $(use_enable kerberos gssapi) + $(multilib_native_use_enable pam) + $(use_enable static-libs static) + --with-tls=$(usex openssl openssl gnutls) + $(use_with systemd ondemand systemd) + $(multilib_native_use_enable usb libusb) + $(use_with zeroconf dnssd avahi) + $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) + ) + + # Handle empty LINGUAS properly, bug #771162 + if [[ -n "${LINGUAS+x}" ]] ; then + myeconfargs+=( + --with-languages="${LINGUAS}" + ) + fi + + if tc-is-static-only; then + myeconfargs+=( + --disable-shared + ) + fi + + # Install in /usr/libexec always, instead of using /usr/lib/cups, as that + # makes more sense when facing multilib support. + sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die + + econf "${myeconfargs[@]}" + + sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die + sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die + sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die + + # Additional path corrections needed for prefix, see bug #597728 + sed \ + -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \ + -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \ + -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \ + -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \ + -i Makedefs || die +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + else + emake libs + fi +} + +multilib_src_test() { + # Avoid using /tmp + export CUPS_TESTBASE="${T}"/cups-tests + + mkdir "${T}"/cups-tests || die + + # We only build some of CUPS for multilib, so can't run the tests. + if multilib_is_native_abi; then + # avoid building *and running* test binaries in src_compile + # https://github.com/OpenPrinting/cups/commit/b1d42061e9286f50eefc851ed906d17c6e80c4b0 + emake UNITTESTS=unittests + default + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake BUILDROOT="${D}" install + else + emake BUILDROOT="${D}" install-libs install-headers + dobin cups-config + fi +} + +multilib_src_install_all() { + dodoc {CHANGES,CREDITS,README}.md + + # Move the default config file to docs + dodoc "${ED}"/etc/cups/cupsd.conf.default + rm "${ED}"/etc/cups/cupsd.conf.default || die + + # Clean out cups init scripts + rm -r "${ED}"/etc/{init.d/cups,rc*} || die + + # Install our init script + local neededservices=( + $(usex zeroconf avahi-daemon '') + $(usex dbus dbus '') + ) + [[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}" + cp "${FILESDIR}"/cupsd.init.d-r4 "${T}"/cupsd || die + sed -i -e "s/@neededservices@/${neededservices}/" "${T}"/cupsd || die + doinitd "${T}"/cupsd + + if use pam ; then + rm "${ED}"/etc/pam.d/${PN} || die + pamd_mimic_system cups auth account + fi + + if use xinetd ; then + # Correct path + sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \ + "${ED}"/etc/xinetd.d/cups-lpd || die + # It is safer to disable this by default, bug #137130 + grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \ + { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/etc/xinetd.d/cups-lpd || die ; } + # Write permission for file owner (root), bug #296221 + fperms u+w /etc/xinetd.d/cups-lpd + else + # Always configure with --with-xinetd= and clean up later, + # bug #525604 + rm -r "${ED}"/etc/xinetd.d || die + fi + + keepdir /etc/cups/{interfaces,ppd,ssl} + + if ! use X ; then + rm -r "${ED}"/usr/share/applications || die + fi + + # Create /etc/cups/client.conf, bug #196967 and bug #266678 + echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf + + # The following file is now provided by cups-filter: + rm -r "${ED}"/usr/share/cups/banners || die + + # The following are created by the init script + rm -r "${ED}"/var/cache || die + rm -r "${ED}"/run || die + + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp +} + +pkg_postinst() { + xdg_pkg_postinst + local v + + for v in ${REPLACING_VERSIONS}; do + if ! ver_test ${v} -ge 2.2.2-r2 ; then + ewarn "The cupsd init script switched to using pidfiles. Shutting down" + ewarn "cupsd will fail the next time. To fix this, please run once as root" + ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" + break + fi + done + + for v in ${REPLACING_VERSIONS}; do + elog + elog "For information about installing a printer and general cups setup" + elog "take a look at: https://wiki.gentoo.org/wiki/Printing" + break + done + + optfeature_header "CUPS may need installing the following for certain features to work:" + use zeroconf && optfeature "local hostname resolution using a hostname.local naming scheme" sys-auth/nss-mdns +} diff --git a/net-print/libcupsfilters/Manifest b/net-print/libcupsfilters/Manifest new file mode 100644 index 000000000000..b5cafc9f9db0 --- /dev/null +++ b/net-print/libcupsfilters/Manifest @@ -0,0 +1,3 @@ +DIST libcupsfilters-2.0.0.tar.xz 1279856 BLAKE2B ce9d839bb700017c303c1301c7a97fd02e3657a908e685377be49557d995574a7fc5a31d4fcbda5eeb9ba2d3cd07858224540dbf0bc9fa078cfd25a58ee15a41 SHA512 279bff6dcfa76312b10dae97480914345defd90eab79c4716d4553870f73e0f9db404786fd7e2948a86ae5aedb10dca0c2984ccb4222acbd4e835cd572030d6a +EBUILD libcupsfilters-2.0.0-r1.ebuild 1363 BLAKE2B 803bcbaa57cd3aeedbbbcddb550f010574f534ec0e460c158773c5c9f96fcc4472ed85651cf9edcf6a80197427d586f96e516fe7de89c5fd8a32c8de1122c413 SHA512 1b9076810de787c435f7e589be12c339acdff0fa4804d4cebc3eb1344e3fc249833b86002eda25d5e60249a89ed12d5c005fbf7c8732087baec537de64890979 +MISC metadata.xml 426 BLAKE2B 60d605203c938ba35e60bc4dfa121d6fb0223d70fdd1bdea4ed02693034a46ff039a580f5c0a5925aa3c4c33220243503096b8de233f6031447a6425a974182a SHA512 04811e0d82ce0365308b4391a33e03da423dc924cc7ff16a2eeedbdb51705b9a62cffe67d7e25b9221a0b511caaa3b19c184301fbecc59056a282a811ad9df7e diff --git a/net-print/libcupsfilters/libcupsfilters-2.0.0-r1.ebuild b/net-print/libcupsfilters/libcupsfilters-2.0.0-r1.ebuild new file mode 100644 index 000000000000..eb32f66f6b78 --- /dev/null +++ b/net-print/libcupsfilters/libcupsfilters-2.0.0-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="library for developing printing features, split out of cups-filters" +HOMEPAGE="https://github.com/OpenPrinting/libcupsfilters" +SRC_URI="https://github.com/OpenPrinting/libcupsfilters/releases/download/${PV}/${P}.tar.xz" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="dbus exif jpeg pdf +poppler +postscript png test tiff" +KEYWORDS="~amd64" + +RESTRICT="!test? ( test )" + +RDEPEND=" + >=app-text/qpdf-8.3.0:= + media-libs/fontconfig + media-libs/lcms:2 + >=net-print/cups-2 + !<net-print/cups-filters-2.0.0 + + exif? ( media-libs/libexif ) + dbus? ( sys-apps/dbus ) + jpeg? ( media-libs/libjpeg-turbo:= ) + pdf? ( app-text/mupdf ) + poppler? ( >=app-text/poppler-0.32[cxx] ) + png? ( media-libs/libpng:= ) + tiff? ( media-libs/tiff:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=sys-devel/gettext-0.18.3 + virtual/pkgconfig + test? ( media-fonts/dejavu ) +" + +src_configure() { + local myeconfargs=( + --enable-imagefilters + --localstatedir="${EPREFIX}"/var + --with-cups-rundir="${EPREFIX}"/run/cups + + $(use_enable exif) + $(use_enable dbus) + $(use_enable poppler) + $(use_enable postscript) + $(use_enable pdf mutool) + $(use_with jpeg) + $(use_with png) + $(use_with tiff) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-print/libcupsfilters/metadata.xml b/net-print/libcupsfilters/metadata.xml new file mode 100644 index 000000000000..d31059e1c097 --- /dev/null +++ b/net-print/libcupsfilters/metadata.xml @@ -0,0 +1,14 @@ +<?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> + <use> + <flag name="poppler">Build the pdftoraster filter</flag> + </use> + <upstream> + <remote-id type="github">OpenPrinting/libcupsfilters</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-print/libppd/Manifest b/net-print/libppd/Manifest new file mode 100644 index 000000000000..476038cb957f --- /dev/null +++ b/net-print/libppd/Manifest @@ -0,0 +1,3 @@ +DIST libppd-2.0.0.tar.xz 580716 BLAKE2B 8505c5ab5b515104308624a8f78505343b894df08ab8ac2727d7bd82d0d65d256d22ecaf384b212d9a5c45d2a619a6311722a8c5ed954b7a8a9780477aedb458 SHA512 8be9e67552528606fd804ba13b05710938ed7d02316c1c902ee657bc0e5fade663ffacb5b032609a1c1fdc80d976e7e54d2ca2f71db83cb8fdcee6a371e6bad4 +EBUILD libppd-2.0.0.ebuild 1378 BLAKE2B 27fc5a35c2ee3f26d41deaee3848d740390efd3469580bbe73a1e8e99e6f770270e8b1c67eee3208c98eb7869fb37824f2bedd49f524225162c31fbcd0ecdba7 SHA512 0504328adee15c811e6f3896d800c3aa8cb1c17174321ff95f7f91fed09f4d67969a6d5f79e10073dbdc7fa367857448e5b7266ac84dd0db63dde07eed4afa43 +MISC metadata.xml 440 BLAKE2B 8cc1e3fa25d2c12efb0253a37a0dedb484fcac5930deacd37bc09534e9210e72e58669a07efc0d40612a428d190b852064f6175083c852a8b3a4153101483905 SHA512 79801ac1a34f4e5fc46bd8c45c638dccde3168c701dfaffb51d626405e77fe0e8fa190b32c0b76150e51197223363dea0163086f172b0dccccd0c94fc5cb2d0b diff --git a/net-print/libppd/libppd-2.0.0.ebuild b/net-print/libppd/libppd-2.0.0.ebuild new file mode 100644 index 000000000000..174c775a213f --- /dev/null +++ b/net-print/libppd/libppd-2.0.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Legacy library for PPD files, split out of cups-filters" +HOMEPAGE="https://github.com/OpenPrinting/libppd" +SRC_URI="https://github.com/OpenPrinting/libppd/releases/download/${PV}/${P}.tar.xz" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="+postscript +poppler" +KEYWORDS="~amd64" + +# pdftops has various possible implementations, but the default +# really needs to be decent +REQUIRED_USE="|| ( postscript poppler )" + +RDEPEND=" + >=net-print/cups-2 + net-print/libcupsfilters + !<net-print/cups-filters-2.0.0 + postscript? ( >=app-text/ghostscript-gpl-9.09[cups] ) + poppler? ( >=app-text/poppler-0.32[utils] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + >=sys-devel/gettext-0.18.3 + virtual/pkgconfig +" + +src_configure() { + local myeconfargs=( + --localstatedir="${EPREFIX}"/var + --with-cups-rundir="${EPREFIX}"/run/cups + # This does build time checks for (preferred) tool interfaces. + $(use_enable postscript ghostscript) + $(use_enable poppler pdftops) + # These fallbacks are just probed for the path. Always enable them. + --with-mutool-path="${EPREFIX}"/usr/bin/mutool + --with-pdftocairo-path="${EPREFIX}"/usr/bin/pdftocairo # from poppler + # unpackaged + --disable-acroread + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-print/libppd/metadata.xml b/net-print/libppd/metadata.xml new file mode 100644 index 000000000000..67a6452ca268 --- /dev/null +++ b/net-print/libppd/metadata.xml @@ -0,0 +1,14 @@ +<?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> + <use> + <flag name="poppler">Use the <pkg>app-text/poppler</pkg> pdftops filter</flag> + </use> + <upstream> + <remote-id type="github">OpenPrinting/libppd</remote-id> + </upstream> +</pkgmetadata> |