repo/gentoo:master commit in: dev-libs/libffi/
"Sam James" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786764087.1e4d9a08d2a76671801c9dec48e5ece94c9eb219.sam@gentoo> |
commit: 1e4d9a08d2a76671801c9dec48e5ece94c9eb219
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 03:21:27 2026 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 03:21:27 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4d9a08
dev-libs/libffi: add 3.8.0
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/libffi/Manifest | 1 +
dev-libs/libffi/libffi-3.8.0.ebuild | 97 +++++++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+)
diff --git a/dev-libs/libffi/Manifest b/dev-libs/libffi/Manifest
index 1a44d2edade8..3238bc9002e9 100644
--- a/dev-libs/libffi/Manifest
+++ b/dev-libs/libffi/Manifest
@@ -4,3 +4,4 @@ DIST libffi-3.5.2.tar.gz 1423124 BLAKE2B 35ce590926bcdd2556c30c94bb0fef3f0cfe8f3
DIST libffi-3.6.0.tar.gz 1475449 BLAKE2B 25044e42e3451319b04105af7818e90579aff90f6bc4eb0313daee354011cfba322b94e282b49cffa014d74ec907c0c5cc47399f3cb25566cbb178b72379c3ec SHA512 716f0e7884cd7206ceb7410a8422a0c2229bf48151ff525575f7489d389683531bd0c6cf8c78a3a5f9c54444ef485a7f2b0e1e6e4180b4da599dec9021a40491
DIST libffi-3.7.0.tar.gz 1508891 BLAKE2B e792fe8213e36d47ec1dad2bda99f9ba34f76587693a52433777c1b113cdb8dc93dd49c9d7c30fd455a2776598dc04be333e6edd96388f33062b4bf0a60086f8 SHA512 4a5021f8a6f2ef8b2b25d3537a642a25aa61c25e8d6b83590b4dc66435903ad72a7751c507a7b0d1ab4749385724224ff40cbebd0af4e923432d074942892c65
DIST libffi-3.7.1.tar.gz 1515185 BLAKE2B 642741667d55aa2921fc250adea68eafd2519e786199fd2d0463a57ab6e830b51d97a361156bc2761d8c1bfecb9156ddc3147b6f81f4379bc054b98a29675526 SHA512 03c04616261a8199794d5d482d734298f2f60b2c9c5968cf717b58df7fd0e4bba33d0cb38f73aec361339128dddf4fdbe5d64002b54fdb8b3fc01c07d8b90a31
+DIST libffi-3.8.0.tar.gz 1581626 BLAKE2B 589f87f79ea637dbddd00db3e320090f17855da5b1669a42b154f1c61bcafd1e8a964738d25b424c95ba5e148565df4b7379800ba42f40149c74d749f4f4b096 SHA512 a259d50f40b5dcde9cb6227bd105761e667290f107553b204a5a6cfdfbf2e6b022ed04be2ea4596da42961d11396125425def3cb67e2844a9eba90b6750c8c39
diff --git a/dev-libs/libffi/libffi-3.8.0.ebuild b/dev-libs/libffi/libffi-3.8.0.ebuild
new file mode 100644
index 000000000000..a32677eadcd5
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.8.0.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit dot-a multilib-minimal preserve-libs
+
+MY_PV=${PV/_rc/-rc}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Portable, high level programming interface to various calling conventions"
+HOMEPAGE="https://sourceware.org/libffi/"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/libffi/libffi"
+ inherit autotools git-r3
+else
+ inherit libtool
+ SRC_URI="https://github.com/libffi/libffi/releases/download/v${MY_PV}/${MY_P}.tar.gz"
+
+ if [[ ${PV} != *@(alpha|beta|pre|rc)* ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
+ fi
+fi
+
+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
+IUSE="debug +exec-static-trampoline pax-kernel static-libs test"
+
+RESTRICT="!test? ( test )"
+BDEPEND="test? ( dev-util/dejagnu )"
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == 9999 ]] ; then
+ eautoreconf
+ else
+ elibtoolize
+ fi
+
+ 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
+}
+
+src_configure() {
+ use static-libs && lto-guarantee-fat
+ multilib-minimal_src_configure
+}
+
+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 \
+ --with-pic \
+ $(use_enable static-libs static) \
+ $(use_enable exec-static-trampoline exec-static-tramp) \
+ $(use_enable pax-kernel pax_emutramp) \
+ $(use_enable debug)
+}
+
+multilib_src_test() {
+ emake -Onone check
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -name "*.la" -delete || die
+ strip-lto-bytecode
+}
+
+pkg_preinst() {
+ preserve_old_lib /usr/$(get_libdir)/libffi.so.7
+}
+
+pkg_postinst() {
+ preserve_old_lib_notify /usr/$(get_libdir)/libffi.so.7
+}