1 |
commit: 6b286d934352693e1f9a9cabfe567884e28b0cb5 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 6 13:02:51 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 6 13:03:17 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b286d93 |
7 |
|
8 |
dev-libs/libffi: allow includedir= override, bug #643582 |
9 |
|
10 |
It's not a fix for bug #643582 as includes location did |
11 |
not change. But a step towards it. |
12 |
|
13 |
Changes are: |
14 |
- updated to EAPI=6 |
15 |
- backported upstream commit |
16 |
https://github.com/libffi/libffi/commit/982b89c01aca99c7bc229914fc1521f96930919b |
17 |
("Install public headers in the standard path") |
18 |
- but overrode default location as |
19 |
--includedir=/usr/$(get_libdir)/${P}/include/ |
20 |
to keep python from breaking: bug #643582#c2. |
21 |
|
22 |
Reported-by: William L. Thomson Jr. |
23 |
Bug: https://bugs.gentoo.org/643582 |
24 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
25 |
|
26 |
.../libffi/files/libffi-3.2.1-complex_alpha.patch | 4 +- |
27 |
.../files/libffi-3.2.1-include-path-autogen.patch | 56 ++++++++++++++++++ |
28 |
.../libffi/files/libffi-3.2.1-include-path.patch | 39 ++++++++++++ |
29 |
dev-libs/libffi/libffi-3.2.1-r1.ebuild | 69 ++++++++++++++++++++++ |
30 |
4 files changed, 166 insertions(+), 2 deletions(-) |
31 |
|
32 |
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 |
33 |
index 0d6e0bc2900..5e8c943eee3 100644 |
34 |
--- a/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch |
35 |
+++ b/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch |
36 |
@@ -1,5 +1,5 @@ |
37 |
---- src/alpha/osf.S.orig 2015-01-16 10:46:15.000000000 +0100 |
38 |
-+++ src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100 |
39 |
+--- a/src/alpha/osf.S.orig 2015-01-16 10:46:15.000000000 +0100 |
40 |
++++ b/src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100 |
41 |
@@ -279,6 +279,7 @@ |
42 |
.gprel32 $load_64 # FFI_TYPE_SINT64 |
43 |
.gprel32 $load_none # FFI_TYPE_STRUCT |
44 |
|
45 |
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 |
46 |
new file mode 100644 |
47 |
index 00000000000..522e1fa9c48 |
48 |
--- /dev/null |
49 |
+++ b/dev-libs/libffi/files/libffi-3.2.1-include-path-autogen.patch |
50 |
@@ -0,0 +1,56 @@ |
51 |
+Autogenerated part of libffi-3.2.1-include-path.patch |
52 |
+ |
53 |
+https://bugs.gentoo.org/643582 |
54 |
+diff --git a/include/Makefile.in b/include/Makefile.in |
55 |
+index 9d747e8..99ecfd7 100644 |
56 |
+--- a/include/Makefile.in |
57 |
++++ b/include/Makefile.in |
58 |
+@@ -152,2 +152,2 @@ am__uninstall_files_from_dir = { \ |
59 |
+-am__installdirs = "$(DESTDIR)$(includesdir)" |
60 |
+-HEADERS = $(nodist_includes_HEADERS) |
61 |
++am__installdirs = "$(DESTDIR)$(includedir)" |
62 |
++HEADERS = $(nodist_include_HEADERS) |
63 |
+@@ -317,2 +317 @@ EXTRA_DIST = ffi.h.in ffi_common.h |
64 |
+-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include |
65 |
+-nodist_includes_HEADERS = ffi.h ffitarget.h |
66 |
++nodist_include_HEADERS = ffi.h ffitarget.h |
67 |
+@@ -360 +359 @@ clean-libtool: |
68 |
+-install-nodist_includesHEADERS: $(nodist_includes_HEADERS) |
69 |
++install-nodist_includeHEADERS: $(nodist_include_HEADERS) |
70 |
+@@ -362 +361 @@ install-nodist_includesHEADERS: $(nodist_includes_HEADERS) |
71 |
+- @list='$(nodist_includes_HEADERS)'; test -n "$(includesdir)" || list=; \ |
72 |
++ @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ |
73 |
+@@ -364,2 +363,2 @@ install-nodist_includesHEADERS: $(nodist_includes_HEADERS) |
74 |
+- echo " $(MKDIR_P) '$(DESTDIR)$(includesdir)'"; \ |
75 |
+- $(MKDIR_P) "$(DESTDIR)$(includesdir)" || exit 1; \ |
76 |
++ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ |
77 |
++ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ |
78 |
+@@ -372,2 +371,2 @@ install-nodist_includesHEADERS: $(nodist_includes_HEADERS) |
79 |
+- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ |
80 |
+- $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ |
81 |
++ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ |
82 |
++ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ |
83 |
+@@ -376 +375 @@ install-nodist_includesHEADERS: $(nodist_includes_HEADERS) |
84 |
+-uninstall-nodist_includesHEADERS: |
85 |
++uninstall-nodist_includeHEADERS: |
86 |
+@@ -378 +377 @@ uninstall-nodist_includesHEADERS: |
87 |
+- @list='$(nodist_includes_HEADERS)'; test -n "$(includesdir)" || list=; \ |
88 |
++ @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ |
89 |
+@@ -380 +379 @@ uninstall-nodist_includesHEADERS: |
90 |
+- dir='$(DESTDIR)$(includesdir)'; $(am__uninstall_files_from_dir) |
91 |
++ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) |
92 |
+@@ -468 +467 @@ installdirs: |
93 |
+- for dir in "$(DESTDIR)$(includesdir)"; do \ |
94 |
++ for dir in "$(DESTDIR)$(includedir)"; do \ |
95 |
+@@ -522 +521 @@ info-am: |
96 |
+-install-data-am: install-nodist_includesHEADERS |
97 |
++install-data-am: install-nodist_includeHEADERS |
98 |
+@@ -566 +565 @@ ps-am: |
99 |
+-uninstall-am: uninstall-nodist_includesHEADERS |
100 |
++uninstall-am: uninstall-nodist_includeHEADERS |
101 |
+@@ -577 +576 @@ uninstall-am: uninstall-nodist_includesHEADERS |
102 |
+- install-nodist_includesHEADERS install-pdf install-pdf-am \ |
103 |
++ install-nodist_includeHEADERS install-pdf install-pdf-am \ |
104 |
+@@ -582 +581 @@ uninstall-am: uninstall-nodist_includesHEADERS |
105 |
+- uninstall-am uninstall-nodist_includesHEADERS |
106 |
++ uninstall-am uninstall-nodist_includeHEADERS |
107 |
|
108 |
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 |
109 |
new file mode 100644 |
110 |
index 00000000000..e1269b2398a |
111 |
--- /dev/null |
112 |
+++ b/dev-libs/libffi/files/libffi-3.2.1-include-path.patch |
113 |
@@ -0,0 +1,39 @@ |
114 |
+https://bugs.gentoo.org/643582 |
115 |
+ |
116 |
+From 982b89c01aca99c7bc229914fc1521f96930919b Mon Sep 17 00:00:00 2001 |
117 |
+From: Yen Chi Hsuan <yan12125@×××××.com> |
118 |
+Date: Sun, 13 Nov 2016 19:17:19 +0800 |
119 |
+Subject: [PATCH] Install public headers in the standard path |
120 |
+ |
121 |
+--- |
122 |
+ include/Makefile.am | 3 +-- |
123 |
+ libffi.pc.in | 2 +- |
124 |
+ 2 files changed, 2 insertions(+), 3 deletions(-) |
125 |
+ |
126 |
+diff --git a/include/Makefile.am b/include/Makefile.am |
127 |
+index bb241e8..c59df9f 100644 |
128 |
+--- a/include/Makefile.am |
129 |
++++ b/include/Makefile.am |
130 |
+@@ -6,5 +6,4 @@ DISTCLEANFILES=ffitarget.h |
131 |
+ noinst_HEADERS=ffi_common.h ffi_cfi.h |
132 |
+ EXTRA_DIST=ffi.h.in |
133 |
+ |
134 |
+-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include |
135 |
+-nodist_includes_HEADERS = ffi.h ffitarget.h |
136 |
++nodist_include_HEADERS = ffi.h ffitarget.h |
137 |
+diff --git a/libffi.pc.in b/libffi.pc.in |
138 |
+index edf6fde..6fad83b 100644 |
139 |
+--- a/libffi.pc.in |
140 |
++++ b/libffi.pc.in |
141 |
+@@ -2,7 +2,7 @@ prefix=@prefix@ |
142 |
+ exec_prefix=@exec_prefix@ |
143 |
+ libdir=@libdir@ |
144 |
+ toolexeclibdir=@toolexeclibdir@ |
145 |
+-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include |
146 |
++includedir=@includedir@ |
147 |
+ |
148 |
+ Name: @PACKAGE_NAME@ |
149 |
+ Description: Library supporting Foreign Function Interfaces |
150 |
+-- |
151 |
+2.15.1 |
152 |
+ |
153 |
|
154 |
diff --git a/dev-libs/libffi/libffi-3.2.1-r1.ebuild b/dev-libs/libffi/libffi-3.2.1-r1.ebuild |
155 |
new file mode 100644 |
156 |
index 00000000000..4eefabab054 |
157 |
--- /dev/null |
158 |
+++ b/dev-libs/libffi/libffi-3.2.1-r1.ebuild |
159 |
@@ -0,0 +1,69 @@ |
160 |
+# Copyright 1999-2018 Gentoo Foundation |
161 |
+# Distributed under the terms of the GNU General Public License v2 |
162 |
+ |
163 |
+EAPI=6 |
164 |
+inherit eutils libtool multilib multilib-minimal toolchain-funcs |
165 |
+ |
166 |
+DESCRIPTION="a portable, high level programming interface to various calling conventions" |
167 |
+HOMEPAGE="https://sourceware.org/libffi/" |
168 |
+SRC_URI="ftp://sourceware.org/pub/${PN}/${P}.tar.gz" |
169 |
+ |
170 |
+LICENSE="MIT" |
171 |
+SLOT="0" |
172 |
+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" |
173 |
+IUSE="debug pax_kernel static-libs test" |
174 |
+ |
175 |
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r1 |
176 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
177 |
+DEPEND="test? ( dev-util/dejagnu )" |
178 |
+ |
179 |
+DOCS="ChangeLog* README" |
180 |
+ |
181 |
+PATCHES=( |
182 |
+ "${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044 |
183 |
+ "${FILESDIR}"/${PN}-3.2.1-complex_alpha.patch |
184 |
+ "${FILESDIR}"/${PN}-3.1-darwin-x32.patch |
185 |
+ "${FILESDIR}"/${PN}-3.2.1-complex-ia64.patch |
186 |
+ "${FILESDIR}"/${PN}-3.2.1-include-path.patch |
187 |
+ "${FILESDIR}"/${PN}-3.2.1-include-path-autogen.patch |
188 |
+) |
189 |
+ |
190 |
+ECONF_SOURCE=${S} |
191 |
+ |
192 |
+pkg_setup() { |
193 |
+ # Check for orphaned libffi, see https://bugs.gentoo.org/354903 for example |
194 |
+ if [[ ${ROOT} == "/" && ${EPREFIX} == "" ]] && ! has_version ${CATEGORY}/${PN}; then |
195 |
+ local base="${T}"/conftest |
196 |
+ echo 'int main() { }' > "${base}".c |
197 |
+ $(tc-getCC) -o "${base}" "${base}".c -lffi >&/dev/null |
198 |
+ if [ $? -eq 0 ]; then |
199 |
+ eerror "The linker reported linking against -lffi to be working while it shouldn't have." |
200 |
+ eerror "This is wrong and you should find and delete the old copy of libffi before continuing." |
201 |
+ die "The system is in inconsistent state with unknown libffi installed." |
202 |
+ fi |
203 |
+ fi |
204 |
+} |
205 |
+ |
206 |
+src_prepare() { |
207 |
+ default |
208 |
+ |
209 |
+ sed -i -e 's:@toolexeclibdir@:$(libdir):g' Makefile.in || die #462814 |
210 |
+ elibtoolize |
211 |
+} |
212 |
+ |
213 |
+multilib_src_configure() { |
214 |
+ use userland_BSD && export HOST="${CHOST}" |
215 |
+ # python does not like miltilib-wrapped headers: bug #643582 |
216 |
+ # thus we install includes into different headers |
217 |
+ local includes="${EPREFIX}"/usr/$(get_libdir)/${P}/include/ |
218 |
+ econf \ |
219 |
+ $(use_enable static-libs static) \ |
220 |
+ $(use_enable pax_kernel pax_emutramp) \ |
221 |
+ $(use_enable debug) \ |
222 |
+ --includedir="${includes}" |
223 |
+} |
224 |
+ |
225 |
+multilib_src_install_all() { |
226 |
+ prune_libtool_files |
227 |
+ einstalldocs |
228 |
+} |