summaryrefslogtreecommitdiff
path: root/dev-libs/libffi/libffi-3.4.2.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-07-08 15:03:58 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-07-08 15:03:58 +0100
commit814f4cf860e299a046b649eaee5463427984c09c (patch)
tree74c45f097899310e599dad6b8df5b63e0f085bc0 /dev-libs/libffi/libffi-3.4.2.ebuild
parent7f0ccc917c7abe6223784c703d86cd14755691fb (diff)
gentoo resync : 08.07.2021
Diffstat (limited to 'dev-libs/libffi/libffi-3.4.2.ebuild')
-rw-r--r--dev-libs/libffi/libffi-3.4.2.ebuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/dev-libs/libffi/libffi-3.4.2.ebuild b/dev-libs/libffi/libffi-3.4.2.ebuild
new file mode 100644
index 000000000000..55fcfb49624c
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.4.2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit multilib-minimal
+
+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"
+
+LICENSE="MIT"
+SLOT="0/8" # SONAME=libffi.so.8
+#unkeyworded for initial testing
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 pax-kernel pax_kernel static-libs test"
+
+RESTRICT="!test? ( test )"
+# If you are USE=pax_kernel user you really want USE=pax-kernel as well.
+# That's a flag rename: https://archives.gentoo.org/gentoo-dev/message/273f5ec9ebc8075f6ee8d8cdda9e759e
+REQUIRED_USE="pax_kernel? ( pax-kernel )"
+
+RDEPEND=""
+DEPEND=""
+BDEPEND="test? ( dev-util/dejagnu )"
+
+DOCS="ChangeLog* README.md"
+
+S=${WORKDIR}/${MY_P}
+
+ECONF_SOURCE=${S}
+
+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() {
+ use userland_BSD && export HOST="${CHOST}"
+ # --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
+}