summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libffi')
-rw-r--r--dev-libs/libffi/Manifest4
-rw-r--r--dev-libs/libffi/files/libffi-3.0.13-emutramp_pax_proc.patch37
-rw-r--r--dev-libs/libffi/files/libffi-3.1-darwin-x32.patch22
-rw-r--r--dev-libs/libffi/files/libffi-3.1-execstack.patch12
-rw-r--r--dev-libs/libffi/files/libffi-3.1-typing_error.patch14
-rw-r--r--dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch20
-rw-r--r--dev-libs/libffi/files/libffi-3.2.1-o-tmpfile-eacces.patch17
-rw-r--r--dev-libs/libffi/libffi-3.0.13-r1.ebuild65
-rw-r--r--dev-libs/libffi/libffi-3.1-r3.ebuild63
-rw-r--r--dev-libs/libffi/libffi-3.2.1.ebuild59
-rw-r--r--dev-libs/libffi/libffi-3.2.ebuild60
-rw-r--r--dev-libs/libffi/metadata.xml36
12 files changed, 409 insertions, 0 deletions
diff --git a/dev-libs/libffi/Manifest b/dev-libs/libffi/Manifest
new file mode 100644
index 000000000000..98cc0cd0b066
--- /dev/null
+++ b/dev-libs/libffi/Manifest
@@ -0,0 +1,4 @@
+DIST libffi-3.0.13.tar.gz 845747 SHA256 1dddde1400c3bcb7749d398071af88c3e4754058d2d4c0b3696c2f82dc5cf11c SHA512 fc47f5d25197c631754efe05a349edb556d072807ecef19b41f17c1a8f39c95221be64926fbd05b1f8439181df1ddff8fc01462ce3a26005b75159ddc27e6f6a WHIRLPOOL d5b14d48a7b35f7349ec938d0deac62db7022ac4d611ab13bc7a6a2766a47e210fc1663fc8c6d7ee48d421c06b66f558010829ac2c215620c76d0bf7650e1308
+DIST libffi-3.1.tar.gz 937214 SHA256 97feeeadca5e21870fa4433bc953d1b3af3f698d5df8a428f68b73cd60aef6eb SHA512 8994973d75facf5ad928c270e17b1a56e24d1543af75b93731a0048e747df27e4190a736b6dc2dca7d43de1d7e88891220304802c10fcccdcebee9c9ffd3d1b9 WHIRLPOOL 19c08cffd39c998fcd762b1e3767b4fd86915427226833411302bebd2d5bcf93d515e6df4a4cab11327595d3966e46442e457fbe09ae986b58bdfb2bb6adb913
+DIST libffi-3.2.1.tar.gz 940837 SHA256 d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37 SHA512 980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 WHIRLPOOL b9d3c86e347029fa9f03fd3813405cc731099812ad6186bd4d2ea646354383803c90912b20e1804a6b7fc12719403b3c0c3b800bdbcab564a2c93fcb4fd722ad
+DIST libffi-3.2.tar.gz 940691 SHA256 6b2680fbf6ae9c2381d381248705857de22e05bae191889298f8e6bfb2ded4ef SHA512 fed5f6eec86144608966857f54bd69a5faa43427f27bc9178ebe2c7a1cecf925c20dbd6df07a207ae469842874efcf5b99fb7e09db59cbd92ebfc0a7e1bb62b7 WHIRLPOOL db7491bc5914eb6691aa366677c63af51979453330373251b1043b53163d1b56dbed65ba23c9f5047257e476e0d216045a06faa346790987047854ae1d04361d
diff --git a/dev-libs/libffi/files/libffi-3.0.13-emutramp_pax_proc.patch b/dev-libs/libffi/files/libffi-3.0.13-emutramp_pax_proc.patch
new file mode 100644
index 000000000000..c27bd9bf8893
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.0.13-emutramp_pax_proc.patch
@@ -0,0 +1,37 @@
+2013-05-22 Magnus Granberg <zorry@gentoo.org>
+
+ #457194
+ * src/closuer.c (emutramp_enabled_check): Check with /proc.
+
+--- a/src/closures.c 2013-03-17 23:27:11.000000000 +0100
++++ b/src/closures.c 2013-04-29 23:26:02.279022022 +0200
+@@ -181,10 +181,26 @@ static int emutramp_enabled = -1;
+ static int
+ emutramp_enabled_check (void)
+ {
+- if (getenv ("FFI_DISABLE_EMUTRAMP") == NULL)
+- return 1;
+- else
++ char *buf = NULL;
++ size_t len = 0;
++ FILE *f;
++ int ret;
++ f = fopen ("/proc/self/status", "r");
++ if (f == NULL)
+ return 0;
++ ret = 0;
++
++ while (getline (&buf, &len, f) != -1)
++ if (!strncmp (buf, "PaX:", 4))
++ {
++ char emutramp;
++ if (sscanf (buf, "%*s %*c%c", &emutramp) == 1)
++ ret = (emutramp == 'E');
++ break;
++ }
++ free (buf);
++ fclose (f);
++ return ret;
+ }
+
+ #define is_emutramp_enabled() (emutramp_enabled >= 0 ? emutramp_enabled \
diff --git a/dev-libs/libffi/files/libffi-3.1-darwin-x32.patch b/dev-libs/libffi/files/libffi-3.1-darwin-x32.patch
new file mode 100644
index 000000000000..e5f100e56726
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.1-darwin-x32.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/show_bug.cgi?id=513428
+https://bugs.gentoo.org/show_bug.cgi?id=536764
+https://trac.macports.org/ticket/44170
+
+--- libffi-3.2.1/src/x86/win32.S
++++ libffi-3.2.1/src/x86/win32.S
+@@ -1184,7 +1184,6 @@
+
+ #if defined(X86_WIN32) && !defined(__OS2__)
+ .section .eh_frame,"w"
+-#endif
+ .Lframe1:
+ .LSCIE1:
+ .long .LECIE1-.LASCIE1 /* Length of Common Information Entry */
+@@ -1343,6 +1342,7 @@
+ /* End of DW_CFA_xxx CFI instructions. */
+ .align 4
+ .LEFDE5:
++#endif /* defined(X86_WIN32) && !defined(__OS2__), for the eh_frame */
+
+ #endif /* !_MSC_VER */
+
diff --git a/dev-libs/libffi/files/libffi-3.1-execstack.patch b/dev-libs/libffi/files/libffi-3.1-execstack.patch
new file mode 100644
index 000000000000..6884a47012d5
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.1-execstack.patch
@@ -0,0 +1,12 @@
+http://bugs.gentoo.org/511634
+http://sourceware.org/ml/libffi-discuss/2014/msg00058.html
+
+--- src/x86/win32.S
++++ src/x86/win32.S
+@@ -1304,3 +1304,6 @@
+
+ #endif /* !_MSC_VER */
+
++#if defined __ELF__ && defined __linux__
++ .section .note.GNU-stack,"",@progbits
++#endif
diff --git a/dev-libs/libffi/files/libffi-3.1-typing_error.patch b/dev-libs/libffi/files/libffi-3.1-typing_error.patch
new file mode 100644
index 000000000000..fc24006d5d32
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.1-typing_error.patch
@@ -0,0 +1,14 @@
+http://bugs.gentoo.org/511752
+http://sourceware.org/ml/libffi-discuss/2014/msg00059.html
+
+--- include/ffi.h.in
++++ include/ffi.h.in
+@@ -221,7 +221,7 @@ typedef struct {
+ #endif
+ } ffi_cif;
+
+-#if HAVE_LONG_DOUBLE_VARIANT
++#if @HAVE_LONG_DOUBLE_VARIANT@
+ /* Used to adjust size/alignment of ffi types. */
+ void ffi_prep_types (ffi_abi abi);
+ # endif
diff --git a/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch b/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch
new file mode 100644
index 000000000000..0d6e0bc29007
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch
@@ -0,0 +1,20 @@
+--- src/alpha/osf.S.orig 2015-01-16 10:46:15.000000000 +0100
++++ src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100
+@@ -279,6 +279,7 @@
+ .gprel32 $load_64 # FFI_TYPE_SINT64
+ .gprel32 $load_none # FFI_TYPE_STRUCT
+ .gprel32 $load_64 # FFI_TYPE_POINTER
++ .gprel32 $load_none # FFI_TYPE_COMPLEX
+
+ /* Assert that the table above is in sync with ffi.h. */
+
+@@ -294,7 +295,8 @@
+ || FFI_TYPE_SINT64 != 12 \
+ || FFI_TYPE_STRUCT != 13 \
+ || FFI_TYPE_POINTER != 14 \
+- || FFI_TYPE_LAST != 14
++ || FFI_TYPE_COMPLEX != 15 \
++ || FFI_TYPE_LAST != 15
+ #error "osf.S out of sync with ffi.h"
+ #endif
+
diff --git a/dev-libs/libffi/files/libffi-3.2.1-o-tmpfile-eacces.patch b/dev-libs/libffi/files/libffi-3.2.1-o-tmpfile-eacces.patch
new file mode 100644
index 000000000000..92a733cbe823
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.2.1-o-tmpfile-eacces.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/529044
+
+deploy this workaround until newer versions of the kernel/C library/libsandbox
+are rolled out into general circulation
+
+--- a/src/closures.c
++++ b/src/closures.c
+@@ -301,7 +301,8 @@ open_temp_exec_file_dir (const char *dir)
+ #ifdef O_TMPFILE
+ fd = open (dir, flags | O_RDWR | O_EXCL | O_TMPFILE, 0700);
+ /* If the running system does not support the O_TMPFILE flag then retry without it. */
+- if (fd != -1 || (errno != EINVAL && errno != EISDIR && errno != EOPNOTSUPP)) {
++ if (fd != -1 || (errno != EINVAL && errno != EISDIR && errno != EOPNOTSUPP &&
++ errno != EACCES)) {
+ return fd;
+ } else {
+ errno = 0;
diff --git a/dev-libs/libffi/libffi-3.0.13-r1.ebuild b/dev-libs/libffi/libffi-3.0.13-r1.ebuild
new file mode 100644
index 000000000000..44d624fb136d
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.0.13-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib toolchain-funcs multilib-minimal
+
+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 arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug pax_kernel static-libs test"
+
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="test? ( dev-util/dejagnu )"
+
+DOCS="ChangeLog* README"
+
+ECONF_SOURCE=${S}
+
+pkg_setup() {
+ # Check for orphaned libffi, see http://bugs.gentoo.org/354903 for example
+ if [[ ${ROOT} == "/" && ${EPREFIX} == "" ]] && ! has_version ${CATEGORY}/${PN}; then
+ local base="${T}"/conftest
+ echo 'int main() { }' > "${base}".c
+ $(tc-getCC) -o "${base}" "${base}".c -lffi >&/dev/null
+ if [ $? -eq 0 ]; then
+ eerror "The linker reported linking against -lffi to be working while it shouldn't have."
+ eerror "This is wrong and you should find and delete the old copy of libffi before continuing."
+ die "The system is in inconsistent state with unknown libffi installed."
+ fi
+ fi
+}
+
+src_prepare() {
+ sed -i 's:@toolexeclibdir@:$(libdir):g' Makefile.in || die #462814
+ epatch "${FILESDIR}"/${P}-emutramp_pax_proc.patch #457194
+ epatch_user
+ elibtoolize
+}
+
+multilib_src_configure() {
+ use userland_BSD && export HOST="${CHOST}"
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable pax_kernel pax_emutramp) \
+ $(use_enable debug)
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ einstalldocs
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/${PN}$(get_libname 5)
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/${PN}$(get_libname 5)
+}
diff --git a/dev-libs/libffi/libffi-3.1-r3.ebuild b/dev-libs/libffi/libffi-3.1-r3.ebuild
new file mode 100644
index 000000000000..cd8913226dfd
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.1-r3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib multilib-minimal toolchain-funcs
+
+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 ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug pax_kernel static-libs test"
+
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="test? ( dev-util/dejagnu )"
+
+DOCS="ChangeLog* README"
+
+ECONF_SOURCE=${S}
+
+pkg_setup() {
+ # Check for orphaned libffi, see http://bugs.gentoo.org/354903 for example
+ if [[ ${ROOT} == "/" && ${EPREFIX} == "" ]] && ! has_version ${CATEGORY}/${PN}; then
+ local base="${T}"/conftest
+ echo 'int main() { }' > "${base}".c
+ $(tc-getCC) -o "${base}" "${base}".c -lffi >&/dev/null
+ if [ $? -eq 0 ]; then
+ eerror "The linker reported linking against -lffi to be working while it shouldn't have."
+ eerror "This is wrong and you should find and delete the old copy of libffi before continuing."
+ die "The system is in inconsistent state with unknown libffi installed."
+ fi
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-execstack.patch \
+ "${FILESDIR}"/${P}-typing_error.patch
+
+ sed -i -e 's:@toolexeclibdir@:$(libdir):g' Makefile.in || die #462814
+ # http://sourceware.org/ml/libffi-discuss/2014/msg00060.html
+ sed -i -e 's:@toolexeclibdir@:${libdir}:' libffi.pc.in || die #511726
+
+ epatch_user
+ elibtoolize
+}
+
+multilib_src_configure() {
+ use userland_BSD && export HOST="${CHOST}"
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable pax_kernel pax_emutramp) \
+ $(use_enable debug)
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ einstalldocs
+}
diff --git a/dev-libs/libffi/libffi-3.2.1.ebuild b/dev-libs/libffi/libffi-3.2.1.ebuild
new file mode 100644
index 000000000000..1237c60af043
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.2.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib multilib-minimal toolchain-funcs
+
+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 ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug pax_kernel static-libs test"
+
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="test? ( dev-util/dejagnu )"
+
+DOCS="ChangeLog* README"
+
+ECONF_SOURCE=${S}
+
+pkg_setup() {
+ # Check for orphaned libffi, see http://bugs.gentoo.org/354903 for example
+ if [[ ${ROOT} == "/" && ${EPREFIX} == "" ]] && ! has_version ${CATEGORY}/${PN}; then
+ local base="${T}"/conftest
+ echo 'int main() { }' > "${base}".c
+ $(tc-getCC) -o "${base}" "${base}".c -lffi >&/dev/null
+ if [ $? -eq 0 ]; then
+ eerror "The linker reported linking against -lffi to be working while it shouldn't have."
+ eerror "This is wrong and you should find and delete the old copy of libffi before continuing."
+ die "The system is in inconsistent state with unknown libffi installed."
+ fi
+ fi
+}
+
+src_prepare() {
+ sed -i -e 's:@toolexeclibdir@:$(libdir):g' Makefile.in || die #462814
+ epatch "${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044
+ epatch "${FILESDIR}"/${PN}-3.2.1-complex_alpha.patch
+ epatch "${FILESDIR}"/${PN}-3.1-darwin-x32.patch
+ epatch_user
+ elibtoolize
+}
+
+multilib_src_configure() {
+ use userland_BSD && export HOST="${CHOST}"
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable pax_kernel pax_emutramp) \
+ $(use_enable debug)
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ einstalldocs
+}
diff --git a/dev-libs/libffi/libffi-3.2.ebuild b/dev-libs/libffi/libffi-3.2.ebuild
new file mode 100644
index 000000000000..3b342935b35d
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib multilib-minimal toolchain-funcs
+
+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"
+# A number of people report python ctypes errors #529044
+#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 ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug pax_kernel static-libs test"
+
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r1
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+DEPEND="test? ( dev-util/dejagnu )"
+
+DOCS="ChangeLog* README"
+
+ECONF_SOURCE=${S}
+
+pkg_setup() {
+ # Check for orphaned libffi, see http://bugs.gentoo.org/354903 for example
+ if [[ ${ROOT} == "/" && ${EPREFIX} == "" ]] && ! has_version ${CATEGORY}/${PN}; then
+ local base="${T}"/conftest
+ echo 'int main() { }' > "${base}".c
+ $(tc-getCC) -o "${base}" "${base}".c -lffi >&/dev/null
+ if [ $? -eq 0 ]; then
+ eerror "The linker reported linking against -lffi to be working while it shouldn't have."
+ eerror "This is wrong and you should find and delete the old copy of libffi before continuing."
+ die "The system is in inconsistent state with unknown libffi installed."
+ fi
+ fi
+}
+
+src_prepare() {
+ sed -i -e 's:@toolexeclibdir@:$(libdir):g' Makefile.in || die #462814
+
+ epatch "${FILESDIR}"/${PN}-3.1-darwin-x32.patch
+
+ epatch_user
+ elibtoolize
+}
+
+multilib_src_configure() {
+ use userland_BSD && export HOST="${CHOST}"
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable pax_kernel pax_emutramp) \
+ $(use_enable debug)
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+ einstalldocs
+}
diff --git a/dev-libs/libffi/metadata.xml b/dev-libs/libffi/metadata.xml
new file mode 100644
index 000000000000..691534b035d1
--- /dev/null
+++ b/dev-libs/libffi/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>toolchain</herd>
+ <longdescription lang="en">
+ Compilers for high level languages generate code that follow certain
+ conventions. These conventions are necessary, in part, for separate
+ compilation to work. One such convention is the "calling
+ convention". The "calling convention" is essentially a set of
+ assumptions made by the compiler about where function arguments will
+ be found on entry to a function. A "calling convention" also specifies
+ where the return value for a function is found.
+
+ Some programs may not know at the time of compilation what arguments
+ are to be passed to a function. For instance, an interpreter may be
+ told at run-time about the number and types of arguments used to call
+ a given function. Libffi can be used in such programs to provide a
+ bridge from the interpreter program to compiled code.
+
+ The libffi library provides a portable, high level programming
+ interface to various calling conventions. This allows a programmer to
+ call any function specified by a call interface description at run
+ time.
+
+ Ffi stands for Foreign Function Interface. A foreign function
+ interface is the popular name for the interface that allows code
+ written in one language to call code written in another language. The
+ libffi library really only provides the lowest, machine dependent
+ layer of a fully featured foreign function interface. A layer must
+ exist above libffi that handles type conversions for values passed
+ between the two languages.
+ </longdescription>
+ <use>
+ <flag name='pax_kernel'>Use PaX emulated trampolines, for we can't use PROT_EXEC</flag>
+ </use>
+</pkgmetadata>