]> git.pld-linux.org Git - packages/cups-filters.git/commitdiff
- new, based on fedora, patches imported from fedora auto/th/cups-filters-1.0.41-1
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 12 Nov 2013 20:34:43 +0000 (21:34 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 12 Nov 2013 20:34:43 +0000 (21:34 +0100)
cups-filters-dbus.patch [new file with mode: 0644]
cups-filters-pdf-landscape.patch [new file with mode: 0644]
cups-filters.spec [new file with mode: 0644]

diff --git a/cups-filters-dbus.patch b/cups-filters-dbus.patch
new file mode 100644 (file)
index 0000000..626d3e8
--- /dev/null
@@ -0,0 +1,58 @@
+diff -up cups-filters-1.0.41/Makefile.am.dbus cups-filters-1.0.41/Makefile.am
+--- cups-filters-1.0.41/Makefile.am.dbus       2013-10-25 14:12:56.000000000 +0100
++++ cups-filters-1.0.41/Makefile.am    2013-11-06 17:16:58.504234619 +0000
+@@ -474,9 +474,11 @@ gstoraster_SOURCES = \
+       cupsfilters/raster.h
+ gstoraster_CFLAGS = \
+       $(CUPS_CFLAGS) \
++      $(DBUS_CFLAGS) \
+       -I$(srcdir)/cupsfilters/
+ gstoraster_LDADD = \
+       $(CUPS_LIBS) \
++      $(DBUS_LIBS) \
+       libcupsfilters.la
+ imagetopdf_SOURCES = \
+diff -up cups-filters-1.0.41/config.h.in.dbus cups-filters-1.0.41/config.h.in
+diff -up cups-filters-1.0.41/configure.ac.dbus cups-filters-1.0.41/configure.ac
+--- cups-filters-1.0.41/configure.ac.dbus      2013-10-30 07:21:44.000000000 +0000
++++ cups-filters-1.0.41/configure.ac   2013-11-06 17:23:07.619921079 +0000
+@@ -114,6 +114,18 @@ AX_COMPARE_VERSION([$CUPS_VERSION],[gt],
+ AC_DEFINE(PDFTOPDF, [], [Needed for pdftopdf filter compilation])
+ AC_DEFINE_DIR(BANNERTOPDF_DATADIR, "{CUPS_DATADIR}/data", [Directory where bannertopdf finds its data files (PDF templates)])
++dnl DBus support
++DBUS_CFLAGS=""
++DBUS_LIBS=""
++AC_ARG_ENABLE([dbus], AC_HELP_STRING([--disable-dbus],
++    [Do not use dbus to communicate with external services]))
++if test "$enable_dbus" != "no"; then
++        PKG_CHECK_MODULES(DBUS, [dbus-1], [HAVE_DBUS=-DHAVE_DBUS])
++        AC_DEFINE([HAVE_DBUS], [], [Defines if dbus is available.])
++fi
++AC_SUBST(DBUS_CFLAGS)
++AC_SUBST(DBUS_LIBS)
++
+ AC_SEARCH_LIBS([dlopen],
+       [dl],
+       [AS_IF([test "$ac_cv_search_dlopen" != "none required"], [
+@@ -640,6 +652,7 @@ Build configuration:
+       php-config:      ${with_php_config}
+       test-font:       ${with_test_font_path}
+       tiff:            ${with_tiff}
++      dbus:            ${HAVE_DBUS}
+       avahi:           ${enable_avahi}
+       browsing:        ${with_browseremoteprotocols}
+       werror:          ${enable_werror}
+diff -up cups-filters-1.0.41/filter/colord.c.dbus cups-filters-1.0.41/filter/colord.c
+--- cups-filters-1.0.41/filter/colord.c.dbus   2013-07-29 20:12:42.000000000 +0100
++++ cups-filters-1.0.41/filter/colord.c        2013-11-06 17:16:58.505234623 +0000
+@@ -32,6 +32,8 @@ MIT Open Source License  -  http://www.o
+ #include <stdio.h>
+ #include <sys/types.h>
++#include "config.h"
++
+ #ifdef HAVE_DBUS
+   #include <dbus/dbus.h>
+ #endif
diff --git a/cups-filters-pdf-landscape.patch b/cups-filters-pdf-landscape.patch
new file mode 100644 (file)
index 0000000..5c9a776
--- /dev/null
@@ -0,0 +1,49 @@
+diff -up cups-filters-1.0.40/filter/pdftops.c.pdf-landscape cups-filters-1.0.40/filter/pdftops.c
+--- cups-filters-1.0.40/filter/pdftops.c.pdf-landscape 2013-10-11 17:15:45.639623613 +0100
++++ cups-filters-1.0.40/filter/pdftops.c       2013-10-11 17:22:41.517421905 +0100
+@@ -273,7 +273,6 @@ main(int  argc,                            /* I - Number of comm
+               *pstops_options,        /* Options for pstops filter */
+               *pstops_end;            /* End of pstops filter option */
+   const char  *cups_serverbin;        /* CUPS_SERVERBIN environment variable */
+-  const char  *content_type;          /* CONTENT_TYPE environment variable */
+ #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+   struct sigaction action;            /* Actions for POSIX signals */
+ #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
+@@ -457,7 +456,6 @@ main(int  argc,                            /* I - Number of comm
+   * Build the command-line for the pdftops or gs filter...
+   */
+-  content_type = getenv("CONTENT_TYPE");
+   if (renderer == PDFTOPS)
+   {
+     pdf_argv[0] = (char *)"pdftops";
+@@ -646,25 +644,17 @@ main(int  argc,                          /* I - Number of comm
+     else if ((renderer == PDFTOPS) || (renderer == PDFTOCAIRO))
+     {
+      /*
+-      *  Use the page sizes of the original PDF document, this way documents
+-      *  which contain pages of different sizes can be printed correctly
++      *  No options to add. Note: pdftopdf has already rotated pages
++      *  for us.
+       */
+-
+-      /* Only do this for unprocessed PDF files */
+-      if (content_type && !strstr (content_type, "/vnd.cups-"))
+-        pdf_argv[pdf_argc++] = (char *)"-origpagesizes";
+     }
+ #endif /* HAVE_POPPLER_PDFTOPS_WITH_ORIGPAGESIZES */
+     else if (renderer == ACROREAD)
+     {
+      /*
+-      * Use the page sizes of the original PDF document, this way documents
+-      * which contain pages of different sizes can be printed correctly
++      *  No options to add. Note: pdftopdf has already rotated pages
++      *  for us.
+       */
+-     
+-      /* Only do this for unprocessed PDF files */
+-      if (content_type && !strstr (content_type, "/vnd.cups-"))
+-        pdf_argv[pdf_argc++] = (char *)"-choosePaperByPDFPageSize";
+     }
+    /*
diff --git a/cups-filters.spec b/cups-filters.spec
new file mode 100644 (file)
index 0000000..66cbe95
--- /dev/null
@@ -0,0 +1,206 @@
+%define                _cups_serverbin         %(/usr/bin/cups-config --serverbin)
+
+Summary:       OpenPrinting CUPS filters and backends
+Name:          cups-filters
+Version:       1.0.41
+Release:       1
+# For a breakdown of the licensing, see COPYING file
+# GPLv2:   filters: commandto*, imagetoraster, pdftops, rasterto*,
+#                   imagetopdf, pstopdf, texttopdf
+#         backends: parallel, serial
+# GPLv2+:  filters: gstopxl, textonly, texttops, imagetops
+# GPLv3:   filters: bannertopdf
+# GPLv3+:  filters: urftopdf
+# LGPLv2+:   utils: cups-browsed
+# MIT:     filters: gstoraster, pdftoijs, pdftoopvp, pdftopdf, pdftoraster
+License:       GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT
+Group:         Applications/Printing
+Source0:       http://www.openprinting.org/download/cups-filters/%{name}-%{version}.tar.xz
+# Source0-md5: fe5a9a07b9a64b35975154068cbedef9
+Patch1:                %{name}-pdf-landscape.patch
+Patch2:                %{name}-dbus.patch
+URL:           http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: avahi-devel
+BuildRequires: avahi-glib-devel
+BuildRequires: cups-devel
+BuildRequires: dbus-devel
+BuildRequires: fontconfig-devel
+BuildRequires: freetype-devel
+BuildRequires: ghostscript-ijs-devel
+BuildRequires: lcms2-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
+BuildRequires: libtiff-devel
+BuildRequires: libtool
+BuildRequires: pkgconfig
+BuildRequires: poppler-cpp-devel
+BuildRequires: poppler-devel
+BuildRequires: poppler-progs
+BuildRequires: python-pycups
+BuildRequires: qpdf-devel
+BuildRequires: systemd
+BuildRequires: zlib-devel
+# Testing font for test scripts.
+#BuildRequires:        dejavu-sans-fonts
+Requires:      cups-filters-libs = %{version}-%{release}
+Requires:      poppler-progs
+# pstopdf
+Requires:      bc
+Requires:      grep
+Requires:      sed
+Obsoletes:     cups-php < 1:1.6.0-1
+# Don't Provide it because we don't build the php module
+#Provides:     cups-php = 1:1.6.0-1
+# Ghostscript CUPS filters live here since Ghostscript 9.08.
+Provides:      ghostscript-cups = 9.08
+Obsoletes:     ghostscript-cups < 9.08
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# cups-browsed
+Requires(post):        systemd
+Requires(preun):       systemd
+Requires(postun):      systemd
+
+%package libs
+Summary:       OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
+Group:         Libraries
+# LGPLv2: libcupsfilters
+# MIT:    libfontembed
+License:       LGPLv2 and MIT
+
+%package devel
+Summary:       OpenPrinting CUPS filters and backends - development environment
+License:       LGPLv2 and MIT
+Group:         Development/Libraries
+Requires:      cups-filters-libs = %{version}-%{release}
+
+%description
+Contains backends, filters, and other software that was once part of
+the core CUPS distribution but is no longer maintained by Apple Inc.
+In addition it contains additional filters developed independently of
+Apple, especially filters for the PDF-centric printing workflow
+introduced by OpenPrinting.
+
+%description libs
+This package provides cupsfilters and fontembed libraries.
+
+%description devel
+This is the development package for OpenPrinting CUPS filters and
+backends.
+
+%package -n cups-browsed
+Summary:       A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers
+Group:         Applications/Printing
+Requires:      cups-filters-libs = %{version}-%{release}
+
+%description -n cups-browsed
+A daemon for browsing the Bonjour broadcasts of shared,
+remote CUPS printers.
+
+%prep
+%setup -q
+%patch1 -p1
+%patch2 -p1
+
+%build
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+
+%configure \
+       --disable-static \
+       --disable-silent-rules \
+       --with-pdftops=hybrid \
+       --enable-dbus \
+       --with-rcdir=no
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{systemdunitdir}
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
+
+# Not sure what is this good for.
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/ttfread
+
+install -p utils/cups-browsed.service $RPM_BUILD_ROOT%{systemdunitdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n cups-browsed
+if [ $1 -eq 1 ] ; then
+       # We can remove this after few releases, it's just for the introduction of cups-browsed.
+       if [ -f %{_sysconfdir}/cups/cups-browsed.conf ]; then
+               echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >>%{_sysconfdir}/cups/cups-browsed.conf
+       fi
+
+       # move BrowsePoll from cupsd.conf to cups-browsed.conf
+       if [ -f %{_sysconfdir}/cups/cupsd.conf ] && grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf; then
+               if ! grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cups-browsed.conf; then
+                       echo "# Settings automatically moved from cupsd.conf by RPM package:" >>%{_sysconfdir}/cups/cups-browsed.conf
+                       grep -i "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf >> %{_sysconfdir}/cups/cups-browsed.conf || :
+               fi
+               sed -i -e "s,^BrowsePoll,#BrowsePoll directive moved to cups-browsed.conf\n#BrowsePoll,i" %{_sysconfdir}/cups/cupsd.conf || :
+       fi
+fi
+%systemd_post cups-browsed.service
+
+%preun -n cups-browsed
+%systemd_preun cups-browsed.service
+
+%postun -n cups-browsed
+%systemd_reload
+
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README AUTHORS NEWS
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
+%attr(755,root,root) %{_cups_serverbin}/filter/*
+%attr(755,root,root) %{_cups_serverbin}/backend/parallel
+%attr(755,root,root) %{_cups_serverbin}/backend/serial
+%{_datadir}/cups/banners
+%{_datadir}/cups/charsets
+%{_datadir}/cups/data/*
+# this needs to be in the main package because of cupsfilters.drv
+%{_datadir}/cups/ppdc/pcl.h
+%{_datadir}/cups/drv/cupsfilters.drv
+%{_datadir}/cups/mime/cupsfilters.types
+%{_datadir}/cups/mime/cupsfilters.convs
+%{_datadir}/ppd/cupsfilters
+
+%files libs
+%defattr(644,root,root,755)
+%doc __doc/COPYING fontembed/README
+%attr(755,root,root) %{_libdir}/libcupsfilters.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcupsfilters.so.1
+%attr(755,root,root) %{_libdir}/libfontembed.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfontembed.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/cupsfilters
+%{_includedir}/fontembed
+%{_datadir}/cups/ppdc/escp.h
+%{_pkgconfigdir}/libcupsfilters.pc
+%{_pkgconfigdir}/libfontembed.pc
+%attr(755,root,root) %{_libdir}/libcupsfilters.so
+%attr(755,root,root) %{_libdir}/libfontembed.so
+
+%files -n cups-browsed
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cups/cups-browsed.conf
+%attr(755,root,root) %{_sbindir}/cups-browsed
+%{systemdunitdir}/cups-browsed.service
+%{_mandir}/man8/cups-browsed.8*
+%{_mandir}/man5/cups-browsed.conf.5*
This page took 0.047596 seconds and 4 git commands to generate.