Make sure we use ghostscript as pdftops interpreter but do _not_ depend

on it being installed at build time (cyclic dependency).

breakage reported by nigel@
This commit is contained in:
ajacoutot 2012-02-17 07:45:10 +00:00
parent 20d186ac7e
commit eb46fd2adc
2 changed files with 23 additions and 20 deletions

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.123 2012/02/16 22:12:08 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.124 2012/02/17 07:45:10 ajacoutot Exp $
COMMENT= Common Unix Printing System
VERSION= 1.5.2
DISTNAME= cups-${VERSION}-source
PKGNAME= cups-${VERSION}
REVISION= 0
CATEGORIES= print sysutils
@ -85,6 +86,7 @@ CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--with-system-groups=wheel \
--with-optim="${CFLAGS}" \
--with-dbusdir=${SYSCONFDIR}/dbus-1 \
--with-pdftops=${LOCALBASE}/bin/gs \
--with-perl="/usr/bin/perl" \
--with-printcap=${SYSCONFDIR}/cups/printcap \
--with-smbconfigfile="samba:///${SYSCONFDIR}/samba/smb.conf" \

View File

@ -1,22 +1,23 @@
$OpenBSD: patch-config-scripts_cups-pdf_m4,v 1.3 2011/09/08 10:33:12 ajacoutot Exp $
$OpenBSD: patch-config-scripts_cups-pdf_m4,v 1.4 2012/02/17 07:45:10 ajacoutot Exp $
Security fix for CVE-2009-3608, CVE-2009-3609.
CUPS "pdftops" Filter Data Handling Integer Overflow Vulnerabilities
CUPS check for the ghostscript binary; we cannot depend on
print/ghostscript/gnu because of a cyclic dependency but we know our
gs supports the ps2write device.
Patch from Ubuntu: poppler-based-pdftops-fixes.dpatch
--- config-scripts/cups-pdf.m4.orig Sat May 7 00:53:53 2011
+++ config-scripts/cups-pdf.m4 Fri Sep 2 09:33:11 2011
@@ -103,6 +103,12 @@ else
DEFAULT_PDFTOPS="#"
fi
--- config-scripts/cups-pdf.m4.orig Fri Feb 17 08:35:39 2012
+++ config-scripts/cups-pdf.m4 Fri Feb 17 08:35:59 2012
@@ -91,12 +91,8 @@ if test "x$CUPS_PDFTOPS" != x; then
DEFAULT_PDFTOPS=""
elif test "x$CUPS_GHOSTSCRIPT" != x; then
AC_MSG_CHECKING(whether gs supports the ps2write device)
- if ($CUPS_GHOSTSCRIPT -h 2>&1 | grep -q ps2write); then
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_GHOSTSCRIPT_PS2WRITE)
- else
- AC_MSG_RESULT(no)
- fi
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GHOSTSCRIPT_PS2WRITE)
+if test "x$CUPS_PDFTOPS" != x; then
+ if `$CUPS_PDFTOPS -h 2>&1 | grep -q -- -origpagesizes 2>/dev/null`; then
+ AC_DEFINE(HAVE_PDFTOPS_WITH_ORIGPAGESIZES)
+ fi
+fi
+
AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")
AC_DEFINE_UNQUOTED(CUPS_GHOSTSCRIPT, "$CUPS_GHOSTSCRIPT")
AC_SUBST(DEFAULT_PDFTOPS)
DEFAULT_PDFTOPS=""
else