1 |
commit: 12d86dd7aa2733c29a9e95b9fab98b47f010a2eb |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 30 11:23:01 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 30 11:23:17 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12d86dd7 |
7 |
|
8 |
dev-libs/gmp: don't mangle libgmpxx.la |
9 |
|
10 |
Modern toolchain installs the following .la entry: |
11 |
dependency_libs=' -L=/usr/lib64 -lgmp' |
12 |
|
13 |
These are just fine for cross-compilation. Our ebuild mangling broke it into: |
14 |
dependency_libs=' =-lgmp' |
15 |
|
16 |
The change drops the mangling completely. |
17 |
|
18 |
Package-Manager: Portage-2.3.86, Repoman-2.3.20 |
19 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
20 |
|
21 |
dev-libs/gmp/gmp-6.2.0-r1.ebuild | 102 +++++++++++++++++++++++++++++++++++++++ |
22 |
1 file changed, 102 insertions(+) |
23 |
|
24 |
diff --git a/dev-libs/gmp/gmp-6.2.0-r1.ebuild b/dev-libs/gmp/gmp-6.2.0-r1.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..b5347356b32 |
27 |
--- /dev/null |
28 |
+++ b/dev-libs/gmp/gmp-6.2.0-r1.ebuild |
29 |
@@ -0,0 +1,102 @@ |
30 |
+# Copyright 1999-2020 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=7 |
34 |
+ |
35 |
+inherit flag-o-matic eutils libtool multilib-minimal |
36 |
+ |
37 |
+MY_PV=${PV/_p*} |
38 |
+MY_PV=${MY_PV/_/-} |
39 |
+MY_P=${PN}-${MY_PV} |
40 |
+PLEVEL=${PV/*p} |
41 |
+DESCRIPTION="Library for arbitrary-precision arithmetic on different type of numbers" |
42 |
+HOMEPAGE="https://gmplib.org/" |
43 |
+SRC_URI="ftp://ftp.gmplib.org/pub/${MY_P}/${MY_P}.tar.xz |
44 |
+ mirror://gnu/${PN}/${MY_P}.tar.xz |
45 |
+ doc? ( https://gmplib.org/${PN}-man-${MY_PV}.pdf )" |
46 |
+ |
47 |
+LICENSE="|| ( LGPL-3+ GPL-2+ )" |
48 |
+# The subslot reflects the C & C++ SONAMEs. |
49 |
+SLOT="0/10.4" |
50 |
+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" |
51 |
+IUSE="+asm doc cxx static-libs" |
52 |
+ |
53 |
+DEPEND="sys-devel/m4 |
54 |
+ app-arch/xz-utils" |
55 |
+RDEPEND="" |
56 |
+ |
57 |
+S=${WORKDIR}/${MY_P%a} |
58 |
+ |
59 |
+DOCS=( AUTHORS ChangeLog NEWS README doc/configuration doc/isa_abi_headache ) |
60 |
+HTML_DOCS=( doc ) |
61 |
+MULTILIB_WRAPPED_HEADERS=( /usr/include/gmp.h ) |
62 |
+ |
63 |
+PATCHES=( |
64 |
+ "${FILESDIR}"/${PN}-6.1.0-noexecstack-detect.patch |
65 |
+) |
66 |
+ |
67 |
+src_prepare() { |
68 |
+ default |
69 |
+ |
70 |
+ # note: we cannot run autotools here as gcc depends on this package |
71 |
+ elibtoolize |
72 |
+ |
73 |
+ # https://bugs.gentoo.org/536894 |
74 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
75 |
+ eapply "${FILESDIR}"/${PN}-6.1.2-gcc-apple-4.0.1.patch |
76 |
+ fi |
77 |
+ |
78 |
+ # GMP uses the "ABI" env var during configure as does Gentoo (econf). |
79 |
+ # So, to avoid patching the source constantly, wrap things up. |
80 |
+ mv configure configure.wrapped || die |
81 |
+ cat <<-\EOF > configure |
82 |
+ #!/usr/bin/env sh |
83 |
+ exec env ABI="${GMPABI}" "$0.wrapped" "$@" |
84 |
+ EOF |
85 |
+ # Patches to original configure might have lost the +x bit. |
86 |
+ chmod a+rx configure{,.wrapped} || die |
87 |
+} |
88 |
+ |
89 |
+multilib_src_configure() { |
90 |
+ # Because of our 32-bit userland, 1.0 is the only HPPA ABI that works |
91 |
+ # https://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613) |
92 |
+ if [[ ${CHOST} == hppa2.0-* ]] ; then |
93 |
+ GMPABI="1.0" |
94 |
+ fi |
95 |
+ |
96 |
+ # ABI mappings (needs all architectures supported) |
97 |
+ case ${ABI} in |
98 |
+ 32|x86) GMPABI=32;; |
99 |
+ 64|amd64|n64) GMPABI=64;; |
100 |
+ [onx]32) GMPABI=${ABI};; |
101 |
+ esac |
102 |
+ export GMPABI |
103 |
+ |
104 |
+ #367719 |
105 |
+ if [[ ${CHOST} == *-mint* ]]; then |
106 |
+ filter-flags -O? |
107 |
+ fi |
108 |
+ |
109 |
+ tc-export CC |
110 |
+ ECONF_SOURCE="${S}" econf \ |
111 |
+ --localstatedir="${EPREFIX}"/var/state/gmp \ |
112 |
+ --enable-shared \ |
113 |
+ $(use_enable asm assembly) \ |
114 |
+ $(use_enable cxx) \ |
115 |
+ $(use_enable static-libs static) |
116 |
+} |
117 |
+ |
118 |
+multilib_src_install() { |
119 |
+ emake DESTDIR="${D}" install |
120 |
+ |
121 |
+ # should be a standalone lib |
122 |
+ rm -f "${ED}"/usr/$(get_libdir)/libgmp.la |
123 |
+ # this requires libgmp |
124 |
+ local la="${ED}/usr/$(get_libdir)/libgmpxx.la" |
125 |
+ use static-libs || rm -f "${la}" |
126 |
+} |
127 |
+ |
128 |
+multilib_src_install_all() { |
129 |
+ einstalldocs |
130 |
+ use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${ED}"/usr/share/doc/${PF}/ |
131 |
+} |