summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/libgcrypt/Manifest1
-rw-r--r--dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch33
-rw-r--r--dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch84
-rw-r--r--dev-libs/libgcrypt/libgcrypt-1.5.4-r1.ebuild57
-rw-r--r--dev-libs/libgcrypt/libgcrypt-1.5.4-r100.ebuild58
5 files changed, 233 insertions, 0 deletions
diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest
index 79bf1a45f7cc..608b99b6d2ef 100644
--- a/dev-libs/libgcrypt/Manifest
+++ b/dev-libs/libgcrypt/Manifest
@@ -1,2 +1,3 @@
+DIST libgcrypt-1.5.4.tar.bz2 1512982 SHA256 d5f88d9f41a46953dc250cdb8575129b37ee2208401b7fa338c897f667c7fb33 SHA512 fe7e1d07eb10ee4ea8054bc955c35dc4b2109db645a08a6fa7757bf1e77a612e03c0838f9766086f04270b3621f34ccae0d6333f117cff204ccad9018c8a7908 WHIRLPOOL 221082d028a90235a3ddcc774b1772a8b8daec989a24b341491849e653e2ecb5cb0e3c8989a3f426524e39b28ebbe1b48532d5d9de7c54f4bdc19b450e22e4dc
DIST libgcrypt-1.6.3.tar.bz2 2494052 SHA256 41b4917b93ae34c6a0e2127378d7a4d66d805a2a86a09911d4f9bd871db7025f SHA512 09a84fcc4d3d755df21f46302a549af4ba788d829ff7fa0cf65eeec033bc3744503f8fe3f4be55a51cc17b1b1b487736c328d7d7bc909f13139600236298c549 WHIRLPOOL dd331afed5c8116df8a55742a7b559791c554a97c32983d64ab196a6d47c2d6bd7e15f8a63dda43947961bb269963185b98927ff0695c3f6d3b939face41e450
DIST libgcrypt-1.6.4.tar.bz2 2549820 SHA256 c9bc2c7fe2e5f4ea13b0c74f9d24bcbb1ad889bb39297d8082aebf23f4336026 SHA512 d2abc81fc3e3acf58f3bf18db449bfb4bdbc28fe62f695276ddd35f34434996b0d686bb48a4724e5134c80ea6cab08ce04f4a0989cb9a72f2497ec833bb24df1 WHIRLPOOL 708de5d55845177aa38dc227920dd64eeef8105427d5c88b8196ca47978f577d57f3cd85cd4627af6574e6ab780b815c1cbc8c8ad02aaba72ef176810f7a8865
diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch b/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch
new file mode 100644
index 000000000000..1d4f650b6c7a
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch
@@ -0,0 +1,33 @@
+The version taken from GnuPG 1.4 assumes any cross-compiled package have
+prefixed underscores, which is not the case; by using libtool's own macro,
+we can avoid the whole issue.
+
+diff --git a/configure.ac b/configure.ac
+index ab160c3..6df49bf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -886,7 +886,7 @@ fi
+ #
+ # Setup assembler stuff.
+ #
+-GNUPG_SYS_SYMBOL_UNDERSCORE()
++LT_SYS_SYMBOL_USCORE
+ AC_ARG_ENABLE(mpi-path,
+ AC_HELP_STRING([--enable-mpi-path=EXTRA_PATH],
+ [prepend EXTRA_PATH to list of CPU specific optimizations]),
+diff --git a/mpi/config.links b/mpi/config.links
+index 7e910ee..9696828 100644
+--- a/mpi/config.links
++++ b/mpi/config.links
+@@ -291,7 +291,7 @@ fi
+
+ # Make sysdep.h
+ echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
+-if test x$ac_cv_sys_symbol_underscore = xyes; then
++if test x$sys_symbol_underscore = xyes; then
+ cat <<EOF >>./mpi/sysdep.h
+ #if __STDC__
+ #define C_SYMBOL_NAME(name) _##name
+--
+1.7.6.1
+
diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch b/dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch
new file mode 100644
index 000000000000..ab5d844552af
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch
@@ -0,0 +1,84 @@
+fix from upstream
+
+From e67c67321ce240c93dd0fa2b21c649c0a8e233f7 Mon Sep 17 00:00:00 2001
+From: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+Date: Tue, 22 Oct 2013 17:07:53 +0300
+Subject: [PATCH] mpi: allow building with clang on ARM
+
+* mpi/longlong.h [__arm__] (add_ssaaaa, sub_ddmmss, umul_ppmm)
+(count_leading_zeros): Do not cast assembly output arguments.
+[__arm__] (umul_ppmm): Remove the extra '%' ahead of assembly comment.
+[_ARM_ARCH >= 4] (umul_ppmm): Use correct inputs and outputs instead of
+registers.
+--
+
+Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+---
+ mpi/longlong.h | 27 +++++++++++++--------------
+ 1 file changed, 13 insertions(+), 14 deletions(-)
+
+diff --git a/mpi/longlong.h b/mpi/longlong.h
+index c2ab9c5..8c8260e 100644
+--- a/mpi/longlong.h
++++ b/mpi/longlong.h
+@@ -188,8 +188,8 @@ extern UDItype __udiv_qrnnd ();
+ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("adds %1, %4, %5\n" \
+ "adc %0, %2, %3" \
+- : "=r" ((USItype)(sh)), \
+- "=&r" ((USItype)(sl)) \
++ : "=r" ((sh)), \
++ "=&r" ((sl)) \
+ : "%r" ((USItype)(ah)), \
+ "rI" ((USItype)(bh)), \
+ "%r" ((USItype)(al)), \
+@@ -197,15 +197,15 @@ extern UDItype __udiv_qrnnd ();
+ #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subs %1, %4, %5\n" \
+ "sbc %0, %2, %3" \
+- : "=r" ((USItype)(sh)), \
+- "=&r" ((USItype)(sl)) \
++ : "=r" ((sh)), \
++ "=&r" ((sl)) \
+ : "r" ((USItype)(ah)), \
+ "rI" ((USItype)(bh)), \
+ "r" ((USItype)(al)), \
+ "rI" ((USItype)(bl)))
+ #if defined __ARM_ARCH_2__ || defined __ARM_ARCH_3__
+ #define umul_ppmm(xh, xl, a, b) \
+- __asm__ ("%@ Inlined umul_ppmm\n" \
++ __asm__ ("@ Inlined umul_ppmm\n" \
+ "mov %|r0, %2, lsr #16 @ AAAA\n" \
+ "mov %|r2, %3, lsr #16 @ BBBB\n" \
+ "bic %|r1, %2, %|r0, lsl #16 @ aaaa\n" \
+@@ -218,20 +218,19 @@ extern UDItype __udiv_qrnnd ();
+ "addcs %|r2, %|r2, #65536\n" \
+ "adds %1, %|r1, %|r0, lsl #16\n" \
+ "adc %0, %|r2, %|r0, lsr #16" \
+- : "=&r" ((USItype)(xh)), \
+- "=r" ((USItype)(xl)) \
++ : "=&r" ((xh)), \
++ "=r" ((xl)) \
+ : "r" ((USItype)(a)), \
+ "r" ((USItype)(b)) \
+ : "r0", "r1", "r2")
+ #else
+ #define umul_ppmm(xh, xl, a, b) \
+- __asm__ ("%@ Inlined umul_ppmm\n" \
+- "umull %r1, %r0, %r2, %r3" \
+- : "=&r" ((USItype)(xh)), \
+- "=r" ((USItype)(xl)) \
++ __asm__ ("@ Inlined umul_ppmm\n" \
++ "umull %1, %0, %2, %3" \
++ : "=&r" ((xh)), \
++ "=r" ((xl)) \
+ : "r" ((USItype)(a)), \
+- "r" ((USItype)(b)) \
+- : "r0", "r1")
++ "r" ((USItype)(b)))
+ #endif
+ #define UMUL_TIME 20
+ #define UDIV_TIME 100
+--
+2.4.4
+
diff --git a/dev-libs/libgcrypt/libgcrypt-1.5.4-r1.ebuild b/dev-libs/libgcrypt/libgcrypt-1.5.4-r1.ebuild
new file mode 100644
index 000000000000..fe222f997a19
--- /dev/null
+++ b/dev-libs/libgcrypt/libgcrypt-1.5.4-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-multilib
+
+DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
+HOMEPAGE="http://www.gnupg.org/"
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0/11" # subslot = soname major version
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/libgpg-error-1.12[${MULTILIB_USEDEP}]
+ !dev-libs/libgcrypt:11
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r19
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.0-uscore.patch
+ "${FILESDIR}"/${PN}-multilib-syspath.patch
+ "${FILESDIR}"/${P}-clang-arm.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/libgcrypt-config
+)
+
+src_configure() {
+ local myeconfargs=(
+ --disable-padlock-support # bug 201917
+ --disable-dependency-tracking
+ --enable-noexecstack
+ --disable-O-flag-munging
+ $(use_enable static-libs static)
+
+ # disabled due to various applications requiring privileges
+ # after libgcrypt drops them (bug #468616)
+ --without-capabilities
+
+ # http://trac.videolan.org/vlc/ticket/620
+ # causes bus-errors on sparc64-solaris
+ $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
+ $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
+ )
+ autotools-multilib_src_configure
+}
diff --git a/dev-libs/libgcrypt/libgcrypt-1.5.4-r100.ebuild b/dev-libs/libgcrypt/libgcrypt-1.5.4-r100.ebuild
new file mode 100644
index 000000000000..a0aad0c9e4b7
--- /dev/null
+++ b/dev-libs/libgcrypt/libgcrypt-1.5.4-r100.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-multilib
+
+DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
+HOMEPAGE="http://www.gnupg.org/"
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="11/11" # subslot = soname major version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND=">=dev-libs/libgpg-error-1.12[${MULTILIB_USEDEP}]
+ !dev-libs/libgcrypt:0/11
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r19
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.0-uscore.patch
+ "${FILESDIR}"/${PN}-multilib-syspath.patch
+ "${FILESDIR}"/${P}-clang-arm.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ --disable-padlock-support # bug 201917
+ --disable-dependency-tracking
+ --enable-noexecstack
+ --disable-O-flag-munging
+
+ # disabled due to various applications requiring privileges
+ # after libgcrypt drops them (bug #468616)
+ --without-capabilities
+
+ # http://trac.videolan.org/vlc/ticket/620
+ # causes bus-errors on sparc64-solaris
+ $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
+ $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
+ )
+ autotools-multilib_src_configure
+}
+
+src_install() {
+ autotools-multilib_src_install
+
+ rm -r "${ED%/}"/usr/{bin,include,lib*/*.so,share} || die
+}