diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-01-06 13:02:51 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-01-06 13:03:17 +0000 |
commit | 6b286d934352693e1f9a9cabfe567884e28b0cb5 (patch) | |
tree | 3cb645075a619dd101fbb5cec34c83951c881e43 /dev-libs/libffi | |
parent | app-office/openoffice-bin: Migrate from LINGUAS to L10N. (diff) | |
download | gentoo-6b286d934352693e1f9a9cabfe567884e28b0cb5.tar.gz gentoo-6b286d934352693e1f9a9cabfe567884e28b0cb5.tar.bz2 gentoo-6b286d934352693e1f9a9cabfe567884e28b0cb5.zip |
dev-libs/libffi: allow includedir= override, bug #643582
It's not a fix for bug #643582 as includes location did
not change. But a step towards it.
Changes are:
- updated to EAPI=6
- backported upstream commit
https://github.com/libffi/libffi/commit/982b89c01aca99c7bc229914fc1521f96930919b
("Install public headers in the standard path")
- but overrode default location as
--includedir=/usr/$(get_libdir)/${P}/include/
to keep python from breaking: bug #643582#c2.
Reported-by: William L. Thomson Jr.
Bug: https://bugs.gentoo.org/643582
Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'dev-libs/libffi')
4 files changed, 166 insertions, 2 deletions
diff --git a/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch b/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch index 0d6e0bc29007..5e8c943eee38 100644 --- a/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch +++ b/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch @@ -1,5 +1,5 @@ ---- src/alpha/osf.S.orig 2015-01-16 10:46:15.000000000 +0100 -+++ src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100 +--- a/src/alpha/osf.S.orig 2015-01-16 10:46:15.000000000 +0100 ++++ b/src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100 @@ -279,6 +279,7 @@ .gprel32 $load_64 # FFI_TYPE_SINT64 .gprel32 $load_none # FFI_TYPE_STRUCT diff --git a/dev-libs/libffi/files/libffi-3.2.1-include-path-autogen.patch b/dev-libs/libffi/files/libffi-3.2.1-include-path-autogen.patch new file mode 100644 index 000000000000..522e1fa9c486 --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.2.1-include-path-autogen.patch @@ -0,0 +1,56 @@ +Autogenerated part of libffi-3.2.1-include-path.patch + +https://bugs.gentoo.org/643582 +diff --git a/include/Makefile.in b/include/Makefile.in +index 9d747e8..99ecfd7 100644 +--- a/include/Makefile.in ++++ b/include/Makefile.in +@@ -152,2 +152,2 @@ am__uninstall_files_from_dir = { \ +-am__installdirs = "$(DESTDIR)$(includesdir)" +-HEADERS = $(nodist_includes_HEADERS) ++am__installdirs = "$(DESTDIR)$(includedir)" ++HEADERS = $(nodist_include_HEADERS) +@@ -317,2 +317 @@ EXTRA_DIST = ffi.h.in ffi_common.h +-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include +-nodist_includes_HEADERS = ffi.h ffitarget.h ++nodist_include_HEADERS = ffi.h ffitarget.h +@@ -360 +359 @@ clean-libtool: +-install-nodist_includesHEADERS: $(nodist_includes_HEADERS) ++install-nodist_includeHEADERS: $(nodist_include_HEADERS) +@@ -362 +361 @@ install-nodist_includesHEADERS: $(nodist_includes_HEADERS) +- @list='$(nodist_includes_HEADERS)'; test -n "$(includesdir)" || list=; \ ++ @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ +@@ -364,2 +363,2 @@ install-nodist_includesHEADERS: $(nodist_includes_HEADERS) +- echo " $(MKDIR_P) '$(DESTDIR)$(includesdir)'"; \ +- $(MKDIR_P) "$(DESTDIR)$(includesdir)" || exit 1; \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ +@@ -372,2 +371,2 @@ install-nodist_includesHEADERS: $(nodist_includes_HEADERS) +- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ +- $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ ++ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ ++ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ +@@ -376 +375 @@ install-nodist_includesHEADERS: $(nodist_includes_HEADERS) +-uninstall-nodist_includesHEADERS: ++uninstall-nodist_includeHEADERS: +@@ -378 +377 @@ uninstall-nodist_includesHEADERS: +- @list='$(nodist_includes_HEADERS)'; test -n "$(includesdir)" || list=; \ ++ @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ +@@ -380 +379 @@ uninstall-nodist_includesHEADERS: +- dir='$(DESTDIR)$(includesdir)'; $(am__uninstall_files_from_dir) ++ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +@@ -468 +467 @@ installdirs: +- for dir in "$(DESTDIR)$(includesdir)"; do \ ++ for dir in "$(DESTDIR)$(includedir)"; do \ +@@ -522 +521 @@ info-am: +-install-data-am: install-nodist_includesHEADERS ++install-data-am: install-nodist_includeHEADERS +@@ -566 +565 @@ ps-am: +-uninstall-am: uninstall-nodist_includesHEADERS ++uninstall-am: uninstall-nodist_includeHEADERS +@@ -577 +576 @@ uninstall-am: uninstall-nodist_includesHEADERS +- install-nodist_includesHEADERS install-pdf install-pdf-am \ ++ install-nodist_includeHEADERS install-pdf install-pdf-am \ +@@ -582 +581 @@ uninstall-am: uninstall-nodist_includesHEADERS +- uninstall-am uninstall-nodist_includesHEADERS ++ uninstall-am uninstall-nodist_includeHEADERS diff --git a/dev-libs/libffi/files/libffi-3.2.1-include-path.patch b/dev-libs/libffi/files/libffi-3.2.1-include-path.patch new file mode 100644 index 000000000000..e1269b2398a4 --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.2.1-include-path.patch @@ -0,0 +1,39 @@ +https://bugs.gentoo.org/643582 + +From 982b89c01aca99c7bc229914fc1521f96930919b Mon Sep 17 00:00:00 2001 +From: Yen Chi Hsuan <yan12125@gmail.com> +Date: Sun, 13 Nov 2016 19:17:19 +0800 +Subject: [PATCH] Install public headers in the standard path + +--- + include/Makefile.am | 3 +-- + libffi.pc.in | 2 +- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/include/Makefile.am b/include/Makefile.am +index bb241e8..c59df9f 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -6,5 +6,4 @@ DISTCLEANFILES=ffitarget.h + noinst_HEADERS=ffi_common.h ffi_cfi.h + EXTRA_DIST=ffi.h.in + +-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include +-nodist_includes_HEADERS = ffi.h ffitarget.h ++nodist_include_HEADERS = ffi.h ffitarget.h +diff --git a/libffi.pc.in b/libffi.pc.in +index edf6fde..6fad83b 100644 +--- a/libffi.pc.in ++++ b/libffi.pc.in +@@ -2,7 +2,7 @@ prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ + toolexeclibdir=@toolexeclibdir@ +-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include ++includedir=@includedir@ + + Name: @PACKAGE_NAME@ + Description: Library supporting Foreign Function Interfaces +-- +2.15.1 + diff --git a/dev-libs/libffi/libffi-3.2.1-r1.ebuild b/dev-libs/libffi/libffi-3.2.1-r1.ebuild new file mode 100644 index 000000000000..4eefabab054b --- /dev/null +++ b/dev-libs/libffi/libffi-3.2.1-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils libtool multilib multilib-minimal toolchain-funcs + +DESCRIPTION="a portable, high level programming interface to various calling conventions" +HOMEPAGE="https://sourceware.org/libffi/" +SRC_URI="ftp://sourceware.org/pub/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-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" + +RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r1 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" +DEPEND="test? ( dev-util/dejagnu )" + +DOCS="ChangeLog* README" + +PATCHES=( + "${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044 + "${FILESDIR}"/${PN}-3.2.1-complex_alpha.patch + "${FILESDIR}"/${PN}-3.1-darwin-x32.patch + "${FILESDIR}"/${PN}-3.2.1-complex-ia64.patch + "${FILESDIR}"/${PN}-3.2.1-include-path.patch + "${FILESDIR}"/${PN}-3.2.1-include-path-autogen.patch +) + +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 + + sed -i -e 's:@toolexeclibdir@:$(libdir):g' Makefile.in || die #462814 + elibtoolize +} + +multilib_src_configure() { + use userland_BSD && export HOST="${CHOST}" + # python does not like miltilib-wrapped headers: bug #643582 + # thus we install includes into different headers + local includes="${EPREFIX}"/usr/$(get_libdir)/${P}/include/ + econf \ + $(use_enable static-libs static) \ + $(use_enable pax_kernel pax_emutramp) \ + $(use_enable debug) \ + --includedir="${includes}" +} + +multilib_src_install_all() { + prune_libtool_files + einstalldocs +} |