PKGBUILDs/extra/libcups/gnutls-pkgconfig.dpatch
2009-10-09 21:23:22 -05:00

26 lines
1.1 KiB
Text

#! /bin/sh /usr/share/dpatch/dpatch-run
## gnutls-pkgconfig.dpatch by <martin.pitt@ubuntu.com>
##
## Use pkg-config instead of deprecated libgnutls-config
## (STR #3178, Debian #529903; from upstream SVN)
@DPATCH@
diff -urNad cups-1.3.10~/config-scripts/cups-ssl.m4 cups-1.3.10/config-scripts/cups-ssl.m4
--- cups-1.3.10~/config-scripts/cups-ssl.m4 2007-07-11 23:46:42.000000000 +0200
+++ cups-1.3.10/config-scripts/cups-ssl.m4 2009-06-08 08:03:27.854814655 +0200
@@ -64,11 +64,11 @@
fi
dnl Then look for GNU TLS...
- if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno"; then
+ if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno" -a "x$PKGCONFIG" != x; then
AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
- if test "x$LIBGNUTLSCONFIG" != x; then
- SSLLIBS=`$LIBGNUTLSCONFIG --libs`
- SSLFLAGS=`$LIBGNUTLSCONFIG --cflags`
+ if $PKGCONFIG --exists gnutls; then
+ SSLLIBS=`$PKGCONFIG --libs gnutls`
+ SSLFLAGS=`$PKGCONFIG --cflags gnutls`
ENCRYPTION_REQUIRED=" Encryption Required"
AC_DEFINE(HAVE_SSL)
AC_DEFINE(HAVE_GNUTLS)