summaryrefslogtreecommitdiff
blob: f0c60cc4ef5f7893f64380ff45937069aac3138d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/mapm/mapm-4.9.5.ebuild,v 1.3 2011/11/28 11:38:09 phajdan.jr Exp $

EAPI="2"

inherit eutils multilib toolchain-funcs

DESCRIPTION="Mike's Arbitrary Precision Math Library"
HOMEPAGE="http://www.tc.umn.edu/~ringx004/mapm-main.html"
SRC_URI="http://www.tc.umn.edu/~ringx004/${P}.tar.gz"
LICENSE="mapm"
SLOT="0"
KEYWORDS="amd64 ~ppc ~sparc x86"
IUSE=""

DEPEND=""
RDEPEND=""

S="${WORKDIR}/${PN}_${PV}"

src_prepare() {
	epatch "${FILESDIR}/${PV}-missing_include.patch"
}

src_compile() {
	$(tc-getCC) -c -Wall ${CFLAGS} -fPIC map*.c || die "compiling sources failed"
	$(tc-getCC) -shared ${LDFLAGS} -Wl,--soname=libmapm.so -o libmapm.so.0 map*.o || die "linking sources failed"
}

src_install() {
	dolib.so libmapm.so.0
#	dosym libmapm.so.0 /usr/$(get_libdir)/libmapm.so

	insinto /usr/include
	doins m_apm.h

	insinto /usr/share/doc/${PF}/examples
	doins calc.c validate.c primenum.c cpp_demo.cpp

	cd DOCS
	dodoc README article.pdf algorithms.used commentary.txt \
		cpp_function.ref function.ref history.txt struct.ref

}