forked from harenome/polylib
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpolylib-20101127.ebuild
60 lines (52 loc) · 1.57 KB
/
polylib-20101127.ebuild
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# ebuild created by [email protected] 2010-Nov-28
# based on polylib-9999.ebuild, found in Gentoo portage tree
#EGIT_BOOTSTRAP="eautoreconf && cd cln && eautoreconf"
inherit autotools eutils
DESCRIPTION="Polytope manipulation library"
HOMEPAGE="http://icps.u-strasbg.fr/polylib/"
SRC_URI=$HOMEPAGE/${P}.tar.lzma
# there is no such file on the page. The file created by packing git contents
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64"
# don't know if it works for other arches
IUSE="doc"
src_unpack()
{
unpack "$A"
cd "$S" || die "failed to go to $S"
# fix stupid and dangerous implementation of matrice/vector input
epatch "${FILESDIR}"/$PN-1024.patch || die "1024.patch failed"
#./autogen.sh && cd cln && ./autogen.sh || die "autogen.sh failed"
eautoreconf && cd cln && eautoreconf || die "autoreconf failed"
use test && einfo "test will be performed"
}
src_test()
{
make check || die "test failed"
# good return code does not guarantee success. Check log file
# to be sure
einfo ; einfo "test ok" ; einfo
}
src_install()
{
emake DESTDIR="${D}" install || die
# prepend 'polylib-' to executables
cd "${D}/usr/bin"
local e=$(ls)
for i in $e ; do
mv $i ${PN}-e || die "failed to rename $i"
done
use doc &&
{
cd "$S/doc" || die "no such dir $S/doc"
# don't repack parampoly-doc.ps.gz
for i in doc.pdf.* ; do
unpack ./$i || die "failed to unpack $i"
done
mv doc.pdf ${PN}-doc.pdf
dodoc ${PN}-doc.pdf Changes || die "Failed to install doc.pdf"
insinto /usr/share/doc/${PF}
doins parampoly-doc.ps.gz
}
}