Gentoo Archives: gentoo-commits

From: "Alon Bar-Lev (alonbl)" <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-libs/gnutls/files: gnutls-3.2.1-build-gmp.patch
Date: Sun, 02 Jun 2013 12:30:22
Message-Id: 20130602123019.18B1D2171E@flycatcher.gentoo.org
1 alonbl 13/06/02 12:30:19
2
3 Added: gnutls-3.2.1-build-gmp.patch
4 Log:
5 link explicitly against gmp, bug#472056
6
7 (Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key BF20DC51)
8
9 Revision Changes Path
10 1.1 net-libs/gnutls/files/gnutls-3.2.1-build-gmp.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/gnutls/files/gnutls-3.2.1-build-gmp.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/gnutls/files/gnutls-3.2.1-build-gmp.patch?rev=1.1&content-type=text/plain
14
15 Index: gnutls-3.2.1-build-gmp.patch
16 ===================================================================
17 From e6ee5b82b8141db62f12c509ef9c5f58bb683544 Mon Sep 17 00:00:00 2001
18 From: Alon Bar-Lev <alon.barlev@×××××.com>
19 Date: Sun, 2 Jun 2013 15:22:07 +0300
20 Subject: [PATCH] build: explicit linkage with gmp library
21
22 gnutls uses gmp library explicitly so it needs to explicit link against
23 it so that all symbols may be resolved.
24
25 Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com>
26 ---
27 lib/nettle/Makefile.am | 3 ++-
28 m4/hooks.m4 | 12 +++++++++++-
29 2 files changed, 13 insertions(+), 2 deletions(-)
30
31 diff --git a/lib/nettle/Makefile.am b/lib/nettle/Makefile.am
32 index e2b704e..56d180a 100644
33 --- a/lib/nettle/Makefile.am
34 +++ b/lib/nettle/Makefile.am
35 @@ -18,7 +18,7 @@
36 # You should have received a copy of the GNU Lesser General Public License
37 # along with this program. If not, see <http://www.gnu.org/licenses/>
38
39 -AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS)
40 +AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(GMP_CFLAGS)
41 AM_CPPFLAGS = \
42 -I$(srcdir)/../../gl \
43 -I$(builddir)/../../gl \
44 @@ -35,3 +35,4 @@ noinst_LTLIBRARIES = libcrypto.la
45
46 libcrypto_la_SOURCES = pk.c mpi.c mac.c cipher.c rnd.c init.c egd.c egd.h \
47 gnettle.h
48 +libcrypto_la_LIBADD = $(GMP_LIBS)
49 diff --git a/m4/hooks.m4 b/m4/hooks.m4
50 index 3439edb..ca71728 100644
51 --- a/m4/hooks.m4
52 +++ b/m4/hooks.m4
53 @@ -77,10 +77,20 @@ AC_MSG_ERROR([[
54 *** Libhogweed (nettle's companion library) was not found. Note that you must compile nettle with gmp support.
55 ]])
56 ])
57 + AC_ARG_VAR(GMP_CFLAGS, [C compiler flags for gmp])
58 + AC_ARG_VAR(GMP_LIBS, [linker flags for gmp])
59 + if test x$GMP_LIBS = x; then
60 + AC_CHECK_LIB(gmp, __gmpz_cmp, [GMP_LIBS="-lgmp"], [AC_MSG_ERROR([[
61 +***
62 +*** gmp was not found. while nettle was.
63 +]])])
64 + fi
65 + AC_SUBST(GMP_CFLAGS)
66 + AC_SUBST(GMP_LIBS)
67 AM_CONDITIONAL(ENABLE_NETTLE, test "$cryptolib" = "nettle")
68 AC_DEFINE([HAVE_LIBNETTLE], 1, [nettle is enabled])
69
70 - GNUTLS_REQUIRES_PRIVATE="Requires.private: nettle, hogweed"
71 + GNUTLS_REQUIRES_PRIVATE="Requires.private: nettle, hogweed, gmp"
72
73 AC_ARG_WITH(included-libtasn1,
74 AS_HELP_STRING([--with-included-libtasn1], [use the included libtasn1]),
75 --
76 1.8.1.5