From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1125848-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 77B1C138334 for <garchives@archives.gentoo.org>; Wed, 27 Nov 2019 22:58:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0C1BE09CF; Wed, 27 Nov 2019 22:58:10 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8C43DE09CF for <gentoo-commits@lists.gentoo.org>; Wed, 27 Nov 2019 22:58:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5208D34D13F for <gentoo-commits@lists.gentoo.org>; Wed, 27 Nov 2019 22:58:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D657C5D2 for <gentoo-commits@lists.gentoo.org>; Wed, 27 Nov 2019 22:58:07 +0000 (UTC) From: "Sergei Trofimovich" <slyfox@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" <slyfox@gentoo.org> Message-ID: <1574895479.91330e1d176561bb267945a0142ef40e1a9d8295.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libffi/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libffi/libffi-3.3-r1.ebuild X-VCS-Directories: dev-libs/libffi/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 91330e1d176561bb267945a0142ef40e1a9d8295 X-VCS-Branch: master Date: Wed, 27 Nov 2019 22:58:07 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 53f3bfd0-3aaf-4922-9cf3-93308360bd76 X-Archives-Hash: 71cabaf1be0866b27e59bb38a9d90538 commit: 91330e1d176561bb267945a0142ef40e1a9d8295 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> AuthorDate: Wed Nov 27 22:56:32 2019 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Wed Nov 27 22:57:59 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91330e1d dev-libs/libffi: drop libffi version from includedir, bug #695788 Posting ebuild source note as-is: ``` --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. ``` Before the change libffi installed headers into: /usr/lib/libffi-3.3/include/ /usr/lib64/libffi-3.3/include/ After the change the patchs are: /usr/lib/libffi/include/ /usr/lib64/libffi/include/ Reported-by: Franz Trischberger Bug: https://bugs.gentoo.org/695788 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> dev-libs/libffi/libffi-3.3-r1.ebuild | 83 ++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/dev-libs/libffi/libffi-3.3-r1.ebuild b/dev-libs/libffi/libffi-3.3-r1.ebuild new file mode 100644 index 00000000000..53912670ba1 --- /dev/null +++ b/dev-libs/libffi/libffi-3.3-r1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit multilib multilib-minimal toolchain-funcs + +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/7" # SONAME=libffi.so.7 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug pax_kernel static-libs test test-bhaible" + +RESTRICT="!test? ( test )" + +RDEPEND="" +DEPEND="" +BDEPEND="test? ( dev-util/dejagnu )" + +DOCS="ChangeLog* README.md" + +PATCHES=( + "${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044 + "${FILESDIR}"/${PN}-3.3_rc0-ppc-macos-go.patch +) + +S=${WORKDIR}/${MY_P} + +ECONF_SOURCE=${S} + +pkg_setup() { + # Check for orphaned libffi, see https://bugs.gentoo.org/354903 for example + if [[ ${ROOT} == "/" && ${EPREFIX} == "" ]] && ! has_version ${CATEGORY}/${PN}; then + local base="${T}"/conftest + echo 'int main() { }' > "${base}".c + $(tc-getCC) -o "${base}" "${base}".c -lffi >&/dev/null + if [ $? -eq 0 ]; then + eerror "The linker reported linking against -lffi to be working while it shouldn't have." + eerror "This is wrong and you should find and delete the old copy of libffi before continuing." + die "The system is in inconsistent state with unknown libffi installed." + fi + fi +} + +src_prepare() { + default + + if ! use test-bhaible; then + # These tests are very heavyweight (hours of runtime) + rm -v testsuite/libffi.bhaible/bhaible.exp || 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 +}