From a1570ec30b741d1a8660bb6050f683cc87b78268 Mon Sep 17 00:00:00 2001 From: Kurt Jaeger Date: Mon, 15 Feb 2016 16:51:05 +0000 Subject: [PATCH] print/foomatic-filters: remove CONFLICT with cups-filters PR: 207181 Submitted by: Vladimir Omelchuk Approved by: cyberbotx@cyberbotx.com (maintainer) --- print/cups-filters/Makefile | 2 -- print/foomatic-filters/Makefile | 6 ++-- .../foomatic-filters/files/patch-Makefile.am | 31 +++++++++++++++++++ .../foomatic-filters/files/patch-configure.ac | 13 ++++++++ .../files/patch-foomaticrip.c | 12 +++---- print/foomatic-filters/files/patch-util.c | 2 +- print/foomatic-filters/pkg-plist | 2 +- 7 files changed, 55 insertions(+), 13 deletions(-) create mode 100644 print/foomatic-filters/files/patch-Makefile.am create mode 100644 print/foomatic-filters/files/patch-configure.ac diff --git a/print/cups-filters/Makefile b/print/cups-filters/Makefile index 34668c56139d..6f2e5f2761ad 100644 --- a/print/cups-filters/Makefile +++ b/print/cups-filters/Makefile @@ -22,8 +22,6 @@ LIB_DEPENDS= libtiff.so:${PORTSDIR}/graphics/tiff \ libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \ libpoppler.so:${PORTSDIR}/graphics/poppler -CONFLICTS= foomatic-filters-4* - USES= compiler:c++11-lib cpe ghostscript gmake jpeg libtool pathfix \ pkgconfig shebangfix tar:xz CPE_VENDOR= linuxfoundation diff --git a/print/foomatic-filters/Makefile b/print/foomatic-filters/Makefile index 9400d8727e5f..cd0f4189e7eb 100644 --- a/print/foomatic-filters/Makefile +++ b/print/foomatic-filters/Makefile @@ -3,7 +3,7 @@ PORTNAME= foomatic-filters PORTVERSION= 4.0.17 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= print MASTER_SITES= http://www.openprinting.org/download/foomatic/ @@ -15,8 +15,6 @@ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libdbus-1.so:${PORTSDIR}/devel/dbus -CONFLICTS= cups-filters-1.8* - USES= autoreconf ghostscript perl5 pkgconfig GNU_CONFIGURE= yes CONFIGURE_ENV= ac_cv_path_A2PS=${LOCALBASE}/bin/a2ps \ @@ -75,6 +73,8 @@ post-patch: @${REINPLACE_CMD} -e 's|/bin/bash|${SH}|g' ${WRKSRC}/foomaticrip.c @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/foomaticrip.c @${REINPLACE_CMD} -e '/filter.conf/ s|if|#if|g' ${WRKSRC}/Makefile.in + @${MV} ${WRKSRC}/beh.in ${WRKSRC}/foomatic-beh.in + @${REINPLACE_CMD} -e 's|beh|foomatic-beh|' ${WRKSRC}/foomatic-beh.in post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/foomatic-rip diff --git a/print/foomatic-filters/files/patch-Makefile.am b/print/foomatic-filters/files/patch-Makefile.am new file mode 100644 index 000000000000..24524fe3848c --- /dev/null +++ b/print/foomatic-filters/files/patch-Makefile.am @@ -0,0 +1,31 @@ +Index: files/patch-Makefile.am +=================================================================== +--- Makefile.am.orig 2012-07-02 14:50:46 UTC ++++ Makefile.am +@@ -76,7 +76,7 @@ install-cups: install-bin + ${SRC}/mkinstalldirs $(DESTDIR)$(CUPS_FILTERS) + ${SRC}/mkinstalldirs $(DESTDIR)$(CUPS_BACKENDS) + ln -sf $(BINDIR)/foomatic-rip $(DESTDIR)$(CUPS_FILTERS) +- ${INSTALL} -m 755 beh $(DESTDIR)$(CUPS_BACKENDS) ++ ${INSTALL} -m 755 foomatic-beh $(DESTDIR)$(CUPS_BACKENDS) + + install-ppr: install-bin + ${SRC}/mkinstalldirs $(DESTDIR)$(PPR_INTERFACES) +@@ -102,7 +102,7 @@ install-man: + + # Clean up the source directory + clean: remove-trash +- rm -f *.o foomatic-rip foomatic-rip.1 beh ++ rm -f *.o foomatic-rip foomatic-rip.1 foomatic-beh + rm -f .testing-stamp stamp-h1 + rm -f test/*.out + +@@ -140,7 +140,7 @@ uninstall-etc: + + uninstall-cups: + rm -f $(DESTDIR)$(CUPS_FILTERS)/foomatic-rip +- rm -f $(DESTDIR)$(CUPS_BACKENDS)/beh ++ rm -f $(DESTDIR)$(CUPS_BACKENDS)/foomatic-beh + rmdir $(DESTDIR)$(CUPS_FILTERS) || : + rmdir $(DESTDIR)$(CUPS_BACKENDS) || : + rmdir $(DESTDIR)$(CUPS) || : diff --git a/print/foomatic-filters/files/patch-configure.ac b/print/foomatic-filters/files/patch-configure.ac new file mode 100644 index 000000000000..4f8dbb04c036 --- /dev/null +++ b/print/foomatic-filters/files/patch-configure.ac @@ -0,0 +1,13 @@ +Index: files/patch-configure.ac +=================================================================== +--- configure.ac.orig 2012-07-02 14:50:46 UTC ++++ configure.ac +@@ -148,7 +148,7 @@ AC_ARG_WITH(execpath,[ --with-execpath= + AC_MSG_RESULT([Execpath: $EXECPATH]) + AC_SUBST(EXECPATH) + +-AC_CONFIG_FILES([Makefile beh foomatic-rip.1]) ++AC_CONFIG_FILES([Makefile foomatic-beh foomatic-rip.1]) + AC_CONFIG_HEADER(config.h) + AC_OUTPUT + diff --git a/print/foomatic-filters/files/patch-foomaticrip.c b/print/foomatic-filters/files/patch-foomaticrip.c index 21d3eb7ead4b..44a29a4ef773 100644 --- a/print/foomatic-filters/files/patch-foomaticrip.c +++ b/print/foomatic-filters/files/patch-foomaticrip.c @@ -1,6 +1,6 @@ ---- foomaticrip.c.orig 2012-07-02 10:50:46.000000000 -0400 -+++ foomaticrip.c 2014-05-19 10:28:46.588515788 -0400 -@@ -180,7 +180,7 @@ +--- foomaticrip.c.orig 2012-07-02 14:50:46 UTC ++++ foomaticrip.c +@@ -180,7 +180,7 @@ char cupsfilterpath[PATH_MAX] = "/usr/lo "/opt/cups/filter:" "/usr/lib/cups/filter"; @@ -9,16 +9,16 @@ void config_set_option(const char *key, const char *value) { -@@ -1061,7 +1061,7 @@ +@@ -1061,7 +1061,7 @@ int print_file(const char *filename, int Ghostscript is not available. */ if (spooler == SPOOLER_CUPS) snprintf(pdf2ps_cmd, PATH_MAX, - "pdftops '%s' '%s' '%s' '%s' '%s' '%s'", -+ "%%LOCALBASE%%/libexec/cups/filter/pdftops '%s' '%s' '%s' '%s' '%s' '%s'", ++ "/usr/local/libexec/cups/filter/pdftops '%s' '%s' '%s' '%s' '%s' '%s'", job->id, job->user, job->title, "1", job->optstr->data, filename); else -@@ -1197,7 +1197,8 @@ +@@ -1197,7 +1197,8 @@ int main(int argc, char** argv) debug = 1; if (debug) { diff --git a/print/foomatic-filters/files/patch-util.c b/print/foomatic-filters/files/patch-util.c index b311fdab51dc..c4d072498649 100644 --- a/print/foomatic-filters/files/patch-util.c +++ b/print/foomatic-filters/files/patch-util.c @@ -1,5 +1,5 @@ Resolves CVE-2015-8327 and CVE-2015-8560 ---- util.c.orig 2015-12-17 18:07:21 UTC +--- util.c.orig 2012-07-02 14:50:46 UTC +++ util.c @@ -31,7 +31,7 @@ #include diff --git a/print/foomatic-filters/pkg-plist b/print/foomatic-filters/pkg-plist index 2f7e1e43bc83..959729d37661 100644 --- a/print/foomatic-filters/pkg-plist +++ b/print/foomatic-filters/pkg-plist @@ -1,6 +1,6 @@ bin/foomatic-rip @sample etc/foomatic/filter.conf.sample -libexec/cups/backend/beh +libexec/cups/backend/foomatic-beh libexec/cups/filter/foomatic-rip lib/ppr/interfaces/foomatic-rip lib/ppr/lib/foomatic-rip