summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-06-26 22:16:34 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2021-06-26 22:37:31 +0100
commit0b2c89773e0df20c0c770b6d8620564b76468578 (patch)
treec4770a5d9d8cac7b03b95d62926cb085f4356e3d /dev-libs/libffi
parentdev-python/pyphen: Bump to 0.11.0 (diff)
downloadgentoo-0b2c89773e0df20c0c770b6d8620564b76468578.tar.gz
gentoo-0b2c89773e0df20c0c770b6d8620564b76468578.tar.bz2
gentoo-0b2c89773e0df20c0c770b6d8620564b76468578.zip
dev-libs/libffi: bump up to 3.4_rc1, SOVERSION=8
Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-libs/libffi')
-rw-r--r--dev-libs/libffi/Manifest1
-rw-r--r--dev-libs/libffi/files/libffi-3.4_rc1-readelf.patch138
-rw-r--r--dev-libs/libffi/libffi-3.4_rc1.ebuild69
-rw-r--r--dev-libs/libffi/metadata.xml3
4 files changed, 210 insertions, 1 deletions
diff --git a/dev-libs/libffi/Manifest b/dev-libs/libffi/Manifest
index a1c499b413f7..9de05c9958fc 100644
--- a/dev-libs/libffi/Manifest
+++ b/dev-libs/libffi/Manifest
@@ -1 +1,2 @@
DIST libffi-3.3.tar.gz 1305466 BLAKE2B cddc40729a30a9bd34d675809f51f8d1b4ccaffa54bc6dd6f7e965f4e260edd34754719f9f6247c8957aeb7cf154d56ce1fe16a54c3f1ad39afbebdf41d23caa SHA512 61513801a156f11420f541d325de697131846487122d6bdcf5491b18b4da788589f5c0bb07e88e396495d3be5830d74e9135595e2b8ddbfe95c448d8597fbd6f
+DIST libffi-3.4-rc1.tar.gz 1346621 BLAKE2B 4a3560d9a5580748cb56d6da275d08f677a5e3895b4ddb8bf8bb085bad20e1e35eb31c48758dc0cd0fa14136c14a91a4d3596f5f716d561563f8d75eca7c6199 SHA512 130520c6de052015110c509b3b5ec5832c2bf989f95bec2c60a36fc2a57745af3f740381a7fa70e0c42b5a9dc610ea25e77849d50bea3bc197d04d23828fc4c0
diff --git a/dev-libs/libffi/files/libffi-3.4_rc1-readelf.patch b/dev-libs/libffi/files/libffi-3.4_rc1-readelf.patch
new file mode 100644
index 000000000000..f976f988c6b3
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.4_rc1-readelf.patch
@@ -0,0 +1,138 @@
+https://github.com/libffi/libffi/pull/646
+--- a/configure.ac
++++ b/configure.ac
+@@ -40,6 +40,7 @@ AM_PROG_AS
+ AM_PROG_CC_C_O
+ AC_PROG_LIBTOOL
+ AC_CONFIG_MACRO_DIR([m4])
++AC_CHECK_TOOL(READELF, readelf)
+
+ # Test for 64-bit build.
+ AC_CHECK_SIZEOF([size_t])
+@@ -271,7 +272,7 @@ if test "x$GCC" = "xyes"; then
+ libffi_cv_ro_eh_frame=yes
+ echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
+ if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then
+- if readelf -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
++ if $READELF -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
+ libffi_cv_ro_eh_frame=no
+ fi
+ fi
+--- a/configure
++++ b/configure
+@@ -667,6 +667,7 @@ MAINT
+ MAINTAINER_MODE_FALSE
+ MAINTAINER_MODE_TRUE
+ PRTDIAG
++READELF
+ CXXCPP
+ CPP
+ LT_SYS_LIBRARY_PATH
+@@ -16380,6 +16393,98 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
++if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
++set dummy ${ac_tool_prefix}readelf; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_READELF+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$READELF"; then
++ ac_cv_prog_READELF="$READELF" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++READELF=$ac_cv_prog_READELF
++if test -n "$READELF"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
++$as_echo "$READELF" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_READELF"; then
++ ac_ct_READELF=$READELF
++ # Extract the first word of "readelf", so it can be a program name with args.
++set dummy readelf; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_READELF+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$ac_ct_READELF"; then
++ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_ac_ct_READELF="readelf"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
++if test -n "$ac_ct_READELF"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
++$as_echo "$ac_ct_READELF" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++ if test "x$ac_ct_READELF" = x; then
++ READELF=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ READELF=$ac_ct_READELF
++ fi
++else
++ READELF="$ac_cv_prog_READELF"
++fi
++
+
+ # Test for 64-bit build.
+ # The cast to long int works around a bug in the HP C Compiler
+@@ -18651,7 +18756,7 @@ else
+ libffi_cv_ro_eh_frame=yes
+ echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
+ if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then
+- if readelf -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
++ if $READELF -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
+ libffi_cv_ro_eh_frame=no
+ fi
+ fi
diff --git a/dev-libs/libffi/libffi-3.4_rc1.ebuild b/dev-libs/libffi/libffi-3.4_rc1.ebuild
new file mode 100644
index 000000000000..dcf2f22db5b9
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.4_rc1.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
+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 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"
+
+PATCHES=("${FILESDIR}"/${PN}-3.4_rc1-readelf.patch)
+
+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 pax-kernel pax_emutramp) \
+ $(use_enable debug)
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name "*.la" -delete || die
+ einstalldocs
+}
diff --git a/dev-libs/libffi/metadata.xml b/dev-libs/libffi/metadata.xml
index 6e9a28c5ac88..ac6b16a1be93 100644
--- a/dev-libs/libffi/metadata.xml
+++ b/dev-libs/libffi/metadata.xml
@@ -34,7 +34,8 @@
between the two languages.
</longdescription>
<use>
- <flag name="pax_kernel">Use PaX emulated trampolines, for we can't use PROT_EXEC</flag>
+ <flag name="pax-kernel">Use PaX emulated trampolines, for we can't use PROT_EXEC.</flag>
+ <flag name="pax_kernel">Use PaX emulated trampolines, for we can't use PROT_EXEC. (use 'pax-kernel' instead)</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:libffi_project:libffi</remote-id>