* [gentoo-commits] proj/hardened-dev:uclibc commit in: net-print/cups-filters/, net-print/cups-filters/files/
@ 2014-05-11 17:23 Anthony G. Basile
0 siblings, 0 replies; only message in thread
From: Anthony G. Basile @ 2014-05-11 17:23 UTC (permalink / raw
To: gentoo-commits
commit: 7a96c8635745782e65ec0f9883778fea635c8bc3
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun May 11 17:24:57 2014 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun May 11 17:24:57 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=7a96c863
net-print/cups-filters: fix mkstemps, bug #509884
Package-Manager: portage-2.2.8-r1
RepoMan-Options: --force
Manifest-Sign-Key: 0xF52D4BBA
---
.../cups-filters/cups-filters-1.0.53-r99.ebuild | 126 +++++++++++++++++++++
net-print/cups-filters/files/cups-browsed.init.d | 20 ++++
net-print/cups-filters/files/cups-browsed.service | 10 ++
.../files/cups-filters-1.0.53-uclibc.patch | 16 +++
net-print/cups-filters/metadata.xml | 10 ++
5 files changed, 182 insertions(+)
diff --git a/net-print/cups-filters/cups-filters-1.0.53-r99.ebuild b/net-print/cups-filters/cups-filters-1.0.53-r99.ebuild
new file mode 100644
index 0000000..70bc467
--- /dev/null
+++ b/net-print/cups-filters/cups-filters-1.0.53-r99.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-print/cups-filters/cups-filters-1.0.53.ebuild,v 1.7 2014/05/10 14:01:00 ago Exp $
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL=no
+
+inherit base eutils perl-module autotools systemd
+
+if [[ "${PV}" == "9999" ]] ; then
+ inherit bzr
+ EBZR_REPO_URI="http://bzr.linuxfoundation.org/openprinting/cups-filters"
+ KEYWORDS="amd64 arm hppa ppc x86"
+else
+ SRC_URI="http://www.openprinting.org/download/${PN}/${P}.tar.xz"
+ KEYWORDS="amd64 arm ~mips x86"
+fi
+DESCRIPTION="Cups PDF filters"
+HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/pdfasstandardprintjobformat"
+
+LICENSE="MIT GPL-2"
+SLOT="0"
+IUSE="dbus +foomatic jpeg perl png static-libs tiff zeroconf"
+
+RDEPEND="
+ >=app-text/ghostscript-gpl-9.09
+ app-text/poppler:=[cxx,jpeg?,lcms,tiff?,xpdf-headers(+)]
+ >=app-text/qpdf-3.0.2:=
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/lcms:2
+ >net-print/cups-1.5.9999
+ !<=net-print/cups-1.5.9999
+ sys-devel/bc
+ sys-libs/zlib
+ dbus? ( sys-apps/dbus )
+ foomatic? ( !net-print/foomatic-filters )
+ jpeg? ( virtual/jpeg:0 )
+ perl? ( dev-lang/perl:= )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff )
+ zeroconf? ( net-dns/avahi[dbus] )
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ base_src_prepare
+ epatch "$FILESDIR/${P}-uclibc.patch"
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable dbus) \
+ $(use_enable zeroconf avahi) \
+ $(use_enable static-libs static) \
+ --with-fontdir="fonts/conf.avail" \
+ --with-pdftops=pdftops \
+ --enable-imagefilters \
+ $(use_with jpeg) \
+ $(use_with png) \
+ $(use_with tiff) \
+ --with-rcdir=no \
+ --with-browseremoteprotocols=DNSSD,CUPS \
+ --without-php
+}
+
+src_compile() {
+ MAKEOPTS=-j1 default
+
+ if use perl; then
+ pushd "${S}/scripting/perl" > /dev/null
+ perl-module_src_prep
+ perl-module_src_compile
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ default
+
+ if use perl; then
+ pushd "${S}/scripting/perl" > /dev/null
+ perl-module_src_install
+ fixlocalpod
+ popd > /dev/null
+ fi
+
+ # workaround: some printer drivers still require pstoraster and pstopxl, bug #383831
+ dosym /usr/libexec/cups/filter/gstoraster /usr/libexec/cups/filter/pstoraster
+ dosym /usr/libexec/cups/filter/gstopxl /usr/libexec/cups/filter/pstopxl
+
+ prune_libtool_files --all
+
+ cp "${FILESDIR}"/cups-browsed.init.d "${T}"/cups-browsed || die
+
+ if ! use zeroconf ; then
+ sed -i -e 's:need cupsd avahi-daemon:need cupsd:g' "${T}"/cups-browsed || die
+ sed -i -e 's:cups\.service avahi-daemon\.service:cups.service:g' "${S}"/utils/cups-browsed.service || die
+ fi
+
+ if ! use foomatic ; then
+ # this needs an upstream solution / configure switch
+ rm -v "${ED}/usr/libexec/cups/filter/foomatic-rip" || die
+ rm -v "${ED}/usr/share/man/man1/foomatic-rip.1" || die
+ fi
+
+ doinitd "${T}"/cups-browsed
+ systemd_dounit "${S}/utils/cups-browsed.service"
+}
+
+pkg_postinst() {
+ perl-module_pkg_postinst
+
+ elog "This version of cups-filters includes cups-browsed, a daemon that autodiscovers"
+ elog "remote queues via avahi or cups-1.5 browsing protocol and adds them to your cups"
+ elog "configuration. You may want to add it to your default runlevel."
+
+ if ! use foomatic ; then
+ ewarn "You are disabling the foomatic code in cups-filters. Please do that ONLY if absolutely."
+ ewarn "necessary. net-print/foomatic-filters as replacement is deprecated and unmaintained."
+ fi
+}
diff --git a/net-print/cups-filters/files/cups-browsed.init.d b/net-print/cups-filters/files/cups-browsed.init.d
new file mode 100644
index 0000000..785c13a
--- /dev/null
+++ b/net-print/cups-filters/files/cups-browsed.init.d
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+PIDFILE=/var/run/cups-browsed.pid
+
+depend() {
+ need cupsd avahi-daemon
+}
+
+start() {
+ ebegin "Starting cups-browsed"
+ start-stop-daemon --start --make-pidfile --pidfile "${PIDFILE}" \
+ --background --quiet --exec /usr/sbin/cups-browsed
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cups-browsed"
+ start-stop-daemon --stop --pidfile "${PIDFILE}" --quiet --exec /usr/sbin/cupsd
+ eend $?
+}
diff --git a/net-print/cups-filters/files/cups-browsed.service b/net-print/cups-filters/files/cups-browsed.service
new file mode 100644
index 0000000..144956c
--- /dev/null
+++ b/net-print/cups-filters/files/cups-browsed.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Make remote CUPS printers available locally
+After=cups.service avahi-daemon.service
+Wants=cups.service avahi-daemon.service
+
+[Service]
+ExecStart=/usr/sbin/cups-browsed
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-print/cups-filters/files/cups-filters-1.0.53-uclibc.patch b/net-print/cups-filters/files/cups-filters-1.0.53-uclibc.patch
new file mode 100644
index 0000000..88e6c34
--- /dev/null
+++ b/net-print/cups-filters/files/cups-filters-1.0.53-uclibc.patch
@@ -0,0 +1,16 @@
+--- cups-filters-1.0.53/filter/foomatic-rip/foomaticrip.c
++++ cups-filters-1.0.53-uclibc/filter/foomatic-rip/foomaticrip.c
+@@ -736,8 +736,13 @@ int main(int argc, char** argv)
+ debug = 1;
+
+ if (debug) {
++#ifdef __UCLIBC__
++ sprintf(tmp, "%s-log-XXXXXX", LOG_FILE);
++ int fd = mkstemp (tmp);
++#else
+ sprintf(tmp, "%s-XXXXXX.log", LOG_FILE);
+ int fd = mkstemps (tmp, 4);
++#endif
+ if (fd != -1)
+ logh = fdopen(fd, "w");
+ else
diff --git a/net-print/cups-filters/metadata.xml b/net-print/cups-filters/metadata.xml
new file mode 100644
index 0000000..dec732c
--- /dev/null
+++ b/net-print/cups-filters/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>printing</herd>
+ <use>
+ <flag name='foomatic'>
+ Build the included foomatic-rip printer driver. Strongly recommended.
+ </flag>
+ </use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-11 17:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-11 17:23 [gentoo-commits] proj/hardened-dev:uclibc commit in: net-print/cups-filters/, net-print/cups-filters/files/ Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox