Merge branch 'f19' into f20
This commit is contained in:
commit
b84afc0ca3
41
cups-filters-pdf-landscape.patch
Normal file
41
cups-filters-pdf-landscape.patch
Normal file
@ -0,0 +1,41 @@
|
||||
diff -up cups-filters-1.0.38/filter/pdftops.c.pdf-landscape cups-filters-1.0.38/filter/pdftops.c
|
||||
--- cups-filters-1.0.38/filter/pdftops.c.pdf-landscape 2013-09-03 15:33:54.000000000 +0100
|
||||
+++ cups-filters-1.0.38/filter/pdftops.c 2013-09-17 14:58:59.460506475 +0100
|
||||
@@ -273,6 +273,7 @@ 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 */
|
||||
@@ -438,6 +439,7 @@ 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";
|
||||
@@ -630,7 +632,9 @@ main(int argc, /* I - Number of comm
|
||||
* which contain pages of different sizes can be printed correctly
|
||||
*/
|
||||
|
||||
- pdf_argv[pdf_argc++] = (char *)"-origpagesizes";
|
||||
+ /* 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)
|
||||
@@ -640,7 +644,9 @@ main(int argc, /* I - Number of comm
|
||||
* which contain pages of different sizes can be printed correctly
|
||||
*/
|
||||
|
||||
- pdf_argv[pdf_argc++] = (char *)"-choosePaperByPDFPageSize";
|
||||
+ /* Only do this for unprocessed PDF files */
|
||||
+ if (content_type && !strstr (content_type, "/vnd.cups-"))
|
||||
+ pdf_argv[pdf_argc++] = (char *)"-choosePaperByPDFPageSize";
|
||||
}
|
||||
|
||||
/*
|
@ -4,7 +4,7 @@
|
||||
Summary: OpenPrinting CUPS filters and backends
|
||||
Name: cups-filters
|
||||
Version: 1.0.38
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
# For a breakdown of the licensing, see COPYING file
|
||||
# GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
|
||||
@ -21,6 +21,8 @@ Group: System Environment/Base
|
||||
Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
|
||||
Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
|
||||
|
||||
Patch1: cups-filters-pdf-landscape.patch
|
||||
|
||||
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
# Obsolete cups-php (bug #971741)
|
||||
@ -102,6 +104,9 @@ This is the development package for OpenPrinting CUPS filters and backends.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
# Fix landscape printing for PDFs (bug #768811).
|
||||
%patch1 -p1 -b .pdf-landscape
|
||||
|
||||
%build
|
||||
# work-around Rpath
|
||||
./autogen.sh
|
||||
@ -118,6 +123,11 @@ make %{?_smp_mflags}
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
# Avoid conflicts with ghostscript < 9.08
|
||||
rm -f %{buildroot}%{_datadir}/ppd/cupsfilters/pxl{color,mono}.ppd
|
||||
rm -f %{buildroot}%{_cups_serverbin}/filter/gsto*
|
||||
sed -i -e '/gstoraster/d' %{buildroot}%{_datadir}/cups/mime/cupsfilters.convs
|
||||
|
||||
# https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
|
||||
mkdir __doc
|
||||
mv %{buildroot}%{_datadir}/doc/cups-filters/* __doc
|
||||
@ -213,6 +223,9 @@ fi
|
||||
%{_libdir}/libfontembed.so
|
||||
|
||||
%changelog
|
||||
* Tue Sep 17 2013 Tim Waugh <twaugh@redhat.com> - 1.0.38-2
|
||||
- Fix landscape printing for PDFs (bug #768811).
|
||||
|
||||
* Wed Sep 04 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.38-1
|
||||
- 1.0.38
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user