~ubuntu-branches/ubuntu/jaunty/cups/jaunty

« back to all changes in this revision

Viewing changes to debian/local/filters/pdf-filters/addtocups

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, Till Kamppeter, Martin Pitt
  • Date: 2009-02-15 18:39:03 UTC
  • mfrom: (6.1.30 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090215183903-i0nhvqyqj4vyn52a
Tags: 1.3.9-13
[ Till Kamppeter ]
* debian/local/filters/pdf-filters/filter/imagetopdf.c: Added support for
  the new "fit-to-page" option (new, more intuitive name for "fitplot").
* debian/filters/pstopdf: Only apply paper size if the "fitplot" or the
  "fit-to-page" option is set.
* debian/local/filters/cpdftocps: Only the last digit of the number of
  copies was used (LP: #309314).
* debian/local/filters/pdf-filters/pdftopdf/pdftopdf.cxx: Do not preceed the
  PDF output with a newline (LP: #303691). Only impose the page size from
  the PPD file to all pages if the "fitplot" or the "fit-to-page" option is 
  set. This prevented from automatic paper tray switching to the correct paper
  sizes when a multiple-page-size document is printed (partial fix for
  LP: #310575).
* debian/patches/pdftops-cups-1.4.dpatch: Updated from CUPS 1.4 SVN. Contains
  fixes for multiple-page-size document printing (partial fix for
  LP: #310575).
* debian/patches/pdftops-dont_fail_on_cancel.dpatch: Removed, should be
  fixed in the new upstream version of pdftops.

[ Martin Pitt ]
* debian/patches/pdftops-cups-1.4.dpatch: Add definition of
  HAVE_PDFTOPS and CUPS_PDFTOPS, so that the filter actually gets
  again built with pdftops support. (Fixes Till's change from above).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
# Silently exit if the changes are already applied
 
4
[ -f $1/filter/imagetopdf.c ] && exit 0
 
5
 
 
6
# Copy files
 
7
cp filter/imagetopdf.c $1/filter/
 
8
cp filter/pdftoijs.cxx $1/filter/
 
9
cp filter/texttopdf.c $1/filter/
 
10
cp filter/pdfutils.h $1/filter/
 
11
cp filter/pdfutils.c $1/filter/
 
12
cp -r filter/fontembed $1/filter/
 
13
cp filter/test_pdf1.c $1/filter/
 
14
cp filter/test_pdf2.c $1/filter/
 
15
cp conf/imagetopdf.convs $1/conf/
 
16
cp conf/imagetopdf.types $1/conf/
 
17
cp conf/pdftopdf.convs $1/conf/
 
18
cp conf/pdf.types $1/conf/
 
19
cp conf/texttopdf.convs $1/conf/
 
20
cp data/pdf.utf-8.heavy $1/data/
 
21
cp data/pdf.utf-8.simple $1/data/
 
22
cp config-scripts/cups-pdf-filters.m4 $1/config-scripts/
 
23
 
 
24
# Copy directories
 
25
cp -r pdftopdf $1
 
26
 
 
27
cd $1
 
28
 
 
29
# Edit configure script
 
30
cp configure.in configure.in.pdf-filters
 
31
cp configure configure.pdf-filters
 
32
cp config.h.in config.h.in.pdf-filters
 
33
perl -p -i -e 's/(sinclude\(config-scripts\/cups-defaults\.m4\))/$1\nsinclude(config-scripts\/cups-pdf-filters.m4)/' configure.in
 
34
autoconf
 
35
perl -p -i -e 's:(\#endif\s*\/\*\s*\!_CUPS_CONFIG_H_\s*\*\/):
 
36
 
 
37
/* Define to 1 if you have the <dirent.h> header file, and it defines "DIR".
 
38
   */
 
39
\#undef HAVE_DIRENT_H
 
40
 
 
41
/* Define to 1 if you have the <ndir.h> header file, and it defines "DIR". */
 
42
\#undef HAVE_NDIR_H
 
43
 
 
44
/* Define to 1 if you have the <sys/dir.h> header file, and it defines "DIR".
 
45
   */
 
46
\#undef HAVE_SYS_DIR_H
 
47
 
 
48
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines "DIR".
 
49
   */
 
50
\#undef HAVE_SYS_NDIR_H
 
51
 
 
52
/* Define to 1 if you have the <zlib.h> header file. */
 
53
\#undef HAVE_ZLIB_H
 
54
 
 
55
/* Parser\:\:Parser has two arguments. */
 
56
\#undef PARSER_HAS_2_ARGS
 
57
 
 
58
/* Define to 1 if you have the "poppler" library (-lpoppler). */
 
59
\#undef HAVE_LIBPOPPLER
 
60
 
 
61
/* New font type enumeration */
 
62
\#undef FONTTYPE_ENUM2
 
63
 
 
64
/* GlobalParams\:\:GlobalParams has a argument. */
 
65
\#undef GLOBALPARAMS_HAS_A_ARG
 
66
 
 
67
/* Have Stream\:\:getUndecodedStream */
 
68
\#undef HAVE_GETUNDECODEDSTREAM
 
69
 
 
70
/* Have UGooString.h */
 
71
\#undef HAVE_UGOOSTRING_H
 
72
 
 
73
/* Old CharCodeToUnicode\:\:mapToUnicode */
 
74
\#undef OLD_MAPTOUNICODE
 
75
 
 
76
\n$1:' config.h.in
 
77
 
 
78
# Edit Makefiles
 
79
cp conf/Makefile conf/Makefile.pdf-filters
 
80
cp filter/Makefile filter/Makefile.pdf-filters
 
81
cp data/Makefile data/Makefile.pdf-filters
 
82
cp Makefile Makefile.pdf-filters
 
83
cp Makedefs.in Makedefs.in.pdf-filters
 
84
perl -p -i -e 's/^(\s*REPLACE\s*=.*)$/$1 imagetopdf.convs imagetopdf.types pdftopdf.convs pdf.types texttopdf.convs/' conf/Makefile
 
85
perl -p -i -e 's/^(\s*FILTERS\s*=\s+)/$1imagetopdf pdftoijs texttopdf /' filter/Makefile
 
86
perl -p -i -e 's/^(\s*OBJS\s*=\s+)/$1imagetopdf.o pdftoijs.o texttopdf.o pdfutils.o /' filter/Makefile
 
87
perl -p -i -e 's/^(\s*CHARSETS\s*=\s+)/$1pdf.utf-8.heavy pdf.utf-8.simple /' data/Makefile
 
88
cat >> filter/Makefile <<EOF
 
89
 
 
90
#
 
91
# imagetops
 
92
#
 
93
 
 
94
imagetopdf:     imagetopdf.o common.o \$(LIBCUPSIMAGE) \\
 
95
                ../cups/\$(LIBCUPS)
 
96
        echo Linking \$@...
 
97
        \$(CC) \$(LDFLAGS) -o \$@ imagetopdf.o common.o \$(LINKCUPSIMAGE) \\
 
98
                \$(IMGLIBS) \$(LIBS)
 
99
 
 
100
 
 
101
#
 
102
# pdftoijs
 
103
#
 
104
 
 
105
pdftoijs:       pdftoijs.o ../cups/\$(LIBCUPS)
 
106
        echo Linking \$@...
 
107
        \$(CC) \$(LDFLAGS) -o \$@ pdftoijs.o \\
 
108
                \$(POPPLER_LIBS) \$(IJS_LIBS)
 
109
 
 
110
 
 
111
#
 
112
# texttopdf
 
113
#
 
114
 
 
115
fontembed/libfontembed.a:
 
116
        \$(MAKE) -C fontembed
 
117
 
 
118
texttopdf:      texttopdf.o textcommon.o common.o pdfutils.o fontembed/libfontembed.a \\
 
119
                ../cups/\$(LIBCUPS)
 
120
        echo Linking \$@...
 
121
        \$(CC) \$(LDFLAGS) -o \$@ texttopdf.o textcommon.o common.o pdfutils.o -Lfontembed -lfontembed \$(LIBS)
 
122
 
 
123
EOF
 
124
perl -p -i -e 's/^(\s*DIRS\s*=.*\s+filter\s+)/$1pdftopdf /' Makefile
 
125
perl -p -i -e 's/^(\s*LIBS\s*=.*$)/$1\nPOPPLER_LIBS\t=\t\@POPPLER_LIBS\@ \$(LIBS)/' Makedefs.in
 
126
perl -p -i -e 's/^(\s*LIBS\s*=.*$)/$1\nIJS_LIBS\t=\t\@IJS_LIBS\@ \$(LIBS)/' Makedefs.in
 
127
perl -p -i -e 's/^(\s*ALL_CFLAGS\s*=\s*)/$1-Ifontembed /' Makedefs.in