diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-24 02:52:00 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-24 02:52:00 +0100 |
commit | e19b21c73e5feac42ade97baf3eeb45c58a2f234 (patch) | |
tree | f524a01a657ca0dd25be3a5bf70fbb6b694b0275 /dev-libs/libffi | |
parent | fceabcd48faf4c890719a14ac4ed93b6b7993364 (diff) |
gentoo auto-resync : 24:07:2022 - 02:51:59
Diffstat (limited to 'dev-libs/libffi')
-rw-r--r-- | dev-libs/libffi/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/libffi/files/libffi-3.4.2-backport-pr-722.patch | 88 | ||||
-rw-r--r-- | dev-libs/libffi/libffi-3.4.2-r2.ebuild | 80 |
3 files changed, 170 insertions, 0 deletions
diff --git a/dev-libs/libffi/Manifest b/dev-libs/libffi/Manifest index 0cc73b3ef1b3..0970a5e6e13d 100644 --- a/dev-libs/libffi/Manifest +++ b/dev-libs/libffi/Manifest @@ -6,9 +6,11 @@ AUX libffi-3.3-power7.patch 1172 BLAKE2B 42408c0774553fde9c086ea3c2b0d0152d15a9d AUX libffi-3.3-ppc-int128.patch 2309 BLAKE2B 5b0c89e8f9f63329d2cb796d23b3a22c48b7761956e18fd383636efdc75e2558cb5d6615dd1ec965034d93061314711ee2ad533f49522a365049d5451bcebf19 SHA512 3b47dde00428ebc536f0f73fc7295d4c554f65a35502e855e808893eb3940d68f903a96cd6f24f0eb5f83a405d10bb83feef19538e490ceeeba99a22a0b96bcd AUX libffi-3.3-ppc-vector-offset.patch 1425 BLAKE2B 334ed26ea082c603cfbf43d37e9cf64ac34a7054857743a9fbf5d05c7226402dfec4fd955cc3dc5652f57712bbaadcd0551ff727cfd8f8305edf38daa9814be2 SHA512 742ef73d95e39eefcbcfb423c4729966a31bf88ff00d20eab6c4db1db04e97f53784bf29111c57c577d1f6264735ee4ed797b4537a74d0ae1753de2990cd3ce9 AUX libffi-3.3_rc0-ppc-macos-go.patch 2100 BLAKE2B 7ae1309b08be9293acee042d141bb632b0763af9e14200ef7206db763b01e289a68ce544709c8abc5a86adca5f1c0c895c6bf24f667429b118bf660ffa95bb39 SHA512 4684b87f1d36a0098ebde7996e4417718b3535eb66ec7c619be74fa30e4446849c246b491cad3aea1ac44bdf9e9fbf6e952000cb85299faf5b1d8598136b184b +AUX libffi-3.4.2-backport-pr-722.patch 2813 BLAKE2B 6d89a670b64a62e88a6f9d4a59aedaf5af14ff4aaf097e87a20c639dac15bd4169fee6c5b8e780dc276e6f9704567cfc0285891deb0fde10e9afe0aa7de5dcc9 SHA512 9b7fbe5adb9554731872f35bd1b1e70dfc6c679544e3e65117359fd584fb47f83c679a9b04d691f3c6f84e9bb2eeb18151ba79cc0bbf537340f8862d24fb4eed DIST libffi-3.3.tar.gz 1305466 BLAKE2B cddc40729a30a9bd34d675809f51f8d1b4ccaffa54bc6dd6f7e965f4e260edd34754719f9f6247c8957aeb7cf154d56ce1fe16a54c3f1ad39afbebdf41d23caa SHA512 61513801a156f11420f541d325de697131846487122d6bdcf5491b18b4da788589f5c0bb07e88e396495d3be5830d74e9135595e2b8ddbfe95c448d8597fbd6f DIST libffi-3.4.2-loongarch64-20220428.patch.xz 64932 BLAKE2B d144dc28a7fce008bc5cd43d9e04125ea8e972324d77951d42039d46e818014079c871f87a0cdbec758b55320c02dff718cf2449f9c630cc899e8e1610784a60 SHA512 33715b21fe027692cc584d6524c03510af7876cc35f318221e1b2b91644cf165c02979c8b426228a8cc6c471e6a59d0435e761b6b7aef589c41a4f28caa36e62 DIST libffi-3.4.2.tar.gz 1351355 BLAKE2B a8137bc895b819f949fd7705e405be627219c6d1fdef280253330f7407d4a548bb057d7bb0e9225d1767d42f9bf5f0ab3c455db1c3470d7cc876bb7b7d55d308 SHA512 31bad35251bf5c0adb998c88ff065085ca6105cf22071b9bd4b5d5d69db4fadf16cadeec9baca944c4bb97b619b035bb8279de8794b922531fddeb0779eb7fb1 EBUILD libffi-3.3-r2.ebuild 2257 BLAKE2B 5a212c60da8441e8fa7ae839bde431f4f74025cfb975836f3369138931ece80d140c109d79d5fba45bd5d684ae96abd273004e211c4782cfcd56d83714b76e93 SHA512 8d4be46533328714d161a6d52ef0316c2286f50d6cce723fa8c1ae9b2bb29336fbb666992c9662da4eaf0dd9d983be79f3177b3d398edceb1223a358340320be EBUILD libffi-3.4.2-r1.ebuild 2528 BLAKE2B e94c8e41d88a5c24914d36fbcdc84b5ad9bf5454d1a440e2a6e8fb1a9e2f6da5ae4acc8fa4387422a949a200aab092cabd0fc324acd7fc58e1a95b6c9aa27795 SHA512 27b02c6d584a01b63b7ef542dee022fbdb550e4748c2c57f2d0b19c563793fe780a4fd73a00a7a3d25089699ea1d4a1489e5eaf5773ddb00994a48bd699658f4 +EBUILD libffi-3.4.2-r2.ebuild 2611 BLAKE2B 70b007eebfa777e6f61aad2dd5a098306b029ce9c6792d1301c7f4eb2dbd27e9faae6c93cb81a8eb8b961338b722d25dce26eab580a26f918b1590be141ebdb0 SHA512 be7d5d32badba58b7e1f6c09281534f3056e01fe31d972634cf52d9a8eb3bc6ea4f7d59eddb4bc0007f8df61b92431d39b11569086a8b97c2be7293bda8aec7f MISC metadata.xml 2134 BLAKE2B 55a67beb917d8f4b342712b0de198d11b6a579ed7b3fa29a523869162d9103c0a9c4034db69835f1583963ffabf33573632266ae4c4206c957f5fe8897dae3da SHA512 e8d0867e4aa99a0227c5e62f2ee28e4235ea100789328168b061fd318af5b705cff097bbd9e98540457dc8f3da09e12b0c94f5fda6fd2240e592bd20595eaa45 diff --git a/dev-libs/libffi/files/libffi-3.4.2-backport-pr-722.patch b/dev-libs/libffi/files/libffi-3.4.2-backport-pr-722.patch new file mode 100644 index 000000000000..41821e89140c --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.2-backport-pr-722.patch @@ -0,0 +1,88 @@ +From f4d413725030b35ec2f01733b154489d0b4c6e1d Mon Sep 17 00:00:00 2001 +From: matoro <matoro@users.noreply.github.com> +Date: Sun, 26 Jun 2022 23:19:00 -0400 +Subject: [PATCH] Move FFI_TYPE definitions above <ffitarget.h> include + +For powerpc at least, these definitions are referenced in the +target-specific ffitarget.h. Discovered in the jffi project. Should +close https://github.com/libffi/libffi/issues/637. Downstream jffi bug +https://github.com/jnr/jffi/issues/107. Downstream distro bug +https://bugs.gentoo.org/827215. + +Testing - both libffi and jffi test suites pass with this patch applied, +at least on ppc64le linux. I did not see any warnings about +redefinitions. + +Tested versions - libffi 3.4.2, jffi 1.3.6 and 1.3.9. +--- + include/ffi.h.in | 50 ++++++++++++++++++++++++------------------------ + 1 file changed, 25 insertions(+), 25 deletions(-) + +diff --git a/include/ffi.h.in b/include/ffi.h.in +index d16f307e..6cd19baa 100644 +--- a/include/ffi.h.in ++++ b/include/ffi.h.in +@@ -56,6 +56,31 @@ extern "C" { + + /* ---- System configuration information --------------------------------- */ + ++/* If these change, update src/mips/ffitarget.h. */ ++#define FFI_TYPE_VOID 0 ++#define FFI_TYPE_INT 1 ++#define FFI_TYPE_FLOAT 2 ++#define FFI_TYPE_DOUBLE 3 ++#if @HAVE_LONG_DOUBLE@ ++#define FFI_TYPE_LONGDOUBLE 4 ++#else ++#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE ++#endif ++#define FFI_TYPE_UINT8 5 ++#define FFI_TYPE_SINT8 6 ++#define FFI_TYPE_UINT16 7 ++#define FFI_TYPE_SINT16 8 ++#define FFI_TYPE_UINT32 9 ++#define FFI_TYPE_SINT32 10 ++#define FFI_TYPE_UINT64 11 ++#define FFI_TYPE_SINT64 12 ++#define FFI_TYPE_STRUCT 13 ++#define FFI_TYPE_POINTER 14 ++#define FFI_TYPE_COMPLEX 15 ++ ++/* This should always refer to the last type code (for sanity checks). */ ++#define FFI_TYPE_LAST FFI_TYPE_COMPLEX ++ + #include <ffitarget.h> + + #ifndef LIBFFI_ASM +@@ -496,31 +521,6 @@ ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type, + + #endif + +-/* If these change, update src/mips/ffitarget.h. */ +-#define FFI_TYPE_VOID 0 +-#define FFI_TYPE_INT 1 +-#define FFI_TYPE_FLOAT 2 +-#define FFI_TYPE_DOUBLE 3 +-#if @HAVE_LONG_DOUBLE@ +-#define FFI_TYPE_LONGDOUBLE 4 +-#else +-#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE +-#endif +-#define FFI_TYPE_UINT8 5 +-#define FFI_TYPE_SINT8 6 +-#define FFI_TYPE_UINT16 7 +-#define FFI_TYPE_SINT16 8 +-#define FFI_TYPE_UINT32 9 +-#define FFI_TYPE_SINT32 10 +-#define FFI_TYPE_UINT64 11 +-#define FFI_TYPE_SINT64 12 +-#define FFI_TYPE_STRUCT 13 +-#define FFI_TYPE_POINTER 14 +-#define FFI_TYPE_COMPLEX 15 +- +-/* This should always refer to the last type code (for sanity checks). */ +-#define FFI_TYPE_LAST FFI_TYPE_COMPLEX +- + #ifdef __cplusplus + } + #endif diff --git a/dev-libs/libffi/libffi-3.4.2-r2.ebuild b/dev-libs/libffi/libffi-3.4.2-r2.ebuild new file mode 100644 index 000000000000..920e5b422175 --- /dev/null +++ b/dev-libs/libffi/libffi-3.4.2-r2.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-minimal preserve-libs + +MY_PV=${PV/_rc/-rc} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="a portable, high level programming interface to various calling conventions" +HOMEPAGE="https://sourceware.org/libffi/" +SRC_URI="https://github.com/libffi/libffi/releases/download/v${MY_PV}/${MY_P}.tar.gz + experimental-loong? ( https://dev.gentoo.org/~xen0n/distfiles/${MY_P}-loongarch64-20220428.patch.xz )" +S="${WORKDIR}"/${MY_P} + +LICENSE="MIT" +# This is a core package which is depended on by e.g. Python +# Please use preserve-libs.eclass in pkg_{pre,post}inst to cover users +# with FEATURES="-preserved-libs" or another package manager if SONAME +# changes. +SLOT="0/8" # SONAME=libffi.so.8 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug exec-static-trampoline experimental-loong pax-kernel static-libs test" + +RESTRICT="!test? ( test )" +BDEPEND="test? ( dev-util/dejagnu )" + +DOCS="ChangeLog* README.md" + +ECONF_SOURCE=${S} + +PATCHES=( "${FILESDIR}/libffi-3.4.2-backport-pr-722.patch" ) # bug 827215 + +src_prepare() { + if use experimental-loong; then + PATCHES+=( "${WORKDIR}/${MY_P}-loongarch64-20220428.patch" ) + fi + + default + if [[ ${CHOST} == arm64-*-darwin* ]] ; then + # ensure we use aarch64 asm, not x86 on arm64 + sed -i -e 's/aarch64\*-\*-\*/arm64*-*-*|&/' \ + configure configure.host || die + fi +} + +multilib_src_configure() { + # --includedir= path maintains a few properties: + # 1. have stable name across libffi versions: some packages like + # dev-lang/ghc or kde-frameworks/networkmanager-qt embed + # ${includedir} at build-time. Don't require those to be + # rebuilt unless SONAME changes. bug #695788 + # + # We use /usr/.../${PN} (instead of former /usr/.../${P}). + # + # 2. have ${ABI}-specific location as ffi.h is target-dependent. + # + # We use /usr/$(get_libdir)/... to have ABI identifier. + econf \ + --includedir="${EPREFIX}"/usr/$(get_libdir)/${PN}/include \ + --disable-multi-os-directory \ + $(use_enable static-libs static) \ + $(use_enable exec-static-trampoline exec-static-tramp) \ + $(use_enable pax-kernel pax_emutramp) \ + $(use_enable debug) +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + einstalldocs +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/libffi.so.7 +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/libffi.so.7 +} |