commit: 7b9b6e482fcb83dc6fcc8046822c0072b08f9bfa
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 5 21:44:50 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 5 22:38:08 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b9b6e48
dev-libs/libffi: add 3.5.0_rc1
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/libffi/Manifest | 1 +
dev-libs/libffi/libffi-3.5.0_rc1.ebuild | 97 +++++++++++++++++++++++++++++++++
2 files changed, 98 insertions(+)
diff --git a/dev-libs/libffi/Manifest b/dev-libs/libffi/Manifest
index a2529cfe19c4..f8a0f2b93ece 100644
--- a/dev-libs/libffi/Manifest
+++ b/dev-libs/libffi/Manifest
@@ -1,3 +1,4 @@
DIST libffi-3.4.6.tar.gz 1391684 BLAKE2B
af8402a09bdbd59b4e9400d2d71bd5ce98f6f1d981d35d1ab40d77a831b13b32c5bd34ca54ff75999e39f0d8a9c066381fae7a8d6c5216d955e064f929f08b88
SHA512
033d2600e879b83c6bce0eb80f69c5f32aa775bf2e962c9d39fbd21226fa19d1e79173d8eaa0d0157014d54509ea73315ad86842356fc3a303c0831c94c6ab39
DIST libffi-3.4.8.tar.gz 1397992 BLAKE2B
10b3d970dc598fb8689bca49751cda499ddc5216baf89d38625385b0d42d57f10d15cce3c4c044c9c73a4fce384c26f2a8e1b99269e9db1174c2631201c6bfd4
SHA512
05344c6c1a1a5b44704f6cf99277098d1ea3ac1dc11c2a691c501786a214f76184ec0637135588630db609ce79e49df3dbd00282dd61e7f21137afba70e24ffe
DIST libffi-3.5.0-rc0.tar.gz 1415090 BLAKE2B
37b1f4b5588f7614d8883c4ae8907331b092772767ef2e682f32474763852e6119ca9ebd6aefd2087f638d1ebdca5b9a7e06cbafbfdc3e2ec9c603bdc19a2187
SHA512
97100e6fd6c90c213d513c2e1bf9ed8d7e60bb3ceecf33f483df002e2a28d99259c8186c4e160e16368762d174cfe5a7ecdd5dd053b50a77adeffb8ee971b5d4
+DIST libffi-3.5.0-rc1.tar.gz 1415673 BLAKE2B
895dfa485e7b69e16519708810c638a3233754fecadcb0dc1648692edb7709834280229f0f58796dc95535bd6d61ad36cc18aa4ed1c051b180c9a8b64953478e
SHA512
15d476ebdf609170cb6a82116b8ad9fcf4f624d76ff249e32842b942d94d8ef796da8b8188ce500d0a66ead1fe990f4ff2813978f827d92b1648cd0e6528cdd9
diff --git a/dev-libs/libffi/libffi-3.5.0_rc1.ebuild
b/dev-libs/libffi/libffi-3.5.0_rc1.ebuild
new file mode 100644
index 000000000000..441ddca3e012
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.5.0_rc1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2025 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 ~amd64-linux ~x86-linux ~arm64-macos
~ppc-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
+}