dev-libs/libxml2: arm64 stable (bug #701020)
[gentoo.git] / dev-libs / mpfr / mpfr-2.4.2_p3-r1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # this ebuild is only for the libmpfr.so.1 ABI SONAME
5
6 EAPI="5"
7
8 inherit eutils libtool multilib multilib-minimal flag-o-matic
9
10 MY_PV=${PV/_p*}
11 MY_P=${PN}-${MY_PV}
12 DESCRIPTION="library for multiple-precision floating-point computations with exact rounding"
13 HOMEPAGE="https://www.mpfr.org/"
14 SRC_URI="https://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.bz2
15         https://dev.gentoo.org/~mgorny/dist/${MY_P}-patchset.tar.bz2"
16
17 LICENSE="LGPL-2.1"
18 SLOT="1"
19 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
20 IUSE=""
21
22 RDEPEND=">=dev-libs/gmp-4.1.4-r2:0[${MULTILIB_USEDEP}]"
23 DEPEND="${RDEPEND}"
24
25 S=${WORKDIR}/${MY_P}
26
27 src_prepare() {
28         epatch "${WORKDIR}"/${MY_P}-patchset/patch*
29         sed -i '/if test/s:==:=:' configure #261016
30         find . -type f -exec touch -r configure {} +
31         elibtoolize
32 }
33
34 multilib_src_configure() {
35         # Newer gmp has deleted this define, so export it for older mpfr.
36         append-cppflags -D__gmp_const=const
37         # Make sure mpfr doesn't go probing toolchains it shouldn't #476336#19
38         ECONF_SOURCE=${S} \
39         user_redefine_cc=yes \
40         econf --disable-static
41 }
42
43 multilib_src_compile() {
44         emake libmpfr.la
45 }
46
47 multilib_src_install() {
48         emake DESTDIR="${D}" install-libLTLIBRARIES
49         rm -f "${ED}"/usr/*/libmpfr.{la,so,dylib,a}
50 }