| 1 |
# Copyright 1999-2007 Gentoo Foundation |
|---|
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
|---|
| 3 |
# $Header: $ |
|---|
| 4 |
|
|---|
| 5 |
inherit eutils |
|---|
| 6 |
|
|---|
| 7 |
DESCRIPTION="OpenSG is a portable scenegraph system to create realtime graphics programs, e.g. for virtual reality applications." |
|---|
| 8 |
HOMEPAGE="http://www.opensg.org" |
|---|
| 9 |
LICENSE="LGPL-2" |
|---|
| 10 |
|
|---|
| 11 |
SRC_URI="http://www.opensg.org/dailybuild_logs/opensg_dailybuild.070621.source.tgz" |
|---|
| 12 |
|
|---|
| 13 |
SLOT="0" |
|---|
| 14 |
KEYWORDS="~x86 ~amd64" |
|---|
| 15 |
|
|---|
| 16 |
# TODO: add use flags for distcc, qt4, cg, tests |
|---|
| 17 |
IUSE="debug tiff png openexr gif cal3d jpeg qt3" |
|---|
| 18 |
|
|---|
| 19 |
DEPEND=" |
|---|
| 20 |
virtual/opengl |
|---|
| 21 |
virtual/glut |
|---|
| 22 |
>=sys-libs/zlib-1.2.3-r1 |
|---|
| 23 |
tiff? ( >=media-libs/tiff-3.8.2-r2 ) |
|---|
| 24 |
png? ( >=media-libs/libpng-1.2.16 ) |
|---|
| 25 |
gif? ( >=media-libs/giflib-4.1.4 ) |
|---|
| 26 |
jpeg? ( >=media-libs/jpeg-6b-r7 ) |
|---|
| 27 |
openexr? ( media-libs/openexr ) |
|---|
| 28 |
cal3d? ( >=media-libs/cal3d-0.11.0-r1 ) |
|---|
| 29 |
qt3? ( >=x11-libs/qt-3.3.8 ) |
|---|
| 30 |
" |
|---|
| 31 |
|
|---|
| 32 |
RDEPEND="${DEPEND}" |
|---|
| 33 |
|
|---|
| 34 |
#S="${WORKDIR}/${P}" |
|---|
| 35 |
|
|---|
| 36 |
# globally set the type of OpenSG to be build |
|---|
| 37 |
OSGTYPE="opt" |
|---|
| 38 |
if use debug ; then |
|---|
| 39 |
OSGTYPE="dbg" |
|---|
| 40 |
fi |
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
src_compile() |
|---|
| 44 |
{ |
|---|
| 45 |
# setup scons options |
|---|
| 46 |
osg_gif="0" |
|---|
| 47 |
if use gif ; then |
|---|
| 48 |
osg_gif="1" |
|---|
| 49 |
fi |
|---|
| 50 |
|
|---|
| 51 |
osg_png="0" |
|---|
| 52 |
if use png ; then |
|---|
| 53 |
osg_png="1" |
|---|
| 54 |
fi |
|---|
| 55 |
|
|---|
| 56 |
osg_tiff="0" |
|---|
| 57 |
if use tiff ; then |
|---|
| 58 |
osg_tiff="1" |
|---|
| 59 |
fi |
|---|
| 60 |
|
|---|
| 61 |
osg_jpeg="0" |
|---|
| 62 |
if use jpeg ; then |
|---|
| 63 |
osg_jpeg="1" |
|---|
| 64 |
fi |
|---|
| 65 |
|
|---|
| 66 |
osg_cal3d="0" |
|---|
| 67 |
if use cal3d ; then |
|---|
| 68 |
osg_cal3d="/usr" |
|---|
| 69 |
fi |
|---|
| 70 |
|
|---|
| 71 |
osg_qt3="0" |
|---|
| 72 |
if use qt3 ; then |
|---|
| 73 |
osg_qt3="/usr/qt/3" |
|---|
| 74 |
fi |
|---|
| 75 |
|
|---|
| 76 |
# TODO: add vars for other scons options |
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
cd ${WORKDIR}/OpenSG |
|---|
| 80 |
./scons ${MAKEOPTS} \ |
|---|
| 81 |
type=${OSGTYPE} \ |
|---|
| 82 |
gif=${osg_gif} \ |
|---|
| 83 |
tif=${osg_tiff} \ |
|---|
| 84 |
png=${osg_png} \ |
|---|
| 85 |
jpg=${osg_jpeg} \ |
|---|
| 86 |
qt=${osg_qt3} \ |
|---|
| 87 |
contrib_cal3d=${osg_cal3d} \ |
|---|
| 88 |
|| die \ |
|---|
| 89 |
"!!! Please add ${S}/config.log when filing bugs reports to bugs.gentoo.org" |
|---|
| 90 |
|
|---|
| 91 |
# TODO: build documentation (doxygen dependency!) |
|---|
| 92 |
} |
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
src_install() |
|---|
| 96 |
{ |
|---|
| 97 |
osg_install="OpenSG/Build/linux-gcc/installed" |
|---|
| 98 |
|
|---|
| 99 |
# install tool binaries |
|---|
| 100 |
exeinto /usr/bin |
|---|
| 101 |
doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/fcdCompile |
|---|
| 102 |
doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/runGraphOp |
|---|
| 103 |
doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/proxyBuilder |
|---|
| 104 |
|
|---|
| 105 |
if use qt3 ; then |
|---|
| 106 |
doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/fcdEdit |
|---|
| 107 |
doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/osgSceneViewer |
|---|
| 108 |
fi |
|---|
| 109 |
|
|---|
| 110 |
# install libraries |
|---|
| 111 |
dolib.so ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/*.so |
|---|
| 112 |
|
|---|
| 113 |
# install headers |
|---|
| 114 |
# the headers are split into two commands |
|---|
| 115 |
insinto /usr/include/OpenSG |
|---|
| 116 |
doins ${WORKDIR}/${osg_install}/include/OpenSG/*.inl |
|---|
| 117 |
doins ${WORKDIR}/${osg_install}/include/OpenSG/OSG[0-9A-Ma-m]*.h |
|---|
| 118 |
doins ${WORKDIR}/${osg_install}/include/OpenSG/OSG[N-Zn-z]*.h |
|---|
| 119 |
|
|---|
| 120 |
# install tutorials |
|---|
| 121 |
exeinto /usr/share/${PN}/tutorials |
|---|
| 122 |
doexe ${WORKDIR}/${osg_install}/Tutorials/* |
|---|
| 123 |
insinto /usr/share/${PN}/tutorials |
|---|
| 124 |
doins ${WORKDIR}/OpenSG/Tutorials/*.cpp |
|---|
| 125 |
doins ${WORKDIR}/OpenSG/Tutorials/Makefile |
|---|
| 126 |
|
|---|
| 127 |
# TODO: install documentation |
|---|
| 128 |
} |
|---|