summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/gnutls/gnutls-1.4.4/gnutls-openssl.patch120
-rw-r--r--meta/packages/gnutls/gnutls-1.4.4/gnutls-texinfo-euro.patch16
-rw-r--r--meta/packages/gnutls/gnutls-1.4.4/onceonly.m463
-rw-r--r--meta/packages/gnutls/gnutls_1.4.4.bb41
-rw-r--r--meta/packages/libgcrypt/libgcrypt_1.2.3.bb28
-rw-r--r--meta/packages/lzo/lzo_1.08.bb36
6 files changed, 304 insertions, 0 deletions
diff --git a/meta/packages/gnutls/gnutls-1.4.4/gnutls-openssl.patch b/meta/packages/gnutls/gnutls-1.4.4/gnutls-openssl.patch
new file mode 100644
index 0000000000..6eca97efd7
--- /dev/null
+++ b/meta/packages/gnutls/gnutls-1.4.4/gnutls-openssl.patch
@@ -0,0 +1,120 @@
1--- gnutls-1.3.5/libextra/gnutls_openssl.c.orig 2006-04-28 20:01:40.000000000 +0100
2+++ gnutls-1.3.5/libextra/gnutls_openssl.c 2006-04-28 20:10:33.000000000 +0100
3@@ -252,12 +252,17 @@
4 ssl->rfd = (gnutls_transport_ptr_t) - 1;
5 ssl->wfd = (gnutls_transport_ptr_t) - 1;
6
7+ ssl->ssl_peek_buffer = NULL;
8+ ssl->ssl_peek_buffer_size = ssl->ssl_peek_avail = 0;
9+
10 return ssl;
11 }
12
13 void
14 SSL_free (SSL * ssl)
15 {
16+ if (ssl->ssl_peek_buffer)
17+ free(ssl->ssl_peek_buffer);
18 gnutls_certificate_free_credentials (ssl->gnutls_cred);
19 gnutls_deinit (ssl->gnutls_state);
20 free (ssl);
21@@ -281,6 +286,7 @@
22 SSL_set_fd (SSL * ssl, int fd)
23 {
24 gnutls_transport_set_ptr (ssl->gnutls_state, (gnutls_transport_ptr_t) fd);
25+ ssl->rfd = ssl->wfd = fd;
26 return 1;
27 }
28
29@@ -306,6 +312,17 @@
30 return 1;
31 }
32
33+int SSL_get_rfd(SSL *ssl)
34+{
35+ return ssl->rfd;
36+}
37+
38+int SSL_get_wfd(SSL *ssl)
39+{
40+ return ssl->wfd;
41+}
42+
43+
44 void
45 SSL_set_bio (SSL * ssl, BIO * rbio, BIO * wbio)
46 {
47@@ -321,6 +338,8 @@
48 int
49 SSL_pending (SSL * ssl)
50 {
51+ if (ssl->ssl_peek_avail)
52+ return ssl->ssl_peek_avail;
53 return gnutls_record_check_pending (ssl->gnutls_state);
54 }
55
56@@ -476,11 +495,50 @@
57 return 1;
58 }
59
60+int SSL_peek(SSL *ssl, void *buf, int len)
61+{
62+ if (len > ssl->ssl_peek_buffer_size) {
63+ ssl->ssl_peek_buffer = realloc (ssl->ssl_peek_buffer, len);
64+ ssl->ssl_peek_buffer_size = len;
65+ }
66+
67+ if (ssl->ssl_peek_avail == 0) {
68+
69+ int ret;
70+
71+ ret = gnutls_record_recv(ssl->gnutls_state, ssl->ssl_peek_buffer, len);
72+ ssl->last_error = ret;
73+
74+ if (ret > 0)
75+ ssl->ssl_peek_avail += ret;
76+ }
77+
78+ if (len > ssl->ssl_peek_avail)
79+ len = ssl->ssl_peek_avail;
80+
81+ memcpy (buf, ssl->ssl_peek_buffer, len);
82+
83+ return len;
84+}
85+
86 int
87 SSL_read (SSL * ssl, void *buf, int len)
88 {
89 int ret;
90
91+ if (ssl->ssl_peek_avail) {
92+ int n = (ssl->ssl_peek_avail > len) ? len : ssl->ssl_peek_avail;
93+
94+ memcpy (buf, ssl->ssl_peek_buffer, n);
95+
96+ if (ssl->ssl_peek_avail > n)
97+ memmove (ssl->ssl_peek_buffer, ssl->ssl_peek_buffer + n, ssl->ssl_peek_avail - n);
98+
99+ ssl->ssl_peek_avail -= n;
100+
101+ return n;
102+ }
103+
104 ret = gnutls_record_recv (ssl->gnutls_state, buf, len);
105 ssl->last_error = ret;
106
107--- gnutls-1.3.5/includes/gnutls/openssl.h.orig 2006-04-28 20:10:55.000000000 +0100
108+++ gnutls-1.3.5/includes/gnutls/openssl.h 2006-04-28 20:11:52.000000000 +0100
109@@ -164,6 +164,11 @@
110
111 gnutls_transport_ptr_t rfd;
112 gnutls_transport_ptr_t wfd;
113+
114+ char *ssl_peek_buffer;
115+ size_t ssl_peek_buffer_size;
116+ size_t ssl_peek_avail;
117+
118 };
119
120 #define rbio gnutls_state
diff --git a/meta/packages/gnutls/gnutls-1.4.4/gnutls-texinfo-euro.patch b/meta/packages/gnutls/gnutls-1.4.4/gnutls-texinfo-euro.patch
new file mode 100644
index 0000000000..e2a2762424
--- /dev/null
+++ b/meta/packages/gnutls/gnutls-1.4.4/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/signatures.texi.orig 2006-04-26 08:06:40.918268000 +0930
5+++ gnutls-1.3.5/doc/signatures.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/packages/gnutls/gnutls-1.4.4/onceonly.m4 b/meta/packages/gnutls/gnutls-1.4.4/onceonly.m4
new file mode 100644
index 0000000000..f6fec37cbf
--- /dev/null
+++ b/meta/packages/gnutls/gnutls-1.4.4/onceonly.m4
@@ -0,0 +1,63 @@
1# onceonly.m4 serial 3
2dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
3dnl This file is free software, distributed under the terms of the GNU
4dnl General Public License. As a special exception to the GNU General
5dnl Public License, this file may be distributed as part of a program
6dnl that contains a configuration script generated by Autoconf, under
7dnl the same distribution terms as the rest of that program.
8
9dnl This file defines some "once only" variants of standard autoconf macros.
10dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
11dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
12dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
13dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
14dnl The advantage is that the check for each of the headers/functions/decls
15dnl will be put only once into the 'configure' file. It keeps the size of
16dnl the 'configure' file down, and avoids redundant output when 'configure'
17dnl is run.
18dnl The drawback is that the checks cannot be conditionalized. If you write
19dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
20dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
21dnl empty, and the check will be inserted before the body of the AC_DEFUNed
22dnl function.
23
24dnl Autoconf version 2.57 or newer is recommended.
25AC_PREREQ(2.54)
26
27# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
28# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
29AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
30 :
31 AC_FOREACH([gl_HEADER_NAME], [$1], [
32 AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]),
33 [-./], [___])), [
34 AC_CHECK_HEADERS(gl_HEADER_NAME)
35 ])
36 AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
37 [-./], [___])))
38 ])
39])
40
41# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
42# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
43AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
44 :
45 AC_FOREACH([gl_FUNC_NAME], [$1], [
46 AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [
47 AC_CHECK_FUNCS(defn([gl_FUNC_NAME]))
48 ])
49 AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]))
50 ])
51])
52
53# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
54# AC_CHECK_DECLS(DECL1, DECL2, ...).
55AC_DEFUN([AC_CHECK_DECLS_ONCE], [
56 :
57 AC_FOREACH([gl_DECL_NAME], [$1], [
58 AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [
59 AC_CHECK_DECLS(defn([gl_DECL_NAME]))
60 ])
61 AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME]))
62 ])
63])
diff --git a/meta/packages/gnutls/gnutls_1.4.4.bb b/meta/packages/gnutls/gnutls_1.4.4.bb
new file mode 100644
index 0000000000..e80dc3bb2f
--- /dev/null
+++ b/meta/packages/gnutls/gnutls_1.4.4.bb
@@ -0,0 +1,41 @@
1DESCRIPTION = "GNU Transport Layer Security Library"
2DEPENDS = "zlib libgcrypt lzo"
3HOMEPAGE = "http://www.gnu.org/software/gnutls/"
4LICENSE = "LGPL"
5
6SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/gnutls-${PV}.tar.bz2 \
7 file://onceonly.m4 \
8 file://gnutls-openssl.patch;patch=1 \
9 file://gnutls-texinfo-euro.patch;patch=1"
10
11inherit autotools binconfig
12
13do_configure_prepend() {
14 cp ${WORKDIR}/onceonly.m4 ${S}/m4/
15}
16
17PACKAGES =+ "${PN}-openssl ${PN}-extra ${PN}-bin"
18FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
19FILES_${PN}-extra = "${libdir}/libgnutls-extra.so.*"
20FILES_${PN} = "${libdir}/libgnutls.so.*"
21FILES_${PN}-bin = "${bindir}/gnutls-serv \
22 ${bindir}/gnutls-cli \
23 ${bindir}/srptool \
24 ${bindir}/certtool \
25 ${bindir}/gnutls-srpcrypt \
26 ${bindir}/psktool"
27
28FILES_${PN}-dev += "${bindir}/*-config ${bindir}/gnutls-cli-debug"
29
30EXTRA_OECONF="--with-included-opencdk --with-included-libtasn1"
31
32do_stage() {
33 oe_libinstall -C lib/.libs -so -a libgnutls ${STAGING_LIBDIR}
34 oe_libinstall -C libextra/.libs -so -a libgnutls-extra ${STAGING_LIBDIR}
35 oe_libinstall -C libextra/.libs -so -a libgnutls-openssl ${STAGING_LIBDIR}
36 autotools_stage_includes
37
38 install -d ${STAGING_DATADIR}/aclocal
39 cp ${S}/lib/libgnutls.m4 ${STAGING_DATADIR}/aclocal/
40}
41
diff --git a/meta/packages/libgcrypt/libgcrypt_1.2.3.bb b/meta/packages/libgcrypt/libgcrypt_1.2.3.bb
new file mode 100644
index 0000000000..e797ee75c7
--- /dev/null
+++ b/meta/packages/libgcrypt/libgcrypt_1.2.3.bb
@@ -0,0 +1,28 @@
1DESCRIPTION = "A general purpose cryptographic library based on the code from GnuPG"
2SECTION = "libs"
3PRIORITY = "optional"
4LICENSE = "GPL LGPL FDL"
5DEPENDS = "libgpg-error"
6
7# move libgcrypt-config into -dev package
8FILES_${PN} = "${libdir}/lib*.so.*"
9FILES_${PN}-dev += "${bindir}"
10
11SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz"
12
13inherit autotools binconfig
14
15EXTRA_OECONF = "--without-pth --disable-asm --with-capabilities"
16
17do_stage() {
18 oe_libinstall -so -C src libgcrypt ${STAGING_LIBDIR}
19 oe_libinstall -so -C src libgcrypt-pthread ${STAGING_LIBDIR}
20 install -m 0755 src/libgcrypt-config ${STAGING_BINDIR}/
21
22 install -d ${STAGING_INCDIR}/
23 for X in gcrypt.h gcrypt-module.h
24 do
25 install -m 0644 src/${X} ${STAGING_INCDIR}/${X}
26 done
27
28}
diff --git a/meta/packages/lzo/lzo_1.08.bb b/meta/packages/lzo/lzo_1.08.bb
new file mode 100644
index 0000000000..c9a8a1384e
--- /dev/null
+++ b/meta/packages/lzo/lzo_1.08.bb
@@ -0,0 +1,36 @@
1DESCRIPTION = "Lossless data compression library"
2HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
3LICENSE = "GPLv2"
4SECTION = "libs"
5PRIORITY = "optional"
6PR = "r14"
7
8SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz"
9
10inherit autotools
11
12EXTRA_OECONF = "--enable-shared"
13
14#do_configure () {
15# # override this function to avoid the autoconf/automake/aclocal/autoheader
16# # calls for now
17# gnu-configize
18# oe_runconf
19#}
20
21do_stage() {
22 install -m 0644 include/lzo1.h ${STAGING_INCDIR}/lzo1.h
23 install -m 0644 include/lzo16bit.h ${STAGING_INCDIR}/lzo16bit.h
24 install -m 0644 include/lzo1a.h ${STAGING_INCDIR}/lzo1a.h
25 install -m 0644 include/lzo1b.h ${STAGING_INCDIR}/lzo1b.h
26 install -m 0644 include/lzo1c.h ${STAGING_INCDIR}/lzo1c.h
27 install -m 0644 include/lzo1f.h ${STAGING_INCDIR}/lzo1f.h
28 install -m 0644 include/lzo1x.h ${STAGING_INCDIR}/lzo1x.h
29 install -m 0644 include/lzo1y.h ${STAGING_INCDIR}/lzo1y.h
30 install -m 0644 include/lzo1z.h ${STAGING_INCDIR}/lzo1z.h
31 install -m 0644 include/lzo2a.h ${STAGING_INCDIR}/lzo2a.h
32 install -m 0644 include/lzoconf.h ${STAGING_INCDIR}/lzoconf.h
33 install -m 0644 include/lzoutil.h ${STAGING_INCDIR}/lzoutil.h
34
35 oe_libinstall -a -so -C src liblzo ${STAGING_LIBDIR}
36}