public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/musl:master commit in: net-print/cups-filters/, net-print/cups-filters/files/
@ 2015-07-20 23:14 Anthony G. Basile
  0 siblings, 0 replies; only message in thread
From: Anthony G. Basile @ 2015-07-20 23:14 UTC (permalink / raw
  To: gentoo-commits

commit:     dcc77aa2425d4b53fe7dd806b1df0e937eef6cef
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 20 23:17:17 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Jul 20 23:17:17 2015 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=dcc77aa2

net-print/cups-filters: drop c++ -pedantic.

Package-Manager: portage-2.2.18
RepoMan-Options: --force
Manifest-Sign-Key: 0xF52D4BBA

 net-print/cups-filters/Manifest                    |   7 ++
 .../cups-filters/cups-filters-1.0.71-r99.ebuild    | 125 +++++++++++++++++++++
 net-print/cups-filters/files/cups-browsed.init.d   |  20 ++++
 net-print/cups-filters/files/cups-browsed.service  |  10 ++
 .../files/cups-filters-1.0.71-poppler0340.patch    |  38 +++++++
 .../cups-filters-1.0.71-remove-c++-pedantic.patch  |  38 +++++++
 net-print/cups-filters/metadata.xml                |  10 ++
 7 files changed, 248 insertions(+)

diff --git a/net-print/cups-filters/Manifest b/net-print/cups-filters/Manifest
new file mode 100644
index 0000000..2e58a4c
--- /dev/null
+++ b/net-print/cups-filters/Manifest
@@ -0,0 +1,7 @@
+AUX cups-browsed.init.d 399 SHA256 d4d27c920ab062532755b553544ff3ef4d561d03bda0728d21e71c83d0e904bd SHA512 3762f18e57e317e4e2b40b1f42da79e383de4f4a360cd7317ae1780edd44ffde007b0ced88bac6b24d082d0fab19425360eec891ba86fe46d9e201e1081a2beb WHIRLPOOL 38782d813df3be20f1d6a15c2aecc94a1409bd8e90b0a2f65f73f512b3ff37afc06c57dbd6be24abd1dead189ea1c75292bc45e68303de4141ef748e9ca58577
+AUX cups-browsed.service 225 SHA256 f4cd6ac0da207deb3b9991264fcb8d3468ae7c5c4fcd1957d296d344fd9e3d44 SHA512 16d7a8b0c95827582706764ca6f96720561e8c314929f6d53c98dccb68b6df21d5928949b0aaf7c2f738ab5c07ee2678d643b9acb6b581bb77a67db950082cdb WHIRLPOOL d1606f5ebfc84398502282e9c1e42bed6701f2d4e284f1214ef924aa94fe2be3e169d83f9d9fdd34a817514df35e680f38b3e91fb7e965510621e3fad8002f14
+AUX cups-filters-1.0.71-poppler0340.patch 1887 SHA256 8307df77f0780f607351627d02468a4ab9a09055b0c32295df1eb989dcbcad74 SHA512 720f33e466d31738ddd3fa2579874a6a05a952bf9fa3b01cfb26da809c664e7eb6b2529ce806d8334789aa51c54300791c407fc866bf2a5752cc26f026a71c36 WHIRLPOOL fd4d2e423a4f8cfe00beffa998d562a8badca8dab82361cdff66e6d69cb472edb51d71f914014fceaedcffc5767d549c164a28845f21269d8169edb1e4b24ebd
+AUX cups-filters-1.0.71-remove-c++-pedantic.patch 2353 SHA256 cadeca2d9a09f17b932e8a46b297d480aa39ee9a39b924eb5402da429e69b6e8 SHA512 9dd3766fefe121c1b6ad12fe2454ae7ddd37a9b2245b450270a1969aa5cd25b99623cbf7a9798102a3507a80542eb7a68adc257a28b5c7d59201ae7920ba3c8b WHIRLPOOL 5d85e18df386018a647ce0ec9cff4db25ed62d2b04bf808f4930593ff53c380b55d114500d9adb7bb314c4ff8e50b88b07e757cee6d04b45f0ef70294c163ee0
+DIST cups-filters-1.0.71.tar.xz 1339116 SHA256 3180aa209c383402822e568ccef8e1ca43f51e30b3af2039c34ebae919a69c1f SHA512 dc243e88d535c8d7e7fd53074b1093a46fc22742504efa09096d2b216846df875e4d914f25d2f726034692538cfdf1b713bc1ef44d199003a21e242b99f44a01 WHIRLPOOL 4afc7079594563f57af81501192cc0cba19db6cd5c10a9544339858a343e245b485e528fbf80eecd711341b23b8321bde817c49db7ddd2f0b801da2b4b9c580d
+EBUILD cups-filters-1.0.71-r99.ebuild 3403 SHA256 feb6c09fe6c28b11697a99607256c0abdd8eec05dbde472d7cf309fd6c433abb SHA512 3ec05fc56890f53c0353f4c76c38e963e99bd1476a8506aa32e8b1e72c3c182bc7cf9bb89d4769c52b4ab8bdea23858cdc1a02f29a6cd14b73a05ff67de2aad9 WHIRLPOOL 616bf845e9335c95aa27cdc4f7f0028e6a6b20bbb6f3291d1b0cfc7c05ed682b6f7a82c40d4cb7d39714fb5162f114fa4154a03e11c7235d67a2e1040842f75e
+MISC metadata.xml 290 SHA256 07d21bc9b73af41131dc35b0b30829bb124443a931df199fad5720fd0c6ecb82 SHA512 8614acef9fc5a0d78a7c65ce34d79189c2496946a4bccb215b9404abdc0c821ee89f3a89892e2c320359063fc43750c9e9581b7fb732d9d710ff7bb2dd6229db WHIRLPOOL a0ef99c415a6e3dea7f7c0f2349ea67ce76e8361f36d1f8c828d136ebf01e4d3a5b1038aba6aea92843ab67bed68c38a0a841f3620e7d46aa205360694e682ba

diff --git a/net-print/cups-filters/cups-filters-1.0.71-r99.ebuild b/net-print/cups-filters/cups-filters-1.0.71-r99.ebuild
new file mode 100644
index 0000000..7c93492
--- /dev/null
+++ b/net-print/cups-filters/cups-filters-1.0.71-r99.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2015 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.71.ebuild,v 1.8 2015/07/19 17:51:07 zlogene 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=""
+else
+	SRC_URI="http://www.openprinting.org/download/${PN}/${P}.tar.xz"
+	KEYWORDS="amd64 arm ~mips ppc 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.7.3
+	!<=net-print/cups-1.5.9999
+	sys-devel/bc
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	foomatic? ( !net-print/foomatic-filters )
+	jpeg? ( virtual/jpeg:0 )
+	perl? ( dev-lang/perl:= )
+	png? ( media-libs/libpng:0= )
+	tiff? ( media-libs/tiff:0 )
+	zeroconf? ( net-dns/avahi[dbus] )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-1.0.71-poppler0340.patch"
+	"${FILESDIR}/${PN}-1.0.71-remove-c++-pedantic.patch"
+)
+
+src_prepare() {
+	base_src_prepare
+	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_configure
+		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
+		perl_delete_localpod
+		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/bin/foomatic-rip" || die
+		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() {
+	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.71-poppler0340.patch b/net-print/cups-filters/files/cups-filters-1.0.71-poppler0340.patch
new file mode 100644
index 0000000..ac0cae3
--- /dev/null
+++ b/net-print/cups-filters/files/cups-filters-1.0.71-poppler0340.patch
@@ -0,0 +1,38 @@
+Hack to make this build against poppler-0.34. Just disables color management in some places.
+We should probably find a better solution. dilfridge@gentoo.org
+
+
+diff -ruN cups-filters-1.0.71.orig/filter/pdftoopvp/OPVPOutputDev.cxx cups-filters-1.0.71/filter/pdftoopvp/OPVPOutputDev.cxx
+--- cups-filters-1.0.71.orig/filter/pdftoopvp/OPVPOutputDev.cxx	2015-06-26 17:45:26.000000000 +0200
++++ cups-filters-1.0.71/filter/pdftoopvp/OPVPOutputDev.cxx	2015-07-14 19:02:51.666737621 +0200
+@@ -1812,9 +1812,15 @@
+   maskSplash->drawImage(&imageSrc, &imgMaskData,
+ 			splashModeMono8, gFalse, maskWidth, maskHeight, mat);
+ #else
++#if POPPLER_VERSION_MAJOR <= 0 && POPPLER_VERSION_MINOR <= 33
+   maskSplash->drawImage(&imageSrc, &imgMaskData,
+ 			splashModeMono8, gFalse, maskWidth, maskHeight,
+                         mat,gFalse);
++#else
++  maskSplash->drawImage(&imageSrc, NULL, &imgMaskData,
++			splashModeMono8, gFalse, maskWidth, maskHeight,
++                        mat,gFalse);
++#endif
+ #endif
+   delete imgMaskData.imgStr;
+   maskStr->close();
+diff -ruN cups-filters-1.0.71.orig/filter/pdftoopvp/oprs/OPRS.cxx cups-filters-1.0.71/filter/pdftoopvp/oprs/OPRS.cxx
+--- cups-filters-1.0.71.orig/filter/pdftoopvp/oprs/OPRS.cxx	2015-06-26 17:45:26.000000000 +0200
++++ cups-filters-1.0.71/filter/pdftoopvp/oprs/OPRS.cxx	2015-07-14 19:00:20.655740720 +0200
+@@ -241,7 +241,11 @@
+ #if POPPLER_VERSION_MAJOR <= 0 && (POPPLER_VERSION_MINOR <= 20 || (POPPLER_VERSION_MINOR == 21 && POPPLER_VERSION_MICRO <= 2))
+ 	return splash->drawImage(src,srcData,srcMode,srcAlpha,w,h,mat);
+ #else
++#if POPPLER_VERSION_MAJOR <= 0 && POPPLER_VERSION_MINOR <= 33
+ 	return splash->drawImage(src,srcData,srcMode,srcAlpha,w,h,mat,gFalse);
++#else
++	return splash->drawImage(src,NULL,srcData,srcMode,srcAlpha,w,h,mat,gFalse);
++#endif
+ #endif
+     } else {
+ 	return opvpSplash->drawImage(src,srcData,srcMode,srcAlpha,w,h,mat);

diff --git a/net-print/cups-filters/files/cups-filters-1.0.71-remove-c++-pedantic.patch b/net-print/cups-filters/files/cups-filters-1.0.71-remove-c++-pedantic.patch
new file mode 100644
index 0000000..76641e8
--- /dev/null
+++ b/net-print/cups-filters/files/cups-filters-1.0.71-remove-c++-pedantic.patch
@@ -0,0 +1,38 @@
+This may be due to a bug in musl's stdlib.h:
+
+fuschia ~ # cat test.cpp 
+#include <algorithm>
+fuschia ~ # g++ -std=c++98 -pedantic -c test.cpp 
+fuschia ~ # g++ -std=c++11 -pedantic -c test.cpp 
+In file included from /usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/xmmintrin.h:38:0,
+                 from /usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/x86intrin.h:34,
+                 from /usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/g++-v4/x86_64-gentoo-linux-musl/bits/opt_random.h:33,
+                 from /usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/g++-v4/random:51,
+                 from /usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/g++-v4/bits/stl_algo.h:65,
+                 from /usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/g++-v4/algorithm:62,
+                 from test.cpp:1:
+/usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/mm_malloc.h:34:64: error: declaration of 'int posix_memalign(void**, size_t, size_t) throw ()' has a different exception specifier
+ extern "C" int posix_memalign (void **, size_t, size_t) throw ();
+                                                                ^
+In file included from /usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/g++-v4/cstdlib:72:0,
+                 from /usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/g++-v4/bits/stl_algo.h:59,
+                 from /usr/lib/gcc/x86_64-gentoo-linux-musl/4.8.4/include/g++-v4/algorithm:62,
+                 from test.cpp:1:
+/usr/include/stdlib.h:98:5: error: from previous declaration 'int posix_memalign(void**, size_t, size_t)'
+ int posix_memalign (void **, size_t, size_t);
+     ^
+
+See: https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01425.html
+
+diff -Naur cups-filters-1.0.71.orig/configure.ac cups-filters-1.0.71/configure.ac
+--- cups-filters-1.0.71.orig/configure.ac	2015-07-02 19:04:48.000000000 -0400
++++ cups-filters-1.0.71/configure.ac	2015-07-20 19:06:48.875330353 -0400
+@@ -602,7 +602,7 @@
+ AS_IF([test x"$GCC" = "xyes"], [
+ 	# Be tough with warnings and produce less careless code
+ 	CFLAGS="$CFLAGS -Wall -pedantic -std=gnu99"
+-	CXXFLAGS="$CXXFLAGS -Wall -pedantic" # -Weffc++" # TODO: enable when it does not print 1MB of warnings
++	CXXFLAGS="$CXXFLAGS -Wall" # -Weffc++" # TODO: enable when it does not print 1MB of warnings
+ ])
+ CFLAGS="$CFLAGS -D_GNU_SOURCE"
+ CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"

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:[~2015-07-20 23:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-20 23:14 [gentoo-commits] proj/musl:master 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