cups-filters: update to 1.0.30

This commit is contained in:
Juergen Daubert 2013-03-12 18:48:56 +01:00
parent f852c59ea2
commit 83c027745b
4 changed files with 165 additions and 71 deletions

View File

@ -1,2 +1,2 @@
01e2d9abc4ea69521334a0ee2f70d98a cups-filters-1.0.29.tar.xz
4a47a0046567309dcd94bd3a93fa4842 cups-filters-poppler_0.22_buildfix.patch
c6cca1041657a23192547010f8f2cca8 cups-filters-1.0.30.tar.xz
ccea97e72f40c79a4fdc2af467c059dd cups-filters-build_without_avahi.patch

View File

@ -4,24 +4,26 @@
# Depends on: cups poppler qpdf
name=cups-filters
version=1.0.29
release=2
version=1.0.30
release=1
source=(http://www.openprinting.org/download/$name/$name-$version.tar.xz
$name-poppler_0.22_buildfix.patch)
$name-build_without_avahi.patch)
build () {
cd $name-$version
patch -p0 -i $SRC/$name-poppler_0.22_buildfix.patch
patch -p0 -i $SRC/$name-build_without_avahi.patch
autoconf
./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/man \
--without-php \
--disable-avahi
--disable-avahi \
--with-browseremoteprotocols=none
make
make DESTDIR=$PKG install
rm -r $PKG/usr/share/doc
rm -r $PKG/{usr/share/doc,etc/cups}
}

View File

@ -0,0 +1,155 @@
=== modified file 'NEWS'
--- NEWS 2013-03-07 18:20:26 +0000
+++ NEWS 2013-03-08 17:00:06 +0000
@@ -1,6 +1,12 @@
NEWS - OpenPrinting CUPS Filters v1.0.30 - 2013-03-07
-----------------------------------------------------
+CHANGES IN V1.0.31
+
+ - Fixed build system to allow building without Avahi. In this case
+ a cups-browsed with only CUPS broadcasting/browsing will get
+ built. Thanks to Tim Waugh from Red Hat (Bug #1101).
+
CHANGES IN V1.0.30
- cups-browsed: Do not remove a generated local print queue when
=== modified file 'configure.ac'
--- configure.ac 2013-03-07 18:20:26 +0000
+++ configure.ac 2013-03-08 17:00:06 +0000
@@ -207,6 +207,8 @@
dnl Avahi for cups-browsed
AVAHI_LIBS=""
AVAHI_CFLAGS=""
+AVAHI_GLIB_CFLAGS=""
+AVAHI_GLIB_LIBS=""
AC_ARG_ENABLE([avahi],
[AS_HELP_STRING([--disable-avahi], [Disable DNS Service Discovery support using Avahi.])],
@@ -231,6 +233,7 @@
AC_DEFINE(HAVE_AVAHI, [], [Define if you have the avahi library])
else
AC_MSG_RESULT(no)
+ enable_avahi=no
fi
fi
@@ -241,7 +244,10 @@
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-PKG_CHECK_MODULES(AVAHI_GLIB, [avahi-glib])
+if test "x$PKGCONFIG" != x -a x$enable_avahi != xno; then
+ PKG_CHECK_MODULES(AVAHI_GLIB, [avahi-glib])
+fi
+
AC_SUBST(AVAHI_GLIB_CFLAGS)
AC_SUBST(AVAHI_GLIB_LIBS)
=== modified file 'utils/cups-browsed.c'
--- utils/cups-browsed.c 2013-03-07 18:10:09 +0000
+++ utils/cups-browsed.c 2013-03-08 17:00:06 +0000
@@ -36,12 +36,14 @@
#include <glib.h>
+#ifdef HAVE_AVAHI
#include <avahi-client/client.h>
#include <avahi-client/lookup.h>
#include <avahi-glib/glib-watch.h>
#include <avahi-common/malloc.h>
#include <avahi-common/error.h>
+#endif /* HAVE_AVAHI */
#include <cups/cups.h>
@@ -99,7 +101,9 @@
static cups_array_t *browseallow;
static GMainLoop *gmainloop = NULL;
+#ifdef HAVE_AVAHI
static AvahiGLibPoll *glib_poll = NULL;
+#endif /* HAVE_AVAHI */
static guint queues_timer_id = (guint) -1;
static int browsesocket = -1;
@@ -557,6 +561,7 @@
}
}
+#ifdef HAVE_AVAHI
static void resolve_callback(
AvahiServiceResolver *r,
AVAHI_GCC_UNUSED AvahiIfIndex interface,
@@ -905,6 +910,7 @@
}
}
+#endif /* HAVE_AVAHI */
void
found_cups_printer (const char *remote_host, const char *uri,
@@ -1712,9 +1718,11 @@
}
int main(int argc, char*argv[]) {
+#ifdef HAVE_AVAHI
AvahiClient *client = NULL;
AvahiServiceBrowser *sb1 = NULL, *sb2 = NULL;
int error;
+#endif /* HAVE_AVAHI */
int ret = 1;
http_t *http;
cups_dest_t *dests,
@@ -1741,6 +1749,13 @@
BrowseLocalProtocols &= ~BROWSE_DNSSD;
}
+#ifndef HAVE_AVAHI
+ if (BrowseRemoteProtocols & BROWSE_DNSSD) {
+ fprintf(stderr, "Remote support for DNSSD not supported\n");
+ BrowseRemoteProtocols &= ~BROWSE_DNSSD;
+ }
+#endif /* HAVE_AVAHI */
+
/* Wait for CUPS daemon to start */
while ((http = httpConnectEncrypt(cupsServer(), ippPort(),
cupsEncryption())) == NULL)
@@ -1815,6 +1830,7 @@
debug_printf("cups-browsed: Using signal handler SIGNAL\n");
#endif /* HAVE_SIGSET */
+#ifdef HAVE_AVAHI
if (BrowseRemoteProtocols & BROWSE_DNSSD) {
/* Allocate main loop object */
if (!(glib_poll = avahi_glib_poll_new(NULL, G_PRIORITY_DEFAULT))) {
@@ -1866,6 +1882,7 @@
}
}
}
+#endif /* HAVE_AVAHI */
if (BrowseLocalProtocols & BROWSE_CUPS ||
BrowseRemoteProtocols & BROWSE_CUPS) {
@@ -1955,7 +1972,8 @@
p->timeout = time(NULL) + TIMEOUT_IMMEDIATELY;
}
handle_cups_queues(NULL);
-
+
+#ifdef HAVE_AVAHI
/* Free the data structures for Bonjour browsing */
if (sb1)
avahi_service_browser_free(sb1);
@@ -1967,6 +1985,7 @@
if (glib_poll)
avahi_glib_poll_free(glib_poll);
+#endif /* HAVE_AVAHI */
if (browsesocket != -1)
close (browsesocket);

