1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 # NOTE: we cannot depend on autotools here starting with gcc-4.3.x
8 inherit eutils multilib
13 DESCRIPTION="library for multiple-precision floating-point computations with exact rounding"
14 HOMEPAGE="http://www.mpfr.org/"
15 SRC_URI="http://www.mpfr.org/mpfr-${MY_PV}/${MY_P}.tar.xz"
19 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
22 RDEPEND=">=dev-libs/gmp-4.1.4-r2[static-libs?]"
28 [[ ${PLEVEL} == ${PV} ]] && return 0
29 for ((i=1; i<=PLEVEL; ++i)) ; do
30 patch=patch$(printf '%02d' ${i})
31 if [[ -f ${FILESDIR}/${MY_PV}/${patch} ]] ; then
32 epatch "${FILESDIR}"/${MY_PV}/${patch}
33 elif [[ -f ${DISTDIR}/${PN}-${MY_PV}_p${i} ]] ; then
34 epatch "${DISTDIR}"/${PN}-${MY_PV}_p${i}
36 ewarn "${DISTDIR}/${PN}-${MY_PV}_p${i}"
37 die "patch ${i} missing - please report to bugs.gentoo.org"
40 sed -i '/if test/s:==:=:' configure #261016
41 find . -type f -print0 | xargs -0 touch -r configure
46 --docdir=/usr/share/doc/${PF} \
47 $(use_enable static-libs static)
51 emake install DESTDIR="${D}" || die
52 use static-libs || rm -f "${D}"/usr/$(get_libdir)/libmpfr.la
54 # clean up html/license install
55 pushd "${D}"/usr/share/doc/${PF} >/dev/null
56 dohtml *.html && rm COPYING* *.html || die
58 # some, but not all, are already installed
59 dodoc AUTHORS BUGS ChangeLog NEWS README TODO
64 preserve_old_lib /usr/$(get_libdir)/libmpfr.so.1
68 preserve_old_lib_notify /usr/$(get_libdir)/libmpfr.so.1