summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnutls
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-support/gnutls
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-support/gnutls')
-rw-r--r--meta/recipes-support/gnutls/gnutls-2.8.6/configure-fix.patch64
-rw-r--r--meta/recipes-support/gnutls/gnutls-2.8.6/gnutls-openssl.patch124
-rw-r--r--meta/recipes-support/gnutls/gnutls-2.8.6/gnutls-texinfo-euro.patch16
-rw-r--r--meta/recipes-support/gnutls/gnutls.inc44
-rw-r--r--meta/recipes-support/gnutls/gnutls_2.8.6.bb7
-rw-r--r--meta/recipes-support/gnutls/libtasn1_2.7.bb21
6 files changed, 276 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls-2.8.6/configure-fix.patch b/meta/recipes-support/gnutls/gnutls-2.8.6/configure-fix.patch
new file mode 100644
index 0000000000..247e324564
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls-2.8.6/configure-fix.patch
@@ -0,0 +1,64 @@
1rebased from original configure_madness.patch
2
3libtasn1 provides an .pc file in upstream,
4and a libgcrypt.pc is added in libgcrypt recipe,
5so use Requires.private for these two.
6
7against 2.8.6
8
907/02/2010 - qhe
10
11---
12diff --git a/lib/configure.ac b/lib/configure.ac
13index 80d3375..1a486f7 100644
14--- a/lib/configure.ac
15+++ b/lib/configure.ac
16@@ -81,8 +81,8 @@ fi
17
18 lgl_INIT
19
20-LIBGNUTLS_LIBS="-L${libdir} -lgnutls $LIBS"
21-LIBGNUTLS_CFLAGS="-I${includedir}"
22+LIBGNUTLS_LIBS="-lgnutls $LIBS"
23+LIBGNUTLS_CFLAGS=""
24 AC_SUBST(LIBGNUTLS_LIBS)
25 AC_SUBST(LIBGNUTLS_CFLAGS)
26
27diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in
28index 3b01c17..de31469 100644
29--- a/lib/gnutls.pc.in
30+++ b/lib/gnutls.pc.in
31@@ -20,6 +20,6 @@ Name: GnuTLS
32 Description: Transport Security Layer implementation for the GNU system
33 URL: http://www.gnu.org/software/gnutls/
34 Version: @VERSION@
35+Requires.private: libgcrypt, libtasn1
36 Libs: -L${libdir} -lgnutls
37-Libs.private: @LIBGNUTLS_LIBS@ @LTLIBTASN1@
38 Cflags: -I${includedir}
39diff --git a/libextra/configure.ac b/libextra/configure.ac
40index c08e73f..3313886 100644
41--- a/libextra/configure.ac
42+++ b/libextra/configure.ac
43@@ -40,8 +40,8 @@ LIBGNUTLS_EXTRA_HOOKS
44
45 xgl_INIT
46
47-LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
48-LIBGNUTLS_EXTRA_CFLAGS="-I${includedir}"
49+LIBGNUTLS_EXTRA_LIBS="-lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
50+LIBGNUTLS_EXTRA_CFLAGS=""
51 AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
52 AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
53
54diff --git a/libextra/gnutls-extra.pc.in b/libextra/gnutls-extra.pc.in
55index 9e7b8f6..e228ec9 100644
56--- a/libextra/gnutls-extra.pc.in
57+++ b/libextra/gnutls-extra.pc.in
58@@ -21,5 +21,5 @@ URL: http://www.gnu.org/software/gnutls/
59 Requires: gnutls
60 Version: @VERSION@
61 Libs: -L${libdir} -lgnutls-extra
62-Libs.private: @LIBGNUTLS_EXTRA_LIBS@
63+Libs.private: -llzo2
64 Cflags: -I${includedir}
diff --git a/meta/recipes-support/gnutls/gnutls-2.8.6/gnutls-openssl.patch b/meta/recipes-support/gnutls/gnutls-2.8.6/gnutls-openssl.patch
new file mode 100644
index 0000000000..413de06472
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls-2.8.6/gnutls-openssl.patch
@@ -0,0 +1,124 @@
1Index: gnutls-1.6.0/libextra/gnutls_openssl.c
2===================================================================
3--- gnutls-1.6.0.orig/libextra/gnutls_openssl.c 2006-08-13 22:34:09.000000000 +0200
4+++ gnutls-1.6.0/libextra/gnutls_openssl.c 2006-12-12 15:07:59.002227000 +0100
5@@ -256,12 +256,17 @@
6 ssl->rfd = (gnutls_transport_ptr_t) - 1;
7 ssl->wfd = (gnutls_transport_ptr_t) - 1;
8
9+ ssl->ssl_peek_buffer = NULL;
10+ ssl->ssl_peek_buffer_size = ssl->ssl_peek_avail = 0;
11+
12 return ssl;
13 }
14
15 void
16 SSL_free (SSL * ssl)
17 {
18+ if (ssl->ssl_peek_buffer)
19+ free(ssl->ssl_peek_buffer);
20 gnutls_certificate_free_credentials (ssl->gnutls_cred);
21 gnutls_deinit (ssl->gnutls_state);
22 free (ssl);
23@@ -285,6 +290,7 @@
24 SSL_set_fd (SSL * ssl, int fd)
25 {
26 gnutls_transport_set_ptr (ssl->gnutls_state, GNUTLS_INT_TO_POINTER (fd));
27+ ssl->rfd = ssl->wfd = fd;
28 return 1;
29 }
30
31@@ -310,6 +316,17 @@
32 return 1;
33 }
34
35+int SSL_get_rfd(SSL *ssl)
36+{
37+ return ssl->rfd;
38+}
39+
40+int SSL_get_wfd(SSL *ssl)
41+{
42+ return ssl->wfd;
43+}
44+
45+
46 void
47 SSL_set_bio (SSL * ssl, BIO * rbio, BIO * wbio)
48 {
49@@ -325,6 +342,8 @@
50 int
51 SSL_pending (SSL * ssl)
52 {
53+ if (ssl->ssl_peek_avail)
54+ return ssl->ssl_peek_avail;
55 return gnutls_record_check_pending (ssl->gnutls_state);
56 }
57
58@@ -480,11 +499,50 @@
59 return 1;
60 }
61
62+int SSL_peek(SSL *ssl, void *buf, int len)
63+{
64+ if (len > ssl->ssl_peek_buffer_size) {
65+ ssl->ssl_peek_buffer = realloc (ssl->ssl_peek_buffer, len);
66+ ssl->ssl_peek_buffer_size = len;
67+ }
68+
69+ if (ssl->ssl_peek_avail == 0) {
70+
71+ int ret;
72+
73+ ret = gnutls_record_recv(ssl->gnutls_state, ssl->ssl_peek_buffer, len);
74+ ssl->last_error = ret;
75+
76+ if (ret > 0)
77+ ssl->ssl_peek_avail += ret;
78+ }
79+
80+ if (len > ssl->ssl_peek_avail)
81+ len = ssl->ssl_peek_avail;
82+
83+ memcpy (buf, ssl->ssl_peek_buffer, len);
84+
85+ return len;
86+}
87+
88 int
89 SSL_read (SSL * ssl, void *buf, int len)
90 {
91 int ret;
92
93+ if (ssl->ssl_peek_avail) {
94+ int n = (ssl->ssl_peek_avail > len) ? len : ssl->ssl_peek_avail;
95+
96+ memcpy (buf, ssl->ssl_peek_buffer, n);
97+
98+ if (ssl->ssl_peek_avail > n)
99+ memmove (ssl->ssl_peek_buffer, ssl->ssl_peek_buffer + n, ssl->ssl_peek_avail - n);
100+
101+ ssl->ssl_peek_avail -= n;
102+
103+ return n;
104+ }
105+
106 ret = gnutls_record_recv (ssl->gnutls_state, buf, len);
107 ssl->last_error = ret;
108
109Index: gnutls-1.6.0/includes/gnutls/openssl.h
110===================================================================
111--- gnutls-1.6.0.orig/libextra/includes/gnutls/openssl.h 2006-03-08 11:44:58.000000000 +0100
112+++ gnutls-1.6.0/libextra/includes/gnutls/openssl.h 2006-12-12 15:07:26.032227000 +0100
113@@ -164,6 +164,11 @@
114
115 gnutls_transport_ptr_t rfd;
116 gnutls_transport_ptr_t wfd;
117+
118+ char *ssl_peek_buffer;
119+ size_t ssl_peek_buffer_size;
120+ size_t ssl_peek_avail;
121+
122 };
123
124 #define rbio gnutls_state
diff --git a/meta/recipes-support/gnutls/gnutls-2.8.6/gnutls-texinfo-euro.patch b/meta/recipes-support/gnutls/gnutls-2.8.6/gnutls-texinfo-euro.patch
new file mode 100644
index 0000000000..a2d2f03870
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls-2.8.6/gnutls-texinfo-euro.patch
@@ -0,0 +1,16 @@
1The version of texinfo in Debian Sarge does not understand the @euro{} command.
2This patch replaces the @euro{} command with the word "euro".
3
4--- gnutls-1.3.5/doc/gnutls.texi.orig 2006-04-26 08:06:40.918268000 +0930
5+++ gnutls-1.3.5/doc/gnutls.texi 2006-04-26 08:06:52.446515440 +0930
6@@ -11,8 +11,8 @@
7 long as it is difficult enough to generate two different messages with
8 the same hash algorithm output. In that case the same signature could
9 be used as a proof for both messages. Nobody wants to sign an innocent
10-message of donating 1 @euro{} to Greenpeace and find out that he
11-donated 1.000.000 @euro{} to Bad Inc.
12+message of donating 1 euro to Greenpeace and find out that he
13+donated 1.000.000 euro to Bad Inc.
14
15 For a hash algorithm to be called cryptographic the following three
16 requirements must hold
diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc
new file mode 100644
index 0000000000..76f4ca63fd
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -0,0 +1,44 @@
1DESCRIPTION = "GNU Transport Layer Security Library"
2HOMEPAGE = "http://www.gnu.org/software/gnutls/"
3BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
4DEPENDS = "zlib lzo gettext libtasn1 libgcrypt (>= 1.4.2)"
5
6LICENSE = "GPLv3+ & LGPLv2.1+"
7LICENSE_${PN} = "LGPLv2.1+"
8LICENSE_${PN}-xx = "GPLv2.1+"
9LICENSE_${PN}-bin = "GPLv3+"
10LICENSE_${PN}-extra = "GPLv3+"
11LICENSE_${PN}-openssl = "GPLv3+"
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
13 file://lib/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
14 file://libextra/COPYING;md5=d32239bcb673463ab874e80d47fae504"
15
16SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/gnutls-${PV}.tar.bz2"
17
18inherit autotools binconfig pkgconfig
19
20EXTRA_OECONF="--with-included-opencdk --with-included-libcfg --disable-rpath \
21 --with-libtasn1-prefix=${STAGING_DIR_HOST}${prefix} \
22 --with-libgcrypt-prefix=${STAGING_DIR_HOST}${prefix} \
23 --with-libz-prefix=${STAGING_DIR_HOST}${prefix} --with-lzo --disable-guile"
24
25do_configure_prepend() {
26 for dir in . lib libextra; do
27 rm ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
28 done
29}
30
31PACKAGES =+ "${PN}-openssl ${PN}-extra ${PN}-bin ${PN}-xx"
32
33FILES_${PN} = "${libdir}/libgnutls.so.*"
34FILES_${PN}-bin = "${bindir}/gnutls-serv \
35 ${bindir}/gnutls-cli \
36 ${bindir}/srptool \
37 ${bindir}/psktool \
38 ${bindir}/certtool \
39 ${bindir}/gnutls-srpcrypt"
40
41FILES_${PN}-dev += "${bindir}/*-config ${bindir}/gnutls-cli-debug"
42FILES_${PN}-extra = "${libdir}/libgnutls-extra.so.*"
43FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
44FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
diff --git a/meta/recipes-support/gnutls/gnutls_2.8.6.bb b/meta/recipes-support/gnutls/gnutls_2.8.6.bb
new file mode 100644
index 0000000000..d8adc6ba17
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls_2.8.6.bb
@@ -0,0 +1,7 @@
1require gnutls.inc
2
3PR = "r0"
4
5SRC_URI += "file://gnutls-openssl.patch \
6 file://gnutls-texinfo-euro.patch \
7 file://configure-fix.patch"
diff --git a/meta/recipes-support/gnutls/libtasn1_2.7.bb b/meta/recipes-support/gnutls/libtasn1_2.7.bb
new file mode 100644
index 0000000000..11a7dc5055
--- /dev/null
+++ b/meta/recipes-support/gnutls/libtasn1_2.7.bb
@@ -0,0 +1,21 @@
1DESCRIPTION = "Library for ASN.1 and DER manipulation"
2HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
3
4LICENSE = "GPLv3+ & LGPLv2.1+"
5LICENSE_${PN}-bin = "GPLv3+"
6LICENSE_${PN} = "LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
8 file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
9 file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
10
11RREPLACES_${PN}-bin = "libtasn1 (<< 2.7)"
12
13PR = "r0"
14
15SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/libtasn1/libtasn1-${PV}.tar.gz"
16
17inherit autotools binconfig lib_package
18
19AUTOTOOLS_STAGE_PKGCONFIG = "1"
20
21BBCLASSEXTEND = "native"