# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils cvs DESCRIPTION="OpenSG is a portable scenegraph system to create realtime graphics programs, e.g. for virtual reality applications." HOMEPAGE="http://www.opensg.org" ECVS_SERVER="opensg.cvs.sourceforge.net:/cvsroot/opensg" ECVS_MODULE="OpenSG" ECVS_USER="anonymous" ECVS_CVS_OPTIONS="-dP -z3" SRC_URI="" LICENSE="LGPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" # TODO: add use flags for distcc, qt4, cg, tests IUSE="debug tiff png openexr gif cal3d jpeg qt3" #RESTRICT="strip" DEPEND=" virtual/opengl virtual/glut >=sys-libs/zlib-1.2.3-r1 tiff? ( >=media-libs/tiff-3.8.2-r2 ) png? ( >=media-libs/libpng-1.2.16 ) gif? ( >=media-libs/giflib-4.1.4 ) jpeg? ( >=media-libs/jpeg-6b-r7 ) openexr? ( media-libs/openexr ) cal3d? ( >=media-libs/cal3d-0.11.0-r1 ) qt3? ( =x11-libs/qt-3.3.8 ) " RDEPEND="${DEPEND}" # Source directory; the dir where the sources can be found (automatically # unpacked) inside ${WORKDIR}. The default value for S is ${WORKDIR}/${P} # If you don't need to change it, leave the S= line out of the ebuild # to keep it tidy. #S="${WORKDIR}/${P}" OSGTYPE="opt" if use debug ; then OSGTYPE="dbg" fi src_compile() { # setup scons options osg_gif="0" if use gif ; then osg_gif="1" fi osg_png="0" if use png ; then osg_png="1" fi osg_tiff="0" if use tiff ; then osg_tiff="1" fi osg_jpeg="0" if use jpeg ; then osg_jpeg="1" fi osg_cal3d="0" if use cal3d ; then osg_cal3d="/usr" fi osg_qt3="0" if use qt3 ; then osg_qt3="/usr/qt/3" fi # TODO: add vars for other scons options cd ${WORKDIR}/OpenSG ./scons ${MAKEOPTS} \ type=${OSGTYPE} \ gif=${osg_gif} \ tif=${osg_tiff} \ png=${osg_png} \ jpg=${osg_jpeg} \ qt=${osg_qt3} \ contrib_cal3d=${osg_cal3d} \ || die \ "!!! Please add ${S}/config.log when filing bugs reports to bugs.gentoo.org" # TODO: build documentation (doxygen dependency!) } src_install() { osg_install="OpenSG/Build/linux-gcc/installed" # install tool binaries exeinto /usr/bin doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/fcdCompile doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/runGraphOp doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/proxyBuilder if use qt3 ; then doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/fcdEdit doexe ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/osgSceneViewer fi # install libraries dolib.so ${WORKDIR}/${osg_install}/lib/${OSGTYPE}/*.so # install headers insinto /usr/include/OpenSG doins ${WORKDIR}/${osg_install}/include/OpenSG/*.inl doins ${WORKDIR}/${osg_install}/include/OpenSG/OSG[0-9A-Ma-m]*.h doins ${WORKDIR}/${osg_install}/include/OpenSG/OSG[N-Zn-z]*.h # install tutorials exeinto /usr/share/${PN}/tutorials doexe ${WORKDIR}/${osg_install}/Tutorials/* insinto /usr/share/${PN}/tutorials doins ${WORKDIR}/OpenSG/Tutorials/*.cpp doins ${WORKDIR}/OpenSG/Tutorials/Makefile # TODO: install documentation }