summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2013-06-02 12:30:33 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2013-06-02 12:30:33 +0000
commitebb84f9f9ba0d817e64e6a8ef760f33d4b5bf300 (patch)
tree5226375f5c93455214453c1bdce992f394017116 /net-libs/gnutls/files
parentUpdate Gnome 3.8 mask (diff)
downloadhistorical-ebb84f9f9ba0d817e64e6a8ef760f33d4b5bf300.tar.gz
historical-ebb84f9f9ba0d817e64e6a8ef760f33d4b5bf300.tar.bz2
historical-ebb84f9f9ba0d817e64e6a8ef760f33d4b5bf300.zip
link explicitly against gmp, bug#472056
Package-Manager: portage-2.2.0_alpha177/cvs/Linux x86_64 Manifest-Sign-Key: 0xBF20DC51
Diffstat (limited to 'net-libs/gnutls/files')
-rw-r--r--net-libs/gnutls/files/gnutls-3.2.1-build-gmp.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/net-libs/gnutls/files/gnutls-3.2.1-build-gmp.patch b/net-libs/gnutls/files/gnutls-3.2.1-build-gmp.patch
new file mode 100644
index 000000000000..1efce4ff1741
--- /dev/null
+++ b/net-libs/gnutls/files/gnutls-3.2.1-build-gmp.patch
@@ -0,0 +1,61 @@
+From e6ee5b82b8141db62f12c509ef9c5f58bb683544 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sun, 2 Jun 2013 15:22:07 +0300
+Subject: [PATCH] build: explicit linkage with gmp library
+
+gnutls uses gmp library explicitly so it needs to explicit link against
+it so that all symbols may be resolved.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ lib/nettle/Makefile.am | 3 ++-
+ m4/hooks.m4 | 12 +++++++++++-
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/lib/nettle/Makefile.am b/lib/nettle/Makefile.am
+index e2b704e..56d180a 100644
+--- a/lib/nettle/Makefile.am
++++ b/lib/nettle/Makefile.am
+@@ -18,7 +18,7 @@
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>
+
+-AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS)
++AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(GMP_CFLAGS)
+ AM_CPPFLAGS = \
+ -I$(srcdir)/../../gl \
+ -I$(builddir)/../../gl \
+@@ -35,3 +35,4 @@ noinst_LTLIBRARIES = libcrypto.la
+
+ libcrypto_la_SOURCES = pk.c mpi.c mac.c cipher.c rnd.c init.c egd.c egd.h \
+ gnettle.h
++libcrypto_la_LIBADD = $(GMP_LIBS)
+diff --git a/m4/hooks.m4 b/m4/hooks.m4
+index 3439edb..ca71728 100644
+--- a/m4/hooks.m4
++++ b/m4/hooks.m4
+@@ -77,10 +77,20 @@ AC_MSG_ERROR([[
+ *** Libhogweed (nettle's companion library) was not found. Note that you must compile nettle with gmp support.
+ ]])
+ ])
++ AC_ARG_VAR(GMP_CFLAGS, [C compiler flags for gmp])
++ AC_ARG_VAR(GMP_LIBS, [linker flags for gmp])
++ if test x$GMP_LIBS = x; then
++ AC_CHECK_LIB(gmp, __gmpz_cmp, [GMP_LIBS="-lgmp"], [AC_MSG_ERROR([[
++***
++*** gmp was not found. while nettle was.
++]])])
++ fi
++ AC_SUBST(GMP_CFLAGS)
++ AC_SUBST(GMP_LIBS)
+ AM_CONDITIONAL(ENABLE_NETTLE, test "$cryptolib" = "nettle")
+ AC_DEFINE([HAVE_LIBNETTLE], 1, [nettle is enabled])
+
+- GNUTLS_REQUIRES_PRIVATE="Requires.private: nettle, hogweed"
++ GNUTLS_REQUIRES_PRIVATE="Requires.private: nettle, hogweed, gmp"
+
+ AC_ARG_WITH(included-libtasn1,
+ AS_HELP_STRING([--with-included-libtasn1], [use the included libtasn1]),
+--
+1.8.1.5
+