Lines 2-8
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/gmp-5.1.2.ebuild,v 1.2 2013/05/26 16:14:48 vapier Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/gmp/gmp-5.1.2.ebuild,v 1.2 2013/05/26 16:14:48 vapier Exp $ |
4 |
|
4 |
|
5 |
inherit flag-o-matic eutils libtool unpacker toolchain-funcs |
5 |
EAPI=4 |
|
|
6 |
|
7 |
inherit flag-o-matic eutils libtool toolchain-funcs multilib-minimal |
6 |
|
8 |
|
7 |
MY_PV=${PV/_p*} |
9 |
MY_PV=${PV/_p*} |
8 |
MY_P=${PN}-${MY_PV} |
10 |
MY_P=${PN}-${MY_PV} |
Lines 24-32
Link Here
|
24 |
|
26 |
|
25 |
S=${WORKDIR}/${MY_P} |
27 |
S=${WORKDIR}/${MY_P} |
26 |
|
28 |
|
27 |
src_unpack() { |
29 |
DOCS=( AUTHORS ChangeLog NEWS README doc/configuration doc/isa_abi_headache ) |
28 |
unpacker_src_unpack |
30 |
HTML_DOCS=( doc ) |
29 |
cd "${S}" |
31 |
MULTILIB_WRAPPED_HEADERS=( /usr/include/gmp.h ) |
|
|
32 |
|
33 |
src_prepare() { |
30 |
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV} |
34 |
[[ -d ${FILESDIR}/${PV} ]] && EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch "${FILESDIR}"/${PV} |
31 |
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch |
35 |
epatch "${FILESDIR}"/${PN}-4.1.4-noexecstack.patch |
32 |
|
36 |
|
Lines 48-54
Link Here
|
48 |
chmod a+rx configure |
52 |
chmod a+rx configure |
49 |
} |
53 |
} |
50 |
|
54 |
|
51 |
src_compile() { |
55 |
multilib_src_configure() { |
52 |
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works |
56 |
# Because of our 32-bit userland, 1.0 is the only HPPA ABI that works |
53 |
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613) |
57 |
# http://gmplib.org/manual/ABI-and-ISA.html#ABI-and-ISA (bug #344613) |
54 |
if [[ ${CHOST} == hppa2.0-* ]] ; then |
58 |
if [[ ${CHOST} == hppa2.0-* ]] ; then |
Lines 64-94
Link Here
|
64 |
export GMPABI |
68 |
export GMPABI |
65 |
|
69 |
|
66 |
tc-export CC |
70 |
tc-export CC |
67 |
econf \ |
71 |
ECONF_SOURCE="${S}" econf \ |
68 |
--localstatedir=/var/state/gmp \ |
72 |
--localstatedir=/var/state/gmp \ |
69 |
$(use_enable cxx) \ |
73 |
$(use_enable cxx) \ |
70 |
$(use_enable static-libs static) |
74 |
$(use_enable static-libs static) |
|
|
75 |
} |
71 |
|
76 |
|
72 |
emake || die |
77 |
multilib_src_compile() { |
|
|
78 |
emake |
73 |
|
79 |
|
74 |
if use pgo ; then |
80 |
if use pgo ; then |
75 |
emake -j1 -C tune tuneup || die |
81 |
emake -j1 -C tune tuneup |
76 |
ebegin "Trying to generate tuned data" |
82 |
ebegin "Trying to generate tuned data" |
77 |
./tune/tuneup | tee gmp.mparam.h.new |
83 |
./tune/tuneup | tee gmp.mparam.h.new |
78 |
if eend $(( 0 + ${PIPESTATUS[*]/#/+} )) ; then |
84 |
if eend $(( 0 + ${PIPESTATUS[*]/#/+} )) ; then |
79 |
mv gmp-mparam.h.new gmp-mparam.h |
85 |
mv gmp-mparam.h.new gmp-mparam.h |
80 |
emake clean || die |
86 |
emake clean |
81 |
emake || die |
87 |
emake |
82 |
fi |
88 |
fi |
83 |
fi |
89 |
fi |
84 |
} |
90 |
} |
85 |
|
91 |
|
86 |
src_test() { |
92 |
multilib_src_test() { |
87 |
emake check |
93 |
emake check |
88 |
} |
94 |
} |
89 |
|
95 |
|
90 |
src_install() { |
96 |
multilib_src_install() { |
91 |
emake DESTDIR="${D}" install || die |
97 |
emake DESTDIR="${D}" install |
92 |
|
98 |
|
93 |
# should be a standalone lib |
99 |
# should be a standalone lib |
94 |
rm -f "${D}"/usr/$(get_libdir)/libgmp.la |
100 |
rm -f "${D}"/usr/$(get_libdir)/libgmp.la |
Lines 97-107
Link Here
|
97 |
use static-libs \ |
103 |
use static-libs \ |
98 |
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \ |
104 |
&& sed -i 's:/[^ ]*/libgmp.la:-lgmp:' "${la}" \ |
99 |
|| rm -f "${la}" |
105 |
|| rm -f "${la}" |
|
|
106 |
} |
100 |
|
107 |
|
101 |
dodoc AUTHORS ChangeLog NEWS README |
108 |
multilib_src_install_all() { |
102 |
dodoc doc/configuration doc/isa_abi_headache |
|
|
103 |
dohtml -r doc |
104 |
|
105 |
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/ |
109 |
use doc && cp "${DISTDIR}"/gmp-man-${MY_PV}.pdf "${D}"/usr/share/doc/${PF}/ |
106 |
} |
110 |
} |
107 |
|
111 |
|