summaryrefslogtreecommitdiff
path: root/dev-libs/libffi
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.4.4-trampoline-c99.patch39
-rw-r--r--dev-libs/libffi/libffi-3.4.4-r4.ebuild (renamed from dev-libs/libffi/libffi-3.4.4-r1.ebuild)15
-rw-r--r--dev-libs/libffi/libffi-3.4.4.ebuild70
4 files changed, 52 insertions, 76 deletions
diff --git a/dev-libs/libffi/Manifest b/dev-libs/libffi/Manifest
index 9ae3155e7d83..04e76cca37d5 100644
--- a/dev-libs/libffi/Manifest
+++ b/dev-libs/libffi/Manifest
@@ -3,9 +3,9 @@ AUX libffi-3.4.4-hppa-jump-table.patch 7872 BLAKE2B c78216a9912e26e74733870d1a0f
AUX libffi-3.4.4-hppa-large-struct.patch 1129 BLAKE2B 3b172af9af01c629ce567309893e1b342b039a53a4992529b8395a426ed74a1741d6dceb660cb2b1d8c2ba1057e91bd08a52c54192ec1d429710322d2fe61ff9 SHA512 77eb9ca86651f550c4c9ae7b508cc0651bea7e17feac6f2a35963b1838c70aeeb2166606fe39f70e9e058a41a53979f2c599c1869a4714a420f2bb006d14107a
AUX libffi-3.4.4-lld-17.patch 828 BLAKE2B 3462bc7db0cf754cb14a9fa0de6377da401c78d021d5e86fc51501d78e4c1104bd821093047af557f1ef8bb375b2eff7c26972524bf179fdfd926089fd8fefc7 SHA512 48d804fe7167c373c0cb3aafc969aedf555651d698857a791062d81e77ba88ba5db3fcabdf975040e19298d418ae12161160fc31e5515017cfc441fc61e66e63
AUX libffi-3.4.4-sparc-float-typo.patch 830 BLAKE2B cdec73bd227f0bcfb077ae0383bdea782886015189da8f3ac89d693a94967f1055edaa34462815709327ebc8a2c3d195a89090b3553db0ee7fa03b92c2341043 SHA512 3314e46725276df7fc91032a2446b9a379d54e9eceee0875952424bd6fd8b6e41a5103bcb990865b18f59ab3264db3bd106474b27a24b3e00196e9257f111022
+AUX libffi-3.4.4-trampoline-c99.patch 1174 BLAKE2B da7990d940b5b0e6944c5b87d599c4955b75224c4f679477fd89cafdfa2ec7cab175986b25db08f0674c56f012456a20bcfce4cdabca1feb224ebd6ebf741e40 SHA512 5ba4e178d4d15a6149bd0bfa44542329812a8c98bae6350b0d2c760c5d4c376cb789c1f313bc6004f458578b18718f23f35c900fb14e5e697b43a2ebd02d7e57
DIST libffi-3.4.4.tar.gz 1362394 BLAKE2B 189fe1ffe9507f204581b0ab09995dc7e7b761bb4eac7e338e9f5ff81431aebcef6c182c1839c9f9acb2706697a260c67e6d1351cf7e2aed7c4eb5d694f6f8fd SHA512 88680aeb0fa0dc0319e5cd2ba45b4b5a340bc9b4bcf20b1e0613b39cd898f177a3863aa94034d8e23a7f6f44d858a53dcd36d1bb8dee13b751ef814224061889
-EBUILD libffi-3.4.4-r1.ebuild 2386 BLAKE2B 2fed1f1f77934bcd7cb23bb9121205f4d89d35af7415b684fbccb20559fa34c266bc8e43076e38f5c8417d84fc3822ab374cb7ccbcf1528e76ad6b5d8e8378ec SHA512 ee51d4c56849f5e8f35d71ea01b82fb4b34fdceef9a6fa4af2c3a99eadb54ce140389336c8f00e6ce9172f8a385e48ce33aee9e274ca0ee47a3f12b862c7ca33
EBUILD libffi-3.4.4-r2.ebuild 2434 BLAKE2B b4e7209406b797ccd41f7fab8ca7c3d4eb2453b2b35fb4a66076fdefa16a346bb6d9fba77fe27dbfa1b9b93a557c3abb7eae03992560477ff2ebd309715c8eec SHA512 de765af9a7397af03a32639dcf016da774308db2cc7e321b366dff6a162a633d2f5c57cfdbf6e8eb9e6c3deefe195de08f4ffe1c4366c93397989840107f9d0d
EBUILD libffi-3.4.4-r3.ebuild 2513 BLAKE2B 29712c6986e6288206241a3f8a4e0b6bf130178160a10897c0a41f8fbe023f0dac402e04d36013322c326986867209ef7379ab1909a25b00c727a8f7aadef749 SHA512 2547cc73f48de955a5e7da2ca1360613c05301bffc87b17347eb736dd28343675ff1b5cde6026fecddbed20bf9090edce7c463c4d67cf08d22a3a52f142666c2
-EBUILD libffi-3.4.4.ebuild 2234 BLAKE2B e4bfd05eb22e58723aeae755e760106d5b03278ffcfc11c7d65c6db54bb489bf8a500a9a5b383fafe0d67792c51ed3319a080a43b853ae7b31a7a979966a4607 SHA512 94461cdfdd44e7eab0491063cbe845e4ccb448730135974864a4260d514bcd9ea81cb773a1f004b4ee8afb3937a5ec6ce55ba71bcc1556e8414048e06b50d6d3
+EBUILD libffi-3.4.4-r4.ebuild 2554 BLAKE2B 08e2c1f2860a9447e34ba67e7d19b95b2ca65ccf33dda9b1686d45d4e71321f4b2f78cb00f06539eefc292019c17bd570f2238bd263945c7901a57ff1c8cb9ad SHA512 65cf061acbe26d6c44cb69bf01c86d78cfe2674b03154c736c7b2cfb15a6bedf4037582372adcec0c3ce2fa41d35d9a75a5b9e02337243df5ce8cf8024a33e32
MISC metadata.xml 2110 BLAKE2B 2653be2cf09c047e45e489d7265d00165ddab2f94744988e4e8bca449bd1e40eeab74cb0b8d7d47a2d8b73563869460fcccb06e1fbccad697a9f213be362cb03 SHA512 e1a280792b929d38451fea1eb360053ed3a452592094f3e327ce4a4ff7eb8e0119435e8ee98f215585d8d98440512b5b68f92d1cd472a3bfd12e2f382e1981a1
diff --git a/dev-libs/libffi/files/libffi-3.4.4-trampoline-c99.patch b/dev-libs/libffi/files/libffi-3.4.4-trampoline-c99.patch
new file mode 100644
index 000000000000..a7728331135e
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.4.4-trampoline-c99.patch
@@ -0,0 +1,39 @@
+https://github.com/libffi/libffi/issues/760
+https://github.com/libffi/libffi/commit/ce077e5565366171aa1b4438749b0922fce887a4
+
+From ce077e5565366171aa1b4438749b0922fce887a4 Mon Sep 17 00:00:00 2001
+From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
+Date: Thu, 2 Feb 2023 14:46:29 +0000
+Subject: [PATCH] Forward declare open_temp_exec_file (#764)
+
+It's defined in closures.c and used in tramp.c.
+Also declare it as an hidden symbol, as it should be.
+
+Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
+--- a/include/ffi_common.h
++++ b/include/ffi_common.h
+@@ -128,6 +128,10 @@ void *ffi_data_to_code_pointer (void *data) FFI_HIDDEN;
+ static trampoline. */
+ int ffi_tramp_is_present (void *closure) FFI_HIDDEN;
+
++/* Return a file descriptor of a temporary zero-sized file in a
++ writable and executable filesystem. */
++int open_temp_exec_file(void) FFI_HIDDEN;
++
+ /* Extended cif, used in callback from assembly routine */
+ typedef struct
+ {
+--- a/src/tramp.c
++++ b/src/tramp.c
+@@ -39,6 +39,10 @@
+ #ifdef __linux__
+ #define _GNU_SOURCE 1
+ #endif
++
++#include <ffi.h>
++#include <ffi_common.h>
++
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+
diff --git a/dev-libs/libffi/libffi-3.4.4-r1.ebuild b/dev-libs/libffi/libffi-3.4.4-r4.ebuild
index cf7d47ca43ca..5304ecb54f9e 100644
--- a/dev-libs/libffi/libffi-3.4.4-r1.ebuild
+++ b/dev-libs/libffi/libffi-3.4.4-r4.ebuild
@@ -1,14 +1,14 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
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"
+DESCRIPTION="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"
S="${WORKDIR}"/${MY_P}
@@ -19,7 +19,7 @@ LICENSE="MIT"
# 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="debug exec-static-trampoline pax-kernel static-libs test"
RESTRICT="!test? ( test )"
@@ -29,6 +29,9 @@ PATCHES=(
"${FILESDIR}"/${P}-hppa-large-struct.patch
"${FILESDIR}"/${P}-hppa-closure-function-ptrs.patch
"${FILESDIR}"/${P}-hppa-jump-table.patch
+ "${FILESDIR}"/${P}-sparc-float-typo.patch
+ "${FILESDIR}"/${P}-lld-17.patch
+ "${FILESDIR}"/${P}-trampoline-c99.patch
)
src_prepare() {
@@ -62,6 +65,10 @@ multilib_src_configure() {
$(use_enable debug)
}
+multilib_src_test() {
+ emake -Onone check
+}
+
multilib_src_install_all() {
einstalldocs
find "${ED}" -name "*.la" -delete || die
diff --git a/dev-libs/libffi/libffi-3.4.4.ebuild b/dev-libs/libffi/libffi-3.4.4.ebuild
deleted file mode 100644
index 5401d0f8a977..000000000000
--- a/dev-libs/libffi/libffi-3.4.4.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2023 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"
-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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="debug exec-static-trampoline pax-kernel static-libs test"
-
-RESTRICT="!test? ( test )"
-BDEPEND="test? ( dev-util/dejagnu )"
-
-src_prepare() {
- 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_SOURCE="${S}" 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() {
- einstalldocs
- find "${ED}" -name "*.la" -delete || die
-}
-
-pkg_preinst() {
- preserve_old_lib /usr/$(get_libdir)/libffi.so.7
-}
-
-pkg_postinst() {
- preserve_old_lib_notify /usr/$(get_libdir)/libffi.so.7
-}