From: Markus Niebel <markus.nie...@tq-group.com>

the libhogweed part requires libgmp. Let's make it configurable.

Signed-off-by: Markus Niebel <markus.nie...@tq-group.com>

Conflicts:
        rules/nettle.in
---
 rules/nettle.in   | 14 +++++++++++++-
 rules/nettle.make | 11 ++++++++++-
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/rules/nettle.in b/rules/nettle.in
index fcacb96..f931994 100644
--- a/rules/nettle.in
+++ b/rules/nettle.in
@@ -1,8 +1,20 @@
 ## SECTION=networking
 
-config NETTLE
+menuconfig NETTLE
        tristate
        prompt "nettle"
+       select LIBGMP if NETTLE_LIBHOGWEED
        help
          Nettle is a cryptographic library.
 
+if NETTLE
+
+config NETTLE_LIBHOGWEED
+       bool
+       prompt "Build libhogweed"
+       help
+         The libhogweed library contains those functions of Nettle that
+         uses bignum operations, and depends on the GMP library
+
+endif
+
diff --git a/rules/nettle.make b/rules/nettle.make
index 59df66e..23d6cb8 100644
--- a/rules/nettle.make
+++ b/rules/nettle.make
@@ -48,8 +48,15 @@ NETTLE_CONF_OPT              := \
        --disable-documentation \
        --disable-fat \
        --$(call ptx/endis,PTXCONF_ARCH_ARM_NEON)-arm-neon \
-       --disable-x86-aesni \
+       --disable-x86-aesni
+
+ifdef PTXCONF_NETTLE_LIBHOGWEED
+NETTLE_CONF_OPT                += \
        --enable-mini-gmp
+else
+NETTLE_CONF_OPT                += \
+       --disable-mini-gmp
+endif
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -65,7 +72,9 @@ $(STATEDIR)/nettle.targetinstall:
        @$(call install_fixup, nettle,DESCRIPTION,missing)
 
        @$(call install_lib, nettle, 0, 0, 0644, libnettle)
+ifdef PTXCONF_NETTLE_LIBHOGWEED
        @$(call install_lib, nettle, 0, 0, 0644, libhogweed)
+endif
        @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/nettle-hash)
        @$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/sexp-conv)
        @$(call install_copy, nettle, 0, 0, 0755, -, 
/usr/bin/nettle-lfib-stream)
-- 
1.9.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to