View File

@ -1,63 +0,0 @@
# http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7035
=== modified file 'NEWS'
--- NEWS 2013-01-02 18:23:25 +0000
+++ NEWS 2013-01-09 10:42:32 +0000
@@ -1,6 +1,11 @@
NEWS - OpenPrinting CUPS Filters v1.0.29 - 2013-01-02
-----------------------------------------------------
+CHANGES IN V1.0.30
+
+ - pdftoopvp: Let it build with Poppler 0.22.x. Thanks to Koji Otani
+ from BBR Inc. (Bug #1089).
+
CHANGES IN V1.0.29
- Fixed ./configure option "--with-rcdir=no". Thanks to Jiri
=== modified file 'filter/pdftoopvp/OPVPOutputDev.cxx'
--- filter/pdftoopvp/OPVPOutputDev.cxx 2012-07-20 08:32:55 +0000
+++ filter/pdftoopvp/OPVPOutputDev.cxx 2013-01-09 10:42:32 +0000
@@ -1804,8 +1804,14 @@
maskSplash = new Splash(maskBitmap, gFalse);
maskColor[0] = 0;
maskSplash->clear(maskColor);
+#if POPPLER_VERSION_MAJOR <= 0 && (POPPLER_VERSION_MINOR <= 20 || (POPPLER_VERSION_MINOR == 21 && POPPLER_VERSION_MICRO <= 2))
maskSplash->drawImage(&imageSrc, &imgMaskData,
splashModeMono8, gFalse, maskWidth, maskHeight, mat);
+#else
+ maskSplash->drawImage(&imageSrc, &imgMaskData,
+ splashModeMono8, gFalse, maskWidth, maskHeight,
+ mat,gFalse);
+#endif
delete imgMaskData.imgStr;
maskStr->close();
gfree(imgMaskData.lookup);
=== modified file 'filter/pdftoopvp/oprs/OPRS.cxx'
--- filter/pdftoopvp/oprs/OPRS.cxx 2012-09-10 19:56:59 +0000
+++ filter/pdftoopvp/oprs/OPRS.cxx 2013-01-09 10:42:32 +0000
@@ -5,6 +5,9 @@
//========================================================================
#include <config.h>
+#ifdef HAVE_CPP_POPPLER_VERSION_H
+#include "cpp/poppler-version.h"
+#endif
#ifdef USE_GCC_PRAGMAS
#pragma implementation
@@ -235,7 +238,11 @@
SplashColorMode srcMode, GBool srcAlpha,
int w, int h, SplashCoord *mat) {
if (rasterMode) {
+#if POPPLER_VERSION_MAJOR <= 0 && (POPPLER_VERSION_MINOR <= 20 || (POPPLER_VERSION_MINOR == 21 && POPPLER_VERSION_MICRO <= 2))
return splash->drawImage(src,srcData,srcMode,srcAlpha,w,h,mat);
+#else
+ return splash->drawImage(src,srcData,srcMode,srcAlpha,w,h,mat,gFalse);
+#endif
} else {
return opvpSplash->drawImage(src,srcData,srcMode,srcAlpha,w,h,mat);
}