summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2011-02-04 18:40:32 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2011-02-04 18:40:32 +0000
commit66df507f574250e5e16ca3f5e1b247e6187e9cb8 (patch)
tree39455b065f81b0398a9b64659515a980b4819018
parentgnome-panel dep is only required for gdict-applet (behind 'bonobo' USE flag).... (diff)
downloadgentoo-2-66df507f574250e5e16ca3f5e1b247e6187e9cb8.tar.gz
gentoo-2-66df507f574250e5e16ca3f5e1b247e6187e9cb8.tar.bz2
gentoo-2-66df507f574250e5e16ca3f5e1b247e6187e9cb8.zip
Backport upstream patch for strncmp usage bug by request from Arfrever Frehtes Taifersar Arahesis. Use EAPI=2. This will effectively kill upgrade path from older systems since it's a depend for dev-lang/python and thus portage. But python ebuilds are newer EAPIs too, so we don't care anymore.
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
-rw-r--r--dev-libs/libffi/ChangeLog9
-rw-r--r--dev-libs/libffi/files/libffi-3.0.9-strncmp.patch15
-rw-r--r--dev-libs/libffi/libffi-3.0.9-r2.ebuild43
3 files changed, 66 insertions, 1 deletions
diff --git a/dev-libs/libffi/ChangeLog b/dev-libs/libffi/ChangeLog
index 2fa117f79983..99c2599652b2 100644
--- a/dev-libs/libffi/ChangeLog
+++ b/dev-libs/libffi/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-libs/libffi
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libffi/ChangeLog,v 1.109 2011/01/06 19:52:33 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libffi/ChangeLog,v 1.110 2011/02/04 18:40:32 ssuominen Exp $
+
+*libffi-3.0.9-r2 (04 Feb 2011)
+
+ 04 Feb 2011; Samuli Suominen <ssuominen@gentoo.org> +libffi-3.0.9-r2.ebuild,
+ +files/libffi-3.0.9-strncmp.patch:
+ Backport upstream patch for strncmp usage bug by request from Arfrever
+ Frehtes Taifersar Arahesis.
06 Jan 2011; Fabian Groffen <grobian@gentoo.org> libffi-3.0.9-r1.ebuild,
+files/libffi-3.0.9-powerpc64-darwin.patch:
diff --git a/dev-libs/libffi/files/libffi-3.0.9-strncmp.patch b/dev-libs/libffi/files/libffi-3.0.9-strncmp.patch
new file mode 100644
index 000000000000..a919f2881790
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.0.9-strncmp.patch
@@ -0,0 +1,15 @@
+src/closures.c (selinux_enabled_check): Fix strncmp usage bug.
+
+http://github.com/atgreen/libffi/commit/eaf444eabc4c78703c0f98ac0197b1619c1b1bef
+
+--- src/closures.c
++++ src/closures.c
+@@ -146,7 +146,7 @@
+ p = strchr (p + 1, ' ');
+ if (p == NULL)
+ break;
+- if (strncmp (p + 1, "selinuxfs ", 10) != 0)
++ if (strncmp (p + 1, "selinuxfs ", 10) == 0)
+ {
+ free (buf);
+ fclose (f);
diff --git a/dev-libs/libffi/libffi-3.0.9-r2.ebuild b/dev-libs/libffi/libffi-3.0.9-r2.ebuild
new file mode 100644
index 000000000000..9b237a1e60b7
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.0.9-r2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libffi/libffi-3.0.9-r2.ebuild,v 1.1 2011/02/04 18:40:32 ssuominen Exp $
+
+EAPI=2
+inherit eutils libtool
+
+DESCRIPTION="a portable, high level programming interface to various calling conventions."
+HOMEPAGE="http://sourceware.org/libffi/"
+SRC_URI="ftp://sourceware.org/pub/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug static-libs test"
+
+RDEPEND=""
+DEPEND="test? ( dev-util/dejagnu )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-interix.patch \
+ "${FILESDIR}"/${P}-powerpc64-darwin.patch \
+ "${FILESDIR}"/${P}-irix.patch \
+ "${FILESDIR}"/${P}-arm-oabi.patch \
+ "${FILESDIR}"/${P}-define-generic-symbols-carefully.patch \
+ "${FILESDIR}"/${P}-strncmp.patch
+
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable static-libs static) \
+ $(use_enable debug)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc ChangeLog* README
+ find "${D}" -type f -name '*.la' -exec rm -f '{}' +
+}