~ubuntu-branches/ubuntu/oneiric/inspircd/oneiric

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh -e
## 03_use_pkg-config_gnutls.dpatch
##
## DP: Use pkg-config to find gnutls.
## DP: Cherry picked from upstream.

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
                exit 1;;
esac

exit 0

@DPATCH@
diff -urbB inspircd-1.1.22+dfsg.orig/configure inspircd-1.1.22+dfsg/configure
--- inspircd-1.1.22+dfsg.orig/configure	2008-11-30 22:10:12.000000000 +0100
+++ inspircd-1.1.22+dfsg/configure	2009-06-20 09:02:41.000000000 +0200
@@ -135,7 +135,7 @@
 {
 	$config{LIBRARY_DIR} = $opt_library_dir;
 }
-chomp($config{HAS_GNUTLS}   = `libgnutls-config --version 2>/dev/null | cut -c 1,2,3`); # GNUTLS Version.
+chomp($config{HAS_GNUTLS}   = `pkg-config --modversion gnutls 2>/dev/null | cut -c 1,2,3`); # GNUTLS Version.
 chomp($config{HAS_OPENSSL}  = `pkg-config --modversion openssl 2>/dev/null`);		# Openssl version
 chomp($gnutls_ver = $config{HAS_GNUTLS});
 chomp($openssl_ver = $config{HAS_OPENSSL});
diff -urbB inspircd-1.1.22+dfsg.orig/src/modules/extra/m_ssl_gnutls.cpp inspircd-1.1.22+dfsg/src/modules/extra/m_ssl_gnutls.cpp
--- inspircd-1.1.22+dfsg.orig/src/modules/extra/m_ssl_gnutls.cpp	2008-09-26 12:52:27.000000000 +0200
+++ inspircd-1.1.22+dfsg/src/modules/extra/m_ssl_gnutls.cpp	2009-06-20 08:57:55.000000000 +0200
@@ -32,8 +32,8 @@
 #endif
 
 /* $ModDesc: Provides SSL support for clients */
-/* $CompileFlags: exec("libgnutls-config --cflags") */
-/* $LinkerFlags: rpath("libgnutls-config --libs") exec("libgnutls-config --libs") */
+/* $CompileFlags: pkgconfincludes("gnutls","/gnutls/gnutls.h","") */
+/* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") */
 /* $ModDep: transport.h */