diff options
Diffstat (limited to 'net-print')
48 files changed, 2002 insertions, 211 deletions
diff --git a/net-print/brlaser/brlaser-6.ebuild b/net-print/brlaser/brlaser-6.ebuild deleted file mode 100644 index 533df7d57162..000000000000 --- a/net-print/brlaser/brlaser-6.ebuild +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -DESCRIPTION="Brother laser printer driver" -HOMEPAGE="https://github.com/pdewacht/brlaser" -SRC_URI="https://github.com/pdewacht/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" - -DEPEND="net-print/cups" -RDEPEND=" - ${DEPEND} - app-text/ghostscript-gpl" 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/cnrdrvcups-lb/Manifest b/net-print/cnrdrvcups-lb/Manifest index 865ff75b2c24..38b30046937b 100644 --- a/net-print/cnrdrvcups-lb/Manifest +++ b/net-print/cnrdrvcups-lb/Manifest @@ -1 +1,2 @@ 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.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/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild b/net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild index bce61bd95d60..456c3250d40a 100644 --- a/net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild +++ b/net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -7,7 +7,7 @@ inherit autotools 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/cups-bjnp-2.0.3.ebuild b/net-print/cups-bjnp/cups-bjnp-2.0.3.ebuild index 3db19754eb94..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-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 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-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..f078ad85f487 --- /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/Manifest b/net-print/cups/Manifest index ec197c098c16..335cffde84a7 100644 --- a/net-print/cups/Manifest +++ b/net-print/cups/Manifest @@ -1,2 +1,3 @@ +DIST cups-2.4.10-source.tar.gz 8145236 BLAKE2B 842a713d606c1e68d5113c0fc2f063cb58519891bb8f442fd64caeebf6b14fbf38b59d1fe4277cf8f9a01238c4c040fc7919234afa56dc86fcebb623a0058322 SHA512 6442207615f79c91de134ff5f438aa5060cbdf764113f7a338a53f7e12ad87bab147ea61302e84c94f259d31950f1a164c4574d11942ca838eb924827375748e 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.4.10.ebuild b/net-print/cups/cups-2.4.10.ebuild new file mode 100644 index 000000000000..561c0c7527d4 --- /dev/null +++ b/net-print/cups/cups-2.4.10.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() { + # We only build some of CUPS for multilib, so can't run the tests. + if multilib_is_native_abi; then + # Avoid using /tmp + export CUPS_TESTBASE="${T}"/cups-tests + + mkdir "${T}"/cups-tests || die + + # 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-2.4.7-r2.ebuild b/net-print/cups/cups-2.4.7-r2.ebuild index 51ce84608e2e..0da25c8b8850 100644 --- a/net-print/cups/cups-2.4.7-r2.ebuild +++ b/net-print/cups/cups-2.4.7-r2.ebuild @@ -213,13 +213,13 @@ 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. if multilib_is_native_abi; then + # Avoid using /tmp + export CUPS_TESTBASE="${T}"/cups-tests + + mkdir "${T}"/cups-tests || die + # avoid building *and running* test binaries in src_compile # https://github.com/OpenPrinting/cups/commit/b1d42061e9286f50eefc851ed906d17c6e80c4b0 emake UNITTESTS=unittests diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-9999.ebuild index 3d6b8b8cac30..561c0c7527d4 100644 --- a/net-print/cups/cups-9999.ebuild +++ b/net-print/cups/cups-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -17,7 +17,7 @@ if [[ ${PV} == *9999 ]] ; then 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" fi fi @@ -30,16 +30,14 @@ LICENSE="Apache-2.0" SLOT="0" IUSE="acl dbus debug kerberos openssl pam selinux static-libs systemd test usb X xinetd zeroconf" -# 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" +RESTRICT="!test? ( test )" BDEPEND=" acct-group/lp acct-group/lpadmin virtual/pkgconfig " -DEPEND=" +COMMON_DEPEND=" app-text/libpaper:= sys-libs/zlib acl? ( @@ -60,13 +58,17 @@ DEPEND=" 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=" - ${DEPEND} + ${COMMON_DEPEND} acct-group/lp acct-group/lpadmin selinux? ( sec-policy/selinux-cups ) " -PDEPEND=">=net-print/cups-filters-1.0.43" PATCHES=( "${FILESDIR}/${PN}-2.4.1-nostrip.patch" @@ -163,7 +165,6 @@ multilib_src_configure() { $(use_enable kerberos gssapi) $(multilib_native_use_enable pam) $(use_enable static-libs static) - $(use_enable test unit-tests) --with-tls=$(usex openssl openssl gnutls) $(use_with systemd ondemand systemd) $(multilib_native_use_enable usb libusb) @@ -212,13 +213,18 @@ multilib_src_compile() { } multilib_src_test() { - # Avoid using /tmp - export CUPS_TESTBASE="${T}"/cups-tests + # We only build some of CUPS for multilib, so can't run the tests. + if multilib_is_native_abi; then + # Avoid using /tmp + export CUPS_TESTBASE="${T}"/cups-tests - mkdir "${T}"/cups-tests || die + mkdir "${T}"/cups-tests || die - # We only build some of CUPS for multilib, so can't run the tests. - multilib_is_native_abi && default + # avoid building *and running* test binaries in src_compile + # https://github.com/OpenPrinting/cups/commit/b1d42061e9286f50eefc851ed906d17c6e80c4b0 + emake UNITTESTS=unittests + default + fi } multilib_src_install() { diff --git a/net-print/epson-inkjet-printer-escpr/Manifest b/net-print/epson-inkjet-printer-escpr/Manifest index 263649d30d5c..b911f5172313 100644 --- a/net-print/epson-inkjet-printer-escpr/Manifest +++ b/net-print/epson-inkjet-printer-escpr/Manifest @@ -1,3 +1,2 @@ -DIST epson-inkjet-printer-escpr-1.8.3-1.src.rpm 5127233 BLAKE2B f00ec01459411100c0502afbda4d9b3449af80ac4517e4288c3861558eef6ec946f4a6c04ea4e22818a455befa652d7135a5d2bce5e3941284f16862ebc4546f SHA512 d4cbf8342e5c664c7473c43f00739bc5ea5f6ccdb818893338bab103cee77630aaf33c1714313e4ae79687a152f8389d9a68faff685d63a35888c28d9abce9dc -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.ebuild b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9-r1.ebuild index 663349e57345..ee7aecc88746 100644 --- 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-r1.ebuild @@ -3,13 +3,14 @@ EAPI=8 -SLOT="2" -MY_P="${PN}${SLOT}-${PV}" +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" @@ -17,7 +18,9 @@ QA_FLAGS_IGNORED="/usr/lib64/libescpr2.so.1.0.0" DEPEND="net-print/cups" RDEPEND="${DEPEND}" -S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}/${PN}-${SLOT}-gcc14.patch" +) src_configure() { econf \ diff --git a/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.3.ebuild b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.3.ebuild deleted file mode 100644 index 2b48a70d1ef0..000000000000 --- a/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.3.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit rpm - -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/15/47/99/379a81c231d0b6b3dfb3db2032ff6e23f7ccaa34/${P}-1.src.rpm" - -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" -) - -src_unpack() { - rpm_src_unpack "${A}" -} - -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/epson-inkjet-printer-escpr-1.8.4.ebuild b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.5.ebuild index 647e4b0f430d..ca70ea12d8a6 100644 --- a/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.4.ebuild +++ b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.8.5.ebuild @@ -8,11 +8,11 @@ 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/57/25/a928e7d08c825ef1cdb892e70318d986720cef8a/${P}-1.tar.gz" +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" +KEYWORDS="amd64 ppc64" DEPEND="net-print/cups" RDEPEND="${DEPEND}" @@ -20,7 +20,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/1.6.5-warnings.patch" "${FILESDIR}/${PN}-1.7.7-fnocommon.patch" - "${FILESDIR}/${P}-1-missing-include.patch" + "${FILESDIR}/${PN}-1.8-missing-include.patch" ) src_configure() { diff --git a/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-1.8.4-1-missing-include.patch b/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-1.8-missing-include.patch index 4229d649bb26..4229d649bb26 100644 --- a/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-1.8.4-1-missing-include.patch +++ b/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-1.8-missing-include.patch 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/foomatic-db-ppds/foomatic-db-ppds-4.0.20190226.ebuild b/net-print/foomatic-db-ppds/foomatic-db-ppds-4.0.20190226-r1.ebuild index aafc2714c037..0d96755a90e8 100644 --- a/net-print/foomatic-db-ppds/foomatic-db-ppds-4.0.20190226.ebuild +++ b/net-print/foomatic-db-ppds/foomatic-db-ppds-4.0.20190226-r1.ebuild @@ -1,25 +1,22 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 - -inherit versionator - -MY_P=${PN/-ppds}-$(replace_version_separator 2 '-') +EAPI=8 DESCRIPTION="linuxprinting.org PPD files for postscript printers" HOMEPAGE="http://www.linuxprinting.org/foomatic.html" -SRC_URI="http://linuxprinting.org/download/foomatic/${MY_P}.tar.xz" +SRC_URI="http://linuxprinting.org/download/foomatic/${PN/-ppds}-$(ver_rs 2 -).tar.xz" +S=${WORKDIR}/${PN/-ppds}-$(ver_cut 3) LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="" -S="${WORKDIR}/${PN/-ppds}-$(get_version_component_range 3 ${PV})" +PATCHES=( + "${FILESDIR}/Makefile.in-4.0.20120117.patch" +) src_prepare() { - eapply "${FILESDIR}/Makefile.in-4.0.20120117.patch" rm db/source/PPD/Kyocera/ReadMe.htm || die # bug #559008 default } diff --git a/net-print/foomatic-db/foomatic-db-4.0.20190226-r1.ebuild b/net-print/foomatic-db/foomatic-db-4.0.20190226-r1.ebuild new file mode 100644 index 000000000000..89e2462b4179 --- /dev/null +++ b/net-print/foomatic-db/foomatic-db-4.0.20190226-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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}-$(ver_rs 2 -).tar.xz" +S=${WORKDIR}/${PN}-$(ver_cut 3) + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" + +RDEPEND=" + net-print/foomatic-db-engine + !net-print/foo2zjs[hp2600n] +" + +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 + + cd "${ED}"/usr/share/foomatic/db/source/ || die + rm -r PPD || die + # Avoid collision with foo2zjs, bug 185486 + local FILES=( + driver/foo2{hp,lava,xqx,zjs}.xml + printer/Generic-ZjStream_Printer.xml + printer/HP-Color_LaserJet_{1500,1600,2600n}.xml + printer/HP-LaserJet_10{00,05,18,20,22}.xml printer/HP-LaserJet_M1005_MFP.xml + printer/Minolta-Color_PageWorks_Pro_L.xml printer/Minolta-magicolor_2{20,30,43}0_DL.xml + printer/Samsung-CLP-{3,6}00.xml + ) + rm -v "${FILES[@]}" || 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 deleted file mode 100644 index b559732c3d5b..000000000000 --- a/net-print/foomatic-db/foomatic-db-4.0.20190226.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2021 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/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/gutenprint/gutenprint-5.3.4-r2.ebuild b/net-print/gutenprint/gutenprint-5.3.4-r2.ebuild index 64355a5a47fe..dfd4b5b50189 100644 --- a/net-print/gutenprint/gutenprint-5.3.4-r2.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,7 +10,7 @@ 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" diff --git a/net-print/hplip-plugin/Manifest b/net-print/hplip-plugin/Manifest index 5f013fea62b8..9ad5358c0bc3 100644 --- a/net-print/hplip-plugin/Manifest +++ b/net-print/hplip-plugin/Manifest @@ -1 +1,2 @@ DIST hplip-3.23.12-plugin.run 11491524 BLAKE2B 9b87522a78588d65815992a170451888b4c6ac83809498fae01cfa4d2c333657a7cf49f2358e12ebfd0ae0f4169e29729e9ef8ba6716f74de0a83b11552275e3 SHA512 933c27040443584e0cfda71b50b8a251ebd34fdf4a2c90f40e36d1c155b3ae87c1474835356f685de2997469b4b7a3f000e216fd427118eea2542fa142783ab9 +DIST hplip-3.24.4-plugin.run 11490921 BLAKE2B 8eeb0a292b1a132841c2d69808441b281de04950be2b906a5906b36b634f30ed42484cc14ac232ef4c50ae5e660c5e48e2afc407e64b12f1b8deb7cf38425bf2 SHA512 21b1636d4d4f7f1673f1a88abc13f4f81c225d6a36a4d45f4f0579ec5ca9bb4a3885ffd413ab6888290c3e2aa62eef45a27cd5eb84c8f20ef3e6c09e24c854b9 diff --git a/net-print/hplip-plugin/hplip-plugin-3.24.4.ebuild b/net-print/hplip-plugin/hplip-plugin-3.24.4.ebuild new file mode 100644 index 000000000000..2325efad4421 --- /dev/null +++ b/net-print/hplip-plugin/hplip-plugin-3.24.4.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +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 ~arm64 ~x86" +IUSE="orblite" +# License does not allow us to redistribute the "source" package +RESTRICT="mirror" + +RDEPEND=" + ~net-print/hplip-${PV} + virtual/udev + orblite? ( + media-gfx/sane-backends + >=sys-libs/glibc-2.26 + virtual/libusb:0 + ) +" + +HPLIP_HOME=/usr/share/hplip + +# Binary prebuilt package +QA_PREBUILT="${HPLIP_HOME}/*.so" + +src_install() { + 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 + + 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/Manifest b/net-print/hplip/Manifest index d7ed9f2773b8..1c60ce864c2b 100644 --- a/net-print/hplip/Manifest +++ b/net-print/hplip/Manifest @@ -1,2 +1,5 @@ DIST hplip-3.23.12-patches-1.tar.xz 21132 BLAKE2B 83cee13ef988618cf6537b3954649c733b3de99f4d1c2ffefe9aeaba8f21e61a92dfa2e4cdb87af3d4b56df244e7de1b1d6bf73d878aa8ccabe60c537e05916f SHA512 89a0139660b013c11ba1dfa6adf1840b8ccc5b49bc31580481967c85e75ca79aba537bc4b65834ee464013b7aa0544267235d14dc877cb5276cb6e89c6a3fafa +DIST hplip-3.23.12-patches-2.tar.xz 22484 BLAKE2B 919be82d0639bc30fdbe6a5651ec08c8b6951fc31284e52f09ea2aed254bb34024c7f757ec3eccec6c0fd5d261a625c2e77d6aa33d298287f26313811280e3b7 SHA512 bc9746fb748819ca06a0a3d5b2a66ab15ef499ed01177fd936f754d743a282253897db7f813ba8165e8336a9a3540c2f9b99e10908930b3842ef7452957afc13 DIST hplip-3.23.12.tar.gz 30162044 BLAKE2B 752a5b75855677e4f8b5b8738181d40c426268be4e393e5df7565c78efca68389e86d92f21002a733c0b2d5d62913bef3986e4bedd36a9f35f205c11e6027e7a SHA512 7461ffec38be68421e4204021f53d2b1641e7a67c14f205390d45f487a1af90956fd221f7e1561635508103ae944f19e04d6052d3f8928f2c9685fdcdcf515df +DIST hplip-3.24.4-patches-1.tar.xz 22068 BLAKE2B 9b388033b17315c407014b0b344e2994c456c84dd856f3f522e202b431a03fb315060d74ead98696af62934fa5e5d44185cae20cd3171252f33049a9832b15f5 SHA512 292c5717627ecbb5f50b2ecad82fdf43bb80c3128f1e4c3cc806167dd34ac9c7c5c2a988103ec18fc82483ba95221261c7935271a0b213523f00a4e9de23731c +DIST hplip-3.24.4.tar.gz 30217933 BLAKE2B 0b5c93465f6d9e30916bf57fd7f2d490d2f04ef80ed1654a7d2c6adc57a5293e358720a71bbb76757a1496d9f7ca05f077f6e9ea62cfa243319fe9d551440710 SHA512 6162ec58289433659ed4c3a254b2a50863c01acb87a8c0e1a1f935fed2b1916c5ae211c2d84130f40963368ff53e0c8da1878a1fce4dd08bd517f65bbcf6a2d2 diff --git a/net-print/hplip/hplip-3.23.12-r1.ebuild b/net-print/hplip/hplip-3.23.12-r1.ebuild index e1ab49564e06..24eb1e8fa894 100644 --- a/net-print/hplip/hplip-3.23.12-r1.ebuild +++ b/net-print/hplip/hplip-3.23.12-r1.ebuild @@ -10,12 +10,12 @@ 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/project/${PN}/${PN}/${PV}/${P}.tar.gz +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" diff --git a/net-print/hplip/hplip-3.23.12.ebuild b/net-print/hplip/hplip-3.23.12-r3.ebuild index e9658aec1aff..334bc12d73c9 100644 --- a/net-print/hplip/hplip-3.23.12.ebuild +++ b/net-print/hplip/hplip-3.23.12-r3.ebuild @@ -3,31 +3,31 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10,11} ) +PYTHON_COMPAT=( python3_{10,11,12} ) PYTHON_REQ_USE="threads(+),xml(+)" 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/project/${PN}/${PN}/${PV}/${P}.tar.gz - https://dev.gentoo.org/~billie/distfiles/${PN}-3.23.12-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-2.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 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 ) @@ -189,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 @@ -234,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) \ diff --git a/net-print/hplip/hplip-3.24.4.ebuild b/net-print/hplip/hplip-3.24.4.ebuild new file mode 100644 index 000000000000..684d9692524b --- /dev/null +++ b/net-print/hplip/hplip-3.24.4.ebuild @@ -0,0 +1,296 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10,11,12} ) +PYTHON_REQ_USE="threads(+),xml(+)" + +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="https://downloads.sourceforge.net/project/${PN}/${PN}/${PV}/${P}.tar.gz + https://dev.gentoo.org/~billie/distfiles/${PN}-3.24.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 + 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:=[${PYTHON_SINGLE_USEDEP}] + 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() { + # -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 + 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-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 + 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 \ + ${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() { + udev_reload + readme.gentoo_print_elog +} + +pkg_postrm() { + udev_reload +} diff --git a/net-print/ink/ink-0.5.3.ebuild b/net-print/ink/ink-0.5.3.ebuild index 9818121ef750..766b299210e4 100644 --- a/net-print/ink/ink-0.5.3.ebuild +++ b/net-print/ink/ink-0.5.3.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 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" diff --git a/net-print/kyocera-1x2x-mfp-driver/kyocera-1x2x-mfp-driver-1.1203-r1.ebuild b/net-print/kyocera-1x2x-mfp-driver/kyocera-1x2x-mfp-driver-1.1203-r2.ebuild index a575ee6097e4..ee73cd5036fb 100644 --- a/net-print/kyocera-1x2x-mfp-driver/kyocera-1x2x-mfp-driver-1.1203-r1.ebuild +++ b/net-print/kyocera-1x2x-mfp-driver/kyocera-1x2x-mfp-driver-1.1203-r2.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 DESCRIPTION="Printer descriptions (PPDs) and filters for Kyocera 1x2x MFP" HOMEPAGE="http://www.kyoceradocumentsolutions.eu" @@ -9,49 +9,35 @@ SRC_URI="LinuxDrv_${PV}_FS-1x2xMFP.zip" LICENSE="GPL-2 kyocera-mita-ppds" SLOT="0" - KEYWORDS="-* ~amd64" -IUSE_L10N=(en ar cs de el es fr he hu it ko pl pt ro ru th tr vi zh-CN zh-TW) +IUSE_L10N=( en ar cs de el es fr he hu it ko pl pt ro ru th tr vi zh-CN zh-TW ) IUSE="+rastertokpsl-fix +${IUSE_L10N[@]/#/l10n_}" REQUIRED_USE="|| ( ${IUSE_L10N[@]/#/l10n_} )" +RESTRICT="fetch mirror" RDEPEND="net-print/cups" -DEPEND="app-arch/unzip" -RESTRICT="fetch mirror" +BDEPEND="app-arch/unzip" + QA_PREBUILT="/usr/libexec/cups/filter/rastertokpsl" get_tarball_name() { # Note the capitalization inconsistency. Don't "fix" that. - case "$1" in - ar) echo arabic ;; - cs) echo czech ;; - de) echo German ;; - el) echo greek ;; - en) echo English ;; - es) echo Spanish ;; - fr) echo French ;; - he) echo hebrew ;; - hu) echo hungarian ;; - it) echo Italian ;; - ko) echo Korean ;; - pl) echo polish ;; - pt) echo Portuguese ;; - ro) echo romanian ;; - ru) echo russian ;; - th) echo thai ;; - tr) echo turkish ;; - vi) echo vietnamese ;; - zh-CN) echo simplified ;; - zh-TW) echo traditional ;; - *) die ;; - esac + declare -A animals=( + [ar]=arabic [cs]=czech [de]=German [el]=greek [en]=English + [es]=Spanish [fr]=French [he]=hebrew [hu]=hungarian [it]=Italian + [ko]=Korean [pl]=polish [pt]=Portuguese [ro]=romanian [ru]=russian + [th]=thai [tr]=turkish [vi]=vietnamese [zh-CN]=simplified [zh-TW]=traditional + ) + echo "${animals[$1]}" } pkg_nofetch() { - einfo "Please, navigate your browser to the following URL and manually" + einfo "Please, navigate your browser to the following URL, select" + einfo "'Support - Downloads' in the menu, select 'FS-1025MFP'," + einfo "select 'Linux print driver (${PV})', accept EULA, and manually" einfo "download the file named '${A}', then put it into your DISTDIR." - einfo "https://www.kyoceradocumentsolutions.eu/index/service/dlc.false.driver.FS1025MFP._.EN.html" + einfo "https://www.kyoceradocumentsolutions.eu/en/support/downloads.name-L2V1L2VuL21mcC9GUzExMjVNRlA=.html" einfo einfo "Consider keeping a local copy of the file since there're chances" einfo "the company is going to eventually stop hosting it for whatever" 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 index af4e7ce42ad6..6a44a004e2a7 100644 --- a/net-print/libcupsfilters/libcupsfilters-2.0.0-r3.ebuild +++ b/net-print/libcupsfilters/libcupsfilters-2.0.0-r3.ebuild @@ -39,6 +39,10 @@ BDEPEND=" test? ( media-fonts/dejavu ) " +PATCHES=( + "${FILESDIR}/${P}-r3-c++17.patch" +) + src_prepare() { default diff --git a/net-print/libcupsfilters/libcupsfilters-2.0.0-r5.ebuild b/net-print/libcupsfilters/libcupsfilters-2.0.0-r5.ebuild new file mode 100644 index 000000000000..aee0c3bce0ec --- /dev/null +++ b/net-print/libcupsfilters/libcupsfilters-2.0.0-r5.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/libinklevel/libinklevel-0.9.3.ebuild b/net-print/libinklevel/libinklevel-0.9.3.ebuild index b1645bd19cf0..3e9d079e6f5f 100644 --- a/net-print/libinklevel/libinklevel-0.9.3.ebuild +++ b/net-print/libinklevel/libinklevel-0.9.3.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=8 @@ -8,7 +8,7 @@ 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" 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 index e11a328fb390..431deb11dbfc 100644 --- a/net-print/libppd/libppd-2.0.0.ebuild +++ b/net-print/libppd/libppd-2.0.0.ebuild @@ -3,6 +3,8 @@ 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" @@ -10,7 +12,7 @@ SRC_URI="https://github.com/OpenPrinting/libppd/releases/download/${PV}/${P}.tar LICENSE="Apache-2.0" SLOT="0" IUSE="+postscript +poppler" -KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86" +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 @@ -29,6 +31,15 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}"/${P}-slibtool.patch +) + +src_prepare() { + default + eautoreconf +} + src_configure() { local myeconfargs=( --localstatedir="${EPREFIX}"/var 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/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/npadmin-0.8.7-r1.ebuild b/net-print/npadmin/npadmin-0.8.7-r2.ebuild index 02d07aa1dfac..97584d2906c8 100644 --- a/net-print/npadmin/npadmin-0.8.7-r1.ebuild +++ b/net-print/npadmin/npadmin-0.8.7-r2.ebuild @@ -1,25 +1,32 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 -DESCRIPTION="Network printer command-line adminstration tool" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" -HOMEPAGE="http://npadmin.sourceforge.net/" +inherit autotools -# this does NOT link against SNMP -DEPEND="" +DESCRIPTION="Network printer command-line administration tool" +HOMEPAGE="https://npadmin.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" -KEYWORDS="amd64 ~ppc x86" -IUSE="" 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 diff --git a/net-print/pnm2ppa/pnm2ppa-1.13-r2.ebuild b/net-print/pnm2ppa/pnm2ppa-1.13-r2.ebuild index 971217523709..ac933c7f1679 100644 --- a/net-print/pnm2ppa/pnm2ppa-1.13-r2.ebuild +++ b/net-print/pnm2ppa/pnm2ppa-1.13-r2.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2022 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" 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/Manifest b/net-print/splix/Manifest index 4df920013eab..4950ef649caf 100644 --- a/net-print/splix/Manifest +++ b/net-print/splix/Manifest @@ -1,2 +1,3 @@ DIST samsung-cms-20120312.tar.xz 3354884 BLAKE2B ebff80c7e4ddebb87c46b0d282c64037d7584170ed224931e5b17fc93a76b162bd1b33ed00c59371464dcaef345cf6c33d428aa42c7b67c82958a23384ed0bac SHA512 448f111493540dc93b88d59fa50857bdca2aa9eb772e53c1d227402235d878ad599683d74bc4d815b4789527b5e7ebe207bb0c8fa9194eaf61ca95b78a1444db DIST splix-2.0.0_p20130826.tar.bz2 127278 BLAKE2B 6a8eb6b15e5208dd4173d50bf2b41d0e0f136057fbb46f36fb68ab1302c0c8a6b735311bc03f15e7afce0de802b3fa62df04ad5cd016532216b67a74e39835c3 SHA512 dda07e24b4321e6c1e3d4fbdd03fcc2b5931465db36ed9d8676a62313c4c64b7cbd58bf41996ddd1ab02086438f225439db0506aca7f0269f6c84e80eff72cb0 +DIST splix-2.0.1.tar.xz 93032 BLAKE2B 82de9e591bda902cee9423e3f626a5b8b13b8ec0e2fd842142b10549d87094316d59c57a005615bf37601ecedf9d5defc59beb5312b4e1269ff1db207c3722bc SHA512 45708d65576e87c9f0c9cc7d4919ea19b1418bb932854b14a80bbcf890e28f7ee11ac64a5b9ccca1b8f4aec803822392ab738329d3e9894ad60b5393bffeef74 diff --git a/net-print/splix/metadata.xml b/net-print/splix/metadata.xml index 2ea580a8d8e2..3ddb1879ca37 100644 --- a/net-print/splix/metadata.xml +++ b/net-print/splix/metadata.xml @@ -11,5 +11,6 @@ </maintainer> <upstream> <remote-id type="sourceforge">splix</remote-id> + <remote-id type="github">OpenPrinting/splix</remote-id> </upstream> </pkgmetadata> diff --git a/net-print/splix/splix-2.0.1.ebuild b/net-print/splix/splix-2.0.1.ebuild new file mode 100644 index 000000000000..365ce4c1ab21 --- /dev/null +++ b/net-print/splix/splix-2.0.1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit toolchain-funcs + +DESCRIPTION="A set of CUPS printer drivers for SPL (Samsung Printer Language) printers" +HOMEPAGE="https://splix.sourceforge.net/" +SRC_URI="https://github.com/OpenPrinting/splix/releases/download/${PV}/${P}.tar.xz + https://dev.gentoo.org/~voyageur/distfiles/samsung-cms-20120312.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="+jbig" + +DEPEND=">=app-text/ghostscript-gpl-9.02 + >=net-print/cups-1.4.0 + jbig? ( media-libs/jbigkit )" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/${PN}-2.0.0_p20130826-algo0x11_le.patch ) + +src_prepare() { + default + + # Move to correct place + mv *.ppd ppd/ + # Honor LDFLAGS + sed -e "/[a-z]_LDFLAGS/s/:=.*/:= $\{LDFLAGS\}/" -i module.mk \ + || die +} + +src_compile() { + local options="MODE=optimized" + use jbig || options="${options} DISABLE_JBIG=1" + emake ${options} PSTORASTER=gstoraster CXX="$(tc-getCXX)" \ + OPTIM_CFLAGS="${CFLAGS}" OPTIM_CXXFLAGS="${CXXFLAGS}" +} + +src_install() { + emake DESTDIR="${D}" install + gzip "${ED}"/$(cups-config --datadir)/model/*/*.ppd || die + + emake DESTDIR="${D}" CMSDIR="${WORKDIR}"/cms MANUFACTURER=samsung installcms + # Add symlinks for xerox and dell models (installed in samsung) + dosym $(cups-config --datadir)/profiles/samsung $(cups-config --datadir)/profiles/xerox + dosym $(cups-config --datadir)/profiles/samsung $(cups-config --datadir)/profiles/dell +} + +pkg_postinst() { + ewarn "You *MUST* make sure that the PPD files that CUPS is using" + ewarn "for actually installed printers are updated if you upgraded" + ewarn "from a previous version of splix!" + ewarn "Otherwise you will be unable to print (your printer might" + ewarn "spit out blank pages etc.)." + ewarn "To do that, simply delete the corresponding PPD file in" + ewarn "/etc/cups/ppd/, click on 'Modify Printer' belonging to the" + ewarn "corresponding printer in the CUPS webinterface (usually" + ewarn "reachable via http://localhost:631/) and choose the correct" + ewarn "printer make and model, for example:" + ewarn "'Samsung' -> 'Samsung ML-1610, 1.0 (en)'" +} |