First step toward a thread safe polylib:
[polylib.git] / polylib-20101127.ebuild
blob77d7a542f59ec9db6388647f05cee90c948f8a73
1 # ebuild created by slashdevslashzerr0@gmail.com 2010-Nov-28
2 # based on polylib-9999.ebuild, found in Gentoo portage tree
4 #EGIT_BOOTSTRAP="eautoreconf && cd cln && eautoreconf"
5 inherit autotools eutils
7 DESCRIPTION="Polytope manipulation library"
8 HOMEPAGE="http://icps.u-strasbg.fr/polylib/"
9 SRC_URI=$HOMEPAGE/${P}.tar.lzma
10 # there is no such file on the page. The file created by packing git contents
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64"
15 # don't know if it works for other arches
16 IUSE="doc"
18 src_unpack()
20 unpack "$A"
21 cd "$S" || die "failed to go to $S"
22 # fix stupid and dangerous implementation of matrice/vector input
23 epatch "${FILESDIR}"/$PN-1024.patch || die "1024.patch failed"
24 #./autogen.sh && cd cln && ./autogen.sh || die "autogen.sh failed"
25 eautoreconf && cd cln && eautoreconf || die "autoreconf failed"
26 use test && einfo "test will be performed"
29 src_test()
31 make check || die "test failed"
32 # good return code does not guarantee success. Check log file
33 # to be sure
34 einfo ; einfo "test ok" ; einfo
37 src_install()
39 emake DESTDIR="${D}" install || die
41 # prepend 'polylib-' to executables
42 cd "${D}/usr/bin"
43 local e=$(ls)
44 for i in $e ; do
45 mv $i ${PN}-e || die "failed to rename $i"
46 done
48 use doc &&
50 cd "$S/doc" || die "no such dir $S/doc"
51 # don't repack parampoly-doc.ps.gz
52 for i in doc.pdf.* ; do
53 unpack ./$i || die "failed to unpack $i"
54 done
55 mv doc.pdf ${PN}-doc.pdf
56 dodoc ${PN}-doc.pdf Changes || die "Failed to install doc.pdf"
57 insinto /usr/share/doc/${PF}
58 doins parampoly-doc.ps.gz