dev-libs/libgcrypt: Update live version to work with current 1.7
authorKristian Fiskerstrand <kf@sumptuouscapital.com>
Sat, 31 Oct 2015 12:45:40 +0000 (13:45 +0100)
committerKristian Fiskerstrand <kf@sumptuouscapital.com>
Sat, 31 Oct 2015 12:45:40 +0000 (13:45 +0100)
Updated for multilib in main tree etc

dev-libs/libgcrypt/Manifest
dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch [new file with mode: 0644]
dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch [new file with mode: 0644]
dev-libs/libgcrypt/libgcrypt-9999.ebuild

index 7932afb..ad6ec94 100644 (file)
@@ -1 +1,3 @@
-EBUILD libgcrypt-9999.ebuild 740 SHA256 7c1c81c2b237cf01c72a712e80ea62ead8c52f644e610d46235c8b0c94fd33dc SHA512 bb249640ea10ae6480b834ed09f1c2f8805584d806b0b19b99ed173e37ff8970265e4bedfc015da5490901803e5ff10882b3faee85211d1621fb9599df15c25c WHIRLPOOL 405fa0eda9e08bd88c3487953f36821f989ed650d8f67d87643a1e94284d3a1f31858a399576731e99af4fbd3789bf7e46c0bd8e54c958a6afa416746b9803eb
+AUX libgcrypt-1.6.1-uscore.patch 843 SHA256 458ebc904185a5d08ef89f0c8ac797b87eec619341b4c0f8130fde2af8749459 SHA512 971814ac34f17464a96fbc110fe995923d873981949a0126e50c206d39499d6146fd00414e837774e6932e4b491cc68c4147278d6216dda630fb876bc8f61791 WHIRLPOOL bbadf4816e081929e8739fbbd3574bd291d9de86c4fe2344dba2c1ceb5f84d3e0bdede194efadefbcbf7409c44c218ab28f48d05b367c225b1687fced7565e15
+AUX libgcrypt-multilib-syspath.patch 588 SHA256 a3fc53f24b9cd0355a5267bc3ca8e88c397878473046536068c8ae4ae0b526eb SHA512 913c1a474aba50ec3589fb5a991f65204ba2cc28203b92353fdef8fb092350c3be814a57f29a26a2176627509a4f573f6db02ebdbcde3f04a2f1d632879293dc WHIRLPOOL 8d066987dc3cfa1dd686047fd5332b11199e5add63f82e397a34b22b5ce2f97af17d60042681c1eb50617402189a0d7fca5db48db7d41f4ef0f1cbe1acc645ab
+EBUILD libgcrypt-9999.ebuild 2159 SHA256 1314cca994f0f6875bbff27f38e2f45763fa38cbfbf21e49de9b03416b10b687 SHA512 20806309eb8c67d4aa27d531d24809d243299229841a2e16bf57c5a8ce3937e2fca26018fca1796f76b52f38f1bdbb3dcb4b530769203f2381374256e07e0582 WHIRLPOOL eb7e2ef006ba0bbd499d5b48b9dac281e69d50597d390f58d8d5c9f88e144ad31c386b6fa72a0d24f8291c1b1433e7c6a5f74b6ac1a625f0528dc32853e818d6
diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch b/dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch
new file mode 100644 (file)
index 0000000..22bfac3
--- /dev/null
@@ -0,0 +1,26 @@
+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.
+
+--- libgcrypt-1.6.1/configure.ac
++++ libgcrypt-1.6.1/configure.ac
+@@ -1022,7 +1022,7 @@
+ # Check whether underscores in symbols are required.  This needs to be
+ # done before setting up the assembler stuff.
+ #
+-GNUPG_SYS_SYMBOL_UNDERSCORE()
++LT_SYS_SYMBOL_USCORE
+ #################################
+--- libgcrypt-1.6.1/mpi/config.links
++++ libgcrypt-1.6.1/mpi/config.links
+@@ -362,7 +362,7 @@
+ # 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
diff --git a/dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch b/dev-libs/libgcrypt/files/libgcrypt-multilib-syspath.patch
new file mode 100644 (file)
index 0000000..7859851
--- /dev/null
@@ -0,0 +1,23 @@
+diff --git a/src/libgcrypt-config.in b/src/libgcrypt-config.in
+index c052638..4c8ddc3 100644
+--- a/src/libgcrypt-config.in
++++ b/src/libgcrypt-config.in
+@@ -154,9 +154,12 @@ if test "$echo_libs" = "yes"; then
+     libs_final="$libs"
+     # Set up `libdirs'.
+-    if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then
+-      libdirs="-L$libdir"
+-    fi
++    case "$libdir" in
++        /usr/lib|/usr/lib64|/lib|/lib64) ;;
++        *)
++            libdirs="-L$libdir"
++            ;;
++    esac
+     # Set up `libs_final'.
+     libs_final="$libs_final $gpg_error_libs"
+-- 
+1.7.6.1
+
index 5d777f5..efc97d4 100644 (file)
@@ -1,39 +1,82 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: Exp $
+# $Id$
 
 EAPI=5
+AUTOTOOLS_AUTORECONF=1
+WANT_AUTOMAKE=1.14
 
-inherit autotools flag-o-matic user git-2
+inherit autotools-multilib flag-o-matic git-2
 
 DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
-HOMEPAGE="http://gnupg.org/"
-
-WANT_AUTOMAKE=1.14
+HOMEPAGE="http://www.gnupg.org/"
 EGIT_REPO_URI="git://git.gnupg.org/${PN}.git"
 
-LICENSE="GPL-2"
-SLOT="0/20"
+LICENSE="LGPL-2.1 MIT"
+SLOT="0/20" # subslot = soname major version
 KEYWORDS=""
+IUSE="doc static-libs +threads"
+
+CDEPEND=">=dev-libs/libgpg-error-1.13[${MULTILIB_USEDEP}]
+       abi_x86_32? (
+               !<=app-emulation/emul-linux-x86-baselibs-20131008-r19
+               !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+       )"
+
+DEPEND="${CDEPEND}
+       doc? ( virtual/texi2dvi 
+               >=sys-apps/texinfo-5.2:0
+              app-text/ghostscript-gpl )"
 
-IUSE=""
-
-REQUIRED_USE=""
-#Texinfo version 4.8 segfaults, force higher version.  
-CDEPEND=">=dev-libs/libgpg-error-1.13"
-DEPEND="
-       >=sys-apps/texinfo-5.2:0
-       media-gfx/transfig
-       app-text/ghostscript-gpl
-       ${CDEPEND}
-"
 RDEPEND="${CDEPEND}"
 
-src_prepare() {
-       ./autogen.sh || die "Autogen failed"
-}
+DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.6.1-uscore.patch
+       "${FILESDIR}"/${PN}-multilib-syspath.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+       /usr/bin/libgcrypt-config
+)
 
-src_configure() {
-       econf \
+multilib_src_configure() {
+       if [[ ${CHOST} == *86*-solaris* ]] ; then
+               # ASM code uses GNU ELF syntax, divide in particular, we need to
+               # allow this via ASFLAGS, since we don't have a flag-o-matic
+               # function for that, we'll have to abuse cflags for this
+               append-cflags -Wa,--divide
+       fi
+       local myeconfargs=(
                --enable-maintainer-mode
+               --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-utils_src_configure
+}
+
+multilib_src_compile() {
+       emake
+       multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
+}
+
+multilib_src_install() {
+       emake DESTDIR="${D}" install
+       multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
+}
+
+multilib_src_prepare() {
+       ./autogen.sh || die "Autogen failed"
 }