diff options
Diffstat (limited to 'net-print')
176 files changed, 3321 insertions, 3561 deletions
diff --git a/net-print/apsfilter/Manifest b/net-print/apsfilter/Manifest deleted file mode 100644 index c347450380fa..000000000000 --- a/net-print/apsfilter/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST apsfilter-7.2.8.tar.bz2 310587 BLAKE2B aae44a7e79157d3ddf9ce56fe51ae90106eb952d536658efe0f19dfcbe5f0d5c7dd078e3bb5044433e250df6b9289a08a466d6e9fc77c91d540daf07a70bf197 SHA512 ca07e7eb620a95b08fb912e899520d5ff85613eb3d1f712e1d38a66cf5b84516dbb35e3e40ef75ac10d1e717cfc2f49930a0f0873fee451d495c8ae572072012 diff --git a/net-print/apsfilter/apsfilter-7.2.8-r1.ebuild b/net-print/apsfilter/apsfilter-7.2.8-r1.ebuild deleted file mode 100644 index 4f7f15844cab..000000000000 --- a/net-print/apsfilter/apsfilter-7.2.8-r1.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Apsfilter Prints So Fine, It Leads To Extraordinary Results" -HOMEPAGE="http://www.apsfilter.org" -SRC_URI="http://www.apsfilter.org/download/${P}.tar.bz2" -S="${WORKDIR}/${PN}" - -KEYWORDS="~alpha ~amd64 ppc sparc x86" -IUSE="cups" -SLOT="0" -LICENSE="GPL-2" - -RDEPEND=" - app-text/ghostscript-gpl - >=app-text/psutils-1.17 - >=app-text/a2ps-4.13b-r4 - net-print/cups - virtual/awk - virtual/imagemagick-tools - virtual/mta" -DEPEND="${RDEPEND}" - -src_configure() { - local myconf= - - # assume that lprng is installed if cups isn't USEd - if use cups ; then - myconf="--with-printcap=/etc/cups/printcap --with-spooldir=/var/spool/cups" - else - myconf="--with-printcap=/etc/lprng/printcap" - fi - - # econf doesn't work here :( - ./configure \ - --prefix="${EPREFIX}/usr" \ - --mandir=/usr/share/man \ - --docdir=/usr/share/doc/${PF} \ - --sysconfdir=/etc \ - "${myconf} ${EXTRA_ECONF}" \ - || die -} - -src_install() { - emake DESTDIR="${ED}" install - dosym ../share/apsfilter/SETUP /usr/bin/apsfilter - - if use cups ; then - dosym ../cups/printcap /etc/printcap - else - dosym ../lprng/printcap /etc/printcap - fi -} diff --git a/net-print/apsfilter/metadata.xml b/net-print/apsfilter/metadata.xml deleted file mode 100644 index c439b06d8c84..000000000000 --- a/net-print/apsfilter/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>printing@gentoo.org</email> - <name>Gentoo Printing Project</name> -</maintainer> -</pkgmetadata> diff --git a/net-print/brlaser/Manifest b/net-print/brlaser/Manifest index c742534f531a..02dd07d44671 100644 --- a/net-print/brlaser/Manifest +++ b/net-print/brlaser/Manifest @@ -1 +1,2 @@ +DIST brlaser-6.2.6.tar.gz 25815 BLAKE2B 0583576e41d895df5fc9d20244daa38abd3f675af13f75f769045644f419385c99a1137c88a6ac8997a7fd4ab7323af304f62d785dac66b1174a9994e3f5104a SHA512 285a053473ae576167e653bb94c20a1ae676c1a39ec87d9b14c664e389a4713d93ca29d5cefd92a6793e1ffbc8b03b119ea8cd903749ae21c9354ce30d470a51 DIST brlaser-6.tar.gz 22807 BLAKE2B be8041c1b6ddb8c4e5055fa35edc2c764562b2b4e52cad17aa968a51886621264d6bf289bd7bb5af0148098bb72aa96adea603091b38c3a245068d60737e80fc SHA512 d7e0e63b64be9ae7633381622c13ba0589e5fe58d277212bce4f5bb712a291ed0b0f2ac3d450dce61c7f9052c1ce7323fec66b5005c5cb3da1314b284d20f06f diff --git a/net-print/brlaser/brlaser-6.ebuild b/net-print/brlaser/brlaser-6-r1.ebuild index 533df7d57162..502b56748750 100644 --- a/net-print/brlaser/brlaser-6.ebuild +++ b/net-print/brlaser/brlaser-6-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit cmake @@ -17,3 +17,10 @@ DEPEND="net-print/cups" RDEPEND=" ${DEPEND} app-text/ghostscript-gpl" + +src_prepare() { + # Don't clobber toolchain defaults + sed -i -e '/-D_FORTIFY_SOURCE=2/d' CMakeLists.txt || die + + cmake_src_prepare +} diff --git a/net-print/brlaser/brlaser-6.2.6.ebuild b/net-print/brlaser/brlaser-6.2.6.ebuild new file mode 100644 index 000000000000..683dbf0ec1a4 --- /dev/null +++ b/net-print/brlaser/brlaser-6.2.6.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Brother laser printer driver" +HOMEPAGE="https://github.com/Owl-Maintain/brlaser/" +SRC_URI="https://github.com/Owl-Maintain/brlaser/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +# https://github.com/Owl-Maintain/brlaser/blob/master/src/main.cc#L5C1-L8C39 +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="net-print/cups" +RDEPEND=" + ${DEPEND} + app-text/ghostscript-gpl +" + +src_prepare() { + # Don't clobber toolchain defaults + sed -i -e '/-D_FORTIFY_SOURCE=2/d' CMakeLists.txt || die + + cmake_src_prepare +} diff --git a/net-print/brlaser/metadata.xml b/net-print/brlaser/metadata.xml index cd2e4bede63a..42a4adc7f922 100644 --- a/net-print/brlaser/metadata.xml +++ b/net-print/brlaser/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person" proxied="yes"> <email>cyrevolt@googlemail.com</email> @@ -8,9 +8,12 @@ <maintainer type="project" proxied="proxy"> <email>proxy-maint@gentoo.org</email> <name>Proxy Maintainers</name> - </maintainer> + </maintainer> <maintainer type="project"> <email>printing@gentoo.org</email> <name>Gentoo Printing Project</name> </maintainer> + <upstream> + <remote-id type="github">Owl-Maintain/brlaser</remote-id> + </upstream> </pkgmetadata> diff --git a/net-print/c2esp/c2esp-27.ebuild b/net-print/c2esp/c2esp-27.ebuild index f7fe2a2c6a37..81e38ab4ccaa 100644 --- a/net-print/c2esp/c2esp-27.ebuild +++ b/net-print/c2esp/c2esp-27.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 DESCRIPTION="A CUPS filter for Kodak ESP printers" HOMEPAGE="https://sourceforge.net/projects/cupsdriverkodak" -SRC_URI="mirror://sourceforge/cupsdriverkodak/files/${P}.tar.gz" +SRC_URI="https://downloads.sourceforge.net/cupsdriverkodak/files/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" diff --git a/net-print/c2esp/metadata.xml b/net-print/c2esp/metadata.xml index b57181121c2c..9975684c2cc9 100644 --- a/net-print/c2esp/metadata.xml +++ b/net-print/c2esp/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/cndrvcups-common-lb/cndrvcups-common-lb-3.70.ebuild b/net-print/cndrvcups-common-lb/cndrvcups-common-lb-3.70.ebuild index ed940b40c224..bfcbeceba005 100644 --- a/net-print/cndrvcups-common-lb/cndrvcups-common-lb-3.70.ebuild +++ b/net-print/cndrvcups-common-lb/cndrvcups-common-lb-3.70.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -9,7 +9,7 @@ MY_PV="$(ver_rs 1- '')" SOURCES_NAME="linux-UFRII-drv-v${MY_PV}-uken" DESCRIPTION="Common files for Canon drivers" -HOMEPAGE="https://www.canon-europe.com/support/products/imagerunner/imagerunner-1730i.aspx" +HOMEPAGE="https://www.canon-europe.com/support/products/imagerunner/imagerunner-1730i.html" SRC_URI="http://gdlp01.c-wss.com/gds/8/0100007658/08/${SOURCES_NAME}-05.tar.gz" S="${WORKDIR}/${SOURCES_NAME}/Sources/${P/-lb-${PV}/-4.10}" diff --git a/net-print/cndrvcups-common-lb/metadata.xml b/net-print/cndrvcups-common-lb/metadata.xml index 6f49eba8f496..85e4ed814fa2 100644 --- a/net-print/cndrvcups-common-lb/metadata.xml +++ b/net-print/cndrvcups-common-lb/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <!-- maintainer-needed --> </pkgmetadata> diff --git a/net-print/cndrvcups-lb/cndrvcups-lb-3.70.ebuild b/net-print/cndrvcups-lb/cndrvcups-lb-3.70.ebuild index 565d211983c3..213654649d2b 100644 --- a/net-print/cndrvcups-lb/cndrvcups-lb-3.70.ebuild +++ b/net-print/cndrvcups-lb/cndrvcups-lb-3.70.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -9,7 +9,7 @@ MY_PV="$(ver_rs 1- '')" SOURCES_NAME="linux-UFRII-drv-v${MY_PV}-uken" DESCRIPTION="Canon UFR II / LIPSLX Printer Driver for Linux" -HOMEPAGE="https://www.canon-europe.com/support/products/imagerunner/imagerunner-1730i.aspx" +HOMEPAGE="https://www.canon-europe.com/support/products/imagerunner/imagerunner-1730i.html" SRC_URI="http://gdlp01.c-wss.com/gds/8/0100007658/08/${SOURCES_NAME}-05.tar.gz" S="${WORKDIR}/${SOURCES_NAME}/Sources/${P}" diff --git a/net-print/cndrvcups-lb/metadata.xml b/net-print/cndrvcups-lb/metadata.xml index 6f49eba8f496..85e4ed814fa2 100644 --- a/net-print/cndrvcups-lb/metadata.xml +++ b/net-print/cndrvcups-lb/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <!-- maintainer-needed --> </pkgmetadata> diff --git a/net-print/cnijfilter2/Manifest b/net-print/cnijfilter2/Manifest index 83806d362510..e39410e68137 100644 --- a/net-print/cnijfilter2/Manifest +++ b/net-print/cnijfilter2/Manifest @@ -1 +1,2 @@ -DIST cnijfilter2-source-5.90-1.tar.gz 1707084 BLAKE2B 3df5786785b12c410f4ae72e1d20fcd7686e0b8de60e7a713392076c2cd9edc1bd3d7f7494712ec6a4f50197fdb79e4cb708fcbe5f3b9e38cb3353e74cc8291a SHA512 d31f5133b6f81114d46cb067779260d5d74b5616e6e1b3924ef9db0db233fbb2b16132f7a003342e2ed14742c3123c644619dc1d5c93bca5d16425a77d45c632 +DIST cnijfilter2-source-6.60-1.tar.gz 2775344 BLAKE2B 0207784251e70c5850da74eb76a4de16d4dc5760e91ce17fc86ee9c61cfac27c041ea3f434ecad846ee3cc93649ac627d41eaaa55d3baf2e148ad36d8e142b87 SHA512 4a0560bcd4028dfbaed0c01a34c17eef492865bae97ebe0ec092442f49401295a160a4ac39ff3869f40d01f7cd085a97d114b9c5bf511a66664c2b74fbf41864 +DIST cnijfilter2-source-6.70-1.tar.gz 3014630 BLAKE2B f1a36c1e24406c5e67bf5a024997dec1788aec77eceaa237dc678a0d55de1434c7a5ad23cda7f44b978cf01f214435afb8588d1b04dc0ab60c37d4c2f56e5fac SHA512 a6e345082eb0c6d9f80011e8e9c6edc5db63ad719c2b4953bce7d0de05493dcb8443a8a4bb88925349a2ceab64645eec91a73fee796cc363947ebe40534af5e4 diff --git a/net-print/cnijfilter2/cnijfilter2-5.90.ebuild b/net-print/cnijfilter2/cnijfilter2-6.60.ebuild index e687d7cce0cd..81ab159fc828 100644 --- a/net-print/cnijfilter2/cnijfilter2-5.90.ebuild +++ b/net-print/cnijfilter2/cnijfilter2-6.60.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -8,39 +8,41 @@ inherit autotools MY_P="${PN}-source-${PV}-1" DESCRIPTION="IJ Printer Driver" -HOMEPAGE="https://www.canon.it/" -SRC_URI="https://dev.gentoo.org/~tupone/distfiles/${MY_P}.tar.gz" +HOMEPAGE="https://www.usa.canon.com/support/p/pixma-g4270#idReference%3Dsoftware-drivers" +SRC_URI="https://pdisp01.c-wss.com/gdl/WWUFORedirectTarget.do?id=MDEwMDAxMTc1MzAx -> cnijfilter2-source-${PV}-1.tar.gz" LICENSE="Canon-IJ" SLOT="0" KEYWORDS="amd64 x86" -IUSE="" DEPEND="virtual/libusb:1 dev-libs/libxml2 net-print/cups" RDEPEND="${DEPEND}" -QA_FLAGS_IGNORED=( - /usr/lib64/libcnbpnet30.so.1.0.0 - /usr/lib64/libcnbpcnclapicom2.so.5.0.0 - /usr/lib64/libcnnet2.so.1.2.4 - /usr/lib64/libcnbpnet20.so.1.0.0 - /usr/bin/cnijlgmon3 -) - S="${WORKDIR}"/${MY_P} PATCHES=( - "${FILESDIR}"/${PN}-5.70-gentoo.patch + "${FILESDIR}"/${PN}-6.50-gentoo.patch "${FILESDIR}"/${PN}-5.80-cflags.patch "${FILESDIR}"/${PN}-5.80-fno-common.patch + "${FILESDIR}"/${P}-c99.patch ) +pkg_setup() { + QA_PREBUILT=" + /usr/$(get_libdir)/libcnbpnet30.so.1.0.0 + /usr/$(get_libdir)/libcnbpcnclapicom2.so.5.0.0 + /usr/$(get_libdir)/libcnnet2.so.1.2.5 + /usr/$(get_libdir)/libcnbpnet20.so.1.0.0 + /usr/bin/cnijlgmon3 + " +} + src_prepare() { default DIRS="cmdtocanonij2 cmdtocanonij3 cnijbe2 lgmon3 rastertocanonij tocanonij tocnpwg" - LIBDIR=com/libs_bin$(usex amd64 64 32) + LIBDIR=com/libs_bin$(usex amd64 _x86_64 _i686) for d in ${DIRS}; do mv "${d}"/configure.{in,ac} || die done @@ -60,13 +62,13 @@ src_prepare() { ln -sf libcnbpcnclapicom2.so.5.0.0 libcnbpcnclapicom2.so || die ln -sf libcnbpnet20.so.1.0.0 libcnbpnet20.so || die ln -sf libcnbpnet30.so.1.0.0 libcnbpnet30.so || die - ln -sf libcnnet2.so.1.2.4 libcnnet2.so || die + ln -sf libcnnet2.so.1.2.5 libcnnet2.so || die cd - } src_configure() { - econf --enable-progpath="${EPREFIX}/usr/bin" LDFLAGS="-L"${S}"/${LIBDIR} ${LDFLAGS}" + econf --enable-progpath="${EPREFIX}/usr/bin" LDFLAGS="-L${S}/${LIBDIR} ${LDFLAGS}" } src_install() { diff --git a/net-print/cnijfilter2/cnijfilter2-6.70.ebuild b/net-print/cnijfilter2/cnijfilter2-6.70.ebuild new file mode 100644 index 000000000000..b2f835c76756 --- /dev/null +++ b/net-print/cnijfilter2/cnijfilter2-6.70.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +MY_P="${PN}-source-${PV}-1" + +DESCRIPTION="IJ Printer Driver" +HOMEPAGE="https://www.usa.canon.com/support/p/pixma-g4270#idReference%3Dsoftware-drivers" +SRC_URI="https://gdlp01.c-wss.com/gds/7/0100012137/01/${PN}-source-${PV}-1.tar.gz" + +LICENSE="Canon-IJ" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="virtual/libusb:1 + dev-libs/libxml2 + net-print/cups" +RDEPEND="${DEPEND}" + +S="${WORKDIR}"/${MY_P} + +PATCHES=( + "${FILESDIR}"/${PN}-6.50-gentoo.patch + "${FILESDIR}"/${PN}-5.80-cflags.patch + "${FILESDIR}"/${PN}-5.80-fno-common.patch + "${FILESDIR}"/${PN}-6.60-c99.patch +) + +pkg_setup() { + QA_PREBUILT=" + /usr/$(get_libdir)/libcnbpnet30.so.1.0.0 + /usr/$(get_libdir)/libcnbpcnclapicom2.so.5.0.0 + /usr/$(get_libdir)/libcnnet2.so.1.2.5 + /usr/$(get_libdir)/libcnbpnet20.so.1.0.0 + /usr/bin/cnijlgmon3 + " +} + +src_prepare() { + default + DIRS="cmdtocanonij2 cmdtocanonij3 cnijbe2 lgmon3 rastertocanonij tocanonij tocnpwg" + LIBDIR=com/libs_bin$(usex amd64 _x86_64 _i686) + for d in ${DIRS}; do + mv "${d}"/configure.{in,ac} || die + done + echo "AC_INIT([${PN}], [${PV}])" >> configure.ac + echo "AM_INIT_AUTOMAKE" >> configure.ac + echo "AC_CONFIG_SUBDIRS([${DIRS}])" >> configure.ac + echo "AC_CONFIG_FILES([Makefile])" >> configure.ac + echo "AC_OUTPUT()" >> configure.ac + echo "SUBDIRS= ${DIRS}" >> Makefile.am + sed -i \ + -e "/^CFLAGS/d" \ + */configure.ac \ + cnijbe2/src/Makefile.am || die + eautoreconf + cd ${LIBDIR} + rm libcn*.so || die + ln -sf libcnbpcnclapicom2.so.5.0.0 libcnbpcnclapicom2.so || die + ln -sf libcnbpnet20.so.1.0.0 libcnbpnet20.so || die + ln -sf libcnbpnet30.so.1.0.0 libcnbpnet30.so || die + ln -sf libcnnet2.so.1.2.5 libcnnet2.so || die + + cd - +} + +src_configure() { + econf --enable-progpath="${EPREFIX}/usr/bin" LDFLAGS="-L${S}/${LIBDIR} ${LDFLAGS}" +} + +src_install() { + default + insinto /usr/share/ppd/cupsfilters + doins ppd/*ppd + dolib.so ${LIBDIR}/* +} diff --git a/net-print/cnijfilter2/files/cnijfilter2-5.70-gentoo.patch b/net-print/cnijfilter2/files/cnijfilter2-6.50-gentoo.patch index fcb2d62ad7b5..cdc5f936824e 100644 --- a/net-print/cnijfilter2/files/cnijfilter2-5.70-gentoo.patch +++ b/net-print/cnijfilter2/files/cnijfilter2-6.50-gentoo.patch @@ -14,12 +14,12 @@ filter_PROGRAMS= cmdtocanonij3 ---- a/cnijbe2/src/Makefile.am 2018-01-14 19:25:48.823470121 +0100 -+++ b/cnijbe2/src/Makefile.am 2018-01-14 19:25:59.316275741 +0100 +--- a/cnijbe2/src/Makefile.am 2023-02-15 19:25:48.823470121 +0100 ++++ b/cnijbe2/src/Makefile.am 2023-02-15 19:25:59.316275741 +0100 @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in --backend_bindir = /usr/lib/cups/backend +-backend_bindir = $(libdir)/cups/backend +backend_bindir = $(libexecdir)/cups/backend backend_bin_PROGRAMS = cnijbe2 transform = diff --git a/net-print/cnijfilter2/files/cnijfilter2-6.60-c99.patch b/net-print/cnijfilter2/files/cnijfilter2-6.60-c99.patch new file mode 100644 index 000000000000..d328d1d1f63c --- /dev/null +++ b/net-print/cnijfilter2/files/cnijfilter2-6.60-c99.patch @@ -0,0 +1,10 @@ +--- a/lgmon3/src/keytext.c 2024-02-20 07:45:11.719827112 +0100 ++++ b/lgmon3/src/keytext.c 2024-02-20 07:46:15.504048256 +0100 +@@ -37,6 +37,7 @@ + #include <unistd.h> + #include <libxml/parser.h> /* Ver.2.80 */ + #include <string.h> ++#include <stdlib.h> + + #include "keytext.h" + diff --git a/net-print/cnijfilter2/metadata.xml b/net-print/cnijfilter2/metadata.xml index d0e866f244f8..8c0d75248cf7 100644 --- a/net-print/cnijfilter2/metadata.xml +++ b/net-print/cnijfilter2/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>tupone@gentoo.org</email> diff --git a/net-print/cnrdrvcups-lb/Manifest b/net-print/cnrdrvcups-lb/Manifest index 5b006fb3594b..38b30046937b 100644 --- a/net-print/cnrdrvcups-lb/Manifest +++ b/net-print/cnrdrvcups-lb/Manifest @@ -1 +1,2 @@ -DIST linux-UFRII-drv-v530-uken-12.tar.gz 188172378 BLAKE2B 9d069843bbd5fa693d584b1e1f9348ca2076656dff85fc6b34ca941c10221a48fc6119d7f2bf9c9bb8e4f512a0dabbd7d65f7fb86e16394f98ba80afc679998f SHA512 61f060a742c9e6cc7439f26fac63fbac33c96722ec80c604eca40716255920a65eab4cd6f592deee627a8c803776df2c0b8c3dbce9727e53862fa7551a172ebe +DIST linux-UFRII-drv-v540-uken-08.tar.gz 188874055 BLAKE2B 150b917d20566de5658bfd46d06e2568924267a046e9083289878e0b51ab05744fefbcebd8e61694d937fd1dde769c0c8f06b6248eacebf3ac8d8706f7baa1f8 SHA512 c488fbaee081b3cd601282e737af0ce1d141a9ae940daa2335ef4da833cdb9fbdda3cc378f4e49b26700b36911dc7b142ef0665e1cacef505f91a666736e62dc +DIST linux-UFRII-drv-v580-m17n-08.tar.gz 66915545 BLAKE2B 5b07c74079c2c5b4a8b360389d426d61026198b9f3c148098b7d32a900912a6d72951f5550896ae7b89418147637dc47fc4351bdc11775958d877c33359a9251 SHA512 650b5fce570dc464d2bd269f6671c276c064f0696170aabbace9811f28da86aeb8fe21badc0ec3d2814943911f35897aa59da26f44797943e97da36e5838409c diff --git a/net-print/cnrdrvcups-lb/cnrdrvcups-lb-5.30.ebuild b/net-print/cnrdrvcups-lb/cnrdrvcups-lb-5.40.ebuild index df6c68146fc5..80efaecd4524 100644 --- a/net-print/cnrdrvcups-lb/cnrdrvcups-lb-5.30.ebuild +++ b/net-print/cnrdrvcups-lb/cnrdrvcups-lb-5.40.ebuild @@ -1,12 +1,12 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit autotools desktop flag-o-matic toolchain-funcs -CANON_REL="12" -DL_ID="8/0100007658/20" +CANON_REL="08" +DL_ID="8/0100007658/25" MY_PV="${PV//\./}" DESCRIPTION="Canon UFR II / LIPSLX Printer Driver for Linux" @@ -18,23 +18,49 @@ SLOT="0" KEYWORDS="-* amd64 x86" IUSE="" -DEPEND="dev-libs/libxml2:2 +DEPEND="dev-libs/atk + dev-libs/glib:2 + dev-libs/libxml2:2 gnome-base/libglade:2.0 media-libs/jbigkit media-libs/libjpeg-turbo net-print/cups - x11-libs/gtk+:2" + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:2 + x11-libs/gtk+:3 + x11-libs/pango" RDEPEND="${DEPEND} !net-print/cndrvcups-common-lb !net-print/cndrvcups-lb" HTML_DOCS=( - "${WORKDIR}"/linux-UFRII-drv-v${MY_PV}-uken/Documents/README-ufr2-5.3xUK.html + "${WORKDIR}"/linux-UFRII-drv-v${MY_PV}-uken/Documents/README-ufr2-${PV//0}xUK.html "${WORKDIR}"/linux-UFRII-drv-v${MY_PV}-uken/Documents/UsersGuide-ufr2-UK.html ) S="${WORKDIR}/linux-UFRII-drv-v${MY_PV}-uken/Sources" +common_op() { + local i + for i in backend buftool cngplp cnjbig rasterfilter; do + cd "${S}/cnrdrvcups-common-${PV}/${i}" || + die "failed to switch dir to ${i}" + "${@}" + cd "${S}" || die "failed to switch dir back from ${i} to ${S}" + done +} + +driver_op() { + local i + for i in cngplp cngplp/files cpca pdftocpca; do + cd "${S}/cnrdrvcups-lb-${PV}/${i}" || + die "failed to switch dir to ${i}" + "${@}" + cd "${S}" || die "failed to switch dir back from ${i} to ${S}" + done +} + pkg_setup() { QA_PREBUILT="/usr/bin/cnsetuputil2 /usr/bin/cnrsdrvufr2 @@ -59,26 +85,6 @@ src_unpack() { unpack ./${P}-1.tar.gz } -common_op() { - local i - for i in backend buftool cngplp cnjbig rasterfilter; do - cd "${S}/cnrdrvcups-common-${PV}/${i}" || - die "failed to switch dir to ${i}" - "${@}" - cd "${S}" || die "failed to switch dir back from ${i} to ${S}" - done -} - -driver_op() { - local i - for i in cngplp cngplp/files cpca pdftocpca; do - cd "${S}/cnrdrvcups-lb-${PV}/${i}" || - die "failed to switch dir to ${i}" - "${@}" - cd "${S}" || die "failed to switch dir back from ${i} to ${S}" - done -} - src_prepare() { default diff --git a/net-print/cnrdrvcups-lb/cnrdrvcups-lb-5.80.ebuild b/net-print/cnrdrvcups-lb/cnrdrvcups-lb-5.80.ebuild new file mode 100644 index 000000000000..8407facad5fc --- /dev/null +++ b/net-print/cnrdrvcups-lb/cnrdrvcups-lb-5.80.ebuild @@ -0,0 +1,200 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools desktop flag-o-matic toolchain-funcs + +CANON_REL="08" +DL_ID="8/0100007658/25" +MY_PV="${PV//\./}" + +DESCRIPTION="Canon UFR II / LIPSLX Printer Driver for Linux" +HOMEPAGE="https://www.canon-europe.com/support/products/imagerunner/" +SRC_URI="https://pdisp01.c-wss.com/gdl/WWUFORedirectTarget.do?id=MDEwMDAwNzY1ODM5&cmp=ABX&lang=EN -> linux-UFRII-drv-v${MY_PV}-m17n-${CANON_REL}.tar.gz" + +LICENSE="Canon-UFR-II GPL-2 MIT" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="" + +DEPEND="dev-libs/atk + dev-libs/glib:2 + dev-libs/libxml2:2 + gnome-base/libglade:2.0 + media-libs/jbigkit + media-libs/libjpeg-turbo + net-print/cups + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:2 + x11-libs/gtk+:3 + x11-libs/pango" +RDEPEND="${DEPEND} + !net-print/cndrvcups-common-lb + !net-print/cndrvcups-lb" + +HTML_DOCS=( + "${WORKDIR}"/linux-UFRII-drv-v${MY_PV}-m17n/Documents/uk_eng/README-ufr2-${PV//0}xUK.html + "${WORKDIR}"/linux-UFRII-drv-v${MY_PV}-m17n/Documents/uk_eng/UsersGuide-ufr2-UK.html +) + +S="${WORKDIR}/linux-UFRII-drv-v${MY_PV}-m17n/Sources" + +common_op() { + local i + for i in backend buftool cngplp cnjbig rasterfilter; do + cd "${S}/cnrdrvcups-common-${PV}/${i}" || + die "failed to switch dir to ${i}" + "${@}" + cd "${S}" || die "failed to switch dir back from ${i} to ${S}" + done +} + +driver_op() { + local i + for i in cngplp cngplp/files cpca pdftocpca; do + cd "${S}/cnrdrvcups-lb-${PV}/${i}" || + die "failed to switch dir to ${i}" + "${@}" + cd "${S}" || die "failed to switch dir back from ${i} to ${S}" + done +} + +pkg_setup() { + QA_PREBUILT="/usr/bin/cnsetuputil2 + /usr/bin/cnrsdrvufr2 + /usr/bin/cnpkmoduleufr2r + /usr/bin/cnpkbidir + /usr/bin/cnpdfdrv + /usr/$(get_libdir)/libufr2filterr.so.1.0.0 + /usr/$(get_libdir)/libColorGearCufr2.so.2.0.0 + /usr/$(get_libdir)/libcnlbcmr.so.1.0 + /usr/$(get_libdir)/libcanon_slimufr2.so.1.0.0 + /usr/$(get_libdir)/libcanonufr2r.so.1.0.0 + /usr/$(get_libdir)/libcaiowrapufr2.so.1.0.0 + /usr/$(get_libdir)/libcaiocnpkbidir.so.1.0.0 + /usr/$(get_libdir)/libcaepcmufr2.so.1.0" + + QA_SONAME="/usr/$(get_libdir)/libcaiocnpkbidir.so.1.0.0" +} + +src_unpack() { + unpack ${A} + cd "${WORKDIR}/linux-UFRII-drv-v${MY_PV}-m17n/Sources/" || die + unpack ./${P}-1.05.tar.xz +} + +src_prepare() { + default + + common_op mv configure.in configure.ac || die "failed to move configure.in" + driver_op mv configure.in configure.ac || die "failed to move configure.in" + + common_op sed -i -e 's/configure.in/configure.ac/' configure.ac || die + driver_op sed -i -e 's/configure.in/configure.ac/' configure.ac || die + + # This should work with autoreconf + export "LIBS=-lgtk-x11-2.0 -lgobject-2.0 -lglib-2.0 -lgmodule-2.0" + + # Other components already depend on compiled product + append-ldflags -L"${S}/cnrdrvcups-common-${PV}/buftool" + + common_op eautoreconf + driver_op eautoreconf + + # Fix a QA issue with .desktop file, + sed -i 's/Application;Utility/Utility/g' "${S}"/cnrdrvcups-utility-${PV}/data/cnsetuputil2.desktop || + die "Failed to modify cnsetuputil2.desktop file." + + append-cflags -fcommon + + # For some reason, @AR@ is defined everywhere else correctly, but not here. + sed -i -e "s/AR = ar/AR = $(tc-getAR)/g" ./cnrdrvcups-common-${PV}/buftool/Makefile.in || die +} + +src_configure() { + common_op econf + driver_op econf +} + +src_compile() { + common_op emake + driver_op emake +} + +src_install() { + common_op emake DESTDIR="${D}" install COMMON_SUFFIX=2 + driver_op emake DESTDIR="${D}" install COMMON_SUFFIX=2 + + insinto /usr/share/cups + doins "${S}"/cnrdrvcups-common-${PV}/Rule/canon-laser-printer.usb-quirks + + if use amd64; then + cd "${S}"/lib/libs64/intel/ || die "failed to switch into libs64" + elif use x86; then + cd "${S}"/lib/libs32/intel/ || die "failed to switch into libs32" + else + die "I don't know what directory to switch into!" + fi + + dolib.so libcaepcmufr2.so.1.0 libcaiocnpkbidir.so.1.0.0 \ + libcaiowrapufr2.so.1.0.0 libcanonufr2r.so.1.0.0 \ + libcanon_slimufr2.so.1.0.0 libcnlbcmr.so.1.0 \ + libColorGearCufr2.so.2.0.0 libufr2filterr.so.1.0.0 + + dosym libcaepcmufr2.so.1.0 /usr/$(get_libdir)/libcaepcmufr2.so + dosym libcaepcmufr2.so.1.0 /usr/$(get_libdir)/libcaepcmufr2.so.1 + + dosym libcaiocnpkbidir.so.1.0.0 /usr/$(get_libdir)/libcaiocnpkbidir.so + dosym libcaiocnpkbidir.so.1.0.0 /usr/$(get_libdir)/libcaiocnpkbidir.so.1 + + dosym libcaiowrapufr2.so.1.0.0 /usr/$(get_libdir)/libcaiowrapufr2.so + dosym libcaiowrapufr2.so.1.0.0 /usr/$(get_libdir)/libcaiowrapufr2.so.1 + + dosym libcanonufr2r.so.1.0.0 /usr/$(get_libdir)/libcanonufr2r.so + dosym libcanonufr2r.so.1.0.0 /usr/$(get_libdir)/libcanonufr2r.so.1 + + dosym libcanon_slimufr2.so.1.0.0 /usr/$(get_libdir)/libcanon_slimufr2.so + dosym libcanon_slimufr2.so.1.0.0 /usr/$(get_libdir)/libcanon_slimufr2.so.1 + + dosym libcnlbcmr.so.1.0 /usr/$(get_libdir)/libcnlbcmr.so + dosym libcnlbcmr.so.1.0 /usr/$(get_libdir)/libcnlbcmr.so.1 + + dosym libColorGearCufr2.so.2.0.0 /usr/$(get_libdir)/libColorGearCufr2.so + dosym libColorGearCufr2.so.2.0.0 /usr/$(get_libdir)/libColorGearCufr2.so.2 + + dosym libufr2filterr.so.1.0.0 /usr/$(get_libdir)/libufr2filterr.so + dosym libufr2filterr.so.1.0.0 /usr/$(get_libdir)/libufr2filterr.so.1 + + dobin cnpdfdrv cnpkbidir cnpkmoduleufr2r cnrsdrvufr2 cnsetuputil2 + + insinto /usr/share/cnpkbidir + doins ./cnpkbidir_info* + + insinto /usr/share/ufr2filterr + doins ./ThLB* + + cd "${S}" || die "Failed to switch back into ${S} during installation." + + dosym ../../../$(get_libdir)/cups/backend/cnusb /usr/libexec/cups/backend/cnusb + dosym ../../../$(get_libdir)/cups/filter/pdftocpca /usr/libexec/cups/filter/pdftocpca + dosym ../../../$(get_libdir)/cups/filter/rastertoufr2 /usr/libexec/cups/filter/rastertoufr2 + + insinto /usr/share/caepcm/ufr2 + doins -r "${S}"/lib/data/ufr2/ + + insinto /usr/share/cups/model + doins ${P}/ppd/*.ppd + + domenu ./cnrdrvcups-utility-${PV}/data/cnsetuputil2.desktop + doicon ./cnrdrvcups-utility-${PV}/data/cnsetuputil.png + + einstalldocs + newdoc "${S}"/cnrdrvcups-common-${PV}/README README.common + newdoc "${S}"/cnrdrvcups-common-${PV}/cngplp/README README.cngplp.common + newdoc "${S}"/cnrdrvcups-lb-${PV}/README README.lb + newdoc "${S}"/cnrdrvcups-lb-${PV}/cngplp/README README.cngplp.driver + + find "${D}" -name '*.la' -type f -delete || die +} diff --git a/net-print/cnrdrvcups-lb/metadata.xml b/net-print/cnrdrvcups-lb/metadata.xml index 1b2becffa26c..bef24d2c2337 100644 --- a/net-print/cnrdrvcups-lb/metadata.xml +++ b/net-print/cnrdrvcups-lb/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <!-- maintainer-needed --> </pkgmetadata> diff --git a/net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild b/net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild new file mode 100644 index 000000000000..456c3250d40a --- /dev/null +++ b/net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="CUPS backend for canon printers using proprietary USB over IP BJNP protocol" +HOMEPAGE="https://sourceforge.net/projects/cups-bjnp/" +SRC_URI="https://downloads.sourceforge.net/${PN}/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc ~ppc64 x86" + +DEPEND="net-print/cups" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-2.0.3-configure-clang16.patch +) + +src_prepare() { + default + + # Clang 16 + eautoreconf +} + +src_configure() { + econf --disable-Werror +} diff --git a/net-print/cups-bjnp/cups-bjnp-2.0.3.ebuild b/net-print/cups-bjnp/cups-bjnp-2.0.3.ebuild index 613046076382..4b4d932b15b9 100644 --- a/net-print/cups-bjnp/cups-bjnp-2.0.3.ebuild +++ b/net-print/cups-bjnp/cups-bjnp-2.0.3.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -DESCRIPTION="CUPS backend for the canon printers using the proprietary USB over IP BJNP protocol" +DESCRIPTION="CUPS backend for canon printers using proprietary USB over IP BJNP protocol" HOMEPAGE="https://sourceforge.net/projects/cups-bjnp/" -SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz" +SRC_URI="https://downloads.sourceforge.net/${PN}/${PV}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" diff --git a/net-print/cups-bjnp/files/cups-bjnp-2.0.3-configure-clang16.patch b/net-print/cups-bjnp/files/cups-bjnp-2.0.3-configure-clang16.patch new file mode 100644 index 000000000000..e1d37445f89d --- /dev/null +++ b/net-print/cups-bjnp/files/cups-bjnp-2.0.3-configure-clang16.patch @@ -0,0 +1,34 @@ +https://sourceforge.net/p/cups-bjnp/patches/5/ +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -25,9 +25,9 @@ + #include <sys/socket.h> ], [ + /* AF_INET6 available check */ + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) +- exit(1); ++ return 1; + else +- exit(0); ++ return 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports IPv6]) +@@ -47,7 +47,7 @@ + /* test if the ss_family member exists in struct sockaddr_storage */ + struct sockaddr_storage ss; + ss.ss_family = AF_INET; +- exit (0); ++ return 0; + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE([HAS_SS_FAMILY], 1, [Define to 1 if struct sockaddr_storage has an ss_family member]) +@@ -59,7 +59,7 @@ + /* test if the __ss_family member exists in struct sockaddr_storage */ + struct sockaddr_storage ss; + ss.__ss_family = AF_INET; +- exit (0); ++ return 0; + ], [ + AC_MSG_RESULT([no, but __ss_family exists]) + AC_DEFINE([HAS___SS_FAMILY], 1, [Define to 1 if struct sockaddr_storage has __ss_family instead of ss_family]) + diff --git a/net-print/cups-bjnp/metadata.xml b/net-print/cups-bjnp/metadata.xml index 1995e3ca80f4..e6ef1a972c06 100644 --- a/net-print/cups-bjnp/metadata.xml +++ b/net-print/cups-bjnp/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> 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..20aedcf5cb6b --- /dev/null +++ b/net-print/cups-browsed/cups-browsed-2.0.0.ebuild @@ -0,0 +1,82 @@ +# Copyright 2023-2024 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 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86" + +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-filters/files/cups-browsed.init.d-r1 b/net-print/cups-browsed/files/cups-browsed.init.d index dddfe7bfb003..4fea546a05ca 100644 --- a/net-print/cups-filters/files/cups-browsed.init.d-r1 +++ b/net-print/cups-browsed/files/cups-browsed.init.d @@ -1,6 +1,6 @@ #!/sbin/openrc-run -pidfile="/var/run/cups-browsed.pid" +pidfile="/run/cups-browsed.pid" command="/usr/sbin/cups-browsed" command_background="true" 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 ab6424a56e4b..3e7f08806c56 100644 --- a/net-print/cups-filters/Manifest +++ b/net-print/cups-filters/Manifest @@ -1,4 +1,2 @@ -DIST cups-filters-1.28.3.tar.xz 1501824 BLAKE2B b4f493681ac2a701648b3b9b071f4ebfb432dd4660b610579ff2ed6cba4f6cd4351d5a1f28f5c096b3ba20d9c45dc87837bf127b9bc98680a98dec58dd0a68ea SHA512 ac139ae7452342bd46e464bff3438d437f1c9a2e719a7b32b7abc22c2667acaa93dfb976decb277a02572e688ecd86289e01fca817bef93018dff2076fb2a30c -DIST cups-filters-1.28.7.tar.xz 1503052 BLAKE2B b9d3280871faa79a7c277731bf6eb1eef161537829d4bc07ec36075ebc12a3617dce66994ed708991757ce7d78fc5ab010925a1d3d9811fd11cf1172f4786442 SHA512 fa94f51ca1c208dcacb1814d8b812c9a72dd09475b7cf836b02c72cb5e3290318f37e475ee3ae8d45351715c3a2ccc0df5ac51ae6fc11462f5acdfa303a04727 -DIST cups-filters-1.28.8.tar.xz 1502456 BLAKE2B 21dad6dc9a1d2f967f3938f2fc5e35eebadb67da8b526a9ea61599272bd3f87e8efff376661adc02b62b539798cbe46e0f7c5c25ba262da0561b53bbb3d08d5d SHA512 77b39ce2a30ad44d50aa58964b389fa5dd75b2b4307ccb25996050fd176e1e794ad0a66ddd4de76e95a671683c3bf448a4f471272c97a752f25ff6234f7d8511 -DIST cups-filters-1.28.9.tar.xz 1502888 BLAKE2B ddfed7c0815673d8a372af96cd879fb159a10d5cdaf07839a0157b94c43cead9d32c62a204513274f2a90b48a09e07d20049b93370b24604f14efe0e782116af SHA512 fbdf01b0a3acd70e3bf036ca4944a8b85ab4ab95d945458e924692008a8a37bb0b1fb097c4d4b3cf6f5ad68ae06e8358659cdfc24974ee629be37b54f5c3dca1 +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 diff --git a/net-print/cups-filters/cups-filters-1.28.9.ebuild b/net-print/cups-filters/cups-filters-1.28.17-r2.ebuild index 8ad08aa25bbc..3198dc53fecc 100644 --- a/net-print/cups-filters/cups-filters-1.28.9.ebuild +++ b/net-print/cups-filters/cups-filters-1.28.17-r2.ebuild @@ -1,30 +1,27 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 GENTOO_DEPEND_ON_PERL=no +inherit perl-module systemd flag-o-matic -inherit autotools perl-module systemd flag-o-matic - -if [[ "${PV}" == "9999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/OpenPrinting/cups-filters.git" -else - SRC_URI="http://www.openprinting.org/download/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -fi 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 + https://www.openprinting.org/download/${PN}/${P}.tar.xz +" LICENSE="MIT GPL-2" SLOT="0" -IUSE="dbus +foomatic jpeg ldap pclm pdf perl png +postscript test tiff zeroconf" +IUSE="dbus exif +foomatic jpeg ldap pclm pdf perl png +postscript test tiff zeroconf" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" RESTRICT="!test? ( test )" RDEPEND=" - >=app-text/poppler-0.32:=[cxx,jpeg?,lcms,tiff?,utils] + >=app-text/poppler-0.32[cxx,jpeg?,lcms,tiff?,utils] >=app-text/qpdf-8.3.0:= dev-libs/glib:2 media-libs/fontconfig @@ -32,17 +29,18 @@ RDEPEND=" media-libs/lcms:2 >=net-print/cups-1.7.3 !<=net-print/cups-1.5.9999 - sys-devel/bc + app-alternatives/bc sys-libs/zlib + exif? ( media-libs/libexif ) dbus? ( sys-apps/dbus ) foomatic? ( !net-print/foomatic-filters ) - jpeg? ( virtual/jpeg:0 ) - ldap? ( net-nds/openldap ) - pdf? ( app-text/mupdf ) + jpeg? ( media-libs/libjpeg-turbo:= ) + ldap? ( net-nds/openldap:= ) + pdf? ( app-text/mupdf:= ) perl? ( dev-lang/perl:= ) - png? ( media-libs/libpng:0= ) + png? ( media-libs/libpng:= ) postscript? ( >=app-text/ghostscript-gpl-9.09[cups] ) - tiff? ( media-libs/tiff:0 ) + tiff? ( media-libs/tiff:= ) zeroconf? ( net-dns/avahi[dbus] ) " DEPEND="${RDEPEND}" @@ -53,24 +51,14 @@ BDEPEND=" test? ( media-fonts/dejavu ) " -src_prepare() { - local need_eautoreconf= - - default - - if ! use test ; then - eapply "${FILESDIR}"/${PN}-1.28.2-make-missing-testfont-non-fatal.patch - need_eautoreconf=yes - elif [[ "${PV}" == "9999" ]] ; then - need_eautoreconf=yes - fi - - [[ -n ${need_eautoreconf} ]] && eautoreconf -} +PATCHES=( + "${FILESDIR}"/${PN}-1.28.17-c++17.patch + "${FILESDIR}"/${PN}-1.28.17-CVE-2023-24805.patch +) src_configure() { - # Bug #626800 - append-cxxflags -std=c++11 + # Bug #898156 + append-cxxflags -std=c++17 local myeconfargs=( --enable-imagefilters @@ -81,7 +69,8 @@ src_configure() { --with-pdftops=pdftops --with-rcdir=no --without-php - --disable-static + + $(use_enable exif) $(use_enable dbus) $(use_enable foomatic) $(use_enable ldap) @@ -95,28 +84,40 @@ src_configure() { ) econf "${myeconfargs[@]}" + + if use perl; then + pushd "${S}"/scripting/perl > /dev/null || die + perl-module_src_configure + popd > /dev/null || die + fi } src_compile() { default if use perl; then - pushd "${S}/scripting/perl" > /dev/null || die - perl-module_src_configure + pushd "${S}"/scripting/perl > /dev/null || die perl-module_src_compile popd > /dev/null || die fi } src_test() { - emake check + # Avoid perl-module_src_test + default + + if use perl; then + pushd "${S}/scripting/perl" > /dev/null || die + perl-module_src_test + popd > /dev/null || die + fi } src_install() { default if use perl; then - pushd "${S}/scripting/perl" > /dev/null || die + pushd "${S}"/scripting/perl > /dev/null || die perl-module_src_install perl_delete_localpod popd > /dev/null || die @@ -130,7 +131,7 @@ src_install() { find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die - cp "${FILESDIR}"/cups-browsed.init.d-r1 "${T}"/cups-browsed || die + cp "${FILESDIR}"/cups-browsed.init.d-r2 "${T}"/cups-browsed || die if ! use zeroconf ; then sed -i -e 's:need cupsd avahi-daemon:need cupsd:g' "${T}"/cups-browsed || die diff --git a/net-print/cups-filters/cups-filters-1.28.3.ebuild b/net-print/cups-filters/cups-filters-1.28.3.ebuild deleted file mode 100644 index 589687b5cf87..000000000000 --- a/net-print/cups-filters/cups-filters-1.28.3.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -GENTOO_DEPEND_ON_PERL=no - -inherit autotools perl-module systemd flag-o-matic - -if [[ "${PV}" == "9999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/OpenPrinting/cups-filters.git" -else - SRC_URI="http://www.openprinting.org/download/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" -fi -DESCRIPTION="Cups filters" -HOMEPAGE="https://wiki.linuxfoundation.org/openprinting/cups-filters" - -LICENSE="MIT GPL-2" -SLOT="0" -IUSE="dbus +foomatic jpeg ldap pclm pdf perl png +postscript test tiff zeroconf" - -RESTRICT="!test? ( test )" - -RDEPEND=" - >=app-text/poppler-0.32:=[cxx,jpeg?,lcms,tiff?,utils] - >=app-text/qpdf-8.3.0:= - dev-libs/glib:2 - media-libs/fontconfig - media-libs/freetype:2 - media-libs/lcms:2 - >=net-print/cups-1.7.3 - !<=net-print/cups-1.5.9999 - sys-devel/bc - sys-libs/zlib - dbus? ( sys-apps/dbus ) - foomatic? ( !net-print/foomatic-filters ) - jpeg? ( virtual/jpeg:0 ) - ldap? ( net-nds/openldap ) - pdf? ( app-text/mupdf ) - perl? ( dev-lang/perl:= ) - png? ( media-libs/libpng:0= ) - postscript? ( >=app-text/ghostscript-gpl-9.09[cups] ) - tiff? ( media-libs/tiff:0 ) - zeroconf? ( net-dns/avahi[dbus] ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - dev-util/gdbus-codegen - >=sys-devel/gettext-0.18.3 - virtual/pkgconfig - test? ( media-fonts/dejavu ) -" - -src_prepare() { - local need_eautoreconf= - - default - - if ! use test ; then - eapply "${FILESDIR}"/${PN}-1.28.2-make-missing-testfont-non-fatal.patch - need_eautoreconf=yes - elif [[ "${PV}" == "9999" ]] ; then - need_eautoreconf=yes - fi - - [[ -n ${need_eautoreconf} ]] && eautoreconf - - # Bug #626800 - append-cxxflags -std=c++11 -} - -src_configure() { - local myeconfargs=( - --enable-imagefilters - --localstatedir="${EPREFIX}"/var - --with-browseremoteprotocols=DNSSD,CUPS - --with-cups-rundir="${EPREFIX}"/run/cups - --with-fontdir="fonts/conf.avail" - --with-pdftops=pdftops - --with-rcdir=no - --without-php - --disable-static - $(use_enable dbus) - $(use_enable foomatic) - $(use_enable ldap) - $(use_enable pclm) - $(use_enable pdf mutool) - $(use_enable postscript ghostscript) - $(use_enable zeroconf avahi) - $(use_with jpeg) - $(use_with png) - $(use_with tiff) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use perl; then - pushd "${S}/scripting/perl" > /dev/null || die - perl-module_src_configure - perl-module_src_compile - popd > /dev/null || die - fi -} - -src_test() { - emake check -} - -src_install() { - default - - if use perl; then - pushd "${S}/scripting/perl" > /dev/null || die - perl-module_src_install - perl_delete_localpod - popd > /dev/null || die - fi - - if use postscript; then - # workaround: some printer drivers still require pstoraster and pstopxl, bug #383831 - dosym gstoraster /usr/libexec/cups/filter/pstoraster - dosym gstopxl /usr/libexec/cups/filter/pstopxl - fi - - find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die - - cp "${FILESDIR}"/cups-browsed.init.d-r1 "${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}"/utils/cups-browsed.service || die - fi - - doinitd "${T}"/cups-browsed - systemd_dounit "${S}/utils/cups-browsed.service" -} - -pkg_postinst() { - if ! use foomatic ; then - ewarn "You are disabling the foomatic code in cups-filters. Please do that ONLY if absolutely." - ewarn "necessary. net-print/foomatic-filters as replacement is deprecated and unmaintained." - fi -} diff --git a/net-print/cups-filters/cups-filters-1.28.7.ebuild b/net-print/cups-filters/cups-filters-1.28.7.ebuild deleted file mode 100644 index 589687b5cf87..000000000000 --- a/net-print/cups-filters/cups-filters-1.28.7.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -GENTOO_DEPEND_ON_PERL=no - -inherit autotools perl-module systemd flag-o-matic - -if [[ "${PV}" == "9999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/OpenPrinting/cups-filters.git" -else - SRC_URI="http://www.openprinting.org/download/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" -fi -DESCRIPTION="Cups filters" -HOMEPAGE="https://wiki.linuxfoundation.org/openprinting/cups-filters" - -LICENSE="MIT GPL-2" -SLOT="0" -IUSE="dbus +foomatic jpeg ldap pclm pdf perl png +postscript test tiff zeroconf" - -RESTRICT="!test? ( test )" - -RDEPEND=" - >=app-text/poppler-0.32:=[cxx,jpeg?,lcms,tiff?,utils] - >=app-text/qpdf-8.3.0:= - dev-libs/glib:2 - media-libs/fontconfig - media-libs/freetype:2 - media-libs/lcms:2 - >=net-print/cups-1.7.3 - !<=net-print/cups-1.5.9999 - sys-devel/bc - sys-libs/zlib - dbus? ( sys-apps/dbus ) - foomatic? ( !net-print/foomatic-filters ) - jpeg? ( virtual/jpeg:0 ) - ldap? ( net-nds/openldap ) - pdf? ( app-text/mupdf ) - perl? ( dev-lang/perl:= ) - png? ( media-libs/libpng:0= ) - postscript? ( >=app-text/ghostscript-gpl-9.09[cups] ) - tiff? ( media-libs/tiff:0 ) - zeroconf? ( net-dns/avahi[dbus] ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - dev-util/gdbus-codegen - >=sys-devel/gettext-0.18.3 - virtual/pkgconfig - test? ( media-fonts/dejavu ) -" - -src_prepare() { - local need_eautoreconf= - - default - - if ! use test ; then - eapply "${FILESDIR}"/${PN}-1.28.2-make-missing-testfont-non-fatal.patch - need_eautoreconf=yes - elif [[ "${PV}" == "9999" ]] ; then - need_eautoreconf=yes - fi - - [[ -n ${need_eautoreconf} ]] && eautoreconf - - # Bug #626800 - append-cxxflags -std=c++11 -} - -src_configure() { - local myeconfargs=( - --enable-imagefilters - --localstatedir="${EPREFIX}"/var - --with-browseremoteprotocols=DNSSD,CUPS - --with-cups-rundir="${EPREFIX}"/run/cups - --with-fontdir="fonts/conf.avail" - --with-pdftops=pdftops - --with-rcdir=no - --without-php - --disable-static - $(use_enable dbus) - $(use_enable foomatic) - $(use_enable ldap) - $(use_enable pclm) - $(use_enable pdf mutool) - $(use_enable postscript ghostscript) - $(use_enable zeroconf avahi) - $(use_with jpeg) - $(use_with png) - $(use_with tiff) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use perl; then - pushd "${S}/scripting/perl" > /dev/null || die - perl-module_src_configure - perl-module_src_compile - popd > /dev/null || die - fi -} - -src_test() { - emake check -} - -src_install() { - default - - if use perl; then - pushd "${S}/scripting/perl" > /dev/null || die - perl-module_src_install - perl_delete_localpod - popd > /dev/null || die - fi - - if use postscript; then - # workaround: some printer drivers still require pstoraster and pstopxl, bug #383831 - dosym gstoraster /usr/libexec/cups/filter/pstoraster - dosym gstopxl /usr/libexec/cups/filter/pstopxl - fi - - find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die - - cp "${FILESDIR}"/cups-browsed.init.d-r1 "${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}"/utils/cups-browsed.service || die - fi - - doinitd "${T}"/cups-browsed - systemd_dounit "${S}/utils/cups-browsed.service" -} - -pkg_postinst() { - if ! use foomatic ; then - ewarn "You are disabling the foomatic code in cups-filters. Please do that ONLY if absolutely." - ewarn "necessary. net-print/foomatic-filters as replacement is deprecated and unmaintained." - fi -} diff --git a/net-print/cups-filters/cups-filters-1.28.8.ebuild b/net-print/cups-filters/cups-filters-1.28.8.ebuild deleted file mode 100644 index 4c748c67fe65..000000000000 --- a/net-print/cups-filters/cups-filters-1.28.8.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -GENTOO_DEPEND_ON_PERL=no - -inherit autotools perl-module systemd flag-o-matic - -if [[ "${PV}" == "9999" ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/OpenPrinting/cups-filters.git" -else - SRC_URI="http://www.openprinting.org/download/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -fi -DESCRIPTION="Cups filters" -HOMEPAGE="https://wiki.linuxfoundation.org/openprinting/cups-filters" - -LICENSE="MIT GPL-2" -SLOT="0" -IUSE="dbus +foomatic jpeg ldap pclm pdf perl png +postscript test tiff zeroconf" - -RESTRICT="!test? ( test )" - -RDEPEND=" - >=app-text/poppler-0.32:=[cxx,jpeg?,lcms,tiff?,utils] - >=app-text/qpdf-8.3.0:= - dev-libs/glib:2 - media-libs/fontconfig - media-libs/freetype:2 - media-libs/lcms:2 - >=net-print/cups-1.7.3 - !<=net-print/cups-1.5.9999 - sys-devel/bc - sys-libs/zlib - dbus? ( sys-apps/dbus ) - foomatic? ( !net-print/foomatic-filters ) - jpeg? ( virtual/jpeg:0 ) - ldap? ( net-nds/openldap ) - pdf? ( app-text/mupdf ) - perl? ( dev-lang/perl:= ) - png? ( media-libs/libpng:0= ) - postscript? ( >=app-text/ghostscript-gpl-9.09[cups] ) - tiff? ( media-libs/tiff:0 ) - zeroconf? ( net-dns/avahi[dbus] ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - dev-util/gdbus-codegen - >=sys-devel/gettext-0.18.3 - virtual/pkgconfig - test? ( media-fonts/dejavu ) -" - -src_prepare() { - local need_eautoreconf= - - default - - if ! use test ; then - eapply "${FILESDIR}"/${PN}-1.28.2-make-missing-testfont-non-fatal.patch - need_eautoreconf=yes - elif [[ "${PV}" == "9999" ]] ; then - need_eautoreconf=yes - fi - - [[ -n ${need_eautoreconf} ]] && eautoreconf - - # Bug #626800 - append-cxxflags -std=c++11 -} - -src_configure() { - local myeconfargs=( - --enable-imagefilters - --localstatedir="${EPREFIX}"/var - --with-browseremoteprotocols=DNSSD,CUPS - --with-cups-rundir="${EPREFIX}"/run/cups - --with-fontdir="fonts/conf.avail" - --with-pdftops=pdftops - --with-rcdir=no - --without-php - --disable-static - $(use_enable dbus) - $(use_enable foomatic) - $(use_enable ldap) - $(use_enable pclm) - $(use_enable pdf mutool) - $(use_enable postscript ghostscript) - $(use_enable zeroconf avahi) - $(use_with jpeg) - $(use_with png) - $(use_with tiff) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - default - - if use perl; then - pushd "${S}/scripting/perl" > /dev/null || die - perl-module_src_configure - perl-module_src_compile - popd > /dev/null || die - fi -} - -src_test() { - emake check -} - -src_install() { - default - - if use perl; then - pushd "${S}/scripting/perl" > /dev/null || die - perl-module_src_install - perl_delete_localpod - popd > /dev/null || die - fi - - if use postscript; then - # workaround: some printer drivers still require pstoraster and pstopxl, bug #383831 - dosym gstoraster /usr/libexec/cups/filter/pstoraster - dosym gstopxl /usr/libexec/cups/filter/pstopxl - fi - - find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die - - cp "${FILESDIR}"/cups-browsed.init.d-r1 "${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}"/utils/cups-browsed.service || die - fi - - doinitd "${T}"/cups-browsed - systemd_dounit "${S}/utils/cups-browsed.service" -} - -pkg_postinst() { - if ! use foomatic ; then - ewarn "You are disabling the foomatic code in cups-filters. Please do that ONLY if absolutely." - ewarn "necessary. net-print/foomatic-filters as replacement is deprecated and unmaintained." - fi -} diff --git a/net-print/cups-filters/cups-filters-2.0.0-r1.ebuild b/net-print/cups-filters/cups-filters-2.0.0-r1.ebuild new file mode 100644 index 000000000000..462a52f62558 --- /dev/null +++ b/net-print/cups-filters/cups-filters-2.0.0-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 2023-2024 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" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="+foomatic" + +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) + ) + + # bash for configure until https://github.com/OpenPrinting/cups-filters/pull/567 (bug #920346) + # lands in a release. + CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}" +} 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..5e666fbd621b --- /dev/null +++ b/net-print/cups-filters/cups-filters-2.0.0.ebuild @@ -0,0 +1,54 @@ +# Copyright 2023-2024 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 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86" + +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-filters/files/cups-browsed.init.d-r2 b/net-print/cups-filters/files/cups-browsed.init.d-r2 new file mode 100644 index 000000000000..4fea546a05ca --- /dev/null +++ b/net-print/cups-filters/files/cups-browsed.init.d-r2 @@ -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-filters/files/cups-filters-1.28.17-CVE-2023-24805.patch b/net-print/cups-filters/files/cups-filters-1.28.17-CVE-2023-24805.patch new file mode 100644 index 000000000000..58b562504d0d --- /dev/null +++ b/net-print/cups-filters/files/cups-filters-1.28.17-CVE-2023-24805.patch @@ -0,0 +1,225 @@ +Modified version from: + + https://packages.debian.org/de/sid/cups-filters + + From: Thorsten Alteholz <debian@alteholz.de> + Date: Fri, 19 May 2023 10:49:35 +0200 + Subject: fix CVE-2023-24805 + +Original patch: + +https://github.com/OpenPrinting/cups-filters/commit/8f274035756c04efeb77eb654e9d4c4447287d65 + +From 8f274035756c04efeb77eb654e9d4c4447287d65 Mon Sep 17 00:00:00 2001 +From: Till Kamppeter <till.kamppeter@gmail.com> +Date: Wed, 17 May 2023 11:12:37 +0200 +Subject: [PATCH] Merge pull request from GHSA-gpxc-v2m8-fr3x + +* beh backend: Use execv() instead of system() - CVE-2023-24805 + +With execv() command line arguments are passed as separate strings and +not the full command line in a single string. This prevents arbitrary +command execution by escaping the quoting of the arguments in a job +with forged job title. + +* beh backend: Extra checks against odd/forged input - CVE-2023-24805 + +- Do not allow '/' in the scheme of the URI (= backend executable + name), to assure that only backends inside /usr/lib/cups/backend/ + are used. + +- Pre-define scheme buffer to empty string, to be defined for case of + uri being NULL. + +- URI must have ':', to split off scheme, otherwise error. + +- Check return value of snprintf() to create call path for backend, to + error out on truncation of a too long scheme or on complete failure + due to a completely odd scheme. + +* beh backend: Further improvements - CVE-2023-24805 + +- Use strncat() instead of strncpy() for getting scheme from URI, the latter + does not require setting terminating zero byte in case of truncation. + +- Also exclude "." or ".." as scheme, as directories are not valid CUPS + backends. + +- Do not use fprintf() in sigterm_handler(), to not interfere with a + fprintf() which could be running in the main process when + sigterm_handler() is triggered. + +- Use "static volatile int" for global variable job_canceled. + +--- + backend/beh.c | 107 +++++++++++++++++++++++++++++++++++++++++++++------------- + 1 file changed, 84 insertions(+), 23 deletions(-) + +diff --git a/backend/beh.c b/backend/beh.c +index 225fd27..8d51235 100644 +--- a/backend/beh.c ++++ b/backend/beh.c +@@ -22,12 +22,13 @@ + #include "backend-private.h" + #include <cups/array.h> + #include <ctype.h> ++#include <sys/wait.h> + + /* + * Local globals... + */ + +-static int job_canceled = 0; /* Set to 1 on SIGTERM */ ++static volatile int job_canceled = 0; /* Set to 1 on SIGTERM */ + + /* + * Local functions... +@@ -213,21 +214,40 @@ call_backend(char *uri, /* I - URI of final destination */ + char **argv, /* I - Command-line arguments */ + char *filename) { /* I - File name of input data */ + const char *cups_serverbin; /* Location of programs */ ++ char *backend_argv[8]; /* Arguments for backend */ + char scheme[1024], /* Scheme from URI */ + *ptr, /* Pointer into scheme */ +- cmdline[65536]; /* Backend command line */ +- int retval; ++ backend_path[2048]; /* Backend path */ ++ int pid = 0, /* Process ID of backend */ ++ wait_pid, /* Process ID from wait() */ ++ wait_status, /* Status from child */ ++ retval = 0; ++ int bytes; + + /* + * Build the backend command line... + */ + +- strncpy(scheme, uri, sizeof(scheme) - 1); +- if (strlen(uri) > 1023) +- scheme[1023] = '\0'; ++ scheme[0] = '\0'; ++ strncat(scheme, uri, sizeof(scheme) - 1); + if ((ptr = strchr(scheme, ':')) != NULL) + *ptr = '\0'; +- ++ else { ++ fprintf(stderr, ++ "ERROR: beh: Invalid URI, no colon (':') to mark end of scheme part.\n"); ++ exit (CUPS_BACKEND_FAILED); ++ } ++ if (strchr(scheme, '/')) { ++ fprintf(stderr, ++ "ERROR: beh: Invalid URI, scheme contains a slash ('/').\n"); ++ exit (CUPS_BACKEND_FAILED); ++ } ++ if (!strcmp(scheme, ".") || !strcmp(scheme, "..")) { ++ fprintf(stderr, ++ "ERROR: beh: Invalid URI, scheme (\"%s\") is a directory.\n", ++ scheme); ++ exit (CUPS_BACKEND_FAILED); ++ } + if ((cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL) + cups_serverbin = CUPS_SERVERBIN; + +@@ -235,16 +255,29 @@ call_backend(char *uri, /* I - URI of final destination */ + fprintf(stderr, + "ERROR: beh: Direct output into a file not supported.\n"); + exit (CUPS_BACKEND_FAILED); +- } else +- snprintf(cmdline, sizeof(cmdline), +- "%s/backend/%s '%s' '%s' '%s' '%s' '%s' %s", +- cups_serverbin, scheme, argv[1], argv[2], argv[3], +- /* Apply number of copies only if beh was called with a +- file name and not with the print data in stdin, as +- backends should handle copies only if they are called +- with a file name */ +- (argc == 6 ? "1" : argv[4]), +- argv[5], filename); ++ } ++ ++ backend_argv[0] = uri; ++ backend_argv[1] = argv[1]; ++ backend_argv[2] = argv[2]; ++ backend_argv[3] = argv[3]; ++ /* Apply number of copies only if beh was called with a file name ++ and not with the print data in stdin, as backends should handle ++ copies only if they are called with a file name */ ++ backend_argv[4] = (argc == 6 ? "1" : argv[4]); ++ backend_argv[5] = argv[5]; ++ backend_argv[6] = filename; ++ backend_argv[7] = NULL; ++ ++ bytes = snprintf(backend_path, sizeof(backend_path), ++ "%s/backend/%s", cups_serverbin, scheme); ++ if (bytes < 0 || bytes >= sizeof(backend_path)) ++ { ++ fprintf(stderr, ++ "ERROR: beh: Invalid scheme (\"%s\"), could not determing backend path.\n", ++ scheme); ++ return (CUPS_BACKEND_FAILED); ++ } + + /* + * Overwrite the device URI and run the actual backend... +@@ -253,18 +286,44 @@ call_backend(char *uri, /* I - URI of final destination */ + setenv("DEVICE_URI", uri, 1); + + fprintf(stderr, +- "DEBUG: beh: Executing backend command line \"%s\"...\n", +- cmdline); ++ "DEBUG: beh: Executing backend command line \"%s '%s' '%s' '%s' '%s' '%s' %s\"...\n", ++ backend_path, backend_argv[1], backend_argv[2], backend_argv[3], ++ backend_argv[4], backend_argv[5], backend_argv[6]); + fprintf(stderr, + "DEBUG: beh: Using device URI: %s\n", + uri); + +- retval = system(cmdline) >> 8; ++ if ((pid = fork()) == 0) { ++ /* ++ * Child comes here... ++ */ ++ ++ /* Run the backend */ ++ execv(backend_path, backend_argv); + +- if (retval == -1) + fprintf(stderr, "ERROR: Unable to execute backend command line: %s\n", + strerror(errno)); + ++ exit(1); ++ } else if (pid < 0) { ++ /* ++ * Unable to fork! ++ */ ++ ++ return (CUPS_BACKEND_FAILED); ++ } ++ ++ while ((wait_pid = wait(&wait_status)) < 0 && errno == EINTR); ++ ++ if (wait_pid >= 0 && wait_status) { ++ if (WIFEXITED(wait_status)) ++ retval = WEXITSTATUS(wait_status); ++ else if (WTERMSIG(wait_status) != SIGTERM) ++ retval = WTERMSIG(wait_status); ++ else ++ retval = 0; ++ } ++ + return (retval); + } + +@@ -277,8 +336,10 @@ static void + sigterm_handler(int sig) { /* I - Signal number (unused) */ + (void)sig; + +- fprintf(stderr, +- "DEBUG: beh: Job canceled.\n"); ++ const char * const msg = "DEBUG: beh: Job canceled.\n"; ++ /* The if() is to eliminate the return value and silence the warning ++ about an unused return value. */ ++ if (write(2, msg, strlen(msg))); + + if (job_canceled) + _exit(CUPS_BACKEND_OK); diff --git a/net-print/cups-filters/files/cups-filters-1.28.17-c++17.patch b/net-print/cups-filters/files/cups-filters-1.28.17-c++17.patch new file mode 100644 index 000000000000..f8f63ccd4724 --- /dev/null +++ b/net-print/cups-filters/files/cups-filters-1.28.17-c++17.patch @@ -0,0 +1,31 @@ +https://bugs.gentoo.org/901243 +(and https://bugs.gentoo.org/898076) +https://github.com/OpenPrinting/cups-filters/pull/505 + +From 104fba23b1c0c67c92777b3165c6dca99558a656 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 6 Feb 2023 18:13:52 -0800 +Subject: [PATCH] use noexcept(false) instead of throw() from c++17 onwards + +C++17 removed dynamic exception specifications [1] +they had been deprecated since C++11, replace +throw(whatever) with noexcept(false). + +[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/filter/pdftoraster.cxx ++++ b/filter/pdftoraster.cxx +@@ -2148,7 +2148,11 @@ int main(int argc, char *argv[]) { + /* For compatibility with g++ >= 4.7 compilers _GLIBCXX_THROW + * should be used as a guard, otherwise use traditional definition */ + #ifndef _GLIBCXX_THROW ++#if __cplusplus < 201703L + #define _GLIBCXX_THROW throw ++#else ++#define _GLIBCXX_THROW(x) noexcept(false) ++#endif + #endif + + void * operator new(size_t size) _GLIBCXX_THROW (std::bad_alloc) + diff --git a/net-print/cups-filters/files/cups-filters-1.28.2-make-missing-testfont-non-fatal.patch b/net-print/cups-filters/files/cups-filters-1.28.2-make-missing-testfont-non-fatal.patch deleted file mode 100644 index 8447929a5246..000000000000 --- a/net-print/cups-filters/files/cups-filters-1.28.2-make-missing-testfont-non-fatal.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- cups-filters-1.28.2/configure.ac -+++ cups-filters-1.28.2/configure.ac -@@ -790,7 +790,10 @@ - ) - - AS_IF([test "x$cross_compiling" != "xyes" && ! test -f "$with_test_font_path"], -- [AC_MSG_ERROR(DejaVuSans.ttf font file is missing. Please install a package providing it.)] -+ [ -+ AC_MSG_WARN(DejaVuSans.ttf font file is missing. Expect test failures!)] -+ AC_DEFINE([TESTFONT]) -+ ] - ) - AC_DEFINE_UNQUOTED([TESTFONT], ["$with_test_font_path"], [Path to font used in tests]) - diff --git a/net-print/cups-filters/metadata.xml b/net-print/cups-filters/metadata.xml index a1bb16fcd63e..f39cf8273849 100644 --- a/net-print/cups-filters/metadata.xml +++ b/net-print/cups-filters/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> @@ -11,5 +11,6 @@ </use> <upstream> <remote-id type="github">OpenPrinting/cups-filters</remote-id> + <remote-id type="cpe">cpe:/a:linuxfoundation:cups-filters</remote-id> </upstream> </pkgmetadata> 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..26e16556b814 --- /dev/null +++ b/net-print/cups-meta/cups-meta-1.ebuild @@ -0,0 +1,23 @@ +# Copyright 2023-2024 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 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86" + +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-pdf/cups-pdf-3.0.1-r1.ebuild b/net-print/cups-pdf/cups-pdf-3.0.1-r1.ebuild deleted file mode 100644 index f775a9ed1b83..000000000000 --- a/net-print/cups-pdf/cups-pdf-3.0.1-r1.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit toolchain-funcs - -DESCRIPTION="Provides a virtual printer for CUPS to produce PDF files" -HOMEPAGE="https://www.cups-pdf.de/" -SRC_URI="https://www.cups-pdf.de/src/${PN}_${PV/_}.tar.gz" -S=${WORKDIR}/${PN}-${PV/_} - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="amd64 ~arm ppc ~ppc64 x86" -IUSE="+ppds" - -RDEPEND=" - net-print/cups - <app-text/ghostscript-gpl-9.54 -" -DEPEND="${RDEPEND}" - -src_compile() { - pushd src >/dev/null - $(tc-getCC) ${LDFLAGS} ${CFLAGS} ${PN}.c -o ${PN} -lcups || die - popd >/dev/null -} - -src_install() { - exeinto /usr/libexec/cups/backend - exeopts -m0700 - doexe src/cups-pdf - - insinto /etc/cups - doins extra/cups-pdf.conf - - insinto /usr/share/cups/model - if use ppds; then - doins extra/CUPS-PDF_opt.ppd - else - doins extra/CUPS-PDF_noopt.ppd - fi - - dodoc ChangeLog README -} diff --git a/net-print/cups-pdf/cups-pdf-3.0.1-r2.ebuild b/net-print/cups-pdf/cups-pdf-3.0.1-r3.ebuild index a27e4fb17d9e..ed52b55cd752 100644 --- a/net-print/cups-pdf/cups-pdf-3.0.1-r2.ebuild +++ b/net-print/cups-pdf/cups-pdf-3.0.1-r3.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=8 inherit toolchain-funcs @@ -12,20 +12,21 @@ S=${WORKDIR}/${PN}-${PV/_} LICENSE="GPL-2+" SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" +KEYWORDS="amd64 ~arm ~arm64 ppc ~ppc64 x86" IUSE="+ppds" DEPEND="net-print/cups" - RDEPEND="${DEPEND} >=app-text/ghostscript-gpl-9.54" PATCHES=( "${FILESDIR}"/${PN}-3.0.1-ghostscript-gpl-9.54-compat.patch ) +src_configure() { + tc-export CC +} + src_compile() { - pushd src &>/dev/null || die - $(tc-getCC) ${LDFLAGS} ${CFLAGS} ${PN}.c -o ${PN} -lcups || die - popd &>/dev/null || die + LDLIBS="-lcups" emake -C src ${PN} } src_install() { @@ -43,5 +44,5 @@ src_install() { doins extra/CUPS-PDF_noopt.ppd fi - dodoc ChangeLog README + einstalldocs } diff --git a/net-print/cups-pdf/metadata.xml b/net-print/cups-pdf/metadata.xml index c439b06d8c84..882504794e17 100644 --- a/net-print/cups-pdf/metadata.xml +++ b/net-print/cups-pdf/metadata.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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> + <maintainer type="project"> + <email>printing@gentoo.org</email> + <name>Gentoo Printing Project</name> + </maintainer> </pkgmetadata> diff --git a/net-print/cups-pk-helper/Manifest b/net-print/cups-pk-helper/Manifest index be83f62d218a..b590abe2099e 100644 --- a/net-print/cups-pk-helper/Manifest +++ b/net-print/cups-pk-helper/Manifest @@ -1 +1 @@ -DIST cups-pk-helper-0.2.6.tar.xz 162368 BLAKE2B 3dec9a32f577c35a426ec4bbf2f96b2e18e0cd7bbb8a43fd93a6104d8fbb01de15cc7a168ae67fe5f2dca34823c70ac5f61acc01d876130d6ae9f5b789491d23 SHA512 33f1b6f58f4772148bd1cfb8163dacaffd3cc62f2d03731710c98b765ebb8b87541cb9cf43e886880134c32db91a43c7142b1556a0abdf1449068031b0d5fbd3 +DIST cups-pk-helper-0.2.7.tar.xz 54500 BLAKE2B e9107c18396e87bc8e385a32d00ac6d15bfcc6f53e9c04514bbc9e7bee6b4a87ba16b97da321c72fb01fa273a0fdcb396a0eed335e9e37eb98d7a299ec480ca1 SHA512 8f1d5dce73a52552d00eb3f54b39e03ca7ae711a0591572a25bd8926e228457628f1ee7e6ae89bda1b0ef473f860ad85bff9036ca1bc244d2cbda530bab96d40 diff --git a/net-print/cups-pk-helper/cups-pk-helper-0.2.6.ebuild b/net-print/cups-pk-helper/cups-pk-helper-0.2.6.ebuild deleted file mode 100644 index f196d8750b43..000000000000 --- a/net-print/cups-pk-helper/cups-pk-helper-0.2.6.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" -GCONF_DEBUG="no" - -inherit gnome2 - -DESCRIPTION="PolicyKit helper to configure cups with fine-grained privileges" -HOMEPAGE="https://www.freedesktop.org/wiki/Software/cups-pk-helper" -SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${P}.tar.xz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ppc ppc64 ~sparc x86" -IUSE="" - -# Require {glib,gdbus-codegen}-2.30.0 due to GDBus changes between 2.29.92 -# and 2.30.0 -COMMON_DEPEND=" - >=dev-libs/glib-2.30.0:2 - net-print/cups - >=sys-auth/polkit-0.97 -" -RDEPEND="${COMMON_DEPEND} - sys-apps/dbus -" -DEPEND="${COMMON_DEPEND} - >=dev-util/gdbus-codegen-2.30.0 - >=dev-util/intltool-0.40.6 - virtual/pkgconfig - sys-devel/gettext -" - -src_prepare() { - DOCS="AUTHORS HACKING NEWS README" - - # Regenerate dbus-codegen files to fix build with glib-2.30.x; bug #410773 - rm -v src/cph-iface-mechanism.{c,h} || die - - gnome2_src_prepare -} diff --git a/net-print/cups-pk-helper/cups-pk-helper-0.2.7-r1.ebuild b/net-print/cups-pk-helper/cups-pk-helper-0.2.7-r1.ebuild new file mode 100644 index 000000000000..52b9222c776c --- /dev/null +++ b/net-print/cups-pk-helper/cups-pk-helper-0.2.7-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit gnome.org meson + +DESCRIPTION="PolicyKit helper to configure cups with fine-grained privileges" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/cups-pk-helper https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper" +SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${P}.tar.xz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86" +RESTRICT="test" # bug #864949 + +DEPEND=" + >=dev-libs/glib-2.36.0:2 + >=sys-auth/polkit-0.97 + net-print/cups +" +RDEPEND="${DEPEND} + sys-apps/dbus +" +BDEPEND=" + >=dev-util/gdbus-codegen-2.36.0 + virtual/pkgconfig + sys-devel/gettext +" + +DOCS=( AUTHORS HACKING NEWS README ) diff --git a/net-print/cups-pk-helper/metadata.xml b/net-print/cups-pk-helper/metadata.xml index 996e7cacd217..5f0502eb8386 100644 --- a/net-print/cups-pk-helper/metadata.xml +++ b/net-print/cups-pk-helper/metadata.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="project"> - <email>gnome@gentoo.org</email> - <name>Gentoo GNOME Desktop</name> - </maintainer> + <maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <upstream> + <remote-id type="freedesktop-gitlab">cups-pk-helper/cups-pk-helper</remote-id> + </upstream> </pkgmetadata> diff --git a/net-print/cups-windows/metadata.xml b/net-print/cups-windows/metadata.xml index c439b06d8c84..e2fedda90ee1 100644 --- a/net-print/cups-windows/metadata.xml +++ b/net-print/cups-windows/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest index f26affcecc5f..ec197c098c16 100644 --- a/net-print/cups/Manifest +++ b/net-print/cups/Manifest @@ -1,2 +1,2 @@ -DIST cups-2.3.3-source.tar.gz 8140741 BLAKE2B 427e6ee3602aec33ac336d9b2c6c8eb270f2996371f0edd3d69e411b94b2e93fc58a0032ba9f6d048f2c58a1c6b48f742671b4011cd725b882adfcc06ed7fd8a SHA512 7d6f4a01794c5599cc71525778ea785fd17271c31ac146a56e8fc374a88f99e4035d018dae48e37e541455e9cc93b302e892b2e93ec558c1b4bfc46dad68c92d -DIST cups-2.3.3op2-source.tar.gz 7993205 BLAKE2B 8c115b91ec185a4820578561aaf681238280b22b5c68b68c484ffbd0fa3c4ec1beb4d426e3f0e33192e32bce78aa8b7f50ed6799732a467fa9e75c34787057ee SHA512 db27dd6fb616bd7ad895b2bdf4ea7b010501358a50dc8f2e7e29558d1cfc088a572b1b35ac512654d3ed410c84df87dc34ca636533a4499117253915d4763117 +DIST cups-2.4.6-source.tar.gz 8135135 BLAKE2B 4e61112ddaa46f20b1cfcb8f523dd07ba7d82604b9857754b288a2a9c5bc50ce242cfa119867347e4696818dc2eb505cf7fff1f9a0634e314edb2500395b83e4 SHA512 eb748680a748f599e4826c17054a24259d190e6c8e8339f6a7a37ee2a3f4c3fd1829e856b25a854cfdbee1b51279c70a0e847f6142225b8b68f1cd10c4ce4ce4 +DIST cups-2.4.7-source.tar.gz 8134809 BLAKE2B d81de62cff37c576ef8fb125b97568c2d86602cec6151d7030552fad421d7bc77a5df1e860d5ac5a241e739cc0d1fe5fcac44b8451ad2fc4dc675cf74fd41382 SHA512 914b574ff6d85de9f3471528b52d4a436c484c441f47651846e1bdfa00aec26774efd416ff466216d2bccf468f8a797b1e0d666b5c82abc87e77550ce8b00d39 diff --git a/net-print/cups/cups-2.3.3-r4.ebuild b/net-print/cups/cups-2.4.6.ebuild index 2c0e2bf040b4..0419f6602052 100644 --- a/net-print/cups/cups-2.3.3-r4.ebuild +++ b/net-print/cups/cups-2.4.6.ebuild @@ -1,37 +1,46 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit autotools flag-o-matic linux-info xdg multilib-minimal pam systemd toolchain-funcs +inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs -MY_PV="${PV/_rc/rc}" -MY_PV="${MY_PV/_beta/b}" +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 +if [[ ${PV} == *9999 ]] ; then inherit git-r3 - EGIT_REPO_URI="https://github.com/apple/cups.git" - if [[ ${PV} != 9999 ]]; then - EGIT_BRANCH=branch-${PV/.9999} - fi + EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git" + [[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999} else - #SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz" - if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" + 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="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi fi +S="${WORKDIR}/${MY_P}" + DESCRIPTION="The Common Unix Printing System" -HOMEPAGE="https://www.cups.org/" +HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups" LICENSE="Apache-2.0" SLOT="0" -IUSE="acl dbus debug kerberos lprng-compat pam selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" +IUSE="acl dbus debug kerberos openssl pam selinux +ssl static-libs systemd test usb X xinetd zeroconf" -CDEPEND=" - app-text/libpaper +# As of 2.4.2, they don't actually seem to be interactive (they pass some flags +# by default to input for us), but they fail on some greyscale issue w/ poppler? +RESTRICT="!test? ( test ) test" + +BDEPEND=" + acct-group/lp + acct-group/lpadmin + virtual/pkgconfig +" +DEPEND=" + app-text/libpaper:= sys-libs/zlib acl? ( kernel_linux? ( @@ -41,68 +50,43 @@ CDEPEND=" ) dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) - !lprng-compat? ( !net-print/lprng ) pam? ( sys-libs/pam ) !pam? ( virtual/libcrypt:= ) - ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] ) + ssl? ( + !openssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${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[${MULTILIB_USEDEP}] ) + zeroconf? ( >=net-dns/avahi-0.6.31-r2[dbus,${MULTILIB_USEDEP}] ) " - -DEPEND="${CDEPEND}" -BDEPEND=" - acct-group/lp - acct-group/lpadmin - virtual/pkgconfig -" - -RDEPEND="${CDEPEND} +RDEPEND=" + ${DEPEND} acct-group/lp acct-group/lpadmin selinux? ( sec-policy/selinux-cups ) " - PDEPEND=">=net-print/cups-filters-1.0.43" -REQUIRED_USE=" - usb? ( threads ) -" - -# upstream includes an interactive test which is a nono for gentoo -RESTRICT="test" - -# systemd-socket.patch from Fedora PATCHES=( - "${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch" - "${FILESDIR}/${PN}-1.4.4-nostrip.patch" - "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" - "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" - "${FILESDIR}/${PN}-2.3.3-user-AR.patch" - "${FILESDIR}/${PN}-2.3.3-no-libtool.patch" + "${FILESDIR}/${PN}-2.4.1-nostrip.patch" + "${FILESDIR}/${PN}-2.4.1-user-AR.patch" ) MULTILIB_CHOST_TOOLS=( /usr/bin/cups-config ) -S="${WORKDIR}/${MY_P}" - pkg_setup() { - #enewgroup lp -> acct-group/lp - # user lp already provided by baselayout - #enewuser lp -1 -1 -1 lp - #enewgroup lpadmin 106 - 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) + # 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, " @@ -111,7 +95,6 @@ pkg_setup() { elog "Alternatively, just disable the usb useflag for cups (your printer will still work)." fi else - #here we should warn user that he should enable it so he can print 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." @@ -131,31 +114,24 @@ pkg_setup() { src_prepare() { default - # Remove ".SILENT" rule for verbose output (bug 524338). - sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" + # Remove ".SILENT" rule for verbose output (bug #524338). + sed 's#^.SILENT:##g' -i Makedefs.in || die - # Fix install-sh, posix sh does not have 'function'. - sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" + # Remove redefinition of _FORTIFY_SOURCE (bug #907683) + sed 's#-D_FORTIFY_SOURCE=3##g' -i config-scripts/cups-compiler.m4 || die - # Do not add -Werror even for live ebuilds - sed '/WARNING_OPTIONS/s@-Werror@@' \ - -i config-scripts/cups-compiler.m4 || die + AT_M4DIR="config-scripts" eautoreconf - AT_M4DIR=config-scripts eaclocal - eautoconf - - # custom Makefiles + # Custom Makefiles multilib_copy_sources } multilib_src_configure() { export DSOFLAGS="${LDFLAGS}" - einfo LINGUAS=\"${LINGUAS}\" - - # explicitly specify compiler wrt bug 524340 + # Explicitly specify compiler wrt bug #524340 # - # need to override KRB5CONFIG for proper flags + # Need to override KRB5CONFIG for proper flags # https://github.com/apple/cups/issues/4423 local myeconfargs=( CC="$(tc-getCC)" @@ -163,13 +139,23 @@ multilib_src_configure() { 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 - --with-languages="${LINGUAS}" - --with-system-groups=lpadmin + # 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) @@ -179,30 +165,40 @@ multilib_src_configure() { $(use_enable kerberos gssapi) $(multilib_native_use_enable pam) $(use_enable static-libs static) - $(use_enable threads) - $(use_enable ssl gnutls) - $(use_enable systemd) + $(use_enable test unit-tests) + # USE="ssl" => gnutls + # USE="ssl openssl" => openssl + $(use_with ssl tls $(usex openssl openssl gnutls)) + $(use_with systemd ondemand systemd) $(multilib_native_use_enable usb libusb) - $(use_enable zeroconf avahi) - --disable-dnssd + $(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[@]}" - # install in /usr/libexec always, instead of using /usr/lib/cups, as that - # makes more sense when facing multilib support. 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 + # Additional path corrections needed for prefix, see bug #597728 sed \ -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \ -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \ @@ -220,6 +216,12 @@ multilib_src_compile() { } 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. multilib_is_native_abi && default } @@ -235,107 +237,82 @@ multilib_src_install() { multilib_src_install_all() { dodoc {CHANGES,CREDITS,README}.md - # move the default config file to docs + # Move the default config file to docs dodoc "${ED}"/etc/cups/cupsd.conf.default - rm -f "${ED}"/etc/cups/cupsd.conf.default + rm "${ED}"/etc/cups/cupsd.conf.default || die - # clean out cups init scripts - rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups} + # Clean out cups init scripts + rm -r "${ED}"/etc/{init.d/cups,rc*} || die - # install our init script + # Install our init script local neededservices=( $(usex zeroconf avahi-daemon '') $(usex dbus dbus '') ) [[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}" - cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die - sed -i \ - -e "s/@neededservices@/${neededservices}/" \ - "${T}"/cupsd || die + 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 + 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:" \ + # 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 + # 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 + # 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, + # Always configure with --with-xinetd= and clean up later, # bug #525604 - rm -rf "${ED}"/etc/xinetd.d + rm -r "${ED}"/etc/xinetd.d || die fi - keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ - /var/log/cups /var/spool/cups/tmp - 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 #266678 + # 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-filters: + # 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/cups || die + # The following are created by the init script + rm -r "${ED}"/var/cache || die rm -r "${ED}"/run || die - # for the special case of running lprng and cups together, bug 467226 - if use lprng-compat ; then - rm -fv "${ED}"/usr/bin/{lp*,cancel} - rm -fv "${ED}"/usr/sbin/lp* - rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*} - rm -fv "${ED}"/usr/share/man/man8/lp* - ewarn "Not installing lp... binaries, since the lprng-compat useflag is set." - ewarn "Unless you plan to install an exotic server setup, you most likely" - ewarn "do not want this. Disable the useflag then and all will be fine." - fi -} - -pkg_preinst() { - xdg_pkg_preinst + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp } pkg_postinst() { - # Update desktop file database and gtk icon cache (bug 370059) xdg_pkg_postinst - local v for v in ${REPLACING_VERSIONS}; do if ! ver_test ${v} -ge 2.2.2-r2 ; then - echo 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" - echo break fi done for v in ${REPLACING_VERSIONS}; do - echo + elog elog "For information about installing a printer and general cups setup" elog "take a look at: https://wiki.gentoo.org/wiki/Printing" - echo break done -} -pkg_postrm() { - # Update desktop file database and gtk icon cache (bug 370059) - xdg_pkg_postrm + 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/cups/cups-2.3.3_p2-r2.ebuild b/net-print/cups/cups-2.4.7-r1.ebuild index 1fb277c69548..1dbd7ec1b326 100644 --- a/net-print/cups/cups-2.3.3_p2-r2.ebuild +++ b/net-print/cups/cups-2.4.7-r1.ebuild @@ -1,38 +1,38 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit autotools flag-o-matic linux-info xdg multilib-minimal pam systemd toolchain-funcs +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 +if [[ ${PV} == *9999 ]] ; then inherit git-r3 -# EGIT_REPO_URI="https://github.com/apple/cups.git" EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git" [[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999} else -# SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz" 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="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" + if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" 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 pam selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" +IUSE="acl dbus debug kerberos openssl pam selinux static-libs systemd test usb X xinetd zeroconf" -REQUIRED_USE="usb? ( threads )" -# upstream includes an interactive test which is a nono for gentoo -RESTRICT="test" +# As of 2.4.2, they don't actually seem to be interactive (they pass some flags +# by default to input for us), but they fail on some greyscale issue w/ poppler? +RESTRICT="!test? ( test ) test" BDEPEND=" acct-group/lp @@ -40,7 +40,7 @@ BDEPEND=" virtual/pkgconfig " DEPEND=" - app-text/libpaper + app-text/libpaper:= sys-libs/zlib acl? ( kernel_linux? ( @@ -52,14 +52,16 @@ DEPEND=" kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) pam? ( sys-libs/pam ) !pam? ( virtual/libcrypt:= ) - ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] ) + !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[${MULTILIB_USEDEP}] ) + zeroconf? ( >=net-dns/avahi-0.6.31-r2[dbus,${MULTILIB_USEDEP}] ) " -RDEPEND="${DEPEND} +RDEPEND=" + ${DEPEND} acct-group/lp acct-group/lpadmin selinux? ( sec-policy/selinux-cups ) @@ -67,30 +69,22 @@ RDEPEND="${DEPEND} PDEPEND=">=net-print/cups-filters-1.0.43" PATCHES=( - "${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch" - "${FILESDIR}/${PN}-1.4.4-nostrip.patch" - "${FILESDIR}/${PN}-2.3.3-user-AR.patch" + "${FILESDIR}/${PN}-2.4.1-nostrip.patch" + "${FILESDIR}/${PN}-2.4.1-user-AR.patch" ) MULTILIB_CHOST_TOOLS=( /usr/bin/cups-config ) -S="${WORKDIR}/${MY_P}" - pkg_setup() { - #enewgroup lp -> acct-group/lp - # user lp already provided by baselayout - #enewuser lp -1 -1 -1 lp - #enewgroup lpadmin 106 - 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) + # 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, " @@ -99,7 +93,6 @@ pkg_setup() { elog "Alternatively, just disable the usb useflag for cups (your printer will still work)." fi else - #here we should warn user that he should enable it so he can print 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." @@ -119,31 +112,24 @@ pkg_setup() { src_prepare() { default - # Remove ".SILENT" rule for verbose output (bug 524338). + # Remove ".SILENT" rule for verbose output (bug #524338). sed 's#^.SILENT:##g' -i Makedefs.in || die - # Fix install-sh, posix sh does not have 'function'. - sed 's#function gzipcp#gzipcp()#g' -i install-sh || die + # Remove redefinition of _FORTIFY_SOURCE (bug #907683) + sed 's#-D_FORTIFY_SOURCE=3##g' -i config-scripts/cups-compiler.m4 || die - # Do not add -Werror even for live ebuilds - sed '/WARNING_OPTIONS/s@-Werror@@' \ - -i config-scripts/cups-compiler.m4 || die + AT_M4DIR="config-scripts" eautoreconf - AT_M4DIR=config-scripts eaclocal - eautoconf - - # custom Makefiles + # Custom Makefiles multilib_copy_sources } multilib_src_configure() { export DSOFLAGS="${LDFLAGS}" - einfo LINGUAS=\"${LINGUAS}\" - - # explicitly specify compiler wrt bug 524340 + # Explicitly specify compiler wrt bug #524340 # - # need to override KRB5CONFIG for proper flags + # Need to override KRB5CONFIG for proper flags # https://github.com/apple/cups/issues/4423 local myeconfargs=( CC="$(tc-getCC)" @@ -151,13 +137,23 @@ multilib_src_configure() { 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 - --with-languages="${LINGUAS}" - --with-system-groups=lpadmin + # 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) @@ -167,30 +163,38 @@ multilib_src_configure() { $(use_enable kerberos gssapi) $(multilib_native_use_enable pam) $(use_enable static-libs static) - $(use_enable threads) - $(use_enable ssl gnutls) - $(use_enable systemd) + $(use_enable test unit-tests) + --with-tls=$(usex openssl openssl gnutls) + $(use_with systemd ondemand systemd) $(multilib_native_use_enable usb libusb) - $(use_enable zeroconf avahi) - --disable-dnssd + $(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[@]}" - # install in /usr/libexec always, instead of using /usr/lib/cups, as that - # makes more sense when facing multilib support. 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 + # Additional path corrections needed for prefix, see bug #597728 sed \ -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \ -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \ @@ -208,6 +212,12 @@ multilib_src_compile() { } 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. multilib_is_native_abi && default } @@ -223,20 +233,20 @@ multilib_src_install() { multilib_src_install_all() { dodoc {CHANGES,CREDITS,README}.md - # move the default config file to docs + # 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 + # Clean out cups init scripts rm -r "${ED}"/etc/{init.d/cups,rc*} || die - # install our init script + # Install our init script local neededservices=( $(usex zeroconf avahi-daemon '') $(usex dbus dbus '') ) [[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}" - cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die + cp "${FILESDIR}"/cupsd.init.d-r4 "${T}"/cupsd || die sed -i -e "s/@neededservices@/${neededservices}/" "${T}"/cupsd || die doinitd "${T}"/cupsd @@ -246,48 +256,41 @@ multilib_src_install_all() { fi if use xinetd ; then - # correct path + # 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 + # 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 + # 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, + # Always configure with --with-xinetd= and clean up later, # bug #525604 rm -r "${ED}"/etc/xinetd.d || die fi - keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ - /var/cache/cups /var/log/cups /var/spool/cups/tmp - 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 #266678 + # 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-filters: + # 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/cups || die + # The following are created by the init script + rm -r "${ED}"/var/cache || die rm -r "${ED}"/run || die -} -pkg_preinst() { - xdg_pkg_preinst + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp } pkg_postinst() { - # Update desktop file database and gtk icon cache (bug 370059) xdg_pkg_postinst - local v for v in ${REPLACING_VERSIONS}; do @@ -305,9 +308,7 @@ pkg_postinst() { elog "take a look at: https://wiki.gentoo.org/wiki/Printing" break done -} -pkg_postrm() { - # Update desktop file database and gtk icon cache (bug 370059) - xdg_pkg_postrm + 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/cups/cups-2.4.7-r2.ebuild b/net-print/cups/cups-2.4.7-r2.ebuild new file mode 100644 index 000000000000..51ce84608e2e --- /dev/null +++ b/net-print/cups/cups-2.4.7-r2.ebuild @@ -0,0 +1,320 @@ +# Copyright 1999-2024 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 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86" + 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/cups/cups-9999.ebuild b/net-print/cups/cups-9999.ebuild index 9dfe3c782811..3d6b8b8cac30 100644 --- a/net-print/cups/cups-9999.ebuild +++ b/net-print/cups/cups-9999.ebuild @@ -1,38 +1,38 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit autotools flag-o-matic linux-info xdg multilib-minimal pam systemd toolchain-funcs +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 +if [[ ${PV} == *9999 ]] ; then inherit git-r3 -# EGIT_REPO_URI="https://github.com/apple/cups.git" EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git" [[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999} else -# SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz" 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" + if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" 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 pam selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" +IUSE="acl dbus debug kerberos openssl pam selinux static-libs systemd test usb X xinetd zeroconf" -REQUIRED_USE="usb? ( threads )" -# upstream includes an interactive test which is a nono for gentoo -RESTRICT="test" +# As of 2.4.2, they don't actually seem to be interactive (they pass some flags +# by default to input for us), but they fail on some greyscale issue w/ poppler? +RESTRICT="!test? ( test ) test" BDEPEND=" acct-group/lp @@ -40,7 +40,7 @@ BDEPEND=" virtual/pkgconfig " DEPEND=" - app-text/libpaper + app-text/libpaper:= sys-libs/zlib acl? ( kernel_linux? ( @@ -52,14 +52,16 @@ DEPEND=" kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) pam? ( sys-libs/pam ) !pam? ( virtual/libcrypt:= ) - ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] ) + !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[${MULTILIB_USEDEP}] ) + zeroconf? ( >=net-dns/avahi-0.6.31-r2[dbus,${MULTILIB_USEDEP}] ) " -RDEPEND="${DEPEND} +RDEPEND=" + ${DEPEND} acct-group/lp acct-group/lpadmin selinux? ( sec-policy/selinux-cups ) @@ -67,29 +69,22 @@ RDEPEND="${DEPEND} PDEPEND=">=net-print/cups-filters-1.0.43" PATCHES=( - "${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch" - "${FILESDIR}/${PN}-1.4.4-nostrip.patch" + "${FILESDIR}/${PN}-2.4.1-nostrip.patch" + "${FILESDIR}/${PN}-2.4.1-user-AR.patch" ) MULTILIB_CHOST_TOOLS=( /usr/bin/cups-config ) -S="${WORKDIR}/${MY_P}" - pkg_setup() { - #enewgroup lp -> acct-group/lp - # user lp already provided by baselayout - #enewuser lp -1 -1 -1 lp - #enewgroup lpadmin 106 - 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) + # 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, " @@ -98,7 +93,6 @@ pkg_setup() { elog "Alternatively, just disable the usb useflag for cups (your printer will still work)." fi else - #here we should warn user that he should enable it so he can print 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." @@ -118,31 +112,24 @@ pkg_setup() { src_prepare() { default - # Remove ".SILENT" rule for verbose output (bug 524338). + # Remove ".SILENT" rule for verbose output (bug #524338). sed 's#^.SILENT:##g' -i Makedefs.in || die - # Fix install-sh, posix sh does not have 'function'. - sed 's#function gzipcp#gzipcp()#g' -i install-sh || die + # Remove redefinition of _FORTIFY_SOURCE (bug #907683) + sed 's#-D_FORTIFY_SOURCE=3##g' -i config-scripts/cups-compiler.m4 || die - # Do not add -Werror even for live ebuilds - sed '/WARNING_OPTIONS/s@-Werror@@' \ - -i config-scripts/cups-compiler.m4 || die + AT_M4DIR="config-scripts" eautoreconf - AT_M4DIR=config-scripts eaclocal - eautoconf - - # custom Makefiles + # Custom Makefiles multilib_copy_sources } multilib_src_configure() { export DSOFLAGS="${LDFLAGS}" - einfo LINGUAS=\"${LINGUAS}\" - - # explicitly specify compiler wrt bug 524340 + # Explicitly specify compiler wrt bug #524340 # - # need to override KRB5CONFIG for proper flags + # Need to override KRB5CONFIG for proper flags # https://github.com/apple/cups/issues/4423 local myeconfargs=( CC="$(tc-getCC)" @@ -150,13 +137,23 @@ multilib_src_configure() { 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 - --with-languages="${LINGUAS}" - --with-system-groups=lpadmin + # 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) @@ -166,30 +163,38 @@ multilib_src_configure() { $(use_enable kerberos gssapi) $(multilib_native_use_enable pam) $(use_enable static-libs static) - $(use_enable threads) - $(use_enable ssl gnutls) - $(use_enable systemd) + $(use_enable test unit-tests) + --with-tls=$(usex openssl openssl gnutls) + $(use_with systemd ondemand systemd) $(multilib_native_use_enable usb libusb) - $(use_enable zeroconf avahi) - --disable-dnssd + $(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[@]}" - # install in /usr/libexec always, instead of using /usr/lib/cups, as that - # makes more sense when facing multilib support. 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 + # Additional path corrections needed for prefix, see bug #597728 sed \ -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \ -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \ @@ -207,6 +212,12 @@ multilib_src_compile() { } 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. multilib_is_native_abi && default } @@ -222,70 +233,64 @@ multilib_src_install() { multilib_src_install_all() { dodoc {CHANGES,CREDITS,README}.md - # move the default config file to docs + # 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*,pam.d/cups} || die + # Clean out cups init scripts + rm -r "${ED}"/etc/{init.d/cups,rc*} || die - # install our init script + # Install our init script local neededservices=( $(usex zeroconf avahi-daemon '') $(usex dbus dbus '') ) [[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}" - cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die + 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 + if use pam ; then + rm "${ED}"/etc/pam.d/${PN} || die pamd_mimic_system cups auth account fi if use xinetd ; then - # correct path + # 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 + # 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 + # 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, + # Always configure with --with-xinetd= and clean up later, # bug #525604 rm -r "${ED}"/etc/xinetd.d || die fi - keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ - /var/cache/cups /var/log/cups /var/spool/cups/tmp - 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 #266678 + # 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-filters: + # 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/cups || die + # The following are created by the init script + rm -r "${ED}"/var/cache || die rm -r "${ED}"/run || die -} -pkg_preinst() { - xdg_pkg_preinst + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp } pkg_postinst() { - # Update desktop file database and gtk icon cache (bug 370059) xdg_pkg_postinst - local v for v in ${REPLACING_VERSIONS}; do @@ -303,9 +308,7 @@ pkg_postinst() { elog "take a look at: https://wiki.gentoo.org/wiki/Printing" break done -} -pkg_postrm() { - # Update desktop file database and gtk icon cache (bug 370059) - xdg_pkg_postrm + 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/cups/files/cups-1.4.4-nostrip.patch b/net-print/cups/files/cups-1.4.4-nostrip.patch deleted file mode 100644 index cd2b07042cec..000000000000 --- a/net-print/cups/files/cups-1.4.4-nostrip.patch +++ /dev/null @@ -1,14 +0,0 @@ -# Source: Gentoo - -diff -urN cups-1.4.4/config-scripts/cups-compiler.m4 cups-1.4.4.new/config-scripts/cups-compiler.m4 ---- cups-1.4.4/config-scripts/cups-compiler.m4 2009-05-17 02:13:47.000000000 +0200 -+++ cups-1.4.4.new/config-scripts/cups-compiler.m4 2010-08-12 19:19:45.937020635 +0200 -@@ -30,7 +30,7 @@ - if test x$enable_debug = xyes; then - OPTIM="-g" - else -- INSTALL_STRIP="-s" -+ INSTALL_STRIP="" - fi - - dnl Debug printfs can slow things down, so provide a separate option for that diff --git a/net-print/cups/files/cups-2.0.1-xinetd-installation-fix.patch b/net-print/cups/files/cups-2.0.1-xinetd-installation-fix.patch deleted file mode 100644 index 2e8419e7675a..000000000000 --- a/net-print/cups/files/cups-2.0.1-xinetd-installation-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/scheduler/Makefile -+++ a/scheduler/Makefile -@@ -211,4 +211,5 @@ -- elif test "x$(XINETD)" != x; then \ -+ fi -+ if test "x$(XINETD)" != x; then \ - echo Installing xinetd configuration file for cups-lpd...; \ - $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \ - $(INSTALL_DATA) cups-lpd.xinetd $(BUILDROOT)$(XINETD)/cups-lpd; \ diff --git a/net-print/cups/files/cups-2.0.2-rename-systemd-service-files.patch b/net-print/cups/files/cups-2.0.2-rename-systemd-service-files.patch deleted file mode 100644 index 16f677ba7a37..000000000000 --- a/net-print/cups/files/cups-2.0.2-rename-systemd-service-files.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 33e0d4c8e450fe69b195422c0880aaa96ca9478d Mon Sep 17 00:00:00 2001 -From: Matthias Maier <tamiko@kyomu.43-1.org> -Date: Wed, 19 Nov 2014 18:00:06 +0100 -Subject: [PATCH] change systemd service files to gentoo naming scheme - ---- - scheduler/Makefile | 10 +++++----- - scheduler/org.cups.cupsd.path.in | 2 +- - scheduler/org.cups.cupsd.service.in | 2 +- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/scheduler/Makefile b/scheduler/Makefile -index 3e0884a..b354420 100644 ---- a/scheduler/Makefile -+++ b/scheduler/Makefile -@@ -203,11 +203,11 @@ install-data: - if test "x$(SYSTEMD_DIR)" != x; then \ - echo Installing systemd configuration files...; \ - $(INSTALL_DIR) $(BUILDROOT)$(SYSTEMD_DIR); \ -- $(INSTALL_DATA) org.cups.cupsd.path $(BUILDROOT)$(SYSTEMD_DIR); \ -- $(INSTALL_DATA) org.cups.cupsd.service $(BUILDROOT)$(SYSTEMD_DIR); \ -- $(INSTALL_DATA) org.cups.cupsd.socket $(BUILDROOT)$(SYSTEMD_DIR); \ -- $(INSTALL_DATA) org.cups.cups-lpdAT.service $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cups-lpd@.service; \ -- $(INSTALL_DATA) org.cups.cups-lpd.socket $(BUILDROOT)$(SYSTEMD_DIR); \ -+ $(INSTALL_DATA) org.cups.cupsd.path $(BUILDROOT)$(SYSTEMD_DIR)/cups.path; \ -+ $(INSTALL_DATA) org.cups.cupsd.service $(BUILDROOT)$(SYSTEMD_DIR)/cups.service; \ -+ $(INSTALL_DATA) org.cups.cupsd.socket $(BUILDROOT)$(SYSTEMD_DIR)/cups.socket; \ -+ $(INSTALL_DATA) org.cups.cups-lpdAT.service $(BUILDROOT)$(SYSTEMD_DIR)/cups-lpd@.service; \ -+ $(INSTALL_DATA) org.cups.cups-lpd.socket $(BUILDROOT)$(SYSTEMD_DIR)/cups-lpd.socket; \ - elif test "x$(XINETD)" != x; then \ - echo Installing xinetd configuration file for cups-lpd...; \ - $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \ -diff --git a/scheduler/org.cups.cupsd.service.in b/scheduler/org.cups.cupsd.service.in -index 0a27c76..7a04248 100644 ---- a/scheduler/org.cups.cupsd.service.in -+++ b/scheduler/org.cups.cupsd.service.in -@@ -7,5 +7,5 @@ ExecStart=@sbindir@/cupsd -l - Type=simple - - [Install] --Also=org.cups.cupsd.socket org.cups.cupsd.path -+Also=cups.socket cups.path - WantedBy=printer.target --- -2.0.4 - diff --git a/net-print/cups/files/cups-2.2.6-fix-install-perms.patch b/net-print/cups/files/cups-2.2.6-fix-install-perms.patch deleted file mode 100644 index a8f007446f2d..000000000000 --- a/net-print/cups/files/cups-2.2.6-fix-install-perms.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- cups-2.2.6/Makedefs.in -+++ cups-2.2.6/Makedefs.in -@@ -49,12 +49,12 @@ - # - - INSTALL_BIN = @LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@ --INSTALL_COMPDATA = $(INSTALL) -c -m 444 @INSTALL_GZIP@ -+INSTALL_COMPDATA = $(INSTALL) -c -m 644 @INSTALL_GZIP@ - INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@ --INSTALL_DATA = $(INSTALL) -c -m 444 -+INSTALL_DATA = $(INSTALL) -c -m 644 - INSTALL_DIR = $(INSTALL) -d - INSTALL_LIB = @LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@ --INSTALL_MAN = $(INSTALL) -c -m 444 -+INSTALL_MAN = $(INSTALL) -c -m 644 - INSTALL_SCRIPT = $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ - - # diff --git a/net-print/cups/files/cups-2.3.3-no-libtool.patch b/net-print/cups/files/cups-2.3.3-no-libtool.patch deleted file mode 100644 index cf8911294183..000000000000 --- a/net-print/cups/files/cups-2.3.3-no-libtool.patch +++ /dev/null @@ -1,25 +0,0 @@ -This is not needed and causes problems with more strict -implementations of libtool. - -With slibtool it fails. - ---- a/backend/Makefile -+++ b/backend/Makefile -@@ -118,7 +118,7 @@ install-exec: $(INSTALLXPC) - echo Installing backends in $(SERVERBIN)/backend - $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend - for file in $(RBACKENDS); do \ -- $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \ -+ $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \ - done - for file in $(UBACKENDS); do \ - $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \ -@@ -142,7 +142,7 @@ install-exec: $(INSTALLXPC) - install-xpc: ipp - echo Installing XPC backends in $(SERVERBIN)/apple - $(INSTALL_DIR) -m 755 $(SERVERBIN)/apple -- $(LIBTOOL) $(INSTALL_BIN) ipp $(SERVERBIN)/apple -+ $(INSTALL_BIN) ipp $(SERVERBIN)/apple - for file in $(IPPALIASES); do \ - $(RM) $(SERVERBIN)/apple/$$file; \ - $(LN) ipp $(SERVERBIN)/apple/$$file; \ diff --git a/net-print/cups/files/cups-2.3.3-user-AR.patch b/net-print/cups/files/cups-2.3.3-user-AR.patch deleted file mode 100644 index 0e52adb567d7..000000000000 --- a/net-print/cups/files/cups-2.3.3-user-AR.patch +++ /dev/null @@ -1,22 +0,0 @@ -AC_PATH_PROG does not search tuple prefixes. ---- a/config-scripts/cups-common.m4 -+++ b/config-scripts/cups-common.m4 -@@ -37,15 +37,15 @@ AC_PROG_CC(clang cc gcc) - AC_PROG_CPP - AC_PROG_CXX(clang++ c++ g++) - AC_PROG_RANLIB --AC_PATH_PROG(AR,ar) -+AC_CHECK_TOOL(AR,ar) - AC_PATH_PROG(CHMOD,chmod) - AC_PATH_PROG(GZIPPROG,gzip) - AC_MSG_CHECKING(for install-sh script) - INSTALL="`pwd`/install-sh" - AC_SUBST(INSTALL) - AC_MSG_RESULT(using $INSTALL) --AC_PATH_PROG(LD,ld) --AC_PATH_PROG(LN,ln) -+AC_CHECK_TOOL(LD,ld) -+AC_CHECK_TOOL(LN,ln) - AC_PATH_PROG(MKDIR,mkdir) - AC_PATH_PROG(MV,mv) - AC_PATH_PROG(RM,rm) diff --git a/net-print/cups/files/cups-2.4.1-nostrip.patch b/net-print/cups/files/cups-2.4.1-nostrip.patch new file mode 100644 index 000000000000..5862ce178255 --- /dev/null +++ b/net-print/cups/files/cups-2.4.1-nostrip.patch @@ -0,0 +1,11 @@ +--- a/config-scripts/cups-compiler.m4 2022-01-27 12:11:42.000000000 +0100 ++++ b/config-scripts/cups-compiler.m4 2022-05-01 11:24:58.855033882 +0200 +@@ -30,8 +30,6 @@ + dnl For debugging, keep symbols, otherwise strip them... + AS_IF([test x$enable_debug = xyes -a "x$OPTIM" = x], [ + OPTIM="-g" +-], [ +- INSTALL_STRIP="-s" + ]) + + dnl Debug printfs can slow things down, so provide a separate option for that diff --git a/net-print/cups/files/cups-2.4.1-user-AR.patch b/net-print/cups/files/cups-2.4.1-user-AR.patch new file mode 100644 index 000000000000..edbecd6ed9fa --- /dev/null +++ b/net-print/cups/files/cups-2.4.1-user-AR.patch @@ -0,0 +1,21 @@ +--- a/config-scripts/cups-common.m4 ++++ b/config-scripts/cups-common.m4 +@@ -39,15 +39,15 @@ + AC_PROG_CPP + AC_PROG_CXX + AC_PROG_RANLIB +-AC_PATH_PROG([AR], [ar]) ++AC_CHECK_TOOL([AR], [ar]) + AC_PATH_PROG([CHMOD], [chmod]) + AC_PATH_PROG([GZIPPROG], [gzip]) + AC_MSG_CHECKING([for install-sh script]) + INSTALL="`pwd`/install-sh" + AC_SUBST([INSTALL]) + AC_MSG_RESULT([using $INSTALL]) +-AC_PATH_PROG([LD], [ld]) +-AC_PATH_PROG([LN], [ln]) ++AC_CHECK_TOOL([LD], [ld]) ++AC_CHECK_TOOL([LN], [ln]) + AC_PATH_PROG([MKDIR], [mkdir]) + AC_PATH_PROG([MV], [mv]) + AC_PATH_PROG([RM], [rm]) diff --git a/net-print/cups/files/cupsd.init.d-r3 b/net-print/cups/files/cupsd.init.d-r4 index 2f563e4c7698..3f65258fbe43 100644 --- a/net-print/cups/files/cupsd.init.d-r3 +++ b/net-print/cups/files/cupsd.init.d-r4 @@ -1,10 +1,10 @@ #!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors description="The Common Unix Printing System daemon" command="/usr/sbin/cupsd" command_args="-f -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf" -pidfile="/var/run/cupsd.pid" +pidfile="/run/cupsd.pid" start_stop_daemon_args="-b -m --pidfile ${pidfile}" depend() { diff --git a/net-print/cups/metadata.xml b/net-print/cups/metadata.xml index aa7c978659f2..d4081ef99041 100644 --- a/net-print/cups/metadata.xml +++ b/net-print/cups/metadata.xml @@ -1,17 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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="lprng-compat"> - Do not install lp... binaries so cups and lprng can coexist. - </flag> - </use> - <upstream> - <remote-id type="cpe">cpe:/a:apple:cups</remote-id> - <remote-id type="github">apple/cups</remote-id> - </upstream> + <maintainer type="project"> + <email>printing@gentoo.org</email> + <name>Gentoo Printing Project</name> + </maintainer> + <use> + <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> instead of <pkg>net-libs/gnutls</pkg> for TLS support</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:apple:cups</remote-id> + <remote-id type="github">OpenPrinting/cups</remote-id> + </upstream> </pkgmetadata> diff --git a/net-print/dymo-cups-drivers/metadata.xml b/net-print/dymo-cups-drivers/metadata.xml index 94da820c05d1..8f9a9cc695e2 100644 --- a/net-print/dymo-cups-drivers/metadata.xml +++ b/net-print/dymo-cups-drivers/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>robbat2@gentoo.org</email> diff --git a/net-print/epson-inkjet-printer-escpr/Manifest b/net-print/epson-inkjet-printer-escpr/Manifest index 52bd1fd5cd42..bff50d4e5265 100644 --- a/net-print/epson-inkjet-printer-escpr/Manifest +++ b/net-print/epson-inkjet-printer-escpr/Manifest @@ -1 +1,3 @@ -DIST epson-inkjet-printer-escpr-1.7.8-1lsb3.2.tar.gz 4809140 BLAKE2B f26b5ce71aec624777e23bd76c65da938b47b24300d3a025b9541a3c1f3aedeb061b342e078f5103b6f4b5d1aa4a72b71764c13b65b842e9014d482aff758c99 SHA512 2d8c36debba52721febef07d18390e3ece6cd5f3a500304dfd285dc31ae33b3712934e0eca8cdb0afe644c18b505190d8a35cd5a69d11d0079f027fa35032195 +DIST epson-inkjet-printer-escpr-1.8.4-1.tar.gz 5595766 BLAKE2B 9baba92331d0f55a6831d23a7b9b2824b5f33392d41f6ef0e2c45a4df7b54503d16b14dccc5dcc0d9b163f2677ba473b502e605f2f9509a1fc8c6c3095bbe858 SHA512 548b0cc27ab91c19b1d4fad79e3c3cacfb821b7c3156d8f1f3aafd31b94405794a86ff8b6abf5e56fb6692a471d96b5665a006cdc748d8de83c2ebadb0f634bc +DIST epson-inkjet-printer-escpr-1.8.5-1.tar.gz 5666905 BLAKE2B 549c948709993779b5615b501038fdceb6c3d6f173709b8cf99459346fff89923bdbe1babe34ee98eed4e1ebbd7a4b5962ddbc9cec9711aa15ff2056fec3d436 SHA512 4117b1efe903e4f506bbc67c45079f1d467ff6527691308734e55d32feeda3ec44b2dd85361e0243114f924eef04a91b0a5e86b5008f0a32ef323989b3d2896f +DIST epson-inkjet-printer-escpr2-1.2.9-1.tar.gz 5367737 BLAKE2B 6868569a6bed622e2f50619a36ffb0a0f7e834fd8a794ae3bc906d971db26b0c86386c9545190ec384027d0b8e8f62ddda6cb24f1e3f60b9c535a1eeddff4332 SHA512 70ff744d42fac4c79d2994648763b0b3970ee5463a7a310a0721a63735d536cb9a0499c894289d946b30e6f564f9bf60aa61801580ab6635af211d50867921a1 diff --git a/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9-r1.ebuild b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9-r1.ebuild new file mode 100644 index 000000000000..ee7aecc88746 --- /dev/null +++ b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P="${PN}2-${PV}" + +DESCRIPTION="Epson Inkjet Printer Driver 2 (ESC/P-R) for Linux" +HOMEPAGE="https://download.ebz.epson.net/dsc/search/01/search/?OSC=LX" +SRC_URI="https://download3.ebz.epson.net/dsc/f/03/00/15/33/96/607198a4f064daa9e7931913eaf27f3a58125f2b/${MY_P}-1.tar.gz" +S="${WORKDIR}/${MY_P}" +LICENSE="EPSON LGPL-2.1+" +SLOT="2" +KEYWORDS="amd64" + +QA_FLAGS_IGNORED="/usr/lib64/libescpr2.so.1.0.0" + +DEPEND="net-print/cups" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-${SLOT}-gcc14.patch" +) + +src_configure() { + econf \ + --with-cupsfilterdir="${EPREFIX}/usr/libexec/cups/filter" + --with-cupsppddir="${EPREFIX}/usr/share/ppd" +} + +src_install() { + default + + find "${ED}/usr/lib64" -name "*.la" -delete \ + || die "Removal of libtool files (.la) has failed." +} diff --git a/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9.ebuild b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9.ebuild new file mode 100644 index 000000000000..d66c18c52378 --- /dev/null +++ b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P="${PN}2-${PV}" + +DESCRIPTION="Epson Inkjet Printer Driver 2 (ESC/P-R) for Linux" +HOMEPAGE="https://download.ebz.epson.net/dsc/search/01/search/?OSC=LX" +SRC_URI="https://download3.ebz.epson.net/dsc/f/03/00/15/33/96/607198a4f064daa9e7931913eaf27f3a58125f2b/${MY_P}-1.tar.gz" +S="${WORKDIR}/${MY_P}" +LICENSE="EPSON LGPL-2.1+" +SLOT="2" +KEYWORDS="amd64" + +QA_FLAGS_IGNORED="/usr/lib64/libescpr2.so.1.0.0" + +DEPEND="net-print/cups" +RDEPEND="${DEPEND}" + +src_configure() { + econf \ + --with-cupsfilterdir="${EPREFIX}/usr/libexec/cups/filter" + --with-cupsppddir="${EPREFIX}/usr/share/ppd" +} + +src_install() { + default + + find "${ED}/usr/lib64" -name "*.la" -delete \ + || die "Removal of libtool files (.la) has failed." +} diff --git a/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.7.8.ebuild b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.4.ebuild index 8e82732e6135..64af8c42cefc 100644 --- a/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.7.8.ebuild +++ b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.4.ebuild @@ -1,15 +1,18 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 DESCRIPTION="Epson Inkjet Printer Driver (ESC/P-R)" HOMEPAGE="https://download.ebz.epson.net/dsc/search/01/search/?OSC=LX" -SRC_URI="https://download3.ebz.epson.net/dsc/f/03/00/12/04/32/1a455ef8618def65700ca4e446311c2fb43cd839/epson-inkjet-printer-escpr-${PV}-1lsb3.2.tar.gz" + +# https://support.epson.net/linux/Printer/LSB_distribution_pages/en/escpr.php +# Use the "source package for arm CPU" to get a tarball instead of an srpm. +SRC_URI="https://download3.ebz.epson.net/dsc/f/03/00/15/57/25/a928e7d08c825ef1cdb892e70318d986720cef8a/${P}-1.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~ppc64" +KEYWORDS="amd64 ppc64" DEPEND="net-print/cups" RDEPEND="${DEPEND}" @@ -17,6 +20,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/1.6.5-warnings.patch" "${FILESDIR}/${PN}-1.7.7-fnocommon.patch" + "${FILESDIR}/${PN}-1.8-missing-include.patch" ) src_configure() { diff --git a/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.5.ebuild b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.5.ebuild new file mode 100644 index 000000000000..ca70ea12d8a6 --- /dev/null +++ b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.5.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Epson Inkjet Printer Driver (ESC/P-R)" +HOMEPAGE="https://download.ebz.epson.net/dsc/search/01/search/?OSC=LX" + +# https://support.epson.net/linux/Printer/LSB_distribution_pages/en/escpr.php +# Use the "source package for arm CPU" to get a tarball instead of an srpm. +SRC_URI="https://download3.ebz.epson.net/dsc/f/03/00/15/68/89/fbff579f15226ffcc4a16895bd6bce6842277802/${P}-1.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc64" + +DEPEND="net-print/cups" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/1.6.5-warnings.patch" + "${FILESDIR}/${PN}-1.7.7-fnocommon.patch" + "${FILESDIR}/${PN}-1.8-missing-include.patch" +) + +src_configure() { + econf --disable-shared + + # Makefile calls ls to generate a file list which is included in Makefile.am + # Set the collation to C to avoid automake being called automatically + unset LC_ALL + export LC_COLLATE=C +} + +src_install() { + emake -C ppd DESTDIR="${D}" install + emake -C src DESTDIR="${D}" install + einstalldocs +} diff --git a/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-1.8-missing-include.patch b/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-1.8-missing-include.patch new file mode 100644 index 000000000000..4229d649bb26 --- /dev/null +++ b/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-1.8-missing-include.patch @@ -0,0 +1,129 @@ +--- /dev/null 2024-02-07 07:14:59.428332875 -0500 ++++ b/lib/epson-escpage.h 2024-02-07 12:39:28.463235607 -0500 +@@ -0,0 +1,126 @@ ++/*__________________________________ epson-escpage.h ________________________________*/ ++ ++/* 1 2 3 4 5 6 7 8 */ ++/*34567890123456789012345678901234567890123456789012345678901234567890123456789012345678*/ ++/*******************************************|********************************************/ ++/* ++ * Copyright (c) 2010 Seiko Epson Corporation All rights reserved. ++ * ++ * Copyright protection claimed includes all forms and matters of ++ * copyrightable material and information now allowed by statutory or judicial ++ * law or hereinafter granted, including without limitation, material generated ++ * from the software programs which are displayed on the screen such as icons, ++ * screen display looks, etc. ++ * ++ */ ++/*******************************************|********************************************/ ++/* */ ++/* Epson ESC/Page command Functions */ ++/* */ ++/*******************************************|********************************************/ ++ ++#ifndef __EPSON_ESCPAGE_H__ ++#define __EPSON_ESCPAGE_H__ ++#ifdef __cplusplus ++extern "C" { ++#endif ++/*------------------------------------ Includes -------------------------------------*/ ++/*******************************************|********************************************/ ++#include "epson-escpr-pvt.h" ++#include "epson-escpr-media.h" ++ ++/*------------------------------- Global Compiler Switch -------------------------------*/ ++/*******************************************|********************************************/ ++#define EPS_PAGE_RIT (1) ++#define EPS_PAGE_TONER_SAVE (0) ++#define EPS_PAGE_OUTUNIT_FACEDOWN (1) ++#define EPS_PAGE_LOWRES_MODE (1) /* OFF=0 / ON=1 */ ++#define EPS_PAGE_HT_ERR_DIFFUSION (1) /* Halftoning mode */ ++ ++/*----------------------------------- Definitions ------------------------------------*/ ++/*******************************************|********************************************/ ++#define dim(x) (sizeof(x) / sizeof(x[0])) ++#define EPS_EJL_LINEMAX (256) ++ ++/*--------------------------- ESC/Page Media Declarations ---------------------------*/ ++/*******************************************|********************************************/ ++typedef struct _tagEPS_PAGE_MEDIASIZE_ { ++ EPS_INT32 id; ++ EPS_INT32 paper_x; ++ EPS_INT32 paper_y; ++ EPS_INT32 print_area_x_border; ++ EPS_INT32 print_area_y_border; ++ const EPS_INT8 *name; ++} EPS_PAGE_MEDIASIZE; ++ ++/* Size 600dpi */ ++static const EPS_PAGE_MEDIASIZE pageMediaSize[] = { ++ { EPS_MSID_A4, 4960, 7016, 4720, 6776, "A4" }, ++ { EPS_MSID_A3, 7016, 9920, 6776, 9680, "A3" }, ++ { EPS_MSID_B4, 6072, 8600, 5832, 8360, "B4" }, ++ { EPS_MSID_B5, 4300, 6072, 4060, 5832, "B5" }, ++ { EPS_MSID_LETTER, 5100, 6600, 4860, 6360, "LT" }, ++ { EPS_MSID_LEGAL, 5100, 8400, 4860, 8160, "LGL"}, ++ { EPS_MSID_POSTCARD,2362, 3496, 2122, 3256, "PC" } ++}; ++ ++/*--------------------------- Data Structure Declarations ---------------------------*/ ++/*******************************************|********************************************/ ++/* command data buffer */ ++typedef struct tagEPS_COMMAND_BUFFER ++{ ++ EPS_UINT32 size; /* allocated buffer size */ ++ EPS_UINT32 len; /* data size */ ++ EPS_INT8* p; ++ void* pExtent; ++} EPS_COMMAND_BUFFER; ++ ++/*-------------------------- Public Function Declarations ---------------------------*/ ++/*******************************************|********************************************/ ++extern EPS_ERR_CODE pageInitJob (const EPS_JOB_ATTRIB *pJobAttr); ++extern EPS_ERR_CODE pageAllocBuffer (void); ++extern void pageRelaseBuffer (void); ++extern EPS_ERR_CODE pageStartJob (void); ++extern EPS_ERR_CODE pageEndJob (void); ++extern EPS_ERR_CODE pageStartPage (void); ++extern EPS_ERR_CODE pageEndPage (void); ++extern EPS_ERR_CODE pageColorRow (const EPS_BANDBMP*, EPS_RECT*); ++extern EPS_ERR_CODE pageSendLeftovers (void); ++ ++ /*** Get Supported Media Function */ ++ /*** -------------------------------------------------------------------------------*/ ++extern EPS_ERR_CODE pageCreateMediaInfo (EPS_PRINTER_INN* printer, EPS_UINT8* pmString, ++ EPS_INT32 pmSize ); ++extern void pageClearSupportedMedia (EPS_PRINTER_INN* printer ); ++extern EPS_ERR_CODE pageGetPrintAreaInfoFromTable(const EPS_JOB_ATTRIB*, ++ EPS_UINT32*, EPS_UINT32*, EPS_LAYOUT_INFO*); ++extern EPS_ERR_CODE pageCreatePrintAreaInfoFromTable (EPS_UINT32,EPS_PRINT_AREA_INFO* ); ++ ++ /*** Get Printable Area */ ++ /*** -------------------------------------------------------------------------------*/ ++extern EPS_ERR_CODE pageGetPrintableArea (EPS_JOB_ATTRIB*, EPS_UINT32*, EPS_UINT32* ); ++ ++ ++/*----------------------- ESC/Page Local Function Declarations ----------------------*/ ++/*******************************************|********************************************/ ++typedef EPS_ERR_CODE (*PAGE_CmdBuffGrow )(EPS_COMMAND_BUFFER *pCmdBuff, EPS_INT32 addSize); ++ ++extern EPS_ERR_CODE ejlStart (EPS_COMMAND_BUFFER *pCmdBuff, PAGE_CmdBuffGrow pfncGrow); ++extern EPS_ERR_CODE ejlEnd (EPS_COMMAND_BUFFER *pCmdBuff, PAGE_CmdBuffGrow pfncGrow, ++ EPS_INT32 pageCount ); ++extern EPS_ERR_CODE ejlPageEsc (EPS_COMMAND_BUFFER *pCmdBuff, PAGE_CmdBuffGrow pfncGrow); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* def __EPSON_ESCPAGE_H__ */ ++ ++/*__________________________________ epson-escpage.h ________________________________*/ ++ ++/*34567890123456789012345678901234567890123456789012345678901234567890123456789012345678*/ ++/* 1 2 3 4 5 6 7 8 */ ++/*******************************************|********************************************/ ++/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ ++/***** End of File *** End of File *** End of File *** End of File *** End of File ******/ ++/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ diff --git a/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-2-gcc14.patch b/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-2-gcc14.patch new file mode 100644 index 000000000000..d415384cfbf1 --- /dev/null +++ b/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-2-gcc14.patch @@ -0,0 +1,228 @@ +--- a/src/mem.c 2024-05-19 17:31:29.121223820 -0400 ++++ b/src/mem.c 2024-05-19 17:31:43.985467218 -0400 +@@ -23,6 +23,7 @@ + + #include <stdlib.h> + #include "mem.h" ++#include "err.h" + + void * + mem_malloc (unsigned int size, bool_t crit) +--- /dev/null 2024-05-19 14:31:56.295999966 -0400 ++++ b/src/epson-escpr-services.h 2024-05-19 17:40:16.646097437 -0400 +@@ -0,0 +1,194 @@ ++/*_____________________________ epson-escpr-services.h ______________________________*/ ++ ++/* 1 2 3 4 5 6 7 8 */ ++/*34567890123456789012345678901234567890123456789012345678901234567890123456789012345678*/ ++/*******************************************|********************************************/ ++/* ++ * Copyright (c) 2009 Seiko Epson Corporation All rights reserved. ++ * ++ * Copyright protection claimed includes all forms and matters of ++ * copyrightable material and information now allowed by statutory or judicial ++ * law or hereinafter granted, including without limitation, material generated ++ * from the software programs which are displayed on the screen such as icons, ++ * screen display looks, etc. ++ * ++ */ ++/*******************************************|********************************************/ ++/* */ ++/* Epson ESC/PR Sevice Functions */ ++/* */ ++/*******************************************|********************************************/ ++#ifndef __EPSON_ESCPR_SERVICES_H__ ++#define __EPSON_ESCPR_SERVICES_H__ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/*------------------------------------ Includes -------------------------------------*/ ++/*******************************************|********************************************/ ++#include "epson-typedefs.h" ++#include "epson-escpr-pvt.h" ++ ++/*------------------------------------- Data Types -------------------------------------*/ ++/*******************************************|********************************************/ ++ ++/*-------------------------------------- Macros -------------------------------------*/ ++/*******************************************|********************************************/ ++ ++/*----------------------------------- Definitions ------------------------------------*/ ++/*******************************************|********************************************/ ++ /*** Ink Cartridge Type */ ++ /*** -------------------------------------------------------------------------------*/ ++#define MI_CARTRIDGE_INDEP 0x00 /* Independent Cartridge */ ++#define MI_CARTRIDGE_ONE 0x01 /* One Cartridge */ ++ ++ /*** Device States */ ++ /*** -------------------------------------------------------------------------------*/ ++#define EPS_ST_ERROR 0x01 ++#define EPS_ST_SELF_PRINTING 0x02 ++#define EPS_ST_BUSY 0x04 ++#define EPS_ST_WAITING 0x08 ++#define EPS_ST_IDLE 0x10 ++/*#define EPS_ST_PAUSE 0x20*/ /* Not supported by 2006 Model */ ++/*#define EPS_ST_INKDRYING 0x40*/ /* Not supported by 2006 Model */ ++#define EPS_ST_CLEANING 0x80 ++#define EPS_ST_FACTORY_SHIPMENT 0x100 ++/*#define EPS_ST_MOTOR_DRIVE_OFF 0x200*/ /* Not supported by 2006 Model */ ++#define EPS_ST_SHUTDOWN 0x400 ++/*#define EPS_ST_WAITPAPERINIT 0x800*/ /* Not supported by 2006 Model */ ++/*#define EPS_ST_INIT_PAPER 0x1000*/ /* Not supported by 2006 Model */ ++ ++ /*** Device Warnings */ ++ /*** -------------------------------------------------------------------------------*/ ++#define EPS_PRNWARN_NONE 0x00 /* No Warnings */ ++#define EPS_PRNWARN_INKLOW (1 << 0) /* Ink Low */ ++#define EPS_PRNWARN_DISABLE_CLEAN (1 << 1) /* disable cleaning */ ++#define EPS_PRNWARN_COLOR_INKOUT (1 << 2) /* disable color print */ ++ ++ ++ /*** Ink Error */ ++ /*** -------------------------------------------------------------------------------*/ ++#define EPS_INKERR_NONE 0 ++ ++#define EPS_INKERR_INKENDB -1 ++#define EPS_INKERR_INKENDC -2 ++#define EPS_INKERR_INKENDCY -3 ++#define EPS_INKERR_INKENDMA -4 ++#define EPS_INKERR_INKENDYL -5 ++#define EPS_INKERR_INKENDLC -6 ++#define EPS_INKERR_INKENDLM -7 ++#define EPS_INKERR_INKENDLY -8 ++#define EPS_INKERR_INKENDDY -9 ++#define EPS_INKERR_INKENDB2 -10 ++#define EPS_INKERR_INKENDRD -11 ++#define EPS_INKERR_INKENDBL -12 ++#define EPS_INKERR_INKENDMB -13 ++#define EPS_INKERR_INKENDPB -14 ++#define EPS_INKERR_INKENDGO -15 ++#define EPS_INKERR_INKENDALL -16 ++#define EPS_INKERR_INKENDBC -17 ++ ++#define EPS_INKERR_CEMPTYB -101 ++#define EPS_INKERR_CEMPTYC -102 ++#define EPS_INKERR_CEMPTYCY -103 ++#define EPS_INKERR_CEMPTYMA -104 ++#define EPS_INKERR_CEMPTYYL -105 ++#define EPS_INKERR_CEMPTYLC -106 ++#define EPS_INKERR_CEMPTYLM -107 ++#define EPS_INKERR_CEMPTYLY -108 ++#define EPS_INKERR_CEMPTYDY -109 ++#define EPS_INKERR_CEMPTYB2 -110 ++#define EPS_INKERR_CEMPTYRD -111 ++#define EPS_INKERR_CEMPTYBL -112 ++#define EPS_INKERR_CEMPTYMB -113 ++#define EPS_INKERR_CEMPTYPB -114 ++#define EPS_INKERR_CEMPTYGO -115 ++#define EPS_INKERR_CEMPTYBC -116 ++#define EPS_INKERR_CEMPTYALL -117 ++ ++#define EPS_INKERR_CFAILB -201 ++#define EPS_INKERR_CFAILC -202 ++#define EPS_INKERR_CFAILCY -203 ++#define EPS_INKERR_CFAILMA -204 ++#define EPS_INKERR_CFAILYL -205 ++#define EPS_INKERR_CFAILLC -206 ++#define EPS_INKERR_CFAILLM -207 ++#define EPS_INKERR_CFAILLY -208 ++#define EPS_INKERR_CFAILDY -209 ++#define EPS_INKERR_CFAILB2 -210 ++#define EPS_INKERR_CFAILRD -211 ++#define EPS_INKERR_CFAILBL -212 ++#define EPS_INKERR_CFAILMB -213 ++#define EPS_INKERR_CFAILPB -214 ++#define EPS_INKERR_CFAILGO -215 ++#define EPS_INKERR_CFAILBC -216 ++#define EPS_INKERR_CFAILALL -217 ++ ++ /*** Cancel request from printer */ ++ /*** -------------------------------------------------------------------------------*/ ++#define EPS_CAREQ_CANCEL -300 ++#define EPS_CAREQ_NOCANCEL -301 ++ ++ /*** Other Printer Information */ ++ /*** -------------------------------------------------------------------------------*/ ++#define EPS_PREPARE_OVERHEAT -400 ++#define EPS_PREPARE_NORMALHEAT -401 ++#define EPS_PREPARE_TRAYOPENED -402 ++#define EPS_PREPARE_TRAYCLOSED -403 ++ ++ /*** reset mode */ ++ /*** -------------------------------------------------------------------------------*/ ++#define EPS_PM_PAGE 1 ++#define EPS_PM_JOB 2 ++ ++ /*** Misc */ ++ /*** -------------------------------------------------------------------------------*/ ++#define _SECOND_ 1000 /* Unit for changing milli second to second */ ++#define _STATUS_REPLY_BUF 512 /* Printer status buffer size */ ++ ++ ++ /*** Model depend */ ++ /*** -------------------------------------------------------------------------------*/ ++#define EPS_MDC_STATUS (1) ++#define EPS_MDC_NOZZLE (2) ++ ++/*--------------------------- Public Function Declarations ---------------------------*/ ++/*******************************************|********************************************/ ++extern EPS_INT32 serParseDeviceID (EPS_INT8*, EPS_INT32, EPS_INT8*, EPS_INT8*, ++ EPS_INT32*, EPS_UINT32*, EPS_UINT32* ); ++extern EPS_BOOL serCheckLang (EPS_INT8*, EPS_UINT32* ); ++extern EPS_ERR_CODE serAnalyzeStatus (EPS_INT8*, EPS_UINT32, EPS_STATUS_INFO*); ++extern void serDelayThread (EPS_UINT32, EPS_CMN_FUNC* ); ++extern EPS_INT32 serInkLevelNromalize (EPS_INT32 ); ++extern EPS_ERR_CODE serGetSerialNo (EPS_INT8*, EPS_INT32, EPS_INT8* ); ++extern EPS_ERR_CODE serGetSerialNoFormST (EPS_INT8*, EPS_INT8*, EPS_INT32 ); ++extern EPS_ERR_CODE serGetSupplyInfo (EPS_UINT8*, EPS_SUPPLY_INFO* ); ++ ++#ifdef GCOMSW_EPSON_SLEEP ++extern EPS_ERR_CODE serSleep (EPS_UINT32 ); ++#endif ++ ++ ++extern void obsSetPrinter (const EPS_PRINTER_INN* ); ++extern void obsSetColorPlane (EPS_UINT8 ); ++extern void obsClear (void ); ++extern EPS_INT32 obsGetPageMode (void ); ++extern EPS_BOOL obsIsA3Model (EPS_INT32 ); ++extern EPS_BOOL obsEnableDuplex (EPS_INT32 ); ++extern EPS_BOOL obsEnableAutoFeed (void ); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* def __EPSON_ESCPR_SERVICES_H__ */ ++ ++ ++/*_____________________________ epson-escpr-services.h _______________________________*/ ++ ++/*34567890123456789012345678901234567890123456789012345678901234567890123456789012345678*/ ++/* 1 2 3 4 5 6 7 8 */ ++/*******************************************|********************************************/ ++/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ ++/***** End of File *** End of File *** End of File *** End of File *** End of File ******/ ++/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ +--- a/src/filter.c 2024-05-19 17:41:19.567178280 -0400 ++++ b/src/filter.c 2024-05-19 17:46:15.780301782 -0400 +@@ -39,6 +39,7 @@ + #include "epson-escpr-api.h" + #include "epson-escpr-services.h" + #include "epson-escpr-mem.h" ++#include "epson-escpr-services.h" + + #include "err.h" + #include "mem.h" +@@ -48,6 +49,10 @@ + #include "optBase.h" + #include "linux_cmn.h" + ++extern EPS_ERR_CODE SetupJobAttrib (const EPS_JOB_ATTRIB*); ++extern EPS_ERR_CODE SendStartJob (); ++extern EPS_ERR_CODE PrintBand (const EPS_UINT8*, EPS_UINT32, EPS_UINT32*); ++ + #define WIDTH_BYTES(bits) (((bits) + 31) / 32 * 4) + + #define PIPSLITE_FILTER_VERSION "* epson-escpr is a part of " PACKAGE_STRING diff --git a/net-print/epson-inkjet-printer-escpr/metadata.xml b/net-print/epson-inkjet-printer-escpr/metadata.xml index c6bc2d94015a..78e26bf47244 100644 --- a/net-print/epson-inkjet-printer-escpr/metadata.xml +++ b/net-print/epson-inkjet-printer-escpr/metadata.xml @@ -1,8 +1,47 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>asturm@gentoo.org</email> - <name>Andreas Sturmlechner</name> + <email>mpagano@gentoo.org</email> + <name>Mike Pagano</name> </maintainer> + <longdescription> + This software is a filter program used with Common UNIX Printing System + (CUPS) from the Linux. This can supply the high quality print with + Seiko Epson Color Ink Jet Printers. + + This product supports only EPSON ESC/P-R printers. This package can be + used for all EPSON ESC/P-R printers. + + For detail list of supported printer, please refer to below site: + http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX. + </longdescription> + <longdescription lang="fr"> + Ce logiciel est un programme de filtres pour le « Common UNIX Printing + System » (CUPS) de Linux. Il peut fournir une impression de haute + qualité avec les imprimantes à jet d'encre couleur Seiko Epson (« Seiko + Epson Color Ink Jet Printers »). + + Ce produit ne supporte que les imprimantes EPSON ESC/P-R. Ce paquet + peut être être utilisé pour toutes les imprimantes EPSON ESC/P-R. + + Pour une liste détaillée des imprimantes supportées, veuillez vous + référer au site ci-dessous : + http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX. + </longdescription> + <slots> + <slot name="0">Epson Inkjet Printer Driver (ESC/P-R) for Linux</slot> + <slot name="2">Epson Inkjet Printer Driver 2 (ESC/P-R) for Linux</slot> + </slots> + <slots lang="fr"> + <slot name="0">Epson Inkjet Printer Driver (ESC/P-R) pour Linux</slot> + <slot name="2">Epson Inkjet Printer Driver 2 (ESC/P-R) pour Linux</slot> + </slots> + <upstream> + <maintainer status="active"> + <name>Seiko Epson Corporation</name> + <email>linux-printer@epson.jp</email> + </maintainer> + <doc>http://download.ebz.epson.net/man/linux/escpr2.html</doc> + </upstream> </pkgmetadata> diff --git a/net-print/fax4cups/fax4cups-1.29-r1.ebuild b/net-print/fax4cups/fax4cups-1.29-r1.ebuild index fe10769ae330..37f2f9ce8f78 100644 --- a/net-print/fax4cups/fax4cups-1.29-r1.ebuild +++ b/net-print/fax4cups/fax4cups-1.29-r1.ebuild @@ -1,16 +1,16 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=8 DESCRIPTION="Fax backend for CUPS" HOMEPAGE="http://vigna.dsi.unimi.it/fax4CUPS/" SRC_URI="http://vigna.dsi.unimi.it/fax4CUPS/fax4CUPS-${PV}.tar.gz" -LICENSE="GPL-2" +S="${WORKDIR}/fax4CUPS-${PV}" +LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~ppc x86" - IUSE="+hylafax mgetty-fax efax" REQUIRED_USE="|| ( hylafax mgetty-fax efax )" @@ -23,27 +23,26 @@ RDEPEND="${DEPEND} ) app-admin/sudo " - -S=${WORKDIR}/fax4CUPS-${PV} +BDEPEND="net-print/cups" src_install() { doman fax4CUPS.1 - exeinto $(cups-config --serverbin)/backend + exeinto $(cups-config --serverbin || die)/backend insinto /usr/share/cups/model + local i for i in hylafax efax mgetty-fax; do - if use $i - then + if use ${i}; then # Backend - doexe $i + doexe ${i} # PPD - doins $i.ppd + doins ${i}.ppd fi done } pkg_postinst() { - elog "Please execute '/etc/init.d/cups restart'" + elog "Please execute '${EROOT}/etc/init.d/cups restart'" elog "to get the *.ppd files working properly" } diff --git a/net-print/fax4cups/metadata.xml b/net-print/fax4cups/metadata.xml index d1eaceb31e9c..7d4c6c8278ba 100644 --- a/net-print/fax4cups/metadata.xml +++ b/net-print/fax4cups/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> @@ -7,7 +7,7 @@ </maintainer> <use> <flag name="hylafax">Install net-misc/hylafax backend</flag> - <flag name="efax">Install net-misc/efax backend</flag> - <flag name="mgetty-fax">Install net-dialup/mgetty backend</flag> + <flag name="efax">Install <pkg>net-misc/efax</pkg> backend</flag> + <flag name="mgetty-fax">Install <pkg>net-dialup/mgetty</pkg> backend</flag> </use> </pkgmetadata> diff --git a/net-print/foo2zjs/foo2zjs-20200221.ebuild b/net-print/foo2zjs/foo2zjs-20200221.ebuild index 2e16ac81d528..6bfd213d2c6b 100644 --- a/net-print/foo2zjs/foo2zjs-20200221.ebuild +++ b/net-print/foo2zjs/foo2zjs-20200221.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -24,7 +24,7 @@ DEPEND="${RDEPEND} app-editors/vim net-misc/wget sys-apps/ed - sys-devel/bc + app-alternatives/bc test? ( sys-process/time )" SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz" diff --git a/net-print/foo2zjs/foo2zjs-99999999.ebuild b/net-print/foo2zjs/foo2zjs-99999999.ebuild index a9d4aa9966f2..2a03dcc7030a 100644 --- a/net-print/foo2zjs/foo2zjs-99999999.ebuild +++ b/net-print/foo2zjs/foo2zjs-99999999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,7 +10,7 @@ HOMEPAGE="http://foo2zjs.rkkda.com/" LICENSE="GPL-2" SLOT="0" -KEYWORDS="" +PROPERTIES="live" IUSE="test" RESTRICT="bindist !test? ( test )" @@ -19,12 +19,12 @@ RDEPEND="net-print/cups net-print/foomatic-db-engine >=net-print/cups-filters-1.0.43-r1[foomatic] virtual/udev" -DEPEND="${RDEPEND} - app-arch/unzip +DEPEND="${RDEPEND}" +BDEPEND="app-arch/unzip app-editors/vim net-misc/wget sys-apps/ed - sys-devel/bc + app-alternatives/bc test? ( sys-process/time )" S="${WORKDIR}/${PN}" @@ -69,6 +69,11 @@ src_compile() { MAKEOPTS=-j1 CC="$(tc-getCC)" default } +src_test() { + # see bug 419787 + : ; +} + src_install() { # ppd files are installed automagically. We have to create a directory # for them. @@ -76,8 +81,3 @@ src_install() { emake DESTDIR="${D}" -j1 install install-hotplug } - -src_test() { - # see bug 419787 - : ; -} diff --git a/net-print/foo2zjs/metadata.xml b/net-print/foo2zjs/metadata.xml index c213922d0b14..e176fc04d714 100644 --- a/net-print/foo2zjs/metadata.xml +++ b/net-print/foo2zjs/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/foomatic-db-engine/files/4.0.7-perl-module.patch b/net-print/foomatic-db-engine/files/4.0.7-perl-module.patch index dbb53feb2a87..172f37fc42d3 100644 --- a/net-print/foomatic-db-engine/files/4.0.7-perl-module.patch +++ b/net-print/foomatic-db-engine/files/4.0.7-perl-module.patch @@ -1,5 +1,3 @@ -diff --git a/Makefile.in b/Makefile.in -index 3014185..81e090d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -42,7 +42,7 @@ LOCAL_LIBDIR=@LOCAL_LIBDIR@ diff --git a/net-print/foomatic-db-engine/files/4.0.7-respect-ldflag.patch b/net-print/foomatic-db-engine/files/4.0.7-respect-ldflag.patch index 9e6071276a4e..7a62faabc684 100644 --- a/net-print/foomatic-db-engine/files/4.0.7-respect-ldflag.patch +++ b/net-print/foomatic-db-engine/files/4.0.7-respect-ldflag.patch @@ -1,5 +1,5 @@ ---- foomatic-db-engine-4.0.2/Makefile.in.orig 2009-07-23 11:45:28.487999828 +0200 -+++ foomatic-db-engine-4.0.2/Makefile.in 2009-07-23 11:45:53.939525006 +0200 +--- a/Makefile.in ++++ b/Makefile.in @@ -231,10 +231,10 @@ ( cd lib && $(PERL) Makefile.PL verbose INSTALLDIRS=$(PERL_INSTALLDIRS) ) diff --git a/net-print/foomatic-db-engine/foomatic-db-engine-4.0.12.ebuild b/net-print/foomatic-db-engine/foomatic-db-engine-4.0.12-r1.ebuild index 02025f3d87b6..ff3713e2c096 100644 --- a/net-print/foomatic-db-engine/foomatic-db-engine-4.0.12.ebuild +++ b/net-print/foomatic-db-engine/foomatic-db-engine-4.0.12-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=8 -inherit epatch perl-module versionator autotools +inherit autotools perl-module DESCRIPTION="Generates ppds out of xml foomatic printer description files" HOMEPAGE="http://www.linuxprinting.org/foomatic.html" @@ -12,52 +12,54 @@ SRC_URI="http://www.openprinting.org/download/foomatic/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" -DEPEND="net-print/cups +BDEPEND=" + net-print/cups virtual/pkgconfig" RDEPEND=" dev-libs/libxml2 >=net-print/cups-filters-1.0.43-r1[foomatic] " +DEPEND="${RDEPEND}" PDEPEND="net-print/foomatic-db" src_prepare() { - epatch \ + default + eapply \ "${FILESDIR}"/4.0.7-perl-module.patch \ "${FILESDIR}"/4.0.7-respect-ldflag.patch \ "${FILESDIR}"/4.0.12-use-pkgconfig.patch sed -i -e "s:@LIB_CUPS@:$(cups-config --serverbin):" Makefile.in || die eautoreconf - cd lib + cd lib || die perl-module_src_prepare } src_configure() { default - emake defaults - cd lib + cd lib || die perl-module_src_configure } src_compile() { + emake defaults default - cd lib + cd lib || die perl-module_src_compile } +src_test() { + cd lib || die + perl-module_src_test +} + src_install() { default dodoc USAGE - cd lib + cd lib || die perl-module_src_install } - -src_test() { - cd lib - perl-module_src_test -} diff --git a/net-print/foomatic-db-engine/metadata.xml b/net-print/foomatic-db-engine/metadata.xml index 8223018128a3..882504794e17 100644 --- a/net-print/foomatic-db-engine/metadata.xml +++ b/net-print/foomatic-db-engine/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/foomatic-db-ppds/metadata.xml b/net-print/foomatic-db-ppds/metadata.xml index 8223018128a3..07456818fddc 100644 --- a/net-print/foomatic-db-ppds/metadata.xml +++ b/net-print/foomatic-db-ppds/metadata.xml @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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/> </pkgmetadata> diff --git a/net-print/foomatic-db/Manifest b/net-print/foomatic-db/Manifest index 0200bd162cb8..d654519ffdf7 100644 --- a/net-print/foomatic-db/Manifest +++ b/net-print/foomatic-db/Manifest @@ -1,3 +1 @@ -DIST foomatic-db-4.0-20170331.tar.xz 5083832 BLAKE2B 3c22869cc50f9e68e04bc9edaf6227764ede1566bf93311f1098d0022174911697a63685488be2c753205e40284ec22c31a64e672fee3851eeec920730b5a344 SHA512 f265a476533a77c27f0eb6414a3b93c6b269effba7bb0d46c9d3965c0e7218c3b081ae5e3f01ebfe7afbec70379543dd2e553b97b338eca43c34c11a4ffb4dcc -DIST foomatic-db-4.0-20180126.tar.xz 5418608 BLAKE2B e11dbfc7e4cf121ba8b456820438b0418981c414c6a798dee463430dd8ccf65b424e1d597bc21b32929e858d0282b12df81fb419793bd34172b0c414619d2762 SHA512 1879e2601ad88262c99201bff5353ac40516985de72dd894eeeae2589ae2b82dd4dbfc972cb3ff43f209efb92753d4ed0ce584d89cd242fedc011511c45d8a87 DIST foomatic-db-4.0-20190226.tar.xz 6438248 BLAKE2B c5ce6b3ec5a29524f6f8c73fdaec88a97a3fd4521753c5058d470ebadf7c35c3218bd7e78023a26b267796ccfbca98368ee4d4bc5252b9339ee1c067adbe80b2 SHA512 308cf8b5648ae8f3be1a1a5af1885319ae9f263575e7b0b06bd66e6e3e0b495656124face65e285bfa657dbff3cff226bb00d78b873f16849b426641dc7d52fe diff --git a/net-print/foomatic-db/foomatic-db-4.0.20170331.ebuild b/net-print/foomatic-db/foomatic-db-4.0.20170331.ebuild deleted file mode 100644 index 1d54962f0f7f..000000000000 --- a/net-print/foomatic-db/foomatic-db-4.0.20170331.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit versionator - -DESCRIPTION="Printer information files for foomatic-db-engine to generate ppds" -HOMEPAGE="http://www.linuxprinting.org/foomatic.html" -SRC_URI="http://www.openprinting.org/download/foomatic/${PN}-$(replace_version_separator 2 -).tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" - -DEPEND="" -RDEPEND=" - net-print/foomatic-db-engine - !net-print/foo2zjs[hp2600n]" - -S="${WORKDIR}/${PN}-$(get_version_component_range 3 ${PV})" - -src_prepare() { - # ppd files do not belong to this package - rm -r db/source/PPD || die -} - -src_configure() { - econf \ - --disable-gzip-ppds \ - --disable-ppds-to-cups -} - -src_install() { - default - rmdir "${ED}"/usr/share/foomatic/db/source/PPD || die - # Avoid collision with foo2zjs, bug 185486 - rm "${ED}"/usr/share/foomatic/db/source/{driver/foo2{hp,lava,xqx,zjs}.xml,printer/{Generic-ZjStream_Printer,HP-{Color_LaserJet_{1500,1600,2600n},LaserJet_{10{00,05,18,20,22},M1005_MFP}},Minolta-{Color_PageWorks_Pro_L,magicolor_2{20,30,43}0_DL},Samsung-CLP-{3,6}00}.xml} || die -} diff --git a/net-print/foomatic-db/foomatic-db-4.0.20180126.ebuild b/net-print/foomatic-db/foomatic-db-4.0.20180126.ebuild deleted file mode 100644 index dc60de17c674..000000000000 --- a/net-print/foomatic-db/foomatic-db-4.0.20180126.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit versionator - -DESCRIPTION="Printer information files for foomatic-db-engine to generate ppds" -HOMEPAGE="http://www.linuxprinting.org/foomatic.html" -SRC_URI="http://www.openprinting.org/download/foomatic/${PN}-$(replace_version_separator 2 -).tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" -IUSE="" - -DEPEND="" -RDEPEND=" - net-print/foomatic-db-engine - !net-print/foo2zjs[hp2600n]" - -S="${WORKDIR}/${PN}-$(get_version_component_range 3 ${PV})" - -src_prepare() { - # ppd files do not belong to this package - rm -r db/source/PPD || die - default -} - -src_configure() { - econf \ - --disable-gzip-ppds \ - --disable-ppds-to-cups -} - -src_install() { - default - rmdir "${ED}"/usr/share/foomatic/db/source/PPD || die - # Avoid collision with foo2zjs, bug 185486 - rm "${ED}"/usr/share/foomatic/db/source/{driver/foo2{hp,lava,xqx,zjs}.xml,printer/{Generic-ZjStream_Printer,HP-{Color_LaserJet_{1500,1600,2600n},LaserJet_{10{00,05,18,20,22},M1005_MFP}},Minolta-{Color_PageWorks_Pro_L,magicolor_2{20,30,43}0_DL},Samsung-CLP-{3,6}00}.xml} || die -} diff --git a/net-print/foomatic-db/foomatic-db-4.0.20190226.ebuild b/net-print/foomatic-db/foomatic-db-4.0.20190226.ebuild index dc60de17c674..b559732c3d5b 100644 --- a/net-print/foomatic-db/foomatic-db-4.0.20190226.ebuild +++ b/net-print/foomatic-db/foomatic-db-4.0.20190226.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -11,7 +11,7 @@ SRC_URI="http://www.openprinting.org/download/foomatic/${PN}-$(replace_version_s LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" IUSE="" DEPEND="" diff --git a/net-print/foomatic-db/metadata.xml b/net-print/foomatic-db/metadata.xml index 8223018128a3..07456818fddc 100644 --- a/net-print/foomatic-db/metadata.xml +++ b/net-print/foomatic-db/metadata.xml @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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/> </pkgmetadata> diff --git a/net-print/gtklp/gtklp-1.3.1.ebuild b/net-print/gtklp/gtklp-1.3.1.ebuild index 6b98fb7e5f39..7cdc9edcd84d 100644 --- a/net-print/gtklp/gtklp-1.3.1.ebuild +++ b/net-print/gtklp/gtklp-1.3.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -7,8 +7,8 @@ inherit autotools desktop flag-o-matic DESCRIPTION="A GUI for cupsd" HOMEPAGE="https://gtklp.sirtobi.com/" -SRC_URI="mirror://sourceforge/gtklp/${P}.src.tar.gz - mirror://sourceforge/gtklp/logo.xpm.gz -> gtklp-logo.xpm.gz" +SRC_URI="https://downloads.sourceforge.net/gtklp/${P}.src.tar.gz + https://downloads.sourceforge.net/gtklp/logo.xpm.gz -> gtklp-logo.xpm.gz" LICENSE="GPL-2" SLOT="0" diff --git a/net-print/gtklp/metadata.xml b/net-print/gtklp/metadata.xml index 1292b2b35870..af00374fc38f 100644 --- a/net-print/gtklp/metadata.xml +++ b/net-print/gtklp/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> @@ -10,7 +10,7 @@ It is used to have an easy (and graphical) access to all of the many options of cups-managed printers. Package also includes GtkLPQ - a graphical frontend for CUPS-Printqueues. -</longdescription> + </longdescription> <upstream> <remote-id type="sourceforge">gtklp</remote-id> </upstream> diff --git a/net-print/gutenprint/Manifest b/net-print/gutenprint/Manifest index f709b3a038b0..8bcf70b934f2 100644 --- a/net-print/gutenprint/Manifest +++ b/net-print/gutenprint/Manifest @@ -1,2 +1 @@ -DIST gutenprint-5.3.3.tar.xz 5050624 BLAKE2B dbcf74169d0756d991bbdad7338a6e6f995f8eeedc2610677b327abee6aecc787d1cc35949f73c1d93ad274de7d467542b72a5fe0abf58fbc4ec6f21667cbad7 SHA512 d2c47eb4ccc3c46ccb2f1042682edf7443f5c57439ead72f49ecd10537cf967251bacf7ca7da29fb8dceecc7eebd55ed021f2594ff9fb6509bab543fab1dc8d6 DIST gutenprint-5.3.4.tar.xz 5341824 BLAKE2B 134e59c7dbf9c0ba95b91c717f1e6841f35520b55105feb1ba40b82785c825b8e2a2429990e78186a1455e5c6de9880f911438d514c53c56d05575dd4e2d68a4 SHA512 63de0b62edbe255a7efaaeab1dcd22577b7b46d7e0e48441b79977f19e76bf3862e4e8e18c55dd1f2e7392d555f9e8ee875ea53b90c689852d2343491a8fbcc8 diff --git a/net-print/gutenprint/files/gutenprint-5.3.3-epson.patch b/net-print/gutenprint/files/gutenprint-5.3.3-epson.patch deleted file mode 100644 index 28906470c7f6..000000000000 --- a/net-print/gutenprint/files/gutenprint-5.3.3-epson.patch +++ /dev/null @@ -1,54 +0,0 @@ -From: Robert Krawitz <rlk@alum.mit.edu> -Date: Sun, 16 Feb 2020 11:21:23 -0500 -Subject: Updates for Epson Stylus Office printers - -Add duplex support for the following printers: - Epson Stylus Office BX525WD - Epson Stylus Office BX535WD - Epson Stylus Office BX62F5WD - Epson Stylus Office BX635FWD - Epson Stylus Office TX620FWD - -Origin: upstream -Closes: #951410 ---- - src/xml/printers/escp2.xml | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/src/xml/printers/escp2.xml b/src/xml/printers/escp2.xml -index 28716a4..79f5a70 100644 ---- a/src/xml/printers/escp2.xml -+++ b/src/xml/printers/escp2.xml -@@ -189,7 +189,7 @@ - <printer translate="name" name="Epson Stylus Office B30" driver="escp2-of-b30" manufacturer="Epson" model="85" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office B33" driver="escp2-of-b33" manufacturer="Epson" model="85" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office B40W" driver="escp2-of-b40w" manufacturer="Epson" model="92" parameters="standard_params" /> -- <printer translate="name" name="Epson Stylus Office B42WD" driver="escp2-of-b42wd" manufacturer="Epson" model="92" parameters="standard_params" /> -+ <printer translate="name" name="Epson Stylus Office B42WD" driver="escp2-of-b42wd" manufacturer="Epson" model="118" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office B1100" driver="escp2-of-b1100" manufacturer="Epson" model="99" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office T30" driver="escp2-of-t30" manufacturer="Epson" model="85" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office T33" driver="escp2-of-t33" manufacturer="Epson" model="85" parameters="standard_params" /> -@@ -197,17 +197,18 @@ - <printer translate="name" name="Epson Stylus Office T1100" driver="escp2-of-t1100" manufacturer="Epson" model="99" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office T1110" driver="escp2-of-t1110" manufacturer="Epson" model="99" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office BX300F" driver="escp2-of-bx300f" manufacturer="Epson" model="94" parameters="standard_params" /> -- <printer translate="name" name="Epson Stylus Office BX525WD" driver="escp2-of-bx525wd" manufacturer="Epson" model="92" parameters="standard_params" /> -- <printer translate="name" name="Epson Stylus Office BX535WD" driver="escp2-of-bx535wd" manufacturer="Epson" model="92" parameters="standard_params" /> -+ <printer translate="name" name="Epson Stylus Office BX305F" driver="escp2-of-bx305f" manufacturer="Epson" model="94" parameters="standard_params" /> -+ <printer translate="name" name="Epson Stylus Office BX525WD" driver="escp2-of-bx525wd" manufacturer="Epson" model="118" parameters="standard_params" /> -+ <printer translate="name" name="Epson Stylus Office BX535WD" driver="escp2-of-bx535wd" manufacturer="Epson" model="118" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office BX600FW" driver="escp2-of-bx600fw" manufacturer="Epson" model="92" parameters="standard_params" /> -- <printer translate="name" name="Epson Stylus Office BX625FWD" driver="escp2-of-bx625fwd" manufacturer="Epson" model="92" parameters="standard_params" /> -+ <printer translate="name" name="Epson Stylus Office BX625FWD" driver="escp2-of-bx625fwd" manufacturer="Epson" model="118" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office BX630FW" driver="escp2-of-bx630fw" manufacturer="Epson" model="92" parameters="standard_params" /> -- <printer translate="name" name="Epson Stylus Office BX635FWD" driver="escp2-of-bx635fwd" manufacturer="Epson" model="92" parameters="standard_params" /> -+ <printer translate="name" name="Epson Stylus Office BX635FWD" driver="escp2-of-bx635fwd" manufacturer="Epson" model="118" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office SX600FW" driver="escp2-of-sx600fw" manufacturer="Epson" model="92" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office SX620FW" driver="escp2-of-sx620fw" manufacturer="Epson" model="92" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office TX300F" driver="escp2-of-tx300f" manufacturer="Epson" model="94" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Office TX600FW" driver="escp2-of-tx600fw" manufacturer="Epson" model="92" parameters="standard_params" /> -- <printer translate="name" name="Epson Stylus Office TX620FWD" driver="escp2-of-tx620fwd" manufacturer="Epson" model="92" parameters="standard_params" /> -+ <printer translate="name" name="Epson Stylus Office TX620FWD" driver="escp2-of-tx620fwd" manufacturer="Epson" model="118" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Photo" driver="escp2-photo" manufacturer="Epson" model="9" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Photo 700" deviceid="MFG:EPSON;MDL:Stylus Photo 700;DES:EPSON Stylus Photo 700;CMD:ESCPL2,BDC;" driver="escp2-700" manufacturer="Epson" model="7" parameters="standard_params" /> - <printer translate="name" name="Epson Stylus Photo EX" deviceid="MFG:EPSON;MDL:Stylus Photo EX;CMD:ESCPL2,BDC;" driver="escp2-ex" manufacturer="Epson" model="8" parameters="standard_params" /> diff --git a/net-print/gutenprint/files/gutenprint-5.3.3-selphy-typo.patch b/net-print/gutenprint/files/gutenprint-5.3.3-selphy-typo.patch deleted file mode 100644 index 393fa718fd36..000000000000 --- a/net-print/gutenprint/files/gutenprint-5.3.3-selphy-typo.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: "Andreas B. Mundt" <andi@debian.org> -Date: Mon, 4 Nov 2019 18:40:58 +0100 -Subject: Fix 'selpyh' for 'selphy' typo for Canon CP300 - -Closes: #943964 ---- - src/cups/backend_canonselphy.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/cups/backend_canonselphy.c b/src/cups/backend_canonselphy.c -index 978df0d..3ef0c31 100644 ---- a/src/cups/backend_canonselphy.c -+++ b/src/cups/backend_canonselphy.c -@@ -1165,7 +1165,7 @@ struct dyesub_backend canonselphy_backend = { - { USB_VID_CANON, USB_PID_CANON_CP100, P_CP_XXX, NULL, "canon-cp100"}, - { USB_VID_CANON, USB_PID_CANON_CP200, P_CP_XXX, NULL, "canon-cp200"}, - { USB_VID_CANON, USB_PID_CANON_CP220, P_CP_XXX, NULL, "canon-cp220"}, -- { USB_VID_CANON, USB_PID_CANON_CP300, P_CP_XXX, NULL, "selpyhcp300"}, -+ { USB_VID_CANON, USB_PID_CANON_CP300, P_CP_XXX, NULL, "selphycp300"}, - { USB_VID_CANON, USB_PID_CANON_CP330, P_CP_XXX, NULL, "canon-cp330"}, - { USB_VID_CANON, USB_PID_CANON_CP400, P_CP_XXX, NULL, "canon-cp400"}, - { USB_VID_CANON, USB_PID_CANON_CP500, P_CP_XXX, NULL, "canon-cp500"}, diff --git a/net-print/gutenprint/gutenprint-5.3.3-r1.ebuild b/net-print/gutenprint/gutenprint-5.3.3-r1.ebuild deleted file mode 100644 index 25a045d2441d..000000000000 --- a/net-print/gutenprint/gutenprint-5.3.3-r1.ebuild +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit autotools - -DESCRIPTION="Ghostscript and cups printer drivers" -HOMEPAGE="http://gutenprint.sourceforge.net" - -MY_P="${P/_/-}" -S="${WORKDIR}/${MY_P}" -SRC_URI="mirror://sourceforge/gimp-print/${MY_P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 sparc x86" - -IUSE="cups gimp gtk nls readline ppds static-libs" -REQUIRED_USE="gimp? ( gtk )" - -BDEPEND=" - virtual/pkgconfig - nls? ( sys-devel/gettext ) -" -# gimp restriction: https://sourceforge.net/p/gimp-print/bugs/725/ -CDEPEND=" - dev-lang/perl - readline? ( sys-libs/readline:0= ) - cups? ( >=net-print/cups-1.1.14 ) - gimp? ( media-gfx/gimp:0/2 x11-libs/gtk+:2 ) - gtk? ( x11-libs/gtk+:2 ) - nls? ( virtual/libintl ) -" -RDEPEND="${CDEPEND}" -DEPEND="${CDEPEND}" - -RESTRICT="test" - -DOCS=( AUTHORS ChangeLog NEWS README doc/gutenprint-users-manual.{pdf,odt} ) - -PATCHES=( - "${FILESDIR}"/${PN}-5.3.1-cflags.patch -) - -src_configure() { - local myeconfargs=( - --enable-test - --disable-translated-cups-ppds - $(use_enable gtk libgutenprintui2) - $(use_with gimp gimp2) - $(use_with gimp gimp2-as-gutenprint) - $(use_with cups) - $(use_enable nls) - $(use_with readline) - $(use_enable static-libs static) - ) - - if use cups && use ppds; then - myeconfargs+=( --enable-cups-ppds --enable-cups-level3-ppds ) - else - myeconfargs+=( --disable-cups-ppds ) - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - dodoc doc/FAQ.html - dodoc -r doc/gutenprintui2/html - rm -r "${ED}"/usr/share/gutenprint/doc || die - - find "${ED}" -name '*.la' -exec rm -f '{}' + || die -} - -pkg_postinst() { - if [[ ${ROOT} == / ]] && [[ -x /usr/sbin/cups-genppdupdate ]]; then - elog "Updating installed printer ppd files" - elog $(/usr/sbin/cups-genppdupdate) - else - elog "You need to update installed ppds manually using cups-genppdupdate" - fi -} diff --git a/net-print/gutenprint/gutenprint-5.3.3-r2.ebuild b/net-print/gutenprint/gutenprint-5.3.3-r2.ebuild deleted file mode 100644 index 6f7e90547c14..000000000000 --- a/net-print/gutenprint/gutenprint-5.3.3-r2.ebuild +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit autotools - -DESCRIPTION="Ghostscript and cups printer drivers" -HOMEPAGE="http://gutenprint.sourceforge.net" - -MY_P="${P/_/-}" -S="${WORKDIR}/${MY_P}" -SRC_URI="mirror://sourceforge/gimp-print/${MY_P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 sparc x86" - -IUSE="cups gimp gtk nls readline ppds static-libs" -REQUIRED_USE="gimp? ( gtk )" - -BDEPEND=" - virtual/pkgconfig - nls? ( sys-devel/gettext ) -" -# gimp restriction: https://sourceforge.net/p/gimp-print/bugs/725/ -CDEPEND=" - dev-lang/perl - readline? ( sys-libs/readline:0= ) - cups? ( >=net-print/cups-1.1.14 ) - gimp? ( media-gfx/gimp:0/2 x11-libs/gtk+:2 ) - gtk? ( x11-libs/gtk+:2 ) - nls? ( virtual/libintl ) -" -RDEPEND="${CDEPEND}" -DEPEND="${CDEPEND}" - -RESTRICT="test" - -DOCS=( AUTHORS ChangeLog NEWS README doc/gutenprint-users-manual.{pdf,odt} ) - -PATCHES=( - "${FILESDIR}"/${PN}-5.3.1-cflags.patch - # From upstream, fixed in next version - "${FILESDIR}"/${P}-epson.patch - "${FILESDIR}"/${P}-selphy-typo.patch -) - -src_configure() { - local myeconfargs=( - --enable-test - --disable-translated-cups-ppds - $(use_enable gtk libgutenprintui2) - $(use_with gimp gimp2) - $(use_with gimp gimp2-as-gutenprint) - $(use_with cups) - $(use_enable nls) - $(use_with readline) - $(use_enable static-libs static) - ) - - if use cups && use ppds; then - myeconfargs+=( --enable-cups-ppds --enable-cups-level3-ppds ) - else - myeconfargs+=( --disable-cups-ppds ) - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - default - - dodoc doc/FAQ.html - dodoc -r doc/gutenprintui2/html - rm -r "${ED}"/usr/share/gutenprint/doc || die - - find "${ED}" -name '*.la' -exec rm -f '{}' + || die -} - -pkg_postinst() { - if [[ -z ${ROOT} ]] && [[ -x /usr/sbin/cups-genppdupdate ]]; then - elog "Updating installed printer ppd files" - elog $(/usr/sbin/cups-genppdupdate) - else - elog "You need to update installed ppds manually using cups-genppdupdate" - fi -} diff --git a/net-print/gutenprint/gutenprint-5.3.4-r1.ebuild b/net-print/gutenprint/gutenprint-5.3.4-r2.ebuild index 4af8c8881e58..dfd4b5b50189 100644 --- a/net-print/gutenprint/gutenprint-5.3.4-r1.ebuild +++ b/net-print/gutenprint/gutenprint-5.3.4-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -10,11 +10,11 @@ HOMEPAGE="http://gutenprint.sourceforge.net" MY_P="${P/_/-}" S="${WORKDIR}/${MY_P}" -SRC_URI="mirror://sourceforge/gimp-print/${MY_P}.tar.xz" +SRC_URI="https://downloads.sourceforge.net/gimp-print/${MY_P}.tar.xz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 sparc x86" IUSE="cups gimp gtk nls readline ppds static-libs" RESTRICT="test" @@ -41,6 +41,13 @@ DEPEND="${RDEPEND}" DOCS=( AUTHORS ChangeLog NEWS README doc/gutenprint-users-manual.{pdf,odt} ) PATCHES=( "${FILESDIR}"/${PN}-5.3.1-cflags.patch ) +src_prepare() { + default + + # Needed for cflags patch + eautoreconf +} + src_configure() { local myeconfargs=( --enable-test diff --git a/net-print/gutenprint/metadata.xml b/net-print/gutenprint/metadata.xml index 763f98878c92..a9a8d007b78d 100644 --- a/net-print/gutenprint/metadata.xml +++ b/net-print/gutenprint/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/hplip-plugin/Manifest b/net-print/hplip-plugin/Manifest index 53c5ac1fc398..5f013fea62b8 100644 --- a/net-print/hplip-plugin/Manifest +++ b/net-print/hplip-plugin/Manifest @@ -1,3 +1 @@ -DIST hplip-3.20.11-plugin.run 11514293 BLAKE2B b3b7698a45e5e68a25ec1216e736484d26546b657f4a519a153acf0280847667e7ca81afc988f722668746281857d51d9e1703857514ffe5b57dea85f2bae4d3 SHA512 9075c1ac8e8f6e12d33b81b633025259f54352ea00271eec07ee898fd9a164445519608fc9ea61a7157845a4a03f87c28f486c7994f0d7db81d11d3fe51f1876 -DIST hplip-3.21.2-plugin.run 11514233 BLAKE2B 262f23c34632f7ba4a9c6e1c4533d0fd44b025e476c0f28f0fc68bc401430c503233583ae381d6c74a89a996b750603910000c6fdc6b0b606e32d56c82ed07f4 SHA512 62f3b6e369bdd1b2145f814901314c78ae5d7426734c92b0511f8ea4a925e24880875a1cfd1623ef800dcfdf3cf5b1c5d83032a19ca200547a4555b0d944f8e6 -DIST hplip-3.21.4-plugin.run 11514018 BLAKE2B a12881a1e4795fb1f5294a8b164f72aa38fd2365fe07853d0a16c688b38835f852e6317992541920fdc299ee84a7b725e70788e5759acbffb173d2604328468a SHA512 0a01dcbafe641688fd21e4f1a1a4520eadd5a1312a913c6870054bbf5b43d22310dea3a21a8e37e645f5637d808ebaeeaa4d64346e73b97c6dc1cba25733a8de +DIST hplip-3.23.12-plugin.run 11491524 BLAKE2B 9b87522a78588d65815992a170451888b4c6ac83809498fae01cfa4d2c333657a7cf49f2358e12ebfd0ae0f4169e29729e9ef8ba6716f74de0a83b11552275e3 SHA512 933c27040443584e0cfda71b50b8a251ebd34fdf4a2c90f40e36d1c155b3ae87c1474835356f685de2997469b4b7a3f000e216fd427118eea2542fa142783ab9 diff --git a/net-print/hplip-plugin/hplip-plugin-3.21.2.ebuild b/net-print/hplip-plugin/hplip-plugin-3.21.2.ebuild deleted file mode 100644 index cca0faecc4c1..000000000000 --- a/net-print/hplip-plugin/hplip-plugin-3.21.2.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit unpacker - -DESCRIPTION="Proprietary plugins and firmware for HPLIP" -HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing/plugins" -SRC_URI="https://developers.hp.com/sites/default/files/hplip-${PV}-plugin.run" -LICENSE="hplip-plugin" -SLOT="0" -KEYWORDS="~amd64 ~arm ~x86" -IUSE="orblite" - -RDEPEND=" - ~net-print/hplip-${PV} - virtual/udev - orblite? ( - media-gfx/sane-backends - >=sys-libs/glibc-2.26 - virtual/libusb:0 - ) -" -DEPEND="" - -S=${WORKDIR} - -HPLIP_HOME=/usr/share/hplip - -# Binary prebuilt package -QA_PREBUILT="${HPLIP_HOME}/*.so" - -# License does not allow us to redistribute the "source" package -RESTRICT="mirror" - -src_install() { - local hplip_arch - case "${ARCH}" in - amd64) hplip_arch="x86_64" ;; - arm) hplip_arch="arm32" ;; - x86) hplip_arch="x86_32" ;; - *) die "Unsupported architecture." ;; - esac - - insinto "${HPLIP_HOME}"/data/firmware - doins *.fw.gz - - for plugin in *-${hplip_arch}.so; do - local plugin_type=prnt - case "${plugin}" in - bb_orblite-*) - use orblite || continue - plugin_type=scan ;; - bb_*) - plugin_type=scan ;; - fax_*) - plugin_type=fax ;; - esac - - exeinto "${HPLIP_HOME}"/${plugin_type}/plugins - newexe ${plugin} ${plugin/-${hplip_arch}} - done - - insinto /var/lib/hp - newins - hplip.state <<-_EOF_ - [plugin] - installed = 1 - eula = 1 - version = ${PV} - _EOF_ -} diff --git a/net-print/hplip-plugin/hplip-plugin-3.21.4.ebuild b/net-print/hplip-plugin/hplip-plugin-3.21.4.ebuild deleted file mode 100644 index cca0faecc4c1..000000000000 --- a/net-print/hplip-plugin/hplip-plugin-3.21.4.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit unpacker - -DESCRIPTION="Proprietary plugins and firmware for HPLIP" -HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing/plugins" -SRC_URI="https://developers.hp.com/sites/default/files/hplip-${PV}-plugin.run" -LICENSE="hplip-plugin" -SLOT="0" -KEYWORDS="~amd64 ~arm ~x86" -IUSE="orblite" - -RDEPEND=" - ~net-print/hplip-${PV} - virtual/udev - orblite? ( - media-gfx/sane-backends - >=sys-libs/glibc-2.26 - virtual/libusb:0 - ) -" -DEPEND="" - -S=${WORKDIR} - -HPLIP_HOME=/usr/share/hplip - -# Binary prebuilt package -QA_PREBUILT="${HPLIP_HOME}/*.so" - -# License does not allow us to redistribute the "source" package -RESTRICT="mirror" - -src_install() { - local hplip_arch - case "${ARCH}" in - amd64) hplip_arch="x86_64" ;; - arm) hplip_arch="arm32" ;; - x86) hplip_arch="x86_32" ;; - *) die "Unsupported architecture." ;; - esac - - insinto "${HPLIP_HOME}"/data/firmware - doins *.fw.gz - - for plugin in *-${hplip_arch}.so; do - local plugin_type=prnt - case "${plugin}" in - bb_orblite-*) - use orblite || continue - plugin_type=scan ;; - bb_*) - plugin_type=scan ;; - fax_*) - plugin_type=fax ;; - esac - - exeinto "${HPLIP_HOME}"/${plugin_type}/plugins - newexe ${plugin} ${plugin/-${hplip_arch}} - done - - insinto /var/lib/hp - newins - hplip.state <<-_EOF_ - [plugin] - installed = 1 - eula = 1 - version = ${PV} - _EOF_ -} diff --git a/net-print/hplip-plugin/hplip-plugin-3.20.11.ebuild b/net-print/hplip-plugin/hplip-plugin-3.23.12.ebuild index 0524ab3f3cae..2574deffcb94 100644 --- a/net-print/hplip-plugin/hplip-plugin-3.20.11.ebuild +++ b/net-print/hplip-plugin/hplip-plugin-3.23.12.ebuild @@ -1,17 +1,21 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit unpacker DESCRIPTION="Proprietary plugins and firmware for HPLIP" HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing/plugins" SRC_URI="https://developers.hp.com/sites/default/files/hplip-${PV}-plugin.run" +S="${WORKDIR}" + LICENSE="hplip-plugin" SLOT="0" -KEYWORDS="amd64 arm x86" +KEYWORDS="amd64 arm arm64 x86" IUSE="orblite" +# License does not allow us to redistribute the "source" package +RESTRICT="mirror" RDEPEND=" ~net-print/hplip-${PV} @@ -22,23 +26,18 @@ RDEPEND=" virtual/libusb:0 ) " -DEPEND="" - -S=${WORKDIR} HPLIP_HOME=/usr/share/hplip # Binary prebuilt package QA_PREBUILT="${HPLIP_HOME}/*.so" -# License does not allow us to redistribute the "source" package -RESTRICT="mirror" - src_install() { - local hplip_arch + local hplip_arch plugin case "${ARCH}" in amd64) hplip_arch="x86_64" ;; arm) hplip_arch="arm32" ;; + arm64) hplip_arch="arm64" ;; x86) hplip_arch="x86_32" ;; *) die "Unsupported architecture." ;; esac diff --git a/net-print/hplip-plugin/metadata.xml b/net-print/hplip-plugin/metadata.xml index cb97715b8595..8e577f12bf50 100644 --- a/net-print/hplip-plugin/metadata.xml +++ b/net-print/hplip-plugin/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/hplip/Manifest b/net-print/hplip/Manifest index 20d2aead2e6b..d7ed9f2773b8 100644 --- a/net-print/hplip/Manifest +++ b/net-print/hplip/Manifest @@ -1,7 +1,2 @@ -DIST hplip-3.20.11-patches-2.tar.xz 18140 BLAKE2B a0271d0c6fcfaa53c68ab00c4c6cfc121e4eef0368b7eff04677ccbd8b897897352fe44a111693d0d45ee1b40bc3c783984f23a35faedfa2fa0da52018aade3c SHA512 8d00d48e295572df19b6edf0efce005f6bae6e051cce5d618575f5e226e2c32896111ddc1a193d4aacfadbe9d7f525761b0ea2564277f4c263b3df5bc86c1f40 -DIST hplip-3.20.11.tar.gz 26301441 BLAKE2B 14667f33cc50b2887c8434ada7327a82e16b9acbcdc75d3a50c0261ec9aef3fada9be81e6c0cbdfb4d29914630799c6406893644386db99c0ce86245cca38cc2 SHA512 f583fb4140a29c5e21956c3e51fe3620baa65d33b40447af419d7fc61473a1148a1873216a84e89be785b155ee8e9aebd5e3eb19d2ded82b8415b1a35de1b55d -DIST hplip-3.21.2-patches-1.tar.xz 19212 BLAKE2B c733651a7831b54bec13b5f037b0f00ab53dbec193f73964d7bb3f8ee4e1dcd02a02dd793d7fc322fe34085bbe5ec281076757d8882b4eb7f85fd0e45b1c3200 SHA512 23c696b111fe098358eb609e64cedc2ee85f4a1dac8bce895e3c6bbcb96e62dd5d2d3f1bcc9d12d20ccd6717b23f92b3016c926df7c73f50ba9425542d08ed29 -DIST hplip-3.21.2.tar.gz 27014784 BLAKE2B b6a13f0d48f3052ad09b419dbe9b68605c85ed8f1bfb6f1ec9720b9aace4a1c6d17a933b0d55ba20dbbc3d389ba1d2751dbd9a71d364ad2e2e1617cd7613dc2d SHA512 73ba37275cfe34a58b81c9656514e15da67c1a69af5471ad132a1538d324efe640879cb7e60c359915607e41b63e653e7ae757661e553235f6e83e378ab46474 -DIST hplip-3.21.4-patches-1.tar.xz 17812 BLAKE2B d38584eb04e5e8d886cd4c8ecd05c31f3a32db185c87eed8a6593f3f2d1368a284bbef36f9d78b2689862165cd132597a3d616aaf5411e875f97de45c57e197e SHA512 fd7438353af8b05e100b5ef16fedcc6bf9257d49fe7d5a12a1a2b3b26965c2ebcd613788e7f585f7c0bd3a97e83381e36f3915eabd16a1e8c4ac50c1129804e8 -DIST hplip-3.21.4.tar.gz 27019741 BLAKE2B 8e978488e09d99d136351b84fddd9ac7921b9ad1ca2355bfde4eca89646953c3caada5d45aeeb6e7882c448349e5ccd4b473df6f0f42e9b50d4b057157397d5f SHA512 3f22433b3d35013025b63163ccd879da203adcec821f9f90748ee8399b370a129ecdffb5889efa57da1dc5c3f45c42f7593d2198d9166240156baf839b55fce6 -DIST hplip-3.21.6.tar.gz 27026295 BLAKE2B 12588ee31bfad45842bd09f8aa0e653bbdb3c80358150b15d391bb55077e52870a5fb047ae0d4c98d687409b5d244da4ee08ce56a7946ef67088de1493a0455b SHA512 08d0a93089669aa04b158aac8aa339da0278824ff2d9ecfcd967ed21ae5c4a1092910e103696e01dd230b8367471528687a4d4623759a561962116758a0b093c +DIST hplip-3.23.12-patches-1.tar.xz 21132 BLAKE2B 83cee13ef988618cf6537b3954649c733b3de99f4d1c2ffefe9aeaba8f21e61a92dfa2e4cdb87af3d4b56df244e7de1b1d6bf73d878aa8ccabe60c537e05916f SHA512 89a0139660b013c11ba1dfa6adf1840b8ccc5b49bc31580481967c85e75ca79aba537bc4b65834ee464013b7aa0544267235d14dc877cb5276cb6e89c6a3fafa +DIST hplip-3.23.12.tar.gz 30162044 BLAKE2B 752a5b75855677e4f8b5b8738181d40c426268be4e393e5df7565c78efca68389e86d92f21002a733c0b2d5d62913bef3986e4bedd36a9f35f205c11e6027e7a SHA512 7461ffec38be68421e4204021f53d2b1641e7a67c14f205390d45f487a1af90956fd221f7e1561635508103ae944f19e04d6052d3f8928f2c9685fdcdcf515df diff --git a/net-print/hplip/hplip-3.20.11-r2.ebuild b/net-print/hplip/hplip-3.20.11-r2.ebuild deleted file mode 100644 index b005d106d680..000000000000 --- a/net-print/hplip/hplip-3.20.11-r2.ebuild +++ /dev/null @@ -1,287 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8,9} ) -PYTHON_REQ_USE="threads(+),xml" - -# 14 and 15 spit out a lot of warnings about subdirs -WANT_AUTOMAKE="1.13" - -inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev - -DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools" -HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing" -SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz - https://dev.gentoo.org/~billie/distfiles/${PN}-3.20.11-patches-2.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 arm arm64 ppc ppc64 x86" - -IUSE="doc fax +hpcups hpijs kde libnotify libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X" - -COMMON_DEPEND=" - net-print/cups - sys-apps/dbus - virtual/jpeg:0 - hpijs? ( net-print/cups-filters[foomatic] ) - !libusb0? ( virtual/libusb:1 ) - libusb0? ( virtual/libusb:0 ) - ${PYTHON_DEPS} - !minimal? ( - scanner? ( - media-gfx/sane-backends - ) - snmp? ( - dev-libs/openssl:0= - net-analyzer/net-snmp:= - net-dns/avahi[dbus,python,${PYTHON_SINGLE_USEDEP}] - ) - ) -" -BDEPEND=" - virtual/pkgconfig -" -DEPEND=" - ${COMMON_DEPEND} -" -RDEPEND=" - ${COMMON_DEPEND} - app-text/ghostscript-gpl - !minimal? ( - $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]' 'python3*') - kernel_linux? ( virtual/udev ) - $(python_gen_cond_dep ' - >=dev-python/dbus-python-1.2.0-r1[${PYTHON_USEDEP}] - dev-python/distro[${PYTHON_USEDEP}] - fax? ( dev-python/reportlab[${PYTHON_USEDEP}] ) - qt5? ( - >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_USEDEP}] - libnotify? ( dev-python/notify2[${PYTHON_USEDEP}] ) - ) - scanner? ( - >=dev-python/reportlab-3.2[${PYTHON_USEDEP}] - >=dev-python/pillow-3.1.1[${PYTHON_USEDEP}] - X? ( - || ( - kde? ( kde-misc/skanlite ) - media-gfx/xsane - media-gfx/sane-frontends - ) - ) - ) - ') - ) - policykit? ( sys-auth/polkit ) -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -PATCHES=( - "${WORKDIR}/patches" -) - -CONFIG_CHECK="~PARPORT ~PPDEV" -ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)." - -#DISABLE_AUTOFORMATTING="yes" -DOC_CONTENTS=" -For more information on setting up your printer please take -a look at the hplip section of the gentoo printing guide: -https://wiki.gentoo.org/wiki/Printing -" - -pkg_setup() { - python-single-r1_pkg_setup - - use scanner && ! use X && ewarn "You need USE=X for the scanner GUI." - - use parport && linux-info_pkg_setup - - if use minimal ; then - ewarn "Installing driver portions only, make sure you know what you are doing." - ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver" - ewarn "is installed. If both USE flags are set hpijs overrides hpcups." - ewarn "This also disables fax, network, scanner and gui support!" - fi - - if ! use hpcups && ! use hpijs ; then - ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver," - ewarn "which is probably not what you want." - ewarn "You will almost certainly not be able to print." - fi -} - -src_prepare() { - default - - python_fix_shebang . - - # Make desktop files follow the specification - # Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=443680 - # Upstream bug: https://bugs.launchpad.net/hplip/+bug/1080324 - sed -i -e '/^Categories=/s/Application;//' \ - -e '/^Encoding=.*/d' hplip.desktop.in || die - sed -i -e '/^Categories=/s/Application;//' \ - -e '/^Version=.*/d' \ - -e '/^Comment=.*/d' hplip-systray.desktop.in || die - - # Fix for Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=345725 - # Upstream bug: https://bugs.launchpad.net/hplip/+bug/880847, - # https://bugs.launchpad.net/hplip/+bug/500086 - local udevdir=$(get_udevdir) - sed -i -e "s|/etc/udev|${udevdir}|g" \ - $(find . -type f -exec grep -l /etc/udev {} +) || die - - # Force recognition of Gentoo distro by hp-check - sed -i \ - -e "s:file('/etc/issue', 'r').read():'Gentoo':" \ - installer/core_install.py || die - - eautoreconf -} - -src_configure() { - local drv_build minimal_build - - if use hpcups ; then - drv_build="$(use_enable hpcups hpcups-install)" - if use static-ppds ; then - drv_build="${drv_build} --enable-cups-ppd-install" - drv_build="${drv_build} --disable-cups-drv-install" - else - drv_build="${drv_build} --enable-cups-drv-install" - drv_build="${drv_build} --disable-cups-ppd-install" - fi - else - drv_build="--disable-hpcups-install" - drv_build="${drv_build} --disable-cups-drv-install" - drv_build="${drv_build} --disable-cups-ppd-install" - fi - - if use hpijs ; then - drv_build="${drv_build} $(use_enable hpijs hpijs-install)" - if use static-ppds ; then - drv_build="${drv_build} --enable-foomatic-ppd-install" - drv_build="${drv_build} --disable-foomatic-drv-install" - else - drv_build="${drv_build} --enable-foomatic-drv-install" - drv_build="${drv_build} --disable-foomatic-ppd-install" - fi - else - drv_build="${drv_build} --disable-hpijs-install" - drv_build="${drv_build} --disable-foomatic-drv-install" - drv_build="${drv_build} --disable-foomatic-ppd-install" - fi - - if use minimal ; then - if use hpijs ; then - minimal_build="--enable-hpijs-only-build" - else - minimal_build="--disable-hpijs-only-build" - fi - if use hpcups ; then - minimal_build="${minimal_build} --enable-hpcups-only-build" - else - minimal_build="${minimal_build} --disable-hpcups-only-build" - fi - minimal_build="${minimal_build} --disable-fax-build" - minimal_build="${minimal_build} --disable-network-build" - minimal_build="${minimal_build} --disable-scan-build" - minimal_build="${minimal_build} --disable-gui-build" - else - if use fax ; then - minimal_build="${minimal_build} --enable-fax-build" - else - minimal_build="${minimal_build} --disable-fax-build" - fi - if use snmp ; then - minimal_build="${minimal_build} --enable-network-build" - else - minimal_build="${minimal_build} --disable-network-build" - fi - if use scanner ; then - minimal_build="${minimal_build} --enable-scan-build" - else - minimal_build="${minimal_build} --disable-scan-build" - fi - if use qt5 ; then - minimal_build="${minimal_build} --enable-qt5" - minimal_build="${minimal_build} --enable-gui-build" - else - minimal_build="${minimal_build} --disable-gui-build" - minimal_build="${minimal_build} --disable-qt5" - fi - fi - - # disable class driver for now - econf \ - --disable-class-driver \ - --disable-foomatic-rip-hplip-install \ - --disable-cups11-build \ - --disable-lite-build \ - --disable-shadow-build \ - --disable-qt3 \ - --disable-qt4 \ - --disable-udev_sysfs_rules \ - --with-cupsbackenddir=$(cups-config --serverbin)/backend \ - --with-cupsfilterdir=$(cups-config --serverbin)/filter \ - --with-docdir=/usr/share/doc/${PF} \ - --with-htmldir=/usr/share/doc/${PF}/html \ - --enable-hpps-install \ - --enable-dbus-build \ - ${drv_build} \ - ${minimal_build} \ - $(use_enable doc doc-build) \ - $(use_enable libusb0 libusb01_build) \ - $(use_enable parport pp-build) \ - $(use_enable policykit) - - # hpijs ppds are created at configure time but are not installed (3.17.11) - - # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip - # The hpcups driver does not use foomatic-rip - #local i - #for i in ppd/hpijs/*.ppd.gz ; do - # rm -f ${i}.temp || die - # gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \ - # gzip > ${i}.temp || die - # mv ${i}.temp ${i} || die - #done -} - -src_install() { - # Disable parallel install - # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018 - emake -j1 DESTDIR="${D}" install - einstalldocs - # default - - # Installed by sane-backends - # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023 - rm -f "${ED}"/etc/sane.d/dll.conf || die - - # Remove desktop and autostart files - # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770 - use qt5 || { - rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg - } - - rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die - rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die - - # Remove hal fdi files - rm -rf "${ED}"/usr/share/hal || die - - find "${D}" -name '*.la' -delete || die - - python_optimize "${ED}"/usr/share/hplip - - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/net-print/hplip/hplip-3.21.2-r1.ebuild b/net-print/hplip/hplip-3.21.2-r1.ebuild deleted file mode 100644 index 5edaeac52bed..000000000000 --- a/net-print/hplip/hplip-3.21.2-r1.ebuild +++ /dev/null @@ -1,287 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8,9} ) -PYTHON_REQ_USE="threads(+),xml" - -# 14 and 15 spit out a lot of warnings about subdirs -WANT_AUTOMAKE="1.13" - -inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev - -DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools" -HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing" -SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz - https://dev.gentoo.org/~billie/distfiles/${PN}-3.21.2-patches-1.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" - -IUSE="doc fax +hpcups hpijs kde libnotify libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X" - -COMMON_DEPEND=" - net-print/cups - sys-apps/dbus - virtual/jpeg:0 - hpijs? ( net-print/cups-filters[foomatic] ) - !libusb0? ( virtual/libusb:1 ) - libusb0? ( virtual/libusb:0 ) - ${PYTHON_DEPS} - !minimal? ( - scanner? ( - media-gfx/sane-backends - ) - snmp? ( - dev-libs/openssl:0= - net-analyzer/net-snmp:= - net-dns/avahi[dbus,python,${PYTHON_SINGLE_USEDEP}] - ) - ) -" -BDEPEND=" - virtual/pkgconfig -" -DEPEND=" - ${COMMON_DEPEND} -" -RDEPEND=" - ${COMMON_DEPEND} - app-text/ghostscript-gpl - !minimal? ( - $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_USEDEP}]' 'python3*') - kernel_linux? ( virtual/udev ) - $(python_gen_cond_dep ' - >=dev-python/dbus-python-1.2.0-r1[${PYTHON_USEDEP}] - dev-python/distro[${PYTHON_USEDEP}] - fax? ( dev-python/reportlab[${PYTHON_USEDEP}] ) - qt5? ( - >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_USEDEP}] - libnotify? ( dev-python/notify2[${PYTHON_USEDEP}] ) - ) - scanner? ( - >=dev-python/reportlab-3.2[${PYTHON_USEDEP}] - >=dev-python/pillow-3.1.1[${PYTHON_USEDEP}] - X? ( - || ( - kde? ( kde-misc/skanlite ) - media-gfx/xsane - media-gfx/sane-frontends - ) - ) - ) - ') - ) - policykit? ( sys-auth/polkit ) -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -PATCHES=( - "${WORKDIR}/patches" -) - -CONFIG_CHECK="~PARPORT ~PPDEV" -ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)." - -#DISABLE_AUTOFORMATTING="yes" -DOC_CONTENTS=" -For more information on setting up your printer please take -a look at the hplip section of the gentoo printing guide: -https://wiki.gentoo.org/wiki/Printing -" - -pkg_setup() { - python-single-r1_pkg_setup - - use scanner && ! use X && ewarn "You need USE=X for the scanner GUI." - - use parport && linux-info_pkg_setup - - if use minimal ; then - ewarn "Installing driver portions only, make sure you know what you are doing." - ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver" - ewarn "is installed. If both USE flags are set hpijs overrides hpcups." - ewarn "This also disables fax, network, scanner and gui support!" - fi - - if ! use hpcups && ! use hpijs ; then - ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver," - ewarn "which is probably not what you want." - ewarn "You will almost certainly not be able to print." - fi -} - -src_prepare() { - default - - python_fix_shebang . - - # Make desktop files follow the specification - # Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=443680 - # Upstream bug: https://bugs.launchpad.net/hplip/+bug/1080324 - sed -i -e '/^Categories=/s/Application;//' \ - -e '/^Encoding=.*/d' hplip.desktop.in || die - sed -i -e '/^Categories=/s/Application;//' \ - -e '/^Version=.*/d' \ - -e '/^Comment=.*/d' hplip-systray.desktop.in || die - - # Fix for Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=345725 - # Upstream bug: https://bugs.launchpad.net/hplip/+bug/880847, - # https://bugs.launchpad.net/hplip/+bug/500086 - local udevdir=$(get_udevdir) - sed -i -e "s|/etc/udev|${udevdir}|g" \ - $(find . -type f -exec grep -l /etc/udev {} +) || die - - # Force recognition of Gentoo distro by hp-check - sed -i \ - -e "s:file('/etc/issue', 'r').read():'Gentoo':" \ - installer/core_install.py || die - - eautoreconf -} - -src_configure() { - local drv_build minimal_build - - if use hpcups ; then - drv_build="$(use_enable hpcups hpcups-install)" - if use static-ppds ; then - drv_build="${drv_build} --enable-cups-ppd-install" - drv_build="${drv_build} --disable-cups-drv-install" - else - drv_build="${drv_build} --enable-cups-drv-install" - drv_build="${drv_build} --disable-cups-ppd-install" - fi - else - drv_build="--disable-hpcups-install" - drv_build="${drv_build} --disable-cups-drv-install" - drv_build="${drv_build} --disable-cups-ppd-install" - fi - - if use hpijs ; then - drv_build="${drv_build} $(use_enable hpijs hpijs-install)" - if use static-ppds ; then - drv_build="${drv_build} --enable-foomatic-ppd-install" - drv_build="${drv_build} --disable-foomatic-drv-install" - else - drv_build="${drv_build} --enable-foomatic-drv-install" - drv_build="${drv_build} --disable-foomatic-ppd-install" - fi - else - drv_build="${drv_build} --disable-hpijs-install" - drv_build="${drv_build} --disable-foomatic-drv-install" - drv_build="${drv_build} --disable-foomatic-ppd-install" - fi - - if use minimal ; then - if use hpijs ; then - minimal_build="--enable-hpijs-only-build" - else - minimal_build="--disable-hpijs-only-build" - fi - if use hpcups ; then - minimal_build="${minimal_build} --enable-hpcups-only-build" - else - minimal_build="${minimal_build} --disable-hpcups-only-build" - fi - minimal_build="${minimal_build} --disable-fax-build" - minimal_build="${minimal_build} --disable-network-build" - minimal_build="${minimal_build} --disable-scan-build" - minimal_build="${minimal_build} --disable-gui-build" - else - if use fax ; then - minimal_build="${minimal_build} --enable-fax-build" - else - minimal_build="${minimal_build} --disable-fax-build" - fi - if use snmp ; then - minimal_build="${minimal_build} --enable-network-build" - else - minimal_build="${minimal_build} --disable-network-build" - fi - if use scanner ; then - minimal_build="${minimal_build} --enable-scan-build" - else - minimal_build="${minimal_build} --disable-scan-build" - fi - if use qt5 ; then - minimal_build="${minimal_build} --enable-qt5" - minimal_build="${minimal_build} --enable-gui-build" - else - minimal_build="${minimal_build} --disable-gui-build" - minimal_build="${minimal_build} --disable-qt5" - fi - fi - - # disable class driver for now - econf \ - --disable-class-driver \ - --disable-foomatic-rip-hplip-install \ - --disable-cups11-build \ - --disable-lite-build \ - --disable-shadow-build \ - --disable-qt3 \ - --disable-qt4 \ - --disable-udev_sysfs_rules \ - --with-cupsbackenddir=$(cups-config --serverbin)/backend \ - --with-cupsfilterdir=$(cups-config --serverbin)/filter \ - --with-docdir=/usr/share/doc/${PF} \ - --with-htmldir=/usr/share/doc/${PF}/html \ - --enable-hpps-install \ - --enable-dbus-build \ - ${drv_build} \ - ${minimal_build} \ - $(use_enable doc doc-build) \ - $(use_enable libusb0 libusb01_build) \ - $(use_enable parport pp-build) \ - $(use_enable policykit) - - # hpijs ppds are created at configure time but are not installed (3.17.11) - - # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip - # The hpcups driver does not use foomatic-rip - #local i - #for i in ppd/hpijs/*.ppd.gz ; do - # rm -f ${i}.temp || die - # gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \ - # gzip > ${i}.temp || die - # mv ${i}.temp ${i} || die - #done -} - -src_install() { - # Disable parallel install - # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018 - emake -j1 DESTDIR="${D}" install - einstalldocs - # default - - # Installed by sane-backends - # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023 - rm -f "${ED}"/etc/sane.d/dll.conf || die - - # Remove desktop and autostart files - # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770 - use qt5 || { - rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg - } - - rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die - rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die - - # Remove hal fdi files - rm -rf "${ED}"/usr/share/hal || die - - find "${D}" -name '*.la' -delete || die - - python_optimize "${ED}"/usr/share/hplip - - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/net-print/hplip/hplip-3.21.6.ebuild b/net-print/hplip/hplip-3.21.6.ebuild deleted file mode 100644 index 84ae3994756d..000000000000 --- a/net-print/hplip/hplip-3.21.6.ebuild +++ /dev/null @@ -1,288 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8,9} ) -PYTHON_REQ_USE="threads(+),xml" - -# 14 and 15 spit out a lot of warnings about subdirs -WANT_AUTOMAKE="1.13" - -inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev - -DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools" -HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing" -SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz - https://dev.gentoo.org/~billie/distfiles/${PN}-3.21.4-patches-1.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" - -IUSE="doc fax +hpcups hpijs kde libnotify libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X" - -COMMON_DEPEND=" - net-print/cups - sys-apps/dbus - virtual/jpeg:0 - hpijs? ( net-print/cups-filters[foomatic] ) - !libusb0? ( virtual/libusb:1 ) - libusb0? ( virtual/libusb:0 ) - ${PYTHON_DEPS} - !minimal? ( - scanner? ( - media-gfx/sane-backends - ) - snmp? ( - dev-libs/openssl:0= - net-analyzer/net-snmp:= - net-dns/avahi[dbus,python,${PYTHON_SINGLE_USEDEP}] - ) - ) -" -BDEPEND=" - virtual/pkgconfig -" -DEPEND=" - ${COMMON_DEPEND} -" -RDEPEND=" - ${COMMON_DEPEND} - app-text/ghostscript-gpl - !minimal? ( - $(python_gen_cond_dep 'dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]' 'python3*') - kernel_linux? ( virtual/udev ) - $(python_gen_cond_dep ' - >=dev-python/dbus-python-1.2.0-r1[${PYTHON_MULTI_USEDEP}] - dev-python/distro[${PYTHON_MULTI_USEDEP}] - fax? ( dev-python/reportlab[${PYTHON_MULTI_USEDEP}] ) - qt5? ( - >=dev-python/PyQt5-5.5.1[dbus,gui,widgets,${PYTHON_MULTI_USEDEP}] - libnotify? ( dev-python/notify2[${PYTHON_MULTI_USEDEP}] ) - ) - scanner? ( - >=dev-python/reportlab-3.2[${PYTHON_MULTI_USEDEP}] - >=dev-python/pillow-3.1.1[${PYTHON_MULTI_USEDEP}] - X? ( - || ( - kde? ( kde-misc/skanlite ) - media-gfx/xsane - media-gfx/sane-frontends - ) - ) - ) - ') - ) - policykit? ( sys-auth/polkit ) -" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -PATCHES=( - "${WORKDIR}/patches" -) - -CONFIG_CHECK="~PARPORT ~PPDEV" -ERROR_PARPORT="Please make sure kernel parallel port support is enabled (PARPORT and PPDEV)." - -#DISABLE_AUTOFORMATTING="yes" -DOC_CONTENTS=" -For more information on setting up your printer please take -a look at the hplip section of the gentoo printing guide: -https://wiki.gentoo.org/wiki/Printing -" - -pkg_setup() { - python-single-r1_pkg_setup - - use scanner && ! use X && ewarn "You need USE=X for the scanner GUI." - - use parport && linux-info_pkg_setup - - if use minimal ; then - ewarn "Installing driver portions only, make sure you know what you are doing." - ewarn "Depending on the USE flags set for hpcups or hpijs the appropiate driver" - ewarn "is installed. If both USE flags are set hpijs overrides hpcups." - ewarn "This also disables fax, network, scanner and gui support!" - fi - - if ! use hpcups && ! use hpijs ; then - ewarn "Installing neither hpcups (USE=-hpcups) nor hpijs (USE=-hpijs) driver," - ewarn "which is probably not what you want." - ewarn "You will almost certainly not be able to print." - fi -} - -src_prepare() { - default - - python_fix_shebang . - - # Make desktop files follow the specification - # Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=443680 - # Upstream bug: https://bugs.launchpad.net/hplip/+bug/1080324 - sed -i -e '/^Categories=/s/Application;//' \ - -e '/^Encoding=.*/d' hplip.desktop.in || die - sed -i -e '/^Categories=/s/Application;//' \ - -e '/^Version=.*/d' \ - -e '/^Comment=.*/d' hplip-systray.desktop.in || die - - # Fix for Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=345725 - # Upstream bug: https://bugs.launchpad.net/hplip/+bug/880847, - # https://bugs.launchpad.net/hplip/+bug/500086 - local udevdir=$(get_udevdir) - sed -i -e "s|/etc/udev|${udevdir}|g" \ - $(find . -type f -exec grep -l /etc/udev {} +) || die - - # Force recognition of Gentoo distro by hp-check - sed -i \ - -e "s:file('/etc/issue', 'r').read():'Gentoo':" \ - installer/core_install.py || die - - eautoreconf -} - -src_configure() { - local drv_build minimal_build - - if use hpcups ; then - drv_build="$(use_enable hpcups hpcups-install)" - if use static-ppds ; then - drv_build="${drv_build} --enable-cups-ppd-install" - drv_build="${drv_build} --disable-cups-drv-install" - else - drv_build="${drv_build} --enable-cups-drv-install" - drv_build="${drv_build} --disable-cups-ppd-install" - fi - else - drv_build="--disable-hpcups-install" - drv_build="${drv_build} --disable-cups-drv-install" - drv_build="${drv_build} --disable-cups-ppd-install" - fi - - if use hpijs ; then - drv_build="${drv_build} $(use_enable hpijs hpijs-install)" - if use static-ppds ; then - drv_build="${drv_build} --enable-foomatic-ppd-install" - drv_build="${drv_build} --disable-foomatic-drv-install" - else - drv_build="${drv_build} --enable-foomatic-drv-install" - drv_build="${drv_build} --disable-foomatic-ppd-install" - fi - else - drv_build="${drv_build} --disable-hpijs-install" - drv_build="${drv_build} --disable-foomatic-drv-install" - drv_build="${drv_build} --disable-foomatic-ppd-install" - fi - - if use minimal ; then - if use hpijs ; then - minimal_build="--enable-hpijs-only-build" - else - minimal_build="--disable-hpijs-only-build" - fi - if use hpcups ; then - minimal_build="${minimal_build} --enable-hpcups-only-build" - else - minimal_build="${minimal_build} --disable-hpcups-only-build" - fi - minimal_build="${minimal_build} --disable-fax-build" - minimal_build="${minimal_build} --disable-network-build" - minimal_build="${minimal_build} --disable-scan-build" - minimal_build="${minimal_build} --disable-gui-build" - else - if use fax ; then - minimal_build="${minimal_build} --enable-fax-build" - else - minimal_build="${minimal_build} --disable-fax-build" - fi - if use snmp ; then - minimal_build="${minimal_build} --enable-network-build" - else - minimal_build="${minimal_build} --disable-network-build" - fi - if use scanner ; then - minimal_build="${minimal_build} --enable-scan-build" - else - minimal_build="${minimal_build} --disable-scan-build" - fi - if use qt5 ; then - minimal_build="${minimal_build} --enable-qt5" - minimal_build="${minimal_build} --enable-gui-build" - else - minimal_build="${minimal_build} --disable-gui-build" - minimal_build="${minimal_build} --disable-qt5" - fi - fi - - # disable class driver for now - econf \ - --disable-class-driver \ - --disable-cups11-build \ - --disable-foomatic-rip-hplip-install \ - --disable-imageProcessor-build \ - --disable-lite-build \ - --disable-shadow-build \ - --disable-qt3 \ - --disable-qt4 \ - --disable-udev_sysfs_rules \ - --with-cupsbackenddir=$(cups-config --serverbin)/backend \ - --with-cupsfilterdir=$(cups-config --serverbin)/filter \ - --with-docdir=/usr/share/doc/${PF} \ - --with-htmldir=/usr/share/doc/${PF}/html \ - --enable-hpps-install \ - --enable-dbus-build \ - ${drv_build} \ - ${minimal_build} \ - $(use_enable doc doc-build) \ - $(use_enable libusb0 libusb01_build) \ - $(use_enable parport pp-build) \ - $(use_enable policykit) - - # hpijs ppds are created at configure time but are not installed (3.17.11) - - # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip - # The hpcups driver does not use foomatic-rip - #local i - #for i in ppd/hpijs/*.ppd.gz ; do - # rm -f ${i}.temp || die - # gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \ - # gzip > ${i}.temp || die - # mv ${i}.temp ${i} || die - #done -} - -src_install() { - # Disable parallel install - # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=578018 - emake -j1 DESTDIR="${D}" install - einstalldocs - # default - - # Installed by sane-backends - # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=201023 - rm -f "${ED}"/etc/sane.d/dll.conf || die - - # Remove desktop and autostart files - # Gentoo Bug: https://bugs.gentoo.org/show_bug.cgi?id=638770 - use qt5 || { - rm -Rf "${ED}"/usr/share/applications "${ED}"/etc/xdg - } - - rm -f "${ED}"/usr/share/doc/${PF}/{copyright,README_LIBJPG,COPYING} || die - rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/doc/${PF}/ || die - - # Remove hal fdi files - rm -rf "${ED}"/usr/share/hal || die - - find "${D}" -name '*.la' -delete || die - - python_optimize "${ED}"/usr/share/hplip - - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/net-print/hplip/hplip-3.21.4.ebuild b/net-print/hplip/hplip-3.23.12-r1.ebuild index e3f7c820026e..24eb1e8fa894 100644 --- a/net-print/hplip/hplip-3.21.4.ebuild +++ b/net-print/hplip/hplip-3.23.12-r1.ebuild @@ -1,42 +1,39 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{8,9} ) -PYTHON_REQ_USE="threads(+),xml" +PYTHON_COMPAT=( python3_{10,11} ) +PYTHON_REQ_USE="threads(+),xml(+)" -# 14 and 15 spit out a lot of warnings about subdirs -WANT_AUTOMAKE="1.13" - -inherit autotools linux-info python-single-r1 readme.gentoo-r1 udev +inherit autotools flag-o-matic linux-info python-single-r1 readme.gentoo-r1 udev DESCRIPTION="HP Linux Imaging and Printing - Print, scan, fax drivers and service tools" HOMEPAGE="https://developers.hp.com/hp-linux-imaging-and-printing" -SRC_URI="mirror://sourceforge/hplip/${P}.tar.gz - https://dev.gentoo.org/~billie/distfiles/${PN}-3.21.4-patches-1.tar.xz" +SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${PV}/${P}.tar.gz + https://dev.gentoo.org/~billie/distfiles/${PN}-3.23.12-patches-1.tar.xz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +KEYWORDS="amd64 arm arm64 ppc ppc64 x86" IUSE="doc fax +hpcups hpijs kde libnotify libusb0 minimal parport policykit qt5 scanner +snmp static-ppds X" COMMON_DEPEND=" net-print/cups - sys-apps/dbus - virtual/jpeg:0 + media-libs/libjpeg-turbo:0 hpijs? ( net-print/cups-filters[foomatic] ) !libusb0? ( virtual/libusb:1 ) libusb0? ( virtual/libusb:0 ) ${PYTHON_DEPS} !minimal? ( + sys-apps/dbus scanner? ( media-gfx/sane-backends ) snmp? ( dev-libs/openssl:0= - net-analyzer/net-snmp:= + net-analyzer/net-snmp:=[${PYTHON_SINGLE_USEDEP}] net-dns/avahi[dbus,python,${PYTHON_SINGLE_USEDEP}] ) ) @@ -144,6 +141,11 @@ src_prepare() { } src_configure() { + # -Werror=lto-type-mismatch + # https://bugs.gentoo.org/861851 + # https://bugs.launchpad.net/hplip/+bug/2055371 + filter-lto + local drv_build minimal_build if use hpcups ; then @@ -187,11 +189,13 @@ src_configure() { else minimal_build="${minimal_build} --disable-hpcups-only-build" fi + minimal_build="${minimal_build} --disable-dbus-build" minimal_build="${minimal_build} --disable-fax-build" minimal_build="${minimal_build} --disable-network-build" minimal_build="${minimal_build} --disable-scan-build" minimal_build="${minimal_build} --disable-gui-build" else + minimal_build="${minimal_build} --enable-dbus-build" if use fax ; then minimal_build="${minimal_build} --enable-fax-build" else @@ -232,7 +236,6 @@ src_configure() { --with-docdir=/usr/share/doc/${PF} \ --with-htmldir=/usr/share/doc/${PF}/html \ --enable-hpps-install \ - --enable-dbus-build \ ${drv_build} \ ${minimal_build} \ $(use_enable doc doc-build) \ @@ -284,5 +287,10 @@ src_install() { } pkg_postinst() { + udev_reload readme.gentoo_print_elog } + +pkg_postrm() { + udev_reload +} diff --git a/net-print/hplip/metadata.xml b/net-print/hplip/metadata.xml index 26f82b7f1847..e50e7c0a00ef 100644 --- a/net-print/hplip/metadata.xml +++ b/net-print/hplip/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>billie@gentoo.org</email> @@ -14,7 +14,6 @@ <flag name="hpcups">Build the hpcups driver for cups (by HP)</flag> <flag name="hpijs">Build the IJS driver for cups (Foomatic)</flag> <flag name="kde">Enables <pkg>kde-misc/skanlite</pkg> as scanner GUI with USE="scanner X"</flag> - <flag name="libnotify">Enables desktop notifications</flag> <flag name="libusb0">Depend on <pkg>virtual/libusb</pkg> SLOT 0. Some old printers do not work with <pkg>virtual/libusb</pkg> SLOT 1.</flag> <flag name="minimal">Only build internal hpijs/hpcups driver (not recommended at all, make sure you know what you are doing)</flag> <flag name="parport">Enable parallel port for devices which require it</flag> diff --git a/net-print/ink/Manifest b/net-print/ink/Manifest index 317ef636ecf2..7221b969191e 100644 --- a/net-print/ink/Manifest +++ b/net-print/ink/Manifest @@ -1,2 +1 @@ -DIST ink-0.5.1.tar.gz 105174 BLAKE2B dc5807ee0f87e8e48e283e86d7d9ea9fe74b407591448eb66d45871185c2439fb97c81ef8c6ab0d10d871f28c49bd0d3a55b981d126314af829420ecacec7bb2 SHA512 12a21279ca4f390c5748b8ab1c62770c82decec1f9bfa3e6c13d7a269a7cb28fb96f92506c532f52fb4e3f1b72012e2c2a08e654a91edb1c73d1f7b778dc5848 -DIST ink-0.5.2.tar.gz 120024 BLAKE2B f90038992759c484bcf12f949feebd92d202e4e392873ac579733032964a928556fe0d380b814cf5f9519d7e9be964964e1b60b1913b083dd9573e5636351875 SHA512 3e04646141b4c3267cf6e29b28b84b2a879a8edbe3356e469b8195b8fb97787144d167ec2bab41b3365c3171638a31dd566cb690725711d942528e2b4c6d4195 +DIST ink-0.5.3.tar.gz 111791 BLAKE2B 15269a5ea267434f529256aeb144950111ffdaf9d9e182b62f5e1b0b3e6340495a2fdf22ffa6578a1960259a5f1a9097f27ca09ea6ecb1fb1f702aa15b7b2b5b SHA512 a05a3647d0fcae652f1b339006d22b7324e42615ed63fed47269dad409d0a6bd7640b9ec9fb6871d7ff0027af2577b64af98cbb8d9e38810e3b26490a5c0a2a1 diff --git a/net-print/ink/ink-0.5.2.ebuild b/net-print/ink/ink-0.5.2.ebuild deleted file mode 100644 index c74f9fc83d85..000000000000 --- a/net-print/ink/ink-0.5.2.ebuild +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -DESCRIPTION="A command line utility to display the ink level of your printer" -SRC_URI="mirror://sourceforge/ink/${P/_}.tar.gz" -HOMEPAGE="http://ink.sourceforge.net/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND=">net-print/libinklevel-0.8" -RDEPEND="${DEPEND}" - -src_configure() { - # always use /bin/bash as configure shell, bug #526548 - CONFIG_SHELL=/bin/bash default -} diff --git a/net-print/ink/ink-0.5.1.ebuild b/net-print/ink/ink-0.5.3.ebuild index f0776c35f68c..766b299210e4 100644 --- a/net-print/ink/ink-0.5.1.ebuild +++ b/net-print/ink/ink-0.5.3.ebuild @@ -1,21 +1,15 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=8 DESCRIPTION="A command line utility to display the ink level of your printer" -SRC_URI="mirror://sourceforge/ink/${P/_}.tar.gz" +SRC_URI="https://downloads.sourceforge.net/ink/${P/_}.tar.gz" HOMEPAGE="http://ink.sourceforge.net/" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 x86" -IUSE="" -DEPEND=">net-print/libinklevel-0.8" +DEPEND="net-print/libinklevel" RDEPEND="${DEPEND}" - -src_configure() { - # always use /bin/bash as configure shell, bug #526548 - CONFIG_SHELL=/bin/bash default -} diff --git a/net-print/ink/metadata.xml b/net-print/ink/metadata.xml index 4784540fe957..f07b456ea944 100644 --- a/net-print/ink/metadata.xml +++ b/net-print/ink/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/kyocera-1x2x-mfp-driver/metadata.xml b/net-print/kyocera-1x2x-mfp-driver/metadata.xml index c6edde204c36..37e15e9dd378 100644 --- a/net-print/kyocera-1x2x-mfp-driver/metadata.xml +++ b/net-print/kyocera-1x2x-mfp-driver/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person" proxied="yes"> <email>firegurafiku@gmail.com</email> diff --git a/net-print/kyocera-mita-ppds/Manifest b/net-print/kyocera-mita-ppds/Manifest deleted file mode 100644 index 729255f532dd..000000000000 --- a/net-print/kyocera-mita-ppds/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST Linux_PPDs_KSL8_4.zip 6468249 BLAKE2B fdfa3a2ee119cd0cc0acb75b9b7dcb67f45605ff0e5dfc6011f46310298d7807d226887e54f81969b979551577e1acbc65f99c9d45dd66b0fe1f94b4d9ac05a9 SHA512 4e98f9972f6158262878b4fe811165ab05de8582d608c60400568a1eaaa1721fbe13394ad6e9aa93e21ed2ff30265856b64ecd1f3ae69ba49c7f9d88a7911833 diff --git a/net-print/kyocera-mita-ppds/kyocera-mita-ppds-8.4-r1.ebuild b/net-print/kyocera-mita-ppds/kyocera-mita-ppds-8.4-r1.ebuild deleted file mode 100644 index 739a186c508c..000000000000 --- a/net-print/kyocera-mita-ppds/kyocera-mita-ppds-8.4-r1.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="PPD description files for (some) Kyocera Mita Printers" -HOMEPAGE="http://www.kyoceramita.it/" -SRC_URI="Linux_PPDs_KSL${PV/\./_}.zip" - -LICENSE="kyocera-mita-ppds" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="l10n_de +l10n_en l10n_es l10n_fr l10n_it l10n_pt" -REQUIRED_USE="|| ( l10n_de l10n_en l10n_es l10n_fr l10n_it l10n_pt )" -RESTRICT="fetch bindist" - -RDEPEND="net-print/cups" -DEPEND="app-arch/unzip" - -S="${WORKDIR}/PPD's_KSL_${PV}" - -pkg_nofetch() { - einfo "Please download ${A} from the following URL:" - einfo "http://www.kyoceramita.it/index/Service_Departement__/Richiesta_di_Supporto_Tecnico/download_center.false.driver.FS1020D._.IT.html" - einfo "" - einfo "The FS-1020D driver from the Italian website provides PPDs for a" - einfo "number of printers in six languages." -} - -src_install() { - insinto /usr/share/cups/model/KyoceraMita - - inslanguage() { - if use l10n_$1; then - doins $2/*.ppd - fi - } - - inslanguage en English - inslanguage fr French - inslanguage de German - inslanguage it Italian - inslanguage pt Portuguese - inslanguage es Spanish - - docinto html - dodoc ReadMe.htm -} diff --git a/net-print/kyocera-mita-ppds/metadata.xml b/net-print/kyocera-mita-ppds/metadata.xml deleted file mode 100644 index 6f49eba8f496..000000000000 --- a/net-print/kyocera-mita-ppds/metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<!-- maintainer-needed --> -</pkgmetadata> diff --git a/net-print/lexmark-upd-ppd/Manifest b/net-print/lexmark-upd-ppd/Manifest new file mode 100644 index 000000000000..de02228146c9 --- /dev/null +++ b/net-print/lexmark-upd-ppd/Manifest @@ -0,0 +1 @@ +DIST lexmark-upd-ppd-1.0.0.20220702.tar.Z 4556832 BLAKE2B 6372a1d08c33397e8926564c831d4960b50849cf3dad7ac57610377e628f5099ae397567449a5ddaf61639b6fbccaa461e90192ef8a7eb5ec170b1fce82656e8 SHA512 10e4f6e719b13df49d70282fe4e3e0b4c6dd6402921d4fa6192768a014c22f704777ed41c4c18cffc32c348542130ca0e05f4a4052ebd5c66256853ea38e8afd diff --git a/net-print/lexmark-upd-ppd/lexmark-upd-ppd-1.0.0.20220702.ebuild b/net-print/lexmark-upd-ppd/lexmark-upd-ppd-1.0.0.20220702.ebuild new file mode 100644 index 000000000000..41b1efe01e00 --- /dev/null +++ b/net-print/lexmark-upd-ppd/lexmark-upd-ppd-1.0.0.20220702.ebuild @@ -0,0 +1,45 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Lexmark universal printer driver PPDs" +HOMEPAGE="https://www.lexmark.com/en_us/support/universal-print-driver.html" +SRC_URI="https://downloads.lexmark.com/downloads/drivers/Lexmark-UPD-PPD-Files.tar.Z -> ${P}.tar.Z" +RESTRICT="mirror" + +LICENSE="Lexmark-EU2-0111" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="" +RDEPEND=" + >=net-print/cups-1.4 + net-dns/avahi +" +BDEPEND="" + +# TODO: add IUSE for foomatic and install those files too + +S="${WORKDIR}"/ppd_files + +QA_FLAGS_IGNORED="usr/libexec/cups/filter/LexCommandFileFilterG2" + +src_prepare() { + default + sed -i 's:/usr/lib/cups/filter/:/usr/libexec/cups/filter/:g' GlobalPPD_1.4/Lexmark_UPD_Series.ppd || die "Unable to patch hard coded PPD paths" +} + +src_install() { + local filterdir + if use amd64; then filterdir="lib64"; + elif use x86; then filterdir="lib"; + else die "No filter for architecture"; fi + + insinto /usr/share/cups/model + exeinto /usr/libexec/cups/filter + + doins "${S}"/GlobalPPD_1.4/Lexmark_UPD_Series.ppd + doexe "${S}"/GlobalPPD_1.4/$filterdir/LexCommandFileFilterG2 + doexe "${S}"/GlobalPPD_1.4/LexFaxPnHFilter +} diff --git a/net-print/lexmark-upd-ppd/metadata.xml b/net-print/lexmark-upd-ppd/metadata.xml new file mode 100644 index 000000000000..78a9d6b02d0f --- /dev/null +++ b/net-print/lexmark-upd-ppd/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> +<email>zx2c4@gentoo.org</email> +<name>Jason A. Donenfeld</name> +</maintainer> +</pkgmetadata> diff --git a/net-print/libcupsfilters/Manifest b/net-print/libcupsfilters/Manifest new file mode 100644 index 000000000000..9145aecf6f6d --- /dev/null +++ b/net-print/libcupsfilters/Manifest @@ -0,0 +1 @@ +DIST libcupsfilters-2.0.0.tar.xz 1279856 BLAKE2B ce9d839bb700017c303c1301c7a97fd02e3657a908e685377be49557d995574a7fc5a31d4fcbda5eeb9ba2d3cd07858224540dbf0bc9fa078cfd25a58ee15a41 SHA512 279bff6dcfa76312b10dae97480914345defd90eab79c4716d4553870f73e0f9db404786fd7e2948a86ae5aedb10dca0c2984ccb4222acbd4e835cd572030d6a diff --git a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-color-space.patch b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-color-space.patch new file mode 100644 index 000000000000..37a8bce64d7b --- /dev/null +++ b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-color-space.patch @@ -0,0 +1,254 @@ +https://bugs.gentoo.org/927137 +https://github.com/OpenPrinting/cups-filters/issues/578 +https://github.com/OpenPrinting/libcupsfilters/commit/c6175a2f3f66dbf76bb35ec8d1ba0dc094c9dbac + +From c6175a2f3f66dbf76bb35ec8d1ba0dc094c9dbac Mon Sep 17 00:00:00 2001 +From: Till Kamppeter <till.kamppeter@gmail.com> +Date: Wed, 29 Nov 2023 00:25:16 +0100 +Subject: [PATCH] raster_base_header(): Several fixes on color space selection + +Fixes #38 + +The internal (static) funcrion raster_base_header() creates a CUPS or +PWG Raster header from scratch, without using data of a PPD file by +means of Raster header derived from the PPD. It solely uses IPP +attributes or command line options. + +It distinguishes between CUPS Raster and PWG/Apple Raster headers. + +There were several bugs in selecting the correct color space and depth +settings: + +- For PWG-Raster all attributes and options got ignored and standard + 8-bit sRGB set. + +- Without any valid color space/depth setting attribute or "auto" + always standard 8-bit sRGB got set as the default, regardless + whether the printer is actually a color printer. + +- Color spaces for printing in color could be set on monochrome + printers by options or atrributes. + +- Color spaces not valid on PWG Raster could be set on PWG Raster. + +- DeviceN modes could only be set by specifying a depth, like + "Device4_8" not just "Device4". + +Now we use 8-bit SGray as default for monochrome printers and 8-bit +RGB for color printers. We use the printer IPP attribute +"color-supported" to check whether the printer is color. + +IPP ttributes or command line options setting a color mode on a +monochrome printer are ignored now, also, if the output format is PWG +Raster, setting a color space not supported by PWG Raster is ignored. + +Now for monochrome AirPrint (Apple Raster) printers, the Raster data +sent should be actually monochrome (grayscale) and not color. +--- + cupsfilters/raster.c | 103 +++++++++++++++++++++++++------------------ + 1 file changed, 61 insertions(+), 42 deletions(-) + +diff --git a/cupsfilters/raster.c b/cupsfilters/raster.c +index 32a8b807..5e10f3bb 100644 +--- a/cupsfilters/raster.c ++++ b/cupsfilters/raster.c +@@ -792,7 +792,7 @@ cfRasterSetColorSpace(cups_page_header_t *h, // I - Raster header + + + static int // O - -1 on error, 0 on success +-raster_base_header(cups_page_header2_t *h, // O - Raster header ++raster_base_header(cups_page_header2_t *h, // O - Raster header + cf_filter_data_t *data, // I - Filter data + int pwg_raster) // I - 1 if PWG/Apple Raster + { +@@ -1420,41 +1420,46 @@ raster_base_header(cups_page_header_t *h, // O - Raster header + // TODO - Support for MediaType number + h->cupsMediaType = 0; + +- // Only for CUPS Raster, if we do not have a sample header from a PPD file +- if (pwg_raster == 0 && +- ((val = cupsGetOption("pwg-raster-document-type", num_options, +- options)) != NULL || +- (val = cupsGetOption("PwgRasterDocumentType", num_options, +- options)) != NULL || +- (val = cupsGetOption("color-space", num_options, options)) != NULL || +- (val = cupsGetOption("ColorSpace", num_options, options)) != NULL || +- (val = cupsGetOption("color-model", num_options, options)) != NULL || +- (val = cupsGetOption("ColorModel", num_options, options)) != NULL || +- (val = cupsGetOption("print-color-mode", num_options, options)) != +- NULL || +- (val = cupsGetOption("output-mode", num_options, options)) != NULL || +- (val = cupsGetOption("OutputMode", num_options, options)) != NULL || +- (val = cfIPPAttrEnumValForPrinter(data->printer_attrs, +- data->job_attrs, +- "print-color-mode")) != NULL)) ++ ++ // Do we have a color printer? ++ bool is_color = ++ ((attr = ippFindAttribute(data->printer_attrs, "color-supported", ++ IPP_TAG_BOOLEAN)) != NULL && ++ ippGetBoolean(attr, 0)); ++ ++ // Color modes ++ int numcolors = 0; // Number of colorants ++ if ((val = cupsGetOption("pwg-raster-document-type", num_options, ++ options)) != NULL || ++ (val = cupsGetOption("PwgRasterDocumentType", num_options, ++ options)) != NULL || ++ (val = cupsGetOption("color-space", num_options, options)) != NULL || ++ (val = cupsGetOption("ColorSpace", num_options, options)) != NULL || ++ (val = cupsGetOption("color-model", num_options, options)) != NULL || ++ (val = cupsGetOption("ColorModel", num_options, options)) != NULL || ++ (val = cupsGetOption("print-color-mode", num_options, options)) != ++ NULL || ++ (val = cupsGetOption("output-mode", num_options, options)) != NULL || ++ (val = cupsGetOption("OutputMode", num_options, options)) != NULL || ++ (val = cfIPPAttrEnumValForPrinter(data->printer_attrs, ++ data->job_attrs, ++ "print-color-mode")) != NULL) + { + int bitspercolor, // Bits per color + bitsperpixel, // Bits per pixel +- colorspace, // CUPS/PWG raster color space +- numcolors; // Number of colorants ++ colorspace; // CUPS/PWG raster color space; + const char *ptr; // Pointer into value + + ptr = NULL; +- numcolors = 0; + bitspercolor = 8; +- if (!strncasecmp(val, "AdobeRgb", 8)) ++ if (is_color && !strncasecmp(val, "AdobeRgb", 8)) + { + if (*(val + 8) == '_' || *(val + 8) == '-') + ptr = val + 9; + colorspace = 20; + numcolors = 3; + } +- else if (!strncasecmp(val, "adobe-rgb", 9)) ++ else if (is_color && !strncasecmp(val, "adobe-rgb", 9)) + { + if (*(val + 9) == '_' || *(val + 9) == '-') + ptr = val + 10; +@@ -1500,19 +1505,19 @@ raster_base_header(cups_page_header_t *h, // O - Raster header + colorspace = 18; + numcolors = 1; + } +- else if (!strcasecmp(val, "color")) ++ else if (is_color && !strcasecmp(val, "color")) + { + colorspace = 19; + numcolors = 3; + } +- else if (!strncasecmp(val, "Cmyk", 4)) ++ else if (is_color && !strncasecmp(val, "Cmyk", 4)) + { + if (*(val + 4) == '_' || *(val + 4) == '-') + ptr = val + 5; + colorspace = 6; + numcolors = 4; + } +- else if (!strncasecmp(val, "Cmy", 3)) ++ else if (!pwg_raster && is_color && !strncasecmp(val, "Cmy", 3)) + { + if (*(val + 3) == '_' || *(val + 3) == '-') + ptr = val + 4; +@@ -1524,10 +1529,9 @@ raster_base_header(cups_page_header_t *h, // O - Raster header + ptr = val + 6; + numcolors = strtol(ptr, (char **)&ptr, 10); + if (*ptr == '_' || *ptr == '-') +- { + ptr ++; ++ if (numcolors > 0 && numcolors < 16) + colorspace = 47 + numcolors; +- } + else + { + numcolors = 0; +@@ -1548,21 +1552,21 @@ raster_base_header(cups_page_header_t *h, // O - Raster header + colorspace = 18; + numcolors = 1; + } +- else if (!strncasecmp(val, "Srgb", 4)) ++ else if (is_color && !strncasecmp(val, "Srgb", 4)) + { + if (*(val + 4) == '_' || *(val + 4) == '-') + ptr = val + 5; + colorspace = 19; + numcolors = 3; + } +- else if (!strncasecmp(val, "Rgbw", 4)) ++ else if (!pwg_raster && is_color && !strncasecmp(val, "Rgbw", 4)) + { + if (*(val + 4) == '_' || *(val + 4) == '-') + ptr = val + 5; + colorspace = 17; + numcolors = 4; + } +- else if (!strncasecmp(val, "Rgb", 3)) ++ else if (is_color && !strncasecmp(val, "Rgb", 3)) + { + if (*(val + 3) == '_' || *(val + 3) == '-') + ptr = val + 4; +@@ -1572,12 +1576,22 @@ raster_base_header(cups_page_header_t *h, // O - Raster header + else if (!strcasecmp(val, "auto")) + { + // Let "auto" not look like an error +- colorspace = 19; +- numcolors = 3; ++ if (is_color) ++ { ++ colorspace = 19; ++ numcolors = 3; ++ } ++ else ++ { ++ colorspace = 18; ++ numcolors = 1; ++ } + } ++ ++ // Color mode found + if (numcolors > 0) + { +- if (ptr) ++ if (ptr && *ptr) + bitspercolor = strtol(ptr, (char **)&ptr, 10); + bitsperpixel = bitspercolor * numcolors; + // In 1-bit-per-color RGB modes we add a forth bit to each pixel +@@ -1590,20 +1604,25 @@ raster_base_header(cups_page_header_t *h, // O - Raster header + h->cupsColorSpace = colorspace; + h->cupsNumColors = numcolors; + } +- else ++ } ++ ++ // No color mode found ++ if (numcolors == 0) ++ { ++ if (is_color) + { + h->cupsBitsPerColor = 8; + h->cupsBitsPerPixel = 24; + h->cupsColorSpace = 19; + h->cupsNumColors = 3; + } +- } +- else +- { +- h->cupsBitsPerColor = 8; +- h->cupsBitsPerPixel = 24; +- h->cupsColorSpace = 19; +- h->cupsNumColors = 3; ++ else ++ { ++ h->cupsBitsPerColor = 8; ++ h->cupsBitsPerPixel = 8; ++ h->cupsColorSpace = 18; ++ h->cupsNumColors = 1; ++ } + } + + // TODO - Support for color orders 1 (banded) and 2 (planar) + + diff --git a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-r3-c++17.patch b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-r3-c++17.patch new file mode 100644 index 000000000000..be74a216d22a --- /dev/null +++ b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-r3-c++17.patch @@ -0,0 +1,17 @@ +https://bugs.gentoo.org/923959 +https://github.com/OpenPrinting/libcupsfilters/issues/35 +https://github.com/OpenPrinting/libcupsfilters/commit/668d7dac277c1d44732fc25e5491c79ff82e597d +--- a/cupsfilters/pdftoraster.cxx ++++ b/cupsfilters/pdftoraster.cxx +@@ -2198,7 +2198,11 @@ + // For compatibility with g++ >= 4.7 compilers _GLIBCXX_THROW + // should be used as a guard, otherwise use traditional definition + #ifndef _GLIBCXX_THROW ++#if __cplusplus < 201703L + #define _GLIBCXX_THROW throw ++#else ++#define _GLIBCXX_THROW(...) noexcept(false) ++#endif + #endif + + void * operator new(size_t size) _GLIBCXX_THROW (std::bad_alloc) diff --git a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-build-fix.patch b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-build-fix.patch new file mode 100644 index 000000000000..c274b8473c47 --- /dev/null +++ b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-build-fix.patch @@ -0,0 +1,28 @@ +https://bugs.gentoo.org/927137 +https://github.com/OpenPrinting/cups-filters/issues/578 +https://github.com/OpenPrinting/libcupsfilters/commit/107091186dce1c0cb2f042f8b880f571089acaf1 + +From 107091186dce1c0cb2f042f8b880f571089acaf1 Mon Sep 17 00:00:00 2001 +From: zdohnal <zdohnal@redhat.com> +Date: Wed, 29 Nov 2023 13:30:48 +0100 +Subject: [PATCH] raster.c: Fix build after last fix (#40) + +Add header file `stdbool`, since we started to use `bool` in +`raster_base_header()`. +--- + cupsfilters/raster.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cupsfilters/raster.c b/cupsfilters/raster.c +index 5e10f3bb..e9a8ad1f 100644 +--- a/cupsfilters/raster.c ++++ b/cupsfilters/raster.c +@@ -29,6 +29,7 @@ + #include <cupsfilters/ipp.h> + #include <cupsfilters/libcups2-private.h> + #include <cups/pwg.h> ++#include <stdbool.h> + + // + // Local functions + diff --git a/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-gray.patch b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-gray.patch new file mode 100644 index 000000000000..e1648c041e97 --- /dev/null +++ b/net-print/libcupsfilters/files/libcupsfilters-2.0.0-raster-gray.patch @@ -0,0 +1,50 @@ +https://bugs.gentoo.org/927137 +https://github.com/OpenPrinting/cups-filters/issues/578 +https://github.com/OpenPrinting/libcupsfilters/commit/78cc6758d98c31397c8addefaa3dfd8746331b72 + +From 78cc6758d98c31397c8addefaa3dfd8746331b72 Mon Sep 17 00:00:00 2001 +From: zdohnal <zdohnal@redhat.com> +Date: Thu, 7 Mar 2024 18:27:06 +0100 +Subject: [PATCH] raster.c: Always use sRGB/sGray if driver is PWG/URF and + RGB/Gray is requested (#51) + +Some driverless printers (EPSON L3160 in Fedora report) stopped working +after commit c6175a2 if `ColorModel=RGB` is passed as option. A +different CUPS color space is assigned with the fix - CUPS_CSPACE_RGB, +which results in no ICC profile being assigned into Ghostscript command +line. + +Probably we can try other .icc profiles with CUPS_CSPACE_RGB (srgb.icc +does not work with RGB color space), but I tested with reporter that +using sRGB space + srgb.icc works for the printer - so the patch is to +use sRGB if the driver is URF/PWG. + +Same logic applied for grayscale printing, if Gray is requested, sGray is +used for URF/PWG. +--- + cupsfilters/raster.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cupsfilters/raster.c b/cupsfilters/raster.c +index e9a8ad1f..7b62b922 100644 +--- a/cupsfilters/raster.c ++++ b/cupsfilters/raster.c +@@ -1550,7 +1550,7 @@ raster_base_header(cups_page_header_t *h, // O - Raster header + { + if (*(val + 4) == '_' || *(val + 4) == '-') + ptr = val + 5; +- colorspace = 18; ++ colorspace = pwg_raster ? 18 : 3; + numcolors = 1; + } + else if (is_color && !strncasecmp(val, "Srgb", 4)) +@@ -1571,7 +1571,7 @@ raster_base_header(cups_page_header_t *h, // O - Raster header + { + if (*(val + 3) == '_' || *(val + 3) == '-') + ptr = val + 4; +- colorspace = 1; ++ colorspace = pwg_raster ? 19 : 1; + numcolors = 3; + } + else if (!strcasecmp(val, "auto")) + diff --git a/net-print/libcupsfilters/libcupsfilters-2.0.0-r3.ebuild b/net-print/libcupsfilters/libcupsfilters-2.0.0-r3.ebuild new file mode 100644 index 000000000000..6a44a004e2a7 --- /dev/null +++ b/net-print/libcupsfilters/libcupsfilters-2.0.0-r3.ebuild @@ -0,0 +1,75 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit libtool + +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 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86" + +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 ) + postscript? ( app-text/ghostscript-gpl[cups] ) + 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 ) +" + +PATCHES=( + "${FILESDIR}/${P}-r3-c++17.patch" +) + +src_prepare() { + default + + # respect --as-needed + elibtoolize +} + +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 ghostscript) + $(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/libcupsfilters-2.0.0-r4.ebuild b/net-print/libcupsfilters/libcupsfilters-2.0.0-r4.ebuild new file mode 100644 index 000000000000..555c55040cd5 --- /dev/null +++ b/net-print/libcupsfilters/libcupsfilters-2.0.0-r4.ebuild @@ -0,0 +1,77 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit libtool + +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" +KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86" +IUSE="dbus exif jpeg pdf +poppler +postscript png test tiff" +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 ) + postscript? ( app-text/ghostscript-gpl[cups] ) + 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 ) +" + +PATCHES=( + "${FILESDIR}/${P}-r3-c++17.patch" + "${FILESDIR}/${P}-color-space.patch" + "${FILESDIR}/${P}-raster-build-fix.patch" + "${FILESDIR}/${P}-raster-gray.patch" +) + +src_prepare() { + default + + # respect --as-needed + elibtoolize +} + +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 ghostscript) + $(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/libgnomecups/Manifest b/net-print/libgnomecups/Manifest deleted file mode 100644 index f3db6f28413f..000000000000 --- a/net-print/libgnomecups/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST libgnomecups-0.2.3.tar.bz2 357129 BLAKE2B 8a8babf0af7a83232590c5e756c4e1c2ce329dae59b88ee5be84c0286a6ed6d6c39f891b7ab0bb68bfc29539769cdd82032422c44a6131c4da9c9355669b1a57 SHA512 7276dfc92209c8503d8a59ceb192273e41bc13cc5f3515dcc00444deca4b9de6a29d0ec4c89811398e03971fa3f5ccbb85ca477da6c5f2bc26f2fb70dccb6a75 diff --git a/net-print/libgnomecups/files/enablenet.patch b/net-print/libgnomecups/files/enablenet.patch deleted file mode 100644 index f2e113d1440f..000000000000 --- a/net-print/libgnomecups/files/enablenet.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libgnomecups/gnome-cups-printer.c.orig 2005-08-04 18:21:32.221038336 +0000 -+++ libgnomecups/gnome-cups-printer.c 2005-08-04 18:22:00.369759080 +0000 -@@ -282,7 +282,7 @@ - * that will produce an infinite loop when presented with an invalid - * hostname. This will also produce a hang if the remote printer is - * unavailable and we do a syncronous lookup. */ --static gboolean go_directly_to_printer_when_possible = FALSE; -+static gboolean go_directly_to_printer_when_possible = TRUE; - - static void - update_attributes (GnomeCupsPrinter *printer) diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-1.6.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-1.6.patch deleted file mode 100644 index 68f379c25109..000000000000 --- a/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-1.6.patch +++ /dev/null @@ -1,285 +0,0 @@ -From ae783efde4fa69578651994505462f02b8639220 Mon Sep 17 00:00:00 2001 -From: Alexandre Rostovtsev <tetromino@gentoo.org> -Date: Tue, 7 Aug 2012 06:53:09 -0400 -Subject: [PATCH] Use CUPS-1.6 IPP API getter/setter functions - -CUPS 1.6 makes various structures private and introduces these ippGet -and ippSet functions for all of the fields in these structures. -http://www.cups.org/str.php?L3928 - -We define our own accessors when building against CUPS < 1.6. - -Based on work by Jiri Popelka <jpopelka@redhat.com> at -https://bugzilla.gnome.org/show_bug.cgi?id=679759 ---- - libgnomecups/gnome-cups-printer.c | 48 +++++++++++++++++++++++++++++------- - libgnomecups/gnome-cups-queue.c | 43 +++++++++++++++++++++++++++------ - libgnomecups/gnome-cups-request.c | 44 ++++++++++++++++++++++++++++----- - 3 files changed, 110 insertions(+), 25 deletions(-) - -diff --git a/libgnomecups/gnome-cups-printer.c b/libgnomecups/gnome-cups-printer.c -index c924af0..f5e1ef7 100644 ---- a/libgnomecups/gnome-cups-printer.c -+++ b/libgnomecups/gnome-cups-printer.c -@@ -37,6 +37,34 @@ - - #define UPDATE_TIMEOUT 5000 - -+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) -+#define HAVE_CUPS_1_6 1 -+#endif -+ -+#ifndef HAVE_CUPS_1_6 -+#define ippGetCount(attr) attr->num_values -+#define ippGetName(attr) attr->name -+#define ippGetInteger(attr, element) attr->values[element].integer -+#define ippGetString(attr, element, language) attr->values[element].string.text -+ -+static ipp_attribute_t * -+ippFirstAttribute(ipp_t *ipp) -+{ -+ if (!ipp) -+ return (NULL); -+ return (ipp->current = ipp->attrs); -+} -+ -+static ipp_attribute_t * -+ippNextAttribute(ipp_t *ipp) -+{ -+ if (!ipp || !ipp->current) -+ return (NULL); -+ return (ipp->current = ipp->current->next); -+} -+#endif -+ -+ - struct _GnomeCupsPPDFile { - char name[1]; - }; -@@ -173,9 +201,9 @@ map_reasons (GnomeCupsPrinter *printer, - printer->details->state_reasons = NULL; - - /* cf. RFC2911 4.4.12 */ -- for (i = 0; i < attr->num_values; i++) { -+ for (i = 0; i < ippGetCount (attr); i++) { - const char *p; -- const char *keyword = attr->values [i].string.text; -+ const char *keyword = ippGetString (attr, i, NULL); - - reason = g_new (GnomeCupsPrinterReason, 1); - -@@ -224,8 +252,8 @@ gnome_cups_printer_get_info (GnomeCupsPrinter *printer) - return printer->details->info; - } - --#define MAP_INT(v,a) {if (!g_ascii_strcasecmp (attr->name, (a))) { if ((v) != attr->values[0].integer) { changed = TRUE; } (v) = attr->values[0].integer; }} --#define MAP_STRING(v,a) {if (!g_ascii_strcasecmp (attr->name, (a))) { if (!v || strcmp (v, attr->values[0].string.text)) { g_free (v); changed = TRUE; (v) = g_strdup (attr->values[0].string.text); }}} -+#define MAP_INT(v,a) {if (!g_ascii_strcasecmp (ippGetName (attr), (a))) { if ((v) != ippGetInteger (attr, 0)) { changed = TRUE; } (v) = ippGetInteger (attr, 0); }} -+#define MAP_STRING(v,a) {if (!g_ascii_strcasecmp (ippGetName (attr), (a))) { if (!v || strcmp (v, ippGetString (attr, 0, NULL))) { g_free (v); changed = TRUE; (v) = g_strdup (ippGetString (attr, 0, NULL)); }}} - - static void - attributes_update_cb (guint id, -@@ -243,14 +271,14 @@ attributes_update_cb (guint id, - changed = FALSE; - - if (!error && response) { -- for (attr = response->attrs; attr != NULL; attr = attr->next) { -- if (!attr->name) { -+ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) { -+ if (!ippGetName (attr)) { - continue; - } -- if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !strcmp (attr->name, "attributes-charset")) { -+ if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !strcmp (ippGetName (attr), "attributes-charset")) { - continue; - } -- if (!g_ascii_strcasecmp (attr->name, "printer-state-reasons")) { -+ if (!g_ascii_strcasecmp (ippGetName (attr), "printer-state-reasons")) { - map_reasons (printer, attr); - } - MAP_INT (printer->details->state, "printer-state"); -@@ -570,7 +598,7 @@ get_default (void) - - attr = ippFindAttribute (response, "printer-name", IPP_TAG_NAME); - if (attr) { -- name = g_strdup (attr->values[0].string.text); -+ name = g_strdup (ippGetString (attr, 0, NULL)); - } else { - name = NULL; - } -@@ -698,7 +726,7 @@ get_printer_names (void) - attr = ippFindAttribute (response, "printer-name", IPP_TAG_NAME); - while (attr) { - ret = g_list_prepend (ret, -- g_strdup (attr->values[0].string.text)); -+ g_strdup (ippGetString (attr, 0, NULL))); - - attr = ippFindNextAttribute (response, - "printer-name", -diff --git a/libgnomecups/gnome-cups-queue.c b/libgnomecups/gnome-cups-queue.c -index 9f98ed9..298db42 100644 ---- a/libgnomecups/gnome-cups-queue.c -+++ b/libgnomecups/gnome-cups-queue.c -@@ -15,6 +15,33 @@ - - #define UPDATE_TIMEOUT 3000 - -+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) -+#define HAVE_CUPS_1_6 1 -+#endif -+ -+#ifndef HAVE_CUPS_1_6 -+#define ippGetName(attr) attr->name -+#define ippGetInteger(attr, element) attr->values[element].integer -+#define ippGetString(attr, element, language) attr->values[element].string.text -+ -+static ipp_attribute_t * -+ippFirstAttribute(ipp_t *ipp) -+{ -+ if (!ipp) -+ return (NULL); -+ return (ipp->current = ipp->attrs); -+} -+ -+static ipp_attribute_t * -+ippNextAttribute(ipp_t *ipp) -+{ -+ if (!ipp || !ipp->current) -+ return (NULL); -+ return (ipp->current = ipp->current->next); -+} -+#endif -+ -+ - struct _GnomeCupsQueueDetails { - char *queue_name; - GList *jobs; -@@ -199,8 +226,8 @@ finish_job (GnomeCupsJob *job) - job->size = job->size * 1024; - } - --#define MAP_STR(dest, src) { if (!g_ascii_strcasecmp (attr->name, (src))) { if ((dest) != NULL) g_free (dest); (dest) = g_strdup (attr->values[0].string.text);}} --#define MAP_INT(dest, src) { if (!g_ascii_strcasecmp (attr->name, (src))) { (dest) = attr->values[0].integer; } } -+#define MAP_STR(dest, src) { if (!g_ascii_strcasecmp (ippGetName (attr), (src))) { if ((dest) != NULL) g_free (dest); (dest) = g_strdup (ippGetString (attr, 0, NULL));}} -+#define MAP_INT(dest, src) { if (!g_ascii_strcasecmp (ippGetName (attr), (src))) { (dest) = ippGetInteger (attr, 0); } } - - static void - get_jobs_cb (guint id, -@@ -231,8 +258,8 @@ get_jobs_cb (guint id, - - if (response) { - job = g_new0 (GnomeCupsJob, 1); -- for (attr = response->attrs; attr != NULL; attr = attr->next) { -- if (attr->name == NULL) { -+ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) { -+ if (ippGetName (attr) == NULL) { - if (job->name) { - finish_job (job); - jobs = g_list_prepend (jobs, job); -@@ -244,7 +271,7 @@ get_jobs_cb (guint id, - continue; - } - -- if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !g_ascii_strcasecmp (attr->name, "attributes-charset")) { -+ if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !g_ascii_strcasecmp (ippGetName (attr), "attributes-charset")) { - continue; - - } -@@ -355,8 +382,8 @@ gnome_cups_queue_get_job_nocache (GnomeCupsQueue *queue, - - if (response) { - job = g_new0 (GnomeCupsJob, 1); -- for (attr = response->attrs; attr != NULL; attr = attr->next) { -- if (attr->name == NULL) { -+ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) { -+ if (ippGetName (attr) == NULL) { - if (job->name) { - finish_job (job); - } else { -@@ -366,7 +393,7 @@ gnome_cups_queue_get_job_nocache (GnomeCupsQueue *queue, - break; - } - -- if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !g_ascii_strcasecmp (attr->name, "attributes-charset")) { -+ if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !g_ascii_strcasecmp (ippGetName (attr), "attributes-charset")) { - continue; - } - -diff --git a/libgnomecups/gnome-cups-request.c b/libgnomecups/gnome-cups-request.c -index c94f623..13f0948 100644 ---- a/libgnomecups/gnome-cups-request.c -+++ b/libgnomecups/gnome-cups-request.c -@@ -19,6 +19,36 @@ - #define STOP_UNUSED_THREADS_TIMEOUT 60 - #define CLOSE_UNUSED_CONNECTIONS_TIMEOUT 30 - -+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) -+#define HAVE_CUPS_1_6 1 -+#endif -+ -+#ifndef HAVE_CUPS_1_6 -+#define ippGetCount(attr) attr->num_values -+#define ippGetValueTag(attr) attr->value_tag -+#define ippGetName(attr) attr->name -+#define ippGetBoolean(attr, element) attr->values[element].boolean -+#define ippGetInteger(attr, element) attr->values[element].integer -+#define ippGetString(attr, element, language) attr->values[element].string.text -+ -+static ipp_attribute_t * -+ippFirstAttribute(ipp_t *ipp) -+{ -+ if (!ipp) -+ return (NULL); -+ return (ipp->current = ipp->attrs); -+} -+ -+static ipp_attribute_t * -+ippNextAttribute(ipp_t *ipp) -+{ -+ if (!ipp || !ipp->current) -+ return (NULL); -+ return (ipp->current = ipp->current->next); -+} -+#endif -+ -+ - typedef struct - { - GMutex *mutex; -@@ -276,14 +306,14 @@ dump_request (ipp_t const *req) - unsigned i; - ipp_attribute_t *attr; - -- for (attr = req->attrs; attr != NULL; attr = attr->next) { -- g_print ("%s", attr->name); -- for (i = 0 ; i < attr->num_values ; i++) { -+ for (attr = ippFirstAttribute (req); attr != NULL; attr = ippNextAttribute (req)) { -+ g_print ("%s", ippGetName (attr)); -+ for (i = 0 ; i < ippGetCount (attr) ; i++) { - g_print ("\t[%d] = ", i); -- switch (attr->value_tag & ~IPP_TAG_COPY) { -+ switch (ippGetValueTag (attr) & ~IPP_TAG_COPY) { - case IPP_TAG_INTEGER: - case IPP_TAG_ENUM: -- g_print ("%d\n", attr->values[i].integer); -+ g_print ("%d\n", ippGetInteger (attr, i)); - break; - - case IPP_TAG_STRING: -@@ -294,11 +324,11 @@ dump_request (ipp_t const *req) - case IPP_TAG_CHARSET: - case IPP_TAG_LANGUAGE: - case IPP_TAG_MIMETYPE: -- g_print ("'%s'\n", attr->values[i].string.text); -+ g_print ("'%s'\n", ippGetString (attr, i, NULL)); - break; - - case IPP_TAG_BOOLEAN: -- g_print ("%s\n", (int)attr->values[i].boolean ? "true" : "false"); -+ g_print ("%s\n", (int)ippGetBoolean (attr, i) ? "true" : "false"); - break; - - default: --- -1.7.8.6 - diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-config.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-config.patch deleted file mode 100644 index 10eb75d1bc46..000000000000 --- a/net-print/libgnomecups/files/libgnomecups-0.2.3-cups-config.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 8f5e326dd89d98b2d34cf6f97583be4eb819b02b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sun, 29 Jun 2014 10:36:14 +0200 -Subject: [PATCH] Use AC_PATH_TOOL to find cups-config. And actually use the - result. - ---- - configure.in | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/configure.in b/configure.in -index 3f0ccc5..0bd367e 100644 ---- a/configure.in -+++ b/configure.in -@@ -22,13 +22,13 @@ AC_SUBST(GLIB_REQUIRED) - - PKG_CHECK_MODULES(LIBGNOMECUPS, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED) - --AC_PATH_PROG(CUPS_CONFIG, cups-config, no) -+AC_PATH_TOOL(CUPS_CONFIG, cups-config, no) - if test "$CUPS_CONFIG" = "no"; then - AC_MSG_ERROR([Please install cups development packages]) - fi - --CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'` --CUPS_LIBS=`cups-config --libs` -+CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'` -+CUPS_LIBS=`$CUPS_CONFIG --libs` - - AC_SUBST(CUPS_CFLAGS) - AC_SUBST(CUPS_LIBS) --- -2.0.0 - diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-format-string.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-format-string.patch deleted file mode 100644 index 797231416b64..000000000000 --- a/net-print/libgnomecups/files/libgnomecups-0.2.3-format-string.patch +++ /dev/null @@ -1,34 +0,0 @@ -From afe4d5299e6f48ace0fbedbfba8159812afcdd1c Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel <lkundrak@v3.sk> -Date: Tue, 14 Jan 2014 15:23:59 +0100 -Subject: [PATCH] Fix build with -Werror=format-security - ---- - libgnomecups/gnome-cups-request.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libgnomecups/gnome-cups-request.c b/libgnomecups/gnome-cups-request.c -index c94f623..fa1bd97 100644 ---- a/libgnomecups/gnome-cups-request.c -+++ b/libgnomecups/gnome-cups-request.c -@@ -353,7 +353,7 @@ request_thread_main (GnomeCupsRequest *request, - g_warning ("IPP request failed with status %d", status); - if (request->error != NULL) - *(request->error) = g_error_new (GNOME_CUPS_ERROR, -- status, ippErrorString (status)); -+ status, "%s", ippErrorString (status)); - } else if (request->response && _gnome_cups_debug) { - g_print ("response = \n"); - dump_request (request->response); -@@ -364,7 +364,7 @@ request_thread_main (GnomeCupsRequest *request, - request->response = NULL; - if (HTTP_OK != status && request->error != NULL) - *(request->error) = g_error_new (GNOME_CUPS_ERROR, -- status, httpStatus (status)); -+ status, "%s", httpStatus (status)); - } else { - g_warning ("Neither request nor output_fd set"); - if (request->error != NULL) --- -1.8.3.1 - diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-g_list_find_custom.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-g_list_find_custom.patch deleted file mode 100644 index 3383cde16786..000000000000 --- a/net-print/libgnomecups/files/libgnomecups-0.2.3-g_list_find_custom.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 14979a2356fd751d82d037db65ce92072097bbf3 Mon Sep 17 00:00:00 2001 -From: Kjartan Maraas <kmaraas@gnome.org> -Date: Wed, 30 Jan 2008 17:30:43 +0000 -Subject: [PATCH] Fix some warnings. Fix wrong order of arguments to - g_list_find_custom. - -2008-01-30 Kjartan Maraas <kmaraas@gnome.org> - - * libgnomecups/gnome-cups-printer.c: (set_timeout), - (gnome_cups_printer_get_state_name), - (_gnome_cups_printer_get_host): Fix some warnings. - * libgnomecups/gnome-cups-queue.c: (gnome_cups_queue_get_job): - Fix wrong order of arguments to g_list_find_custom. - -svn path=/trunk/; revision=237 ---- - ChangeLog | 8 ++++++++ - libgnomecups/gnome-cups-printer.c | 7 +++---- - libgnomecups/gnome-cups-queue.c | 4 ++-- - 3 files changed, 13 insertions(+), 6 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index b41ac9e..166c87a 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,11 @@ -+2008-01-30 Kjartan Maraas <kmaraas@gnome.org> -+ -+ * libgnomecups/gnome-cups-printer.c: (set_timeout), -+ (gnome_cups_printer_get_state_name), -+ (_gnome_cups_printer_get_host): Fix some warnings. -+ * libgnomecups/gnome-cups-queue.c: (gnome_cups_queue_get_job): -+ Fix wrong order of arguments to g_list_find_custom. -+ - 2008-01-18 Gil Forcada <gforcada@gnome.org> - - * configure.in: Added mk, tr and zh_HK to ALL_LINGUAS. -diff --git a/libgnomecups/gnome-cups-printer.c b/libgnomecups/gnome-cups-printer.c -index 9c5c7d3..704f205 100644 ---- a/libgnomecups/gnome-cups-printer.c -+++ b/libgnomecups/gnome-cups-printer.c -@@ -791,7 +791,7 @@ set_timeout (void) - - if (should_timeout && !update_timeout_id) { - update_timeout_id = g_timeout_add (UPDATE_TIMEOUT, -- update_printers_timeout, -+ (GSourceFunc)update_printers_timeout, - NULL); - } else if (!should_timeout && update_timeout_id) { - g_source_remove (update_timeout_id); -@@ -1069,7 +1069,6 @@ gnome_cups_printer_get_state (GnomeCupsPrinter *printer) - const char * - gnome_cups_printer_get_state_name (GnomeCupsPrinter *printer) - { -- const char *state_str; - ipp_pstate_t state; - - g_return_val_if_fail (GNOME_CUPS_IS_PRINTER (printer), NULL); -@@ -1079,7 +1078,7 @@ gnome_cups_printer_get_state_name (GnomeCupsPrinter *printer) - - state = printer->details->state; - -- return state_str = _(printer_state_strings[state - IPP_PRINTER_IDLE]); -+ return _(printer_state_strings[state - IPP_PRINTER_IDLE]); - } - - const char * -@@ -2001,7 +2000,7 @@ _gnome_cups_printer_get_host (GnomeCupsPrinter *printer) - { - gchar *host = NULL; - --#warning this is broken for smb://user:pass@host/printer urls -+ /* warning this is broken for smb://user:pass@host/printer urls */ - if (go_directly_to_printer_when_possible && - printer->details->printer_uri) { - gchar *x, *y; -diff --git a/libgnomecups/gnome-cups-queue.c b/libgnomecups/gnome-cups-queue.c -index d9b9a92..9f98ed9 100644 ---- a/libgnomecups/gnome-cups-queue.c -+++ b/libgnomecups/gnome-cups-queue.c -@@ -413,8 +413,8 @@ gnome_cups_queue_get_job (GnomeCupsQueue *queue, - { - if (cache_ok) { - GList *link = g_list_find_custom (queue->details->jobs, -- (GCompareFunc) find_job_by_id, -- GINT_TO_POINTER (job_id)); -+ GINT_TO_POINTER (job_id), -+ (GCompareFunc) find_job_by_id); - if (link) - return gnome_cups_job_dup (link->data); - } --- -1.7.8.4 - diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-glib.h.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-glib.h.patch deleted file mode 100644 index 3f73af861c04..000000000000 --- a/net-print/libgnomecups/files/libgnomecups-0.2.3-glib.h.patch +++ /dev/null @@ -1,38 +0,0 @@ -From d84eee9450b3b6f6155074915efc61bedcc8d446 Mon Sep 17 00:00:00 2001 -From: Dominique Leuenberger <dimstar@opensuse.org> -Date: Sun, 27 Nov 2011 21:36:41 +0100 -Subject: [PATCH] Fix: Only glib.h can be included - ---- - libgnomecups/gnome-cups-i18n.c | 2 +- - libgnomecups/gnome-cups-init.h | 3 +-- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/libgnomecups/gnome-cups-i18n.c b/libgnomecups/gnome-cups-i18n.c -index 8987c5c..127756d 100644 ---- a/libgnomecups/gnome-cups-i18n.c -+++ b/libgnomecups/gnome-cups-i18n.c -@@ -1,5 +1,5 @@ - #include <config.h> --#include <glib/gmacros.h> -+#include <glib.h> - #include "gnome-cups-i18n.h" - - #ifdef ENABLE_NLS -diff --git a/libgnomecups/gnome-cups-init.h b/libgnomecups/gnome-cups-init.h -index 22b682a..c4600fc 100644 ---- a/libgnomecups/gnome-cups-init.h -+++ b/libgnomecups/gnome-cups-init.h -@@ -1,8 +1,7 @@ - #ifndef GNOME_CUPS_INIT - #define GNOME_CUPS_INIT - --#include <glib/gtypes.h> --#include <glib/gmacros.h> -+#include <glib.h> - - G_BEGIN_DECLS - --- -1.7.7 - diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-lpoptions.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-lpoptions.patch deleted file mode 100644 index b682e450746a..000000000000 --- a/net-print/libgnomecups/files/libgnomecups-0.2.3-lpoptions.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- libgnomecups-0.2.2.orig/libgnomecups/gnome-cups-printer.c -+++ libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.c -@@ -510,6 +510,10 @@ - num_dests = cups_get_dests (filename, num_dests, dests); - g_free (filename); - -+ filename = g_build_filename (g_get_home_dir (), ".cups", "lpoptions", NULL); -+ num_dests = cups_get_dests (filename, num_dests, dests); -+ g_free (filename); -+ - return num_dests; - } - diff --git a/net-print/libgnomecups/files/libgnomecups-0.2.3-pkgconfig.patch b/net-print/libgnomecups/files/libgnomecups-0.2.3-pkgconfig.patch deleted file mode 100644 index 8fe6502a6f38..000000000000 --- a/net-print/libgnomecups/files/libgnomecups-0.2.3-pkgconfig.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libgnomecups-1.0.pc.in~ 2007-01-02 01:18:51.000000000 +0100 -+++ libgnomecups-1.0.pc.in 2011-05-08 13:21:35.000000000 +0200 -@@ -7,5 +7,6 @@ - Description: GNOME CUPS Library - Version: @VERSION@ - Requires: glib-2.0 gobject-2.0 --Libs: -L${libdir} -lgnomecups-1.0 @CUPS_LIBS@ -+Libs: -L${libdir} -lgnomecups-1.0 -+Libs.private: -L${libdir} -lgnomecups-1.0 @CUPS_LIBS@ - Cflags: -I${includedir} @CUPS_CFLAGS@ diff --git a/net-print/libgnomecups/libgnomecups-0.2.3-r5.ebuild b/net-print/libgnomecups/libgnomecups-0.2.3-r5.ebuild deleted file mode 100644 index ee9b210015d1..000000000000 --- a/net-print/libgnomecups/libgnomecups-0.2.3-r5.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -GCONF_DEBUG="yes" -GNOME_TARBALL_SUFFIX="bz2" - -inherit autotools epatch gnome2 multilib-minimal - -DESCRIPTION="GNOME cups library" -HOMEPAGE="https://www.gnome.org/" - -LICENSE="GPL-2 LGPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 sparc x86" -IUSE="" - -RDEPEND=" - >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] - >=net-print/cups-1.7.1-r1[${MULTILIB_USEDEP}] -" -DEPEND="${RDEPEND} - >=dev-util/intltool-0.28 - gnome-base/gnome-common - virtual/pkgconfig -" - -src_prepare() { - epatch "${FILESDIR}"/enablenet.patch - - # Fix .pc file per bug #235013 - epatch "${FILESDIR}"/${P}-pkgconfig.patch - - # Upstream fix for g_list_find_custom() argument order - epatch "${FILESDIR}/${P}-g_list_find_custom.patch" - - # >=glib-2.31 compat, bug #400789, https://bugzilla.gnome.org/show_bug.cgi?id=664930 - epatch "${FILESDIR}/${P}-glib.h.patch" - - # cups-1.6 compat, bug #428812 - epatch "${FILESDIR}/${P}-cups-1.6.patch" - - # so it looks for cups-config... how about using $CUPS_CONFIG then? - # and also use AC_PATH_TOOL to respect $CHOST - epatch "${FILESDIR}/${P}-cups-config.patch" - - # Fix building with -Werror=format-security, bug #517612 - epatch "${FILESDIR}/${P}-format-string.patch" - - # Look for lpoptions in the right spot, upstream bug #520449 - epatch "${FILESDIR}/${P}-lpoptions.patch" - - eautoreconf # To fix intltool files making LINGUAS to be honored - gnome2_src_prepare -} - -multilib_src_configure() { - ECONF_SOURCE=${S} \ - gnome2_src_configure --disable-static -} - -multilib_src_install() { - gnome2_src_install -} diff --git a/net-print/libgnomecups/metadata.xml b/net-print/libgnomecups/metadata.xml deleted file mode 100644 index 0d5df29788c2..000000000000 --- a/net-print/libgnomecups/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>gnome@gentoo.org</email> - <name>Gentoo GNOME Desktop</name> -</maintainer> -<maintainer type="project"> - <email>printing@gentoo.org</email> - <name>Gentoo Printing Project</name> -</maintainer> -</pkgmetadata> diff --git a/net-print/libinklevel/Manifest b/net-print/libinklevel/Manifest index e57b5a8b883a..cbd810bdce57 100644 --- a/net-print/libinklevel/Manifest +++ b/net-print/libinklevel/Manifest @@ -1 +1 @@ -DIST libinklevel-0.9.2.tar.gz 367928 BLAKE2B f74af31529246668a0bc00c17b2ec1432532eb484b7efb230873e251c26b349ff26f4eb51f7f610198416964c090f60232f10e40f5170783cbe806cbcf849155 SHA512 127acaef2d2c09981b4da80e4d86a869c66f0f2f9733e139800bc944c159ddca42829499a97ecbb712b74c950bb28a4e22382c9c2a42d374bc5593f8802b6c59 +DIST libinklevel-0.9.3.tar.gz 385622 BLAKE2B c44726239d09719b634046dd40e168b6d0aefe86e675ac6669e7ffcefffbe30f9116fd2b778d7b6c9ae06d7781126202b6dcdddc50359e8905c9dab3893a6cb7 SHA512 bc45661fb861fb8fc6e209ceb4023e7eed2e474e05de76a9185e698aac7bc14d302bd254a1d95bdda104bce066d85ca27bb69d6620e17eca41b95bb279a6ad47 diff --git a/net-print/libinklevel/files/libinklevel-0.9.2-autoconf-2.70.patch b/net-print/libinklevel/files/libinklevel-0.9.2-autoconf-2.70.patch new file mode 100644 index 000000000000..462f23eb73b1 --- /dev/null +++ b/net-print/libinklevel/files/libinklevel-0.9.2-autoconf-2.70.patch @@ -0,0 +1,51 @@ +https://sources.debian.org/patches/libinklevel/0.9.3-3/0001-configure.ac-fix-ftbfs-with-autoconf2.70.patch/ +https://bugs.gentoo.org/750173 + +From: Boyuan Yang <byang@debian.org> +Date: Sat, 16 Jan 2021 11:03:56 -0500 +Subject: configure.ac: fix ftbfs with autoconf2.70 + +Applied-Upstream: email, yes +--- a/configure.ac ++++ b/configure.ac +@@ -12,7 +12,7 @@ ABI_VERSION=5:0:0 + + dnl no more configuration after this line + +-AC_CONFIG_SRCDIR(libinklevel.c) ++AC_CONFIG_SRCDIR([libinklevel.c]) + + ## Determine hostname & OS + ## AC_CANONICAL_HOST +@@ -77,9 +77,9 @@ AC_CHECK_HEADERS([ifaddrs.h]) + + ## Check for mandatory header files + +-AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h \ ++AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h \ + sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h wchar.h ] +- ,,AC_MSG_ERROR( required header file missing )) ++ ,,AC_MSG_ERROR([required header file missing])) + + ## determine libraries that need to get linked + +@@ -96,7 +96,7 @@ AC_CHECK_FUNCS([getifaddrs]) + AC_CHECK_FUNCS([alarm ftime gethostbyaddr gethostbyname gettimeofday inet_ntoa \ + memset select socket strchr strdup strerror strncasecmp strstr \ + gethostname] +- ,,AC_MSG_ERROR( required library function missing )) ++ ,,AC_MSG_ERROR([required library function missing])) + AC_FUNC_MALLOC + AC_FUNC_REALLOC + AC_HEADER_RESOLV +@@ -117,8 +117,8 @@ case $host in + PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0]);; + + *-freebsd*) AC_DEFINE_UNQUOTED(HOST_OS,FREEBSD,[Host OS]) +- AC_CHECK_LIB([usb], libusb_init,, AC_MSG_ERROR(Library not found),);; +- *-*-*) AC_MSG_ERROR( Host OS not (yet) supported) ;; ++ AC_CHECK_LIB([usb], libusb_init,, AC_MSG_ERROR([Library not found]),);; ++ *-*-*) AC_MSG_ERROR([Host OS not (yet) supported]) ;; + esac + + ## Variables to be exported diff --git a/net-print/libinklevel/libinklevel-0.9.2.ebuild b/net-print/libinklevel/libinklevel-0.9.3.ebuild index b6fb5ca58d72..3e9d079e6f5f 100644 --- a/net-print/libinklevel/libinklevel-0.9.2.ebuild +++ b/net-print/libinklevel/libinklevel-0.9.3.ebuild @@ -1,29 +1,35 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=8 -inherit autotools multilib +inherit autotools MY_P="${P/_/}" DESCRIPTION="A library to get the ink level of your printer" HOMEPAGE="http://libinklevel.sourceforge.net/" -SRC_URI="mirror://sourceforge/libinklevel/${MY_P}.tar.gz" +SRC_URI="https://downloads.sourceforge.net/libinklevel/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" +LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~ppc x86" -LICENSE="GPL-2" -IUSE="debug static-libs" +IUSE="debug" DEPEND=">=sys-libs/libieee1284-0.2.11 virtual/libusb:1" RDEPEND="${DEPEND}" -S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}"/${PN}-0.9.2-autoconf-2.70.patch +) src_prepare() { + default + sed -i -e "/^dist_doc_DATA/d" Makefile.am \ || die "Failed to disable installation of docs" + eautoreconf } @@ -32,7 +38,6 @@ src_configure() { } src_install() { - emake DESTDIR="${D}" install - dodoc AUTHORS ChangeLog NEWS README - use static-libs || rm "${D}"/usr/$(get_libdir)/libinklevel.{a,la} + default + find "${ED}" -name '*.la' -delete || die } diff --git a/net-print/libinklevel/metadata.xml b/net-print/libinklevel/metadata.xml index 2ae8f556b809..fa03614f75b6 100644 --- a/net-print/libinklevel/metadata.xml +++ b/net-print/libinklevel/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/libppd/Manifest b/net-print/libppd/Manifest new file mode 100644 index 000000000000..bc6ba554c08c --- /dev/null +++ b/net-print/libppd/Manifest @@ -0,0 +1 @@ +DIST libppd-2.0.0.tar.xz 580716 BLAKE2B 8505c5ab5b515104308624a8f78505343b894df08ab8ac2727d7bd82d0d65d256d22ecaf384b212d9a5c45d2a619a6311722a8c5ed954b7a8a9780477aedb458 SHA512 8be9e67552528606fd804ba13b05710938ed7d02316c1c902ee657bc0e5fade663ffacb5b032609a1c1fdc80d976e7e54d2ca2f71db83cb8fdcee6a371e6bad4 diff --git a/net-print/libppd/files/libppd-2.0.0-slibtool.patch b/net-print/libppd/files/libppd-2.0.0-slibtool.patch new file mode 100644 index 000000000000..5491ac1fd896 --- /dev/null +++ b/net-print/libppd/files/libppd-2.0.0-slibtool.patch @@ -0,0 +1,64 @@ +https://github.com/OpenPrinting/libppd/pull/32 +https://github.com/OpenPrinting/libppd/commit/a040f26f3ca103c8ae7706d91ae157dca0974c49 + +From e614c21b82a2f85487fe406a8bf4a2c9064501f8 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Mon, 18 Dec 2023 22:28:21 -0500 +Subject: [PATCH] build: fix failure to correctly link to zlib + +Checking for the header is NOT sufficient when utilizing its shared +library symbols. Look it up with pkg-config explicitly, and explicitly +add it to ensure that at runtime, libppd has its own DT_NEEDED +dependency on libz.so; if libppd successfully links at all -- not a +given, if -Wl,-no-undefined is used -- then it *may* transitively get +libz.so from its recursive dependencies, but this is no guarantee at +all. + +Fixes failure to build discovered at https://bugs.gentoo.org/920273 +--- + Makefile.am | 2 ++ + configure.ac | 8 +++++++- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 7aed422b..c44aa3e0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -120,9 +120,11 @@ libppd_la_SOURCES = \ + $(pkgppddefs_DATA) + libppd_la_LIBADD = \ + $(LIBCUPSFILTERS_LIBS) \ ++ $(ZLIB_LIBS) \ + $(CUPS_LIBS) + libppd_la_CFLAGS = \ + $(LIBCUPSFILTERS_CFLAGS) \ ++ $(ZLIB_CFLAGS) \ + $(CUPS_CFLAGS) + libppd_la_CXXFLAGS = \ + $(libppd_la_CFLAGS) +diff --git a/configure.ac b/configure.ac +index 66927d80..7d8a459b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -164,6 +164,13 @@ AC_SUBST(CUPS_STATEDIR) + # ======================== + PKG_CHECK_MODULES([LIBCUPSFILTERS], [libcupsfilters]) + ++# ============== ++# Check for zlib ++# ============== ++PKG_CHECK_MODULES([ZLIB], [zlib], ,[ ++ AC_CHECK_HEADER([zlib.h]) ++ AC_CHECK_LIB([z], [deflateInit])]) ++ + # ============================================================ + # Check for whether we want to install the testppdfile utility + # ============================================================ +@@ -220,7 +227,6 @@ AC_CHECK_HEADERS([stdlib.h]) + AC_CHECK_HEADERS([sys/stat.h]) + AC_CHECK_HEADERS([sys/types.h]) + AC_CHECK_HEADERS([unistd.h]) +-AC_CHECK_HEADERS([zlib.h]) + AC_CHECK_HEADERS([endian.h]) + AC_CHECK_HEADERS([dirent.h]) + AC_CHECK_HEADERS([sys/ioctl.h]) 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..763f0c6558a3 --- /dev/null +++ b/net-print/libppd/libppd-2.0.0.ebuild @@ -0,0 +1,63 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +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 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86" + +# 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 +" + +PATCHES=( + "${FILESDIR}"/${P}-slibtool.patch +) + +src_prepare() { + default + eautoreconf +} + +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> diff --git a/net-print/lm1100/Manifest b/net-print/lm1100/Manifest deleted file mode 100644 index ab3330db8889..000000000000 --- a/net-print/lm1100/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST lm1100.1.0.2a.tar.gz 64316 BLAKE2B b47fef489b16568e2e2b0097bd79f90b1c7acb80b7fd28d00fc74c5072f83b1c2f2d6bb75534e0c678d4ad9312d222e311bd9593206acad8eaa3a5166fbbebcf SHA512 3dda80602af99d93a570e066ca2a121afd93b28b5d28b6f49b52c2c90e288de7b87cefdd5e00bf4edd73439fb6088433fabe884b841befd24183f27a12fcbcb1 -DIST lm1100maint.tar.gz 708 BLAKE2B 69b29e477a5491f88bafe92eb94a3742fe8b6074116544cd0689a98273b9bd4eb3ee5e5b74acc4e68cff3eef1d9c177b6d041db64712dad2e6fb189f56e9c1cb SHA512 fe81351705c36dd30e01d402461820ed583d2a8222af8dd81f4dff35c6629592e09fb6dbc0740b9ba0f555de65aeae41c0cb953fbedd0c8620db29b37d797b02 diff --git a/net-print/lm1100/files/lm1100-1.0.2a-class.patch b/net-print/lm1100/files/lm1100-1.0.2a-class.patch deleted file mode 100644 index b771e1bf1449..000000000000 --- a/net-print/lm1100/files/lm1100-1.0.2a-class.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ur lm1100.1.0.2a~/PaintLine300c.h lm1100.1.0.2a/PaintLine300c.h ---- lm1100.1.0.2a~/PaintLine300c.h 2006-06-22 15:14:36.000000000 +0200 -+++ lm1100.1.0.2a/PaintLine300c.h 2006-06-22 15:14:55.000000000 +0200 -@@ -32,7 +32,7 @@ - int size; - int x,y; - -- friend LexmarkProtocol300c; -+ friend class LexmarkProtocol300c; - - public: - void pad(int pad_amount); -diff -ur lm1100.1.0.2a~/PaintLineBW.h lm1100.1.0.2a/PaintLineBW.h ---- lm1100.1.0.2a~/PaintLineBW.h 2006-06-22 15:14:36.000000000 +0200 -+++ lm1100.1.0.2a/PaintLineBW.h 2006-06-22 15:14:55.000000000 +0200 -@@ -33,7 +33,7 @@ - int size; - int x,y; - -- friend LexmarkProtocolBW; -+ friend class LexmarkProtocolBW; - - public: - void pad(int pad_amount); diff --git a/net-print/lm1100/files/lm1100-1.0.2a-fix-compile-gcc-3.4.patch b/net-print/lm1100/files/lm1100-1.0.2a-fix-compile-gcc-3.4.patch deleted file mode 100644 index 60e1b5c2e7a3..000000000000 --- a/net-print/lm1100/files/lm1100-1.0.2a-fix-compile-gcc-3.4.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- LexmarkProtocol300c.cc.orig 2000-11-21 09:06:22.000000000 +0100 -+++ LexmarkProtocol300c.cc 2004-06-16 13:28:04.397060286 +0200 -@@ -69,7 +69,7 @@ - Jet **LexmarkProtocol300c::createJets(int *numJets, Map *imageMap) - { - *numJets = 6; -- class Jet **jets = new (Jet *)[6]; -+ class Jet **jets = new Jet*[6]; - jets[0] = new Jet(0,9,0,imageMap,LEFT_JET,0,8); - jets[1] = new Jet(1,0,0,imageMap,RIGHT_JET,0,8); - jets[2] = new Jet(2,-9,20,imageMap,LEFT_JET,1,8); ---- LexmarkProtocolBW.cc.orig 2000-11-21 09:06:22.000000000 +0100 -+++ LexmarkProtocolBW.cc 2004-06-16 13:32:51.291509280 +0200 -@@ -68,7 +68,7 @@ - Jet **LexmarkProtocolBW::createJets(int *numJets, Map *imageMap) - { - *numJets = 2; -- class Jet **jets = new (Jet *)[2]; -+ class Jet **jets = new Jet*[2]; - jets[0] = new Jet(0,9,0,imageMap,LEFT_JET,0,28); - jets[1] = new Jet(0,0,0,imageMap,RIGHT_JET,0,28); - diff --git a/net-print/lm1100/files/lm1100-1.0.2a-fix-compile-gcc-4.1.patch b/net-print/lm1100/files/lm1100-1.0.2a-fix-compile-gcc-4.1.patch deleted file mode 100644 index bc797a09a44b..000000000000 --- a/net-print/lm1100/files/lm1100-1.0.2a-fix-compile-gcc-4.1.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff -ru lm1100.1.0.2a~/Jet.h lm1100.1.0.2a/Jet.h ---- lm1100.1.0.2a~/Jet.h 2006-12-02 18:48:16.000000000 +0100 -+++ lm1100.1.0.2a/Jet.h 2006-12-02 18:49:54.000000000 +0100 -@@ -45,7 +45,7 @@ - Coord imageStart; // start of image from edge of paper - - bool insideImage(int x, int y); -- bool Jet::needsPainting(int ix, int iy, int bit); -+ bool needsPainting(int ix, int iy, int bit); - - public: - /* Range of paper jet covers when head is at 0,0 */ -@@ -54,7 +54,7 @@ - /* Range of paper jet needs to cover to get the entire image */ - void getImageRange(Rect *dest); - Coord *getPreferredImageStart(Coord *start); -- int Jet::getPreferredEnd(); -+ int getPreferredEnd(); - bool finished(); - void setImageStart(Coord *imageStart); - void paint(int startX, int endX, int y, class LexmarkProtocol *protocol); -diff -ru lm1100.1.0.2a~/LinkedList.h lm1100.1.0.2a/LinkedList.h ---- lm1100.1.0.2a~/LinkedList.h 2006-12-02 18:48:16.000000000 +0100 -+++ lm1100.1.0.2a/LinkedList.h 2006-12-02 18:49:54.000000000 +0100 -@@ -26,8 +26,8 @@ - void *object; - LinkedList *next; - -- LinkedList::LinkedList(); -- LinkedList::LinkedList(void * object); -+ LinkedList(); -+ LinkedList(void * object); - }; - - #endif -diff -ru lm1100.1.0.2a~/Map.h lm1100.1.0.2a/Map.h ---- lm1100.1.0.2a~/Map.h 2006-12-02 18:48:16.000000000 +0100 -+++ lm1100.1.0.2a/Map.h 2006-12-02 18:49:54.000000000 +0100 -@@ -41,7 +41,7 @@ - int height; /* height of map in cells */ - - Map(int width, int height, int cellSize); -- Map::~Map(); -+ ~Map(); - - void cacheLines(int start, int len); - void addAlgorithm(MapAlgorithm *algorithm); -diff -ru lm1100.1.0.2a~/PPMRaw.h lm1100.1.0.2a/PPMRaw.h ---- lm1100.1.0.2a~/PPMRaw.h 2006-12-02 18:48:16.000000000 +0100 -+++ lm1100.1.0.2a/PPMRaw.h 2006-12-02 18:49:54.000000000 +0100 -@@ -32,7 +32,7 @@ - - public: - PPMRaw(Reader *reader,bool readMagic); -- static void PPMRaw::readHeader(int *width, int *height, int *maxval, Reader *reader, bool readMagic); -+ static void readHeader(int *width, int *height, int *maxval, Reader *reader, bool readMagic); - - virtual void getRGB(RGB *rgb, int x, int y); - -diff -ru lm1100.1.0.2a~/Rect.h lm1100.1.0.2a/Rect.h ---- lm1100.1.0.2a~/Rect.h 2006-12-02 18:48:16.000000000 +0100 -+++ lm1100.1.0.2a/Rect.h 2006-12-02 18:49:54.000000000 +0100 -@@ -23,8 +23,8 @@ - class Rect - { - public: -- Rect::Rect(); -- Rect::Rect(int x, int y, int width, int height); -+ Rect(); -+ Rect(int x, int y, int width, int height); - - int x,y,width,height; - diff --git a/net-print/lm1100/files/lm1100-1.0.2a-makefile.patch b/net-print/lm1100/files/lm1100-1.0.2a-makefile.patch deleted file mode 100644 index b1f0a2ac4913..000000000000 --- a/net-print/lm1100/files/lm1100-1.0.2a-makefile.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- lm1100.1.0.2a~/Makefile 2001-02-26 01:40:16.000000000 +0100 -+++ lm1100.1.0.2a/Makefile 2006-10-23 19:01:57.000000000 +0200 -@@ -7,17 +7,19 @@ - VERSION=lm1100.1.0.2a - TARFILES = $(FILES:%=$(VERSION)/%) - --CC = g++ -O2 -+CXX?=g++ -+CXXFLAGS?= -O2 -+#CC = g++ -O2 - #CC = g++ -g - - lm1100: $(OBJS) -- $(CC) -o lm1100 $(OBJS) $(LIBS) -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o lm1100 $(OBJS) $(LIBS) - - bufcat: SpongeWriter.o ThreadSafeCircleBuffer.o bufcat.o -- $(CC) -o bufcat SpongeWriter.o ThreadSafeCircleBuffer.o bufcat.o -lpthread -+ $(CXX) $(CXXFLAGS) -o bufcat SpongeWriter.o ThreadSafeCircleBuffer.o bufcat.o -lpthread - - leak: $(OBJS) -- $(CC) -o lm1100 $(OBJS) $(LIBS) /usr/local/LeakTracer/LeakTracer.o -+ $(CXX) $(CXXFLAGS) -o lm1100 $(OBJS) $(LIBS) /usr/local/LeakTracer/LeakTracer.o - - tarball: $(FILES) - rm $(VERSION);ln -s . $(VERSION);tar -cf - $(TARFILES) | gzip > $(VERSION).tar.gz -@@ -27,7 +29,7 @@ - rm *.o - - %.o: %.cc -- $(CC) $(DEFINES) -c $< -+ $(CXX) $(CXXFLAGS) $(DEFINES) -c $< - - TAGS: $(SRCS) - etag $(SRCS) diff --git a/net-print/lm1100/files/lm1100maint-firmware.patch b/net-print/lm1100/files/lm1100maint-firmware.patch deleted file mode 100644 index 5c3f4c92ea86..000000000000 --- a/net-print/lm1100/files/lm1100maint-firmware.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ur lm1100maint~/lm1100back lm1100maint/lm1100back ---- lm1100maint~/lm1100back 2006-06-26 19:48:51.000000000 +0200 -+++ lm1100maint/lm1100back 2006-06-26 19:50:41.000000000 +0200 -@@ -1,2 +1,2 @@ - #!/bin/sh --dd if=/usr/share/lm1100maint/lexmarkback of=/dev/lp0 -+dd if=/usr/share/lm1100/lexmarkback of=/dev/lp0 -diff -ur lm1100maint~/lm1100change lm1100maint/lm1100change ---- lm1100maint~/lm1100change 2006-06-26 19:48:51.000000000 +0200 -+++ lm1100maint/lm1100change 2006-06-26 19:50:55.000000000 +0200 -@@ -1,2 +1,2 @@ - #!/bin/sh --dd if=/usr/share/lm1100maint/lexmarkchange of=/dev/lp0 -+dd if=/usr/share/lm1100/lexmarkchange of=/dev/lp0 diff --git a/net-print/lm1100/lm1100-1.0.2a-r1.ebuild b/net-print/lm1100/lm1100-1.0.2a-r1.ebuild deleted file mode 100644 index 1521dc21c771..000000000000 --- a/net-print/lm1100/lm1100-1.0.2a-r1.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit epatch toolchain-funcs - -DESCRIPTION="The Tim Engler's Lexmark 1100 driver" -HOMEPAGE="http://www.linuxprinting.org/show_driver.cgi?driver=lm1100" -MY_P=${P/lm1100-/lm1100.} -SRC_URI="mirror://gentoo/${MY_P}.tar.gz - mirror://gentoo/${PN}maint.tar.gz" -#http://www.linuxprinting.org/download/printing/${PN}/${PN}maint.tar.gz -#http://www.linuxprinting.org/download/printing/${PN}/${MY_P}.tar.gz -S="${WORKDIR}"/${MY_P} - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" - -src_prepare() { - epatch "${FILESDIR}/${P}-fix-compile-gcc-3.4.patch"\ - "${FILESDIR}/${P}-fix-compile-gcc-4.1.patch"\ - "${FILESDIR}/${P}-class.patch"\ - "${FILESDIR}/${P}-makefile.patch" - cd "${WORKDIR}/${PN}maint" || die - epatch "${FILESDIR}/${PN}maint-firmware.patch" -} - -src_compile() { - emake CXX="$(tc-getCXX)" -} - -src_install() { - dobin lm1100 - dodoc README RELEASE.txt - - cd "${WORKDIR}/${PN}maint" || die - dobin lm1100back lm1100change - insinto "/usr/share/${PN}" - doins lexmarkback lexmarkchange - newdoc README README.maint -} diff --git a/net-print/lm1100/metadata.xml b/net-print/lm1100/metadata.xml deleted file mode 100644 index 6f49eba8f496..000000000000 --- a/net-print/lm1100/metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<!-- maintainer-needed --> -</pkgmetadata> diff --git a/net-print/metadata.xml b/net-print/metadata.xml index 40a932a55fb0..449c4f4c247b 100644 --- a/net-print/metadata.xml +++ b/net-print/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <catmetadata> <longdescription lang="en"> The net-print category contains network printing packages. diff --git a/net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch b/net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch new file mode 100644 index 000000000000..459341f63a79 --- /dev/null +++ b/net-print/mtink/files/mtink-1.0.16-fix-function-declarations.patch @@ -0,0 +1,57 @@ +Description: fix function declarations + This patch fixes various conflicting and implicit function declarations + reported by goto-cc from the cbmc package. +Bug-Debian: http://bugs.debian.org/749433 +Author: Graham Inggs <graham@nerve.org.za> +Forwarded: No, nothing left to forward to +Last-Update: 2015-05-31 +--- a/mainSrc/cmd.h ++++ b/mainSrc/cmd.h +@@ -70,6 +70,4 @@ + } + #endif + +-extern int devRead(int fd, unsigned char *buf, int len, int timeout); +-extern int devWrite(int fd, unsigned char *buf, int len, int timeout); + #endif +--- a/mainSrc/rw.c ++++ b/mainSrc/rw.c +@@ -18,6 +18,8 @@ + + #ifndef MACOS + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + #include <unistd.h> + #include <fcntl.h> + #include <errno.h> +--- a/mainSrc/cmd.c ++++ b/mainSrc/cmd.c +@@ -53,6 +53,7 @@ + #include "mtink.h" + #include "cmd.h" + #include "d4lib.h" ++#include "rw.h" + + #ifdef MACOS + #include "usbHlp.h" +--- a/mainSrc/gimp-mtink.c ++++ b/mainSrc/gimp-mtink.c +@@ -23,6 +23,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <libgimp/gimp.h> + #include <unistd.h> + #include <dirent.h> +--- a/detect/askPrinter.c ++++ b/detect/askPrinter.c +@@ -1,6 +1,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <unistd.h> + #include <sys/ioctl.h> + #include <fcntl.h> + #include <sys/time.h> diff --git a/net-print/mtink/metadata.xml b/net-print/mtink/metadata.xml index 8223018128a3..882504794e17 100644 --- a/net-print/mtink/metadata.xml +++ b/net-print/mtink/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/mtink/mtink-1.0.16-r2.ebuild b/net-print/mtink/mtink-1.0.16-r2.ebuild index 8f231fa1e74e..4d46836b2d1f 100644 --- a/net-print/mtink/mtink-1.0.16-r2.ebuild +++ b/net-print/mtink/mtink-1.0.16-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -6,8 +6,8 @@ EAPI=7 inherit toolchain-funcs DESCRIPTION="mtink is a status monitor and inkjet cartridge changer for some Epson printers" -HOMEPAGE="http://xwtools.automatix.de/" -SRC_URI="http://xwtools.automatix.de/files/${P}.tar.gz" +HOMEPAGE="https://web.archive.org/web/20160316185818/http://xwtools.automatix.de/" +SRC_URI="https://web.archive.org/web/20160316185818/http://xwtools.automatix.de/files/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" @@ -32,6 +32,7 @@ PATCHES=( "${FILESDIR}"/${P}-flags.patch "${FILESDIR}"/${P}-motif.patch "${FILESDIR}"/${P}-fno-common.patch + "${FILESDIR}"/${P}-fix-function-declarations.patch ) src_prepare() { diff --git a/net-print/npadmin/files/npadmin-0.8.7-makefile.patch b/net-print/npadmin/files/npadmin-0.8.7-makefile.patch new file mode 100644 index 000000000000..140750a0b0b8 --- /dev/null +++ b/net-print/npadmin/files/npadmin-0.8.7-makefile.patch @@ -0,0 +1,43 @@ +--- a/Makefile.in 2024-03-28 13:35:04.247099098 +0000 ++++ b/Makefile.in 2024-03-28 13:33:44.610623716 +0000 +@@ -104,7 +104,7 @@ + NROFF = nroff + DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ + Makefile.am Makefile.in NEWS TODO acconfig.h aclocal.m4 config.h.in \ +-configure configure.in install-sh memcmp.c missing mkinstalldirs \ ++configure configure.ac install-sh memcmp.c missing mkinstalldirs \ + npadmin.spec.in snprintf.c + + +@@ -118,19 +118,19 @@ + all: all-redirect + .SUFFIXES: + .SUFFIXES: .C .S .c .o .s +-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) ++$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +-$(ACLOCAL_M4): configure.in ++$(ACLOCAL_M4): configure.ac + cd $(srcdir) && $(ACLOCAL) + + config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) ++$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + + config.h: stamp-h +@@ -148,7 +148,7 @@ + rm -f $(srcdir)/stamp-h.in; \ + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi +-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h ++$(srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null + diff --git a/net-print/npadmin/metadata.xml b/net-print/npadmin/metadata.xml index 81b685a0b019..a3f654a08ac7 100644 --- a/net-print/npadmin/metadata.xml +++ b/net-print/npadmin/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/npadmin/npadmin-0.8.7-r1.ebuild b/net-print/npadmin/npadmin-0.8.7-r1.ebuild index 02d07aa1dfac..d07f1e1a6c63 100644 --- a/net-print/npadmin/npadmin-0.8.7-r1.ebuild +++ b/net-print/npadmin/npadmin-0.8.7-r1.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 DESCRIPTION="Network printer command-line adminstration tool" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" HOMEPAGE="http://npadmin.sourceforge.net/" # this does NOT link against SNMP diff --git a/net-print/npadmin/npadmin-0.8.7-r2.ebuild b/net-print/npadmin/npadmin-0.8.7-r2.ebuild new file mode 100644 index 000000000000..4751943a3468 --- /dev/null +++ b/net-print/npadmin/npadmin-0.8.7-r2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Network printer command-line administration tool" +HOMEPAGE="https://npadmin.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +# this does NOT link against SNMP +# DEPEND="" + +PATCHES=( + "${FILESDIR}"/${P}-stdlib.patch + "${FILESDIR}"/${P}-gcc6.patch + "${FILESDIR}"/${P}-makefile.patch +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + dobin npadmin + doman npadmin.1 + dodoc README AUTHORS ChangeLog INSTALL NEWS README TODO +} diff --git a/net-print/pnm2ppa/files/pnm2ppa-1.13-clang16.patch b/net-print/pnm2ppa/files/pnm2ppa-1.13-clang16.patch new file mode 100644 index 000000000000..3fabafc871e9 --- /dev/null +++ b/net-print/pnm2ppa/files/pnm2ppa-1.13-clang16.patch @@ -0,0 +1,7 @@ +https://bugs.gentoo.org/874534 +--- a/ppa_protocol/parse_vlink.c ++++ b/ppa_protocol/parse_vlink.c +@@ -1,2 +1,3 @@ + #include <stdio.h> ++#include <string.h> + diff --git a/net-print/pnm2ppa/metadata.xml b/net-print/pnm2ppa/metadata.xml index 694dbab7c8b5..94ca5a8e1ab3 100644 --- a/net-print/pnm2ppa/metadata.xml +++ b/net-print/pnm2ppa/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/pnm2ppa/pnm2ppa-1.13-r1.ebuild b/net-print/pnm2ppa/pnm2ppa-1.13-r2.ebuild index 4cfb04d59fba..ac933c7f1679 100644 --- a/net-print/pnm2ppa/pnm2ppa-1.13-r1.ebuild +++ b/net-print/pnm2ppa/pnm2ppa-1.13-r2.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 DESCRIPTION="Print driver for Hp Deskjet 710, 712, 720, 722, 820, 1000 series" HOMEPAGE="http://pnm2ppa.sourceforge.net" -SRC_URI="mirror://sourceforge/pnm2ppa/${P}.tar.gz" +SRC_URI="https://downloads.sourceforge.net/pnm2ppa/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" @@ -26,7 +26,10 @@ RDEPEND=" syslog? ( virtual/logger )" DEPEND="${RDEPEND}" -PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) +PATCHES=( + "${FILESDIR}"/${P}-fno-common.patch + "${FILESDIR}"/${P}-clang16.patch +) src_configure() { local lng i withval diff --git a/net-print/poster/metadata.xml b/net-print/poster/metadata.xml index c439b06d8c84..e2fedda90ee1 100644 --- a/net-print/poster/metadata.xml +++ b/net-print/poster/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>printing@gentoo.org</email> diff --git a/net-print/poster/poster-20060221-r3.ebuild b/net-print/poster/poster-20060221-r4.ebuild index f278b477bd42..47b567373b68 100644 --- a/net-print/poster/poster-20060221-r3.ebuild +++ b/net-print/poster/poster-20060221-r4.ebuild @@ -1,18 +1,17 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit toolchain-funcs DESCRIPTION="Small utility for making a poster from an EPS file or a one-page PS document" +HOMEPAGE="https://ctan.org/pkg/poster" SRC_URI="mirror://kde/printing/${P}.tar.bz2" -HOMEPAGE="https://printing.kde.org/downloads" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~ppc x86" -IUSE="" PATCHES=( "${FILESDIR}/${P}-fix_gs_crash.patch" diff --git a/net-print/splix/metadata.xml b/net-print/splix/metadata.xml index a45c436ce155..2ea580a8d8e2 100644 --- a/net-print/splix/metadata.xml +++ b/net-print/splix/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>voyageur@gentoo.org</email> diff --git a/net-print/splix/splix-2.0.0_p20130826-r1.ebuild b/net-print/splix/splix-2.0.0_p20130826-r1.ebuild index c0d507a457a9..5b17bec8db15 100644 --- a/net-print/splix/splix-2.0.0_p20130826-r1.ebuild +++ b/net-print/splix/splix-2.0.0_p20130826-r1.ebuild @@ -1,17 +1,17 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 inherit toolchain-funcs DESCRIPTION="A set of CUPS printer drivers for SPL (Samsung Printer Language) printers" -HOMEPAGE="http://splix.sourceforge.net/" +HOMEPAGE="https://splix.sourceforge.net/" SRC_URI="https://dev.gentoo.org/~voyageur/distfiles/${P}.tar.bz2 https://dev.gentoo.org/~voyageur/distfiles/samsung-cms-20120312.tar.xz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 x86" +KEYWORDS="amd64 ~arm64 x86" IUSE="+jbig" DEPEND=">=app-text/ghostscript-gpl-9.02 diff --git a/net-print/sshlpr/metadata.xml b/net-print/sshlpr/metadata.xml index 6f49eba8f496..85e4ed814fa2 100644 --- a/net-print/sshlpr/metadata.xml +++ b/net-print/sshlpr/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <!-- maintainer-needed --> </pkgmetadata> diff --git a/net-print/sshlpr/sshlpr-1.ebuild b/net-print/sshlpr/sshlpr-1-r1.ebuild index 1c32c9003523..99cf50d6b50f 100644 --- a/net-print/sshlpr/sshlpr-1.ebuild +++ b/net-print/sshlpr/sshlpr-1-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -14,8 +14,8 @@ IUSE="" DEPEND="net-print/cups" RDEPEND="${DEPEND} - net-misc/openssh - sys-apps/shadow" + sys-apps/shadow + virtual/openssh" S="${WORKDIR}" |