]> Pileus Git - ~andy/sunrise/blob - media-gfx/leocad/leocad-9999.ebuild
922787d7b1c3186c87a3ccaa56d80aaec318ef63
[~andy/sunrise] / media-gfx / leocad / leocad-9999.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="1"
6
7 inherit subversion
8
9 DESCRIPTION="LeoCAD is a CAD program that uses bricks similar to those found in many toys."
10 HOMEPAGE="http://www.leocad.org"
11
12 ESVN_REPO_URI="http://svn.gerf.org/${PN}/trunk"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS=""
17
18 IUSE="jpeg zlib png"
19
20 RDEPEND="virtual/opengl
21         x11-libs/gtk+:2
22         jpeg? ( media-libs/jpeg )
23         zlib? ( sys-libs/zlib )
24         png? ( media-libs/libpng )"
25 DEPEND="${RDEPEND}"
26
27 src_unpack() {
28         subversion_src_unpack
29         cd "${S}"
30
31         if ! use jpeg; then
32                 sed -i \
33                         -e "s:(test -s jpegtest); then :{(test -s jpegtest);} \&\& false; then :" \
34                         config.mk || die "patching Makefile failed"
35         fi
36         if ! use zlib; then
37                 sed -i \
38                         -e "s:(test -s ztest); then :{(test -s ztest);} \&\& false; then :" \
39                         config.mk || die "patching Makefile failed"
40         fi
41         if ! use png; then
42                 sed -i \
43                         -e "s:(test -s pngtest); then :{(test -s pngtest);} \&\& false; then :" \
44                         config.mk || die "patching Makefile failed"
45         fi
46 }
47
48 src_compile() {
49         emake config || die
50         emake || die
51 }
52
53 src_install() {
54         dobin bin/leocad || die
55         doman docs/leocad.1 || die
56         dodoc docs/*.txt || die
57 }
58
59 pkg_postinst() {
60         elog "Due to a missing release number, automatic fetching of the"
61         elog "pieces library is disabled. Please download it yourself:"
62         elog
63         elog "  wget http://www.leocad.org/files/pieces.zip"
64         elog
65         elog "and unpack it with the following command:"
66         elog
67         elog "  unzip pieces.zip"
68 }