aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven 'sleipnir' Rebhan <odinshorse@googlemail.com>2009-06-01 09:11:43 +0000
committerSven 'sleipnir' Rebhan <odinshorse@googlemail.com>2009-06-01 09:11:43 +0000
commit18a3ab3adba8eb4965308f6aee20a71930b9a11b (patch)
tree82f86eb6af79cbbc5233e4cf07eb6fd576ee8565 /dev-libs
parentAdd pkg-config support for libgpg-error (taken from openembedded). (diff)
downloadembedded-cross-18a3ab3adba8eb4965308f6aee20a71930b9a11b.tar.gz
embedded-cross-18a3ab3adba8eb4965308f6aee20a71930b9a11b.tar.bz2
embedded-cross-18a3ab3adba8eb4965308f6aee20a71930b9a11b.zip
Use pkg-config file of libgpg-error to ease cross-compilation.
Furthermore add pkg-config support for the package itself (this part was taken from openembedded).
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libgcrypt/Manifest4
-rw-r--r--dev-libs/libgcrypt/files/libgcrypt-gpg-error-pkgconfig.patch20
-rw-r--r--dev-libs/libgcrypt/files/libgcrypt-pkgconfig-support.patch51
-rw-r--r--dev-libs/libgcrypt/libgcrypt-1.4.4.ebuild49
4 files changed, 124 insertions, 0 deletions
diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest
new file mode 100644
index 0000000..c6e6679
--- /dev/null
+++ b/dev-libs/libgcrypt/Manifest
@@ -0,0 +1,4 @@
+AUX libgcrypt-gpg-error-pkgconfig.patch 751 RMD160 beaff3d93f045b5e89d96c9711451f2cbf83bcf5 SHA1 1791e360c0883b0b8418b5bad8d96c541975eef0 SHA256 a327393eabcd9071e7a2d3f011b376b2be46f05d42b91a512ab88cd57c2690dc
+AUX libgcrypt-pkgconfig-support.patch 1570 RMD160 b993a12ba04fd1320f0346f6c4f89615e1f0abc4 SHA1 687fd95785a3aacfa11cb2f52b8fbd73a0430a8b SHA256 fcc8cb55ad8a6545bb974e9e064132f4f155a654c599285f1bd002aaabbd7ea1
+DIST libgcrypt-1.4.4.tar.bz2 1143139 RMD160 65fd66687bd17bc8a680c59f26a8edf3e21e7dbf SHA1 3987f0efcbb7048c136d5c859e88eee1763a14f6 SHA256 3212b88080cf8fa006164d38fc176fafa5c29591c8384f284ab880db0dbf306f
+EBUILD libgcrypt-1.4.4.ebuild 1346 RMD160 456e11fd4f06a680283441ba911e4327cf2a6f00 SHA1 36811f2daaa8508a059dcb37c4709bc68bd40c13 SHA256 87d5c43dcc7929439f30e19189eb83304e59109f70bf07b1dfdbcf70866c0689
diff --git a/dev-libs/libgcrypt/files/libgcrypt-gpg-error-pkgconfig.patch b/dev-libs/libgcrypt/files/libgcrypt-gpg-error-pkgconfig.patch
new file mode 100644
index 0000000..f0391b6
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-gpg-error-pkgconfig.patch
@@ -0,0 +1,20 @@
+--- configure.ac 2009-06-01 08:36:08.000000000 +0000
++++ configure.ac.new 2009-06-01 09:00:57.000000000 +0000
+@@ -511,11 +511,12 @@
+ #
+ # gpg-error is required.
+ #
+-AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION")
+-if test "x$GPG_ERROR_LIBS" = "x"; then
+- AC_MSG_ERROR([libgpg-error is needed.
+- See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .])
+-fi
++PKG_CHECK_MODULES([GPG_ERROR], [gpg-error >= "$NEED_GPG_ERROR_VERSION"])
++#AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION")
++#if test "x$GPG_ERROR_LIBS" = "x"; then
++# AC_MSG_ERROR([libgpg-error is needed.
++# See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .])
++#fi
+
+ AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GCRYPT,
+ [The default error source for libgcrypt.])
diff --git a/dev-libs/libgcrypt/files/libgcrypt-pkgconfig-support.patch b/dev-libs/libgcrypt/files/libgcrypt-pkgconfig-support.patch
new file mode 100644
index 0000000..642b522
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-pkgconfig-support.patch
@@ -0,0 +1,51 @@
+This patch was taken from openembedded (Author: Denys Dmytriyenko).
+
+Index: configure.ac
+===================================================================
+--- configure.ac.orig
++++ configure.ac
+@@ -1072,6 +1072,7 @@ cipher/Makefile
+ doc/Makefile
+ src/Makefile
+ src/gcrypt.h
++src/libgcrypt.pc
+ src/libgcrypt-config
+ src/versioninfo.rc
+ tests/Makefile
+Index: src/libgcrypt.pc.in
+===================================================================
+--- /dev/null
++++ src/libgcrypt.pc.in
+@@ -0,0 +1,32 @@
++# Process this file with autoconf to produce a pkg-config metadata file.
++# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
++# Author: Simon Josefsson
++#
++# This file is free software; as a special exception the author gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++#
++# This file is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@LIBGCRYPT_CONFIG_API_VERSION@
++
++# Misc information.
++symmetric_ciphers=@LIBGCRYPT_CIPHERS@
++asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
++digests=@LIBGCRYPT_DIGESTS@
++
++Name: libgcrypt
++Description: GNU crypto library
++URL: http://www.gnupg.org
++Version: @VERSION@
++Libs: -L${libdir} -lgcrypt
++Libs.private: -L${libdir} -lgpg-error
++Cflags: -I${includedir}
diff --git a/dev-libs/libgcrypt/libgcrypt-1.4.4.ebuild b/dev-libs/libgcrypt/libgcrypt-1.4.4.ebuild
new file mode 100644
index 0000000..ba2e6e2
--- /dev/null
+++ b/dev-libs/libgcrypt/libgcrypt-1.4.4.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libgcrypt/libgcrypt-1.4.4.ebuild,v 1.9 2009/04/05 05:39:48 arfrever Exp $
+
+inherit eutils flag-o-matic toolchain-funcs autotools
+
+DESCRIPTION="general purpose crypto library based on the code used in GnuPG"
+HOMEPAGE="http://www.gnupg.org/"
+SRC_URI="mirror://gnupg/libgcrypt/${P}.tar.bz2
+ ftp://ftp.gnupg.org/gcrypt/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=dev-libs/libgpg-error-1.7"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ [[ $(tc-arch) == x86 && $(gcc-version) == 4.1 ]] && replace-flags -O3 -O2
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+
+ # Add pkg-config support to this package
+ # (for easier cross-compilation).
+ epatch "${FILESDIR}/${PN}-gpg-error-pkgconfig.patch"
+ epatch "${FILESDIR}/${PN}-pkgconfig-support.patch"
+ eautoreconf
+}
+
+src_compile() {
+ # --disable-padlock-support for bug #201917
+ econf \
+ --disable-padlock-support \
+ --disable-dependency-tracking \
+ --with-pic \
+ --enable-noexecstack
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog NEWS README* THANKS TODO
+}