From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-libs/libffi/Manifest | 8 +++ dev-libs/libffi/files/libffi-3.1-darwin-x32.patch | 22 ++++++++ .../libffi/files/libffi-3.2.1-complex_alpha.patch | 20 ++++++++ .../files/libffi-3.2.1-o-tmpfile-eacces.patch | 17 +++++++ dev-libs/libffi/libffi-3.2.1.ebuild | 58 ++++++++++++++++++++++ dev-libs/libffi/metadata.xml | 39 +++++++++++++++ 6 files changed, 164 insertions(+) create mode 100644 dev-libs/libffi/Manifest create mode 100644 dev-libs/libffi/files/libffi-3.1-darwin-x32.patch create mode 100644 dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch create mode 100644 dev-libs/libffi/files/libffi-3.2.1-o-tmpfile-eacces.patch create mode 100644 dev-libs/libffi/libffi-3.2.1.ebuild create mode 100644 dev-libs/libffi/metadata.xml (limited to 'dev-libs/libffi') diff --git a/dev-libs/libffi/Manifest b/dev-libs/libffi/Manifest new file mode 100644 index 000000000000..8af80d89d6df --- /dev/null +++ b/dev-libs/libffi/Manifest @@ -0,0 +1,8 @@ +AUX libffi-3.1-darwin-x32.patch 606 SHA256 419007aba26be807a25e6f34d319225458e3febc75c3f3d0c85093ded63e3cb2 SHA512 909e4c45f124d6a9d4a0b2b97fdcbf0451a15c11c3da581fc8571d4f4f0857306bbfddf682bbe0441f0c5c84a8489e4a79a792883bfe440224cf672567bf0a24 WHIRLPOOL 9f749489499e8e9fa7712ae4111424c47c695cd5ee7b6480a8a2f5cd638d8d95c000e16e81eb13603bd842c2d50d2d0c60480d519960c55b652867fd6cb95cde +AUX libffi-3.2.1-complex_alpha.patch 601 SHA256 5653822db3b2338f6b7c63107868d20665a200f139616476fc1411ae76283fa5 SHA512 66890bf241236f08e0e726c820e2ff82df6071c1a3b25aa4f3f005b6431b94ec5a5f730db56de82c006e26415d72fe665d6ced37567bcdec6d84357faeb24bec WHIRLPOOL 1e020a6477eb137f5579de73a76a021eb2444a1223ef1e7b50460cbd92643c841429993d08517b7297b50f7d10aa4e5446f23ac1185d18712a5d28081d35eb74 +AUX libffi-3.2.1-o-tmpfile-eacces.patch 660 SHA256 655ed8d1c6ff1f48d69f28f3393e84fe53e581504f55cfa05b1914ed97be7463 SHA512 0887063ce1d812c31a34d662f852cf2944e008f2f60bd07941572f9032861e749968b090686e0d788f7cc3c5c8f1ed2388418ff000c42fd2d592f9837e782f65 WHIRLPOOL 72305d87d8a96542264c9b4211f14744fd980a29c9d63d78919211ec0d5a027973e9825777a79980c4ec22ed59319c3230780e60746ac860ce5a405b35351659 +DIST libffi-3.2.1.tar.gz 940837 SHA256 d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37 SHA512 980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 WHIRLPOOL b9d3c86e347029fa9f03fd3813405cc731099812ad6186bd4d2ea646354383803c90912b20e1804a6b7fc12719403b3c0c3b800bdbcab564a2c93fcb4fd722ad +EBUILD libffi-3.2.1.ebuild 2067 SHA256 2d2cb5f72664dd32cd95b3873c29d57956902966f74773d9b6db6e78eaa01769 SHA512 018ca3295c6cd32359328358ad5ae7052c4139434419e7824f16bcac18d0652a325a3fc4591c402347b362a246f590e344c8225cfd6994c3ef5b00d537e7c2de WHIRLPOOL a9df656132a25045a36bcfbf7dd67d35ad16fa709c0aeb9e458473409b38f7c5bef6bcdeffa4f01d90e3bd2b529b9631786c583d3a12a476da9b428ace784bef +MISC ChangeLog 4914 SHA256 e5af61b0b32e4435fff51eefb6e7ce8e88deae722409e304f9af77fbcc2a8ad3 SHA512 2d6f89478be3cc0e5acd594702d5fc5f299257a32e2f1f934821f47aeb35877971d32d9bb618df6142a07540570ebae5dd71a9e4568a4ec431bd9908f3d97a1e WHIRLPOOL 4825d0299eef1fb2f6f835196d2dc9a9dd5613b3d6577c4ef1a97fa4b6620709fdeefdd33074fa83b08318126bd9c300217d81de4ef8d187e789ac3044087774 +MISC ChangeLog-2015 27182 SHA256 b643eb3993bbd864daf849482c0c2e58133468cfb4efd5b2ccc0170ba9d123bf SHA512 a00480e9d37cf03bcdaf45b43199098349b369580d9cb9eb23c4fab135440a55e47a635255bfcccd9e3cd0be6336b9275a79ecb93ee4177b2587112b09a259db WHIRLPOOL 94783d36d7ba7f246013f435c4c43d84b0438be0d69d9d6fcfc899a9601641baefdee4015872f26fcb10610a95ef398ed6ddeaf99787683c41cc5b523ec09449 +MISC metadata.xml 1866 SHA256 7f949adee86d868d30a6dd8a8bf251318105c635eeea96612419e7eaa3fbf170 SHA512 e1de94bb58c77aa48ee1b7d81777d26b736db3f3ef652099bb3f3a9bd75689258a61168371a30976e0717519bc9300b3812a8405ad1f16683c45a24817960b90 WHIRLPOOL 79f40596a2e0026b4248496bc6a560e711c028fdd045a86187e672a2bc2f597ac9e97bed128b14ab5bd62fca133da2e91bc8d4c64dc9523d2a95a5f1082e17a3 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.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.2.1.ebuild b/dev-libs/libffi/libffi-3.2.1.ebuild new file mode 100644 index 000000000000..1160d49a6b8b --- /dev/null +++ b/dev-libs/libffi/libffi-3.2.1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils libtool multilib multilib-minimal toolchain-funcs + +DESCRIPTION="a portable, high level programming interface to various calling conventions" +HOMEPAGE="https://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 ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-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 https://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/metadata.xml b/dev-libs/libffi/metadata.xml new file mode 100644 index 000000000000..d8fae30b11e1 --- /dev/null +++ b/dev-libs/libffi/metadata.xml @@ -0,0 +1,39 @@ + + + + + toolchain@gentoo.org + Gentoo Toolchain Project + + + 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. + + + Use PaX emulated trampolines, for we can't use PROT_EXEC + + -- cgit v1.2.3