173 lines
5.6 KiB
Diff
173 lines
5.6 KiB
Diff
--- ./test/run-stp-tests.sh.orig 2008-04-01 23:30:44.000000000 +0200
|
|
+++ ./test/run-stp-tests.sh 2008-04-09 18:05:52.000000000 +0200
|
|
@@ -273,7 +273,7 @@
|
|
else
|
|
ln -s $root/filter/imagetops /tmp/cups-$user/bin/filter
|
|
ln -s $root/filter/imagetoraster /tmp/cups-$user/bin/filter
|
|
- ln -s $root/pdftops/pdftops /tmp/cups-$user/bin/filter
|
|
+ ln -s $root/filter/pdftops /tmp/cups-$user/bin/filter
|
|
fi
|
|
|
|
#
|
|
--- ./packaging/cups.list.in.orig 2008-02-15 22:32:52.000000000 +0100
|
|
+++ ./packaging/cups.list.in 2008-04-09 18:06:28.000000000 +0200
|
|
@@ -265,7 +265,7 @@
|
|
f 0755 root sys $SERVERBIN/filter/imagetoraster filter/imagetoraster
|
|
%endif
|
|
%if PDFTOPS
|
|
-f 0755 root sys $SERVERBIN/filter/pdftops pdftops/pdftops
|
|
+f 0755 root sys $SERVERBIN/filter/pdftops filter/pdftops
|
|
%endif
|
|
f 0755 root sys $SERVERBIN/filter/pstops filter/pstops
|
|
f 0755 root sys $SERVERBIN/filter/rastertolabel filter/rastertolabel
|
|
--- ./filter/Makefile.orig 2007-07-20 01:27:49.000000000 +0200
|
|
+++ ./filter/Makefile 2008-04-09 18:05:26.000000000 +0200
|
|
@@ -19,7 +19,7 @@
|
|
|
|
|
|
FILTERS = gziptoany hpgltops texttops pstops $(IMGFILTERS) \
|
|
- rastertolabel rastertoepson rastertohp
|
|
+ rastertolabel rastertoepson rastertohp pdftops
|
|
TARGETS = $(FILTERS) \
|
|
$(LIBCUPSIMAGE) \
|
|
libcupsimage.a \
|
|
@@ -41,7 +41,7 @@
|
|
OBJS = $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \
|
|
gziptoany.o imagetops.o imagetoraster.o common.o pstops.o \
|
|
rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
|
|
- testimage.o testraster.o textcommon.o texttops.o
|
|
+ testimage.o testraster.o textcommon.o texttops.o pdftops.o
|
|
|
|
|
|
#
|
|
@@ -322,6 +322,14 @@
|
|
echo Linking $@...
|
|
$(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
|
|
|
|
+#
|
|
+# pdftops
|
|
+#
|
|
+
|
|
+pdftops: pdftops.o common.o ../cups/$(LIBCUPS)
|
|
+ echo Linking $@...
|
|
+ $(CC) $(LDFLAGS) -o $@ pdftops.o common.o $(LIBS)
|
|
+
|
|
|
|
#
|
|
# rastertolabel
|
|
--- cups-1.3.7/config.h.in.orig 2008-01-07 19:26:57.000000000 +0100
|
|
+++ cups-1.3.7/config.h.in 2008-04-09 18:22:50.000000000 +0200
|
|
@@ -420,6 +420,12 @@
|
|
#undef HAVE_PYTHON
|
|
#define CUPS_PYTHON "/usr/bin/python"
|
|
|
|
+/*
|
|
+ * Location of the poppler/Xpdf pdftops program...
|
|
+ */
|
|
+
|
|
+#define HAVE_PDFTOPS "/usr/bin/pdftops"
|
|
+
|
|
|
|
/*
|
|
* Do we have Darwin's CoreFoundation and SystemConfiguration frameworks?
|
|
--- cups-1.3.7/Makefile.orig 2008-02-16 00:26:51.000000000 +0100
|
|
+++ cups-1.3.7/Makefile 2008-04-09 19:08:39.000000000 +0200
|
|
@@ -20,7 +20,7 @@
|
|
#
|
|
|
|
DIRS = cups backend berkeley cgi-bin filter locale man monitor \
|
|
- notifier $(PDFTOPS) scheduler systemv test \
|
|
+ notifier scheduler systemv test \
|
|
$(PHPDIR) \
|
|
conf data doc $(FONTS) ppd templates
|
|
|
|
--- cups-1.3.7/filter/pdftops.c.orig 2008-04-22 20:18:35.000000000 +0200
|
|
+++ cups-1.3.7/filter/pdftops.c 2008-04-22 20:22:09.000000000 +0200
|
|
@@ -126,7 +126,7 @@ main(int argc, /* I - Number of comm
|
|
|
|
if ((fd = cupsTempFd(tempfile, sizeof(tempfile))) < 0)
|
|
{
|
|
- _cupsLangPrintError(_("ERROR: Unable to copy PDF file"));
|
|
+ perror(_("ERROR: Unable to copy PDF file"));
|
|
return (1);
|
|
}
|
|
|
|
@@ -299,10 +299,10 @@ main(int argc, /* I - Number of comm
|
|
|
|
#ifdef HAVE_PDFTOPS
|
|
execv(HAVE_PDFTOPS, pdfargv);
|
|
- _cupsLangPrintError(_("ERROR: Unable to execute pdftops program"));
|
|
+ perror("ERROR: Unable to execute pdftops program");
|
|
#else
|
|
execv(CUPS_GHOSTSCRIPT, pdfargv);
|
|
- _cupsLangPrintError(_("ERROR: Unable to execute gs program"));
|
|
+ perror("ERROR: Unable to execute gs program");
|
|
#endif /* HAVE_PDFTOPS */
|
|
|
|
exit(1);
|
|
@@ -314,9 +314,9 @@ main(int argc, /* I - Number of comm
|
|
*/
|
|
|
|
#ifdef HAVE_PDFTOPS
|
|
- _cupsLangPrintError(_("ERROR: Unable to execute pdftops program"));
|
|
+ perror("ERROR: Unable to execute pdftops program");
|
|
#else
|
|
- _cupsLangPrintError(_("ERROR: Unable to execute gs program"));
|
|
+ perror("ERROR: Unable to execute gs program");
|
|
#endif /* HAVE_PDFTOPS */
|
|
|
|
pdfstatus = 1;
|
|
--- cups-1.3.7/filter/pdftops.c.orig 2008-04-22 20:24:15.000000000 +0200
|
|
+++ cups-1.3.7/filter/pdftops.c 2008-04-22 20:26:20.000000000 +0200
|
|
@@ -301,7 +301,7 @@ main(int argc, /* I - Number of comm
|
|
execv(HAVE_PDFTOPS, pdfargv);
|
|
perror("ERROR: Unable to execute pdftops program");
|
|
#else
|
|
- execv(CUPS_GHOSTSCRIPT, pdfargv);
|
|
+ execv("/bin/sgs", pdfargv);
|
|
perror("ERROR: Unable to execute gs program");
|
|
#endif /* HAVE_PDFTOPS */
|
|
|
|
--- cups-1.3.7/config-scripts/cups-pdf.m4.orig 2007-07-11 23:46:42.000000000 +0200
|
|
+++ cups-1.3.7/config-scripts/cups-pdf.m4 2008-05-07 13:34:07.000000000 +0200
|
|
@@ -13,18 +13,31 @@
|
|
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
|
dnl
|
|
|
|
-AC_ARG_ENABLE(pdftops, [ --enable-pdftops build pdftops filter, default=auto ])
|
|
+AC_ARG_WITH(pdftops, [ --with-pdftops build pdftops filter, default=auto ],[],with_pdftops=auto)
|
|
|
|
PDFTOPS=""
|
|
|
|
-if test "x$enable_pdftops" != xno; then
|
|
- AC_MSG_CHECKING(whether to build pdftops filter)
|
|
- if test "x$enable_pdftops" = xyes -o $uname != Darwin; then
|
|
- PDFTOPS="pdftops"
|
|
- AC_MSG_RESULT(yes)
|
|
- else
|
|
- AC_MSG_RESULT(no)
|
|
+if test "x$with_pdftops" != xno; then
|
|
+ if test "x$with_pdftops" != xyes -a "x$with_pdftops" != xauto ; then
|
|
+ HAVE_PDFTOPS=$with_pdftops
|
|
+ AC_DEFINE_UNQUOTED(HAVE_PDFTOPS, "$HAVE_PDFTOPS")
|
|
+ else
|
|
+ AC_PATH_PROG(HAVE_PDFTOPS, pdftops)
|
|
+ AC_DEFINE_UNQUOTED(HAVE_PDFTOPS, "$HAVE_PDFTOPS")
|
|
+
|
|
+ if test "x$HAVE_PDFTOPS" != x; then
|
|
+ AC_MSG_CHECKING(whether to build pdftops filter)
|
|
+ if test "x$with_pdftops" = xyes -o $uname != Darwin; then
|
|
+ PDFTOPS="pdftops"
|
|
+ AC_MSG_RESULT(yes)
|
|
+ else
|
|
+ AC_MSG_RESULT(no)
|
|
+ fi
|
|
+ elif test x$with_pdftops = xyes; then
|
|
+ AC_MSG_ERROR(Unable to find pdftops program!)
|
|
+ exit 1
|
|
fi
|
|
+ fi
|
|
fi
|
|
|
|
AC_SUBST(PDFTOPS)
|