aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/nettle/files/nettle-2.5-static-libs.patch')
-rw-r--r--dev-libs/nettle/files/nettle-2.5-static-libs.patch108
1 files changed, 108 insertions, 0 deletions
diff --git a/dev-libs/nettle/files/nettle-2.5-static-libs.patch b/dev-libs/nettle/files/nettle-2.5-static-libs.patch
new file mode 100644
index 0000000..4434d58
--- /dev/null
+++ b/dev-libs/nettle/files/nettle-2.5-static-libs.patch
@@ -0,0 +1,108 @@
+From c4a57cf2b0ebf3b99309f40cfa1c5107ae038d84 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Fri, 14 Dec 2012 23:31:10 +0200
+Subject: [PATCH] build: add --enable-static option
+
+Gentoo bug#405525, support not installing static libraries.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ Makefile.in | 16 ++++++++++------
+ configure.ac | 12 ++++++++++++
+ 2 files changed, 22 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index be0de3c..d4a2a7d 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -21,7 +21,11 @@ include config.make
+ PRE_CPPFLAGS = -I.
+ # FIXME: Add configuration of LIBEXT?
+ LIBTARGETS = libnettle.a @IF_HOGWEED@ libhogweed.a
+-SHLIBTARGETS = $(LIBNETTLE_FORLINK) @IF_HOGWEED@ $(LIBHOGWEED_FORLINK)
++@IF_STATIC@INSTALL_LIBTARGETS = install-static
++@IF_STATIC@UNINSTALL_LIBTARGETS = uninstall-static
++@IF_SHARED@SHLIBTARGETS = $(LIBNETTLE_FORLINK) @IF_HOGWEED@ $(LIBHOGWEED_FORLINK)
++@IF_SHARED@INSTALL_SHLIBTARGETS = install-shared-nettle @IF_HOGWEED@ install-shared-hogweed
++@IF_SHARED@UNINSTALL_SHLIBTARGETS = uninstall-shared
+
+ getopt_SOURCES = getopt.c getopt1.c
+ getopt_TARGETS = $(getopt_SOURCES:.c=.$(OBJEXT))
+@@ -32,7 +36,7 @@ internal_TARGETS = $(internal_SOURCES:.c=.$(OBJEXT))
+ TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) twofishdata$(EXEEXT) \
+ shadata$(EXEEXT) gcmdata$(EXEEXT) \
+ $(getopt_TARGETS) $(internal_TARGETS) \
+- $(LIBTARGETS) @IF_SHARED@ $(SHLIBTARGETS)
++ $(LIBTARGETS) $(SHLIBTARGETS)
+ IMPLICIT_TARGETS = @IF_DLL@ $(LIBNETTLE_FILE) $(LIBHOGWEED_FILE)
+
+ DOCTARGETS = nettle.info nettle.html nettle.pdf
+@@ -302,8 +306,8 @@ hogweed.pc: hogweed.pc.in config.status
+ ./config.status $@
+
+ # Installation
+-install-here: install-info install-headers install-static install-pkgconfig \
+- @IF_SHARED@ install-shared-nettle @IF_HOGWEED@ install-shared-hogweed
++install-here: install-info install-headers install-pkgconfig \
++ $(INSTALL_LIBTARGETS) $(INSTALL_SHLIBTARGETS)
+
+ install-static: $(LIBTARGETS)
+ $(MKDIR_P) $(DESTDIR)$(libdir)
+@@ -369,8 +373,8 @@ install-pkgconfig: $(PKGCONFIG_FILES)
+ done
+
+ # Uninstall
+-uninstall-here: uninstall-info uninstall-headers uninstall-static \
+- uninstall-pkgconfig @IF_SHARED@ uninstall-shared
++uninstall-here: uninstall-info uninstall-headers uninstall-pkgconfig \
++ $(UNINSTALL_LIBTARGETS) $(UNINSTALL_SHLIBTARGETS)
+
+ uninstall-static:
+ for f in $(LIBTARGETS) ; do \
+diff --git a/configure.ac b/configure.ac
+index 6bf2b8b..994ee75 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,6 +43,10 @@ AC_ARG_ENABLE(assembler,
+ AC_HELP_STRING([--disable-assembler],[Disable assembler code]),,
+ [enable_assembler=yes])
+
++AC_ARG_ENABLE(static,
++ AC_HELP_STRING([--disable-static], [Do not build any static library]),,
++ [enable_static=yes])
++
+ AC_ARG_ENABLE(shared,
+ AC_HELP_STRING([--disable-shared], [Do not build any shared library]),,
+ [enable_shared=yes])
+@@ -566,6 +570,12 @@ else
+ IF_HOGWEED='#'
+ fi
+
++if test "x$enable_static" = xyes ; then
++ IF_STATIC=''
++else
++ IF_STATIC='#'
++fi
++
+ if test "x$enable_shared" = xyes ; then
+ IF_SHARED=''
+ else
+@@ -573,6 +583,7 @@ else
+ fi
+
+ AC_SUBST(IF_HOGWEED)
++AC_SUBST(IF_STATIC)
+ AC_SUBST(IF_SHARED)
+ AC_SUBST(IF_DLL)
+
+@@ -654,6 +665,7 @@ AC_MSG_NOTICE([summary of build options:
+ Install prefix: ${prefix}
+ Library directory: ${libdir}
+ Compiler: ${CC}
++ Static libraries: ${enable_static}
+ Shared libraries: ${enable_shared}
+ Public key crypto: ${enable_public_key}
+ ])
+--
+1.7.8.6
+