]> Pileus Git - ~andy/sunrise/blob - x11-libs/libqglviewer/libqglviewer-2.3.1.ebuild
x11-libs/libqglviewer: New ebuild for bug 53167, thanks to scarabeus
[~andy/sunrise] / x11-libs / libqglviewer / libqglviewer-2.3.1.ebuild
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit kde-functions qt4
6
7 MY_P="libQGLViewer-"${PV}
8
9 DESCRIPTION="Simple 3D viewer class for Qt OpenGL applications"
10 HOMEPAGE="http://www.libqglviewer.com"
11 SRC_URI="http://www.libqglviewer.com/src/${MY_P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="doc"
17
18 RDEPEND="virtual/opengl
19         >=x11-libs/qt-4.3"
20
21 S="${WORKDIR}"/${MY_P}
22
23 src_compile() {
24         set-qtdir 4
25         cd QGLViewer
26         eqmake4 QGLViewer.pro -o Makefile \
27                 PREFIX=/usr || die "qmake QGLViewer failed"
28         emake || die "emake QGLViewer failed"
29
30         cd ../designerPlugin
31         eqmake4 designerPlugin.pro -o Makefile \
32                 INCLUDE_DIR=.. \
33                 LIB_DIR=../QGLViewer || die "qmake designerPlugin failed"
34         emake || die "emake designerPlugin failed"
35 }
36
37 src_install() {
38         cd QGLViewer
39         INSTALL_ROOT="${D}" emake install_target install_include || die "install QGLViewer failed"
40
41         cd ../designerPlugin
42         INSTALL_ROOT="${D}" emake install_target || die "install QGLViewer failed"
43
44         dodoc ../README
45
46         if use doc ; then
47                 dohtml -r ../doc/*
48                 insinto /usr/share/doc/${PF}
49                 doins -r ../examples
50         fi
51 }