4ceab21e8e70d90f52d768f6adcd1e43d51515a9
[gentoo.git] / dev-tex / sketch / sketch-0.3.7.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 inherit eutils toolchain-funcs
5
6 DESCRIPTION="Produces drawings of two- or three-dimensional solid objects and scenes for TeX"
7 HOMEPAGE="http://www.frontiernet.net/~eugene.ressler/"
8 SRC_URI="http://www.frontiernet.net/~eugene.ressler/${P}.tgz"
9 LICENSE="GPL-3"
10
11 SLOT="0"
12 KEYWORDS="~amd64 ~ppc64 ~x86"
13 IUSE="doc examples"
14
15 DEPEND="dev-lang/perl"
16 RDEPEND=""
17
18 src_unpack() {
19         unpack ${A}
20
21         cd "${S}"
22         sed -i -e "s:\$(CC):\$(CC) \$(LDFLAGS):" makefile
23 }
24
25 src_compile() {
26         emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" || die "emake failed"
27 }
28
29 src_install() {
30         dobin sketch || die
31         edos2unix Doc/sketch.info
32         doinfo Doc/sketch.info || die
33         dohtml updates.htm || die
34         if use doc ; then
35                 insinto /usr/share/doc/${PF}
36                 doins Doc/sketch.pdf || die
37                 dohtml Doc/sketch/* || die
38         fi
39         if use examples ; then
40                 insinto /usr/share/doc/${PF}/examples
41                 doins Data/* || die "Failed to install examples"
42         fi
43 }