]> Pileus Git - ~andy/sunrise/blob - media-gfx/ngplant/ngplant-0.9.7.ebuild
www-misc/abloadtool: Fix qt deps
[~andy/sunrise] / media-gfx / ngplant / ngplant-0.9.7.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 WX_GTK_VER="2.8"
8
9 inherit eutils multilib toolchain-funcs wxwidgets
10
11 DESCRIPTION="plant modeling software package"
12 HOMEPAGE="http://ngplant.sourceforge.net"
13 SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${P}.tar.gz"
14
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 LICENSE="GPL-3 BSD"
18 IUSE="doc examples"
19
20 RDEPEND="
21         media-libs/glew
22         media-libs/freeglut
23         x11-libs/wxGTK:2.8[X]
24         dev-lang/lua"
25 DEPEND="${RDEPEND}
26         dev-util/scons
27         virtual/pkgconfig
28         dev-libs/libxslt"
29
30 src_prepare() {
31         epatch "${FILESDIR}"/${PV}-gcc4.3.patch
32         rm -rf extern
33
34         sed \
35                 -e "s:CC_OPT_FLAGS=.*$:CC_OPT_FLAGS=\'${CFLAGS}\':g" \
36                 -i SConstruct \
37                 || die "failed to correct CFLAGS"
38
39         sed \
40                 -e "s:LINKFLAGS='-s':LINKFLAGS=\'${LDFLAGS}\':g" \
41                 -i ngpview/SConscript ${PN}/SConscript devtools/SConscript ngpshot/SConscript \
42                 || die "failed to correct LDFLAGS"
43 }
44
45 src_compile() {
46         scons \
47                 CC=$(tc-getCC) \
48                 CXX=$(tc-getCXX)\
49                 LINKFLAGS="${LDFLAGS}" \
50                 GLEW_INC="/usr/include/" \
51                 GLEW_LIBPATH="/usr/$(get_libdir)/" \
52                 GLEW_LIBS="GLEW GL GLU glut" \
53                 LUA_INC="/usr/include/" \
54                 LUA_LIBPATH="/usr/$(get_libdir)/" \
55                 LUA_LIBS="$(pkg-config lua --libs)" \
56                 || die
57 }
58
59 src_install() {
60         dobin ${PN}/${PN} ngpview/ngpview devtools/ngpbench ngpshot/ngpshot scripts/ngp2obj.py || die
61         dolib.a ngpcore/libngpcore.a ngput/libngput.a || die
62         insinto /usr/share/${PN}/
63         doins -r plugins shaders || die
64
65         dodoc ReleaseNotes || die
66
67         if use examples; then
68                 doins -r samples || die
69         fi
70
71         if use doc; then
72                 dohtml -r docapi || die
73         fi
74 }