summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2012-09-26 23:38:23 +0000
committerTim Harder <radhermit@gentoo.org>2012-09-26 23:38:23 +0000
commit145c7c43c074d563fb8c3952404c05f00f9b8cd8 (patch)
tree2edbee02129233e4034ef1a53ae8806fb4ca9c59
parentUse virtual/yacc instead of explicit bison dep. (diff)
downloadgentoo-2-145c7c43c074d563fb8c3952404c05f00f9b8cd8.tar.gz
gentoo-2-145c7c43c074d563fb8c3952404c05f00f9b8cd8.tar.bz2
gentoo-2-145c7c43c074d563fb8c3952404c05f00f9b8cd8.zip
Fix build with glibc-2.16 (bug #424988 by Christian Hagau) and link against the built libgnutls library instead of the system version (bug #436146 by Bartosz Brachaczek).
(Portage version: 2.2.0_alpha131/cvs/Linux x86_64)
-rw-r--r--net-libs/gnutls/ChangeLog8
-rw-r--r--net-libs/gnutls/files/gnutls-2.12.20-glibc-2.16.patch26
-rw-r--r--net-libs/gnutls/files/gnutls-2.12.20-libadd.patch36
-rw-r--r--net-libs/gnutls/gnutls-2.12.20.ebuild4
4 files changed, 72 insertions, 2 deletions
diff --git a/net-libs/gnutls/ChangeLog b/net-libs/gnutls/ChangeLog
index 7a2c0d143733..6ab1c469dc19 100644
--- a/net-libs/gnutls/ChangeLog
+++ b/net-libs/gnutls/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-libs/gnutls
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/gnutls/ChangeLog,v 1.379 2012/09/26 22:22:09 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/gnutls/ChangeLog,v 1.380 2012/09/26 23:38:22 radhermit Exp $
+
+ 26 Sep 2012; Tim Harder <radhermit@gentoo.org> gnutls-2.12.20.ebuild,
+ +files/gnutls-2.12.20-glibc-2.16.patch, +files/gnutls-2.12.20-libadd.patch:
+ Fix build with glibc-2.16 (bug #424988 by Christian Hagau) and link against
+ the built libgnutls library instead of the system version (bug #436146 by
+ Bartosz Brachaczek).
26 Sep 2012; Tim Harder <radhermit@gentoo.org> -gnutls-2.12.19.ebuild,
-gnutls-3.0.20.ebuild, -gnutls-3.0.21.ebuild, -gnutls-3.0.22.ebuild,
diff --git a/net-libs/gnutls/files/gnutls-2.12.20-glibc-2.16.patch b/net-libs/gnutls/files/gnutls-2.12.20-glibc-2.16.patch
new file mode 100644
index 000000000000..6b7f5453490c
--- /dev/null
+++ b/net-libs/gnutls/files/gnutls-2.12.20-glibc-2.16.patch
@@ -0,0 +1,26 @@
+--- gnutls-2.12.20/gl/stdio.in.h
++++ gnutls-2.12.20/gl/stdio.in.h
+@@ -714,8 +714,10 @@
+ /* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
++#ifdef HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
++#endif
+
+
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+--- gnutls-2.12.20/lib/gl/stdio.in.h
++++ gnutls-2.12.20/lib/gl/stdio.in.h
+@@ -714,8 +714,10 @@
+ /* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
++#ifdef HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
++#endif
+
+
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
diff --git a/net-libs/gnutls/files/gnutls-2.12.20-libadd.patch b/net-libs/gnutls/files/gnutls-2.12.20-libadd.patch
new file mode 100644
index 000000000000..fe5f1964ddda
--- /dev/null
+++ b/net-libs/gnutls/files/gnutls-2.12.20-libadd.patch
@@ -0,0 +1,36 @@
+--- gnutls-2.12.20/libextra/Makefile.am
++++ gnutls-2.12.20/libextra/Makefile.am
+@@ -69,7 +69,7 @@
+ if ENABLE_MINITASN1
+ libgnutls_openssl_la_LIBADD += ../lib/minitasn1/libminitasn1.la
+ else
+-libgnutls_openssl_la_LDFLAGS += $(LTLIBTASN1)
++libgnutls_openssl_la_LIBADD += $(LTLIBTASN1)
+ endif
+
+ if HAVE_LD_OUTPUT_DEF
+@@ -89,8 +89,9 @@
+ libgnutls_extra_la_SOURCES += \
+ ext_inner_application.h ext_inner_application.c gnutls_ia.c
+
++cryptolib_ldadd =
+ if !ENABLE_NETTLE
+-libgnutls_extra_la_LIBADD += $(LTLIBGCRYPT)
++cryptolib_ldadd = $(LTLIBGCRYPT)
+ endif
+
+ # Rest
+@@ -104,11 +105,10 @@
+ DISTCLEANFILES += $(defexec_DATA)
+
+ libgnutls_extra_la_LDFLAGS += \
+- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+- $(LZO_LIBS)
++ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+ libgnutls_extra_la_LIBADD += ../lib/gl/liblgnu.la gl/libxgnu.la \
+- ../lib/libgnutls.la
++ ../lib/libgnutls.la $(cryptolib_ldadd) $(LZO_LIBS)
+
+ if HAVE_LD_VERSION_SCRIPT
+ libgnutls_extra_la_LDFLAGS += \
diff --git a/net-libs/gnutls/gnutls-2.12.20.ebuild b/net-libs/gnutls/gnutls-2.12.20.ebuild
index 281850df42d1..8737474e8e76 100644
--- a/net-libs/gnutls/gnutls-2.12.20.ebuild
+++ b/net-libs/gnutls/gnutls-2.12.20.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/gnutls/gnutls-2.12.20.ebuild,v 1.3 2012/08/02 20:08:08 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/gnutls/gnutls-2.12.20.ebuild,v 1.4 2012/09/26 23:38:22 radhermit Exp $
EAPI=4
@@ -69,6 +69,8 @@ src_prepare() {
find . -name ltmain.sh -exec rm {} \;
epatch "${FILESDIR}"/${P}-AF_UNIX.patch
+ epatch "${FILESDIR}"/${P}-libadd.patch
+ epatch "${FILESDIR}"/${P}-glibc-2.16.patch
# support user patches
epatch_user