diff options
author | 2012-06-05 16:59:04 -0400 | |
---|---|---|
committer | 2012-06-05 16:59:04 -0400 | |
commit | 27c585a394cb7ad0f93f99cb88fa82394ea3f7d9 (patch) | |
tree | d356e13d557f7e4dd9aac2467321c576578d158f | |
parent | sci-electronics/rosinstall: Fix OS detection for Funtoo users. (diff) | |
download | ezod-27c585a394cb7ad0f93f99cb88fa82394ea3f7d9.tar.gz ezod-27c585a394cb7ad0f93f99cb88fa82394ea3f7d9.tar.bz2 ezod-27c585a394cb7ad0f93f99cb88fa82394ea3f7d9.zip |
Initial import of media-libs/panda3d ebuild.
-rw-r--r-- | licenses/Panda3D | 15 | ||||
-rw-r--r-- | media-libs/panda3d/Manifest | 5 | ||||
-rw-r--r-- | media-libs/panda3d/files/50panda3d | 3 | ||||
-rw-r--r-- | media-libs/panda3d/files/panda3d-1.8.0-pkgconfig.patch | 33 | ||||
-rw-r--r-- | media-libs/panda3d/metadata.xml | 14 | ||||
-rw-r--r-- | media-libs/panda3d/panda3d-1.8.0.ebuild | 128 |
6 files changed, 198 insertions, 0 deletions
diff --git a/licenses/Panda3D b/licenses/Panda3D new file mode 100644 index 0000000..379bcd2 --- /dev/null +++ b/licenses/Panda3D @@ -0,0 +1,15 @@ +Panda3D License + +What follows is the Modified BSD License. See also http://www.opensource.org/licenses/bsd-license.php + +Copyright (c) 2008, Carnegie Mellon University. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of Carnegie Mellon University nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/media-libs/panda3d/Manifest b/media-libs/panda3d/Manifest new file mode 100644 index 0000000..9575b2b --- /dev/null +++ b/media-libs/panda3d/Manifest @@ -0,0 +1,5 @@ +AUX 50panda3d 78 RMD160 b624dff504d17114562e424892dce05f73764ad8 SHA1 2fb352c72017e7c189fd51b1faec67ef4801c460 SHA256 cc996df97f1c434472971614956c49e553068fd49c4086f4612fc8b7126d1b84 +AUX panda3d-1.8.0-pkgconfig.patch 2281 RMD160 86268fd4f15be8bbd4df21fd9973295f0dcd5062 SHA1 c16a9c2d90d9160235e1b2459573ede8af155c15 SHA256 d72eda1da6126abf35f4f9874c7bc5651c9dbcec1b075cb2bb93c1c29e13f73c +DIST panda3d-1.8.0.tar.gz 36374979 RMD160 564766ed4adef6bf167d7c650a0da262177ffe94 SHA1 dad3462b331610c983e2797a80203041dd7645cb SHA256 bb453b0836a98a0c0f6c57db341f06567989eeefae2ef7361c2281e671c21d88 +EBUILD panda3d-1.8.0.ebuild 2818 RMD160 22de26cf5df693f41ea0c41b2e9223d87de19ed3 SHA1 5501be1672e762aef5f46cb8a5d83be7859d1d7e SHA256 d6a89509488c4528d29c272eb28d7c037e90a35c4f1c9740711f884b59c15b62 +MISC metadata.xml 463 RMD160 bb2e01fb4921bcd54b2cd75c8bb7f944bc32e573 SHA1 1a5ee2f3b94f59e8c898bd2c5ee0c8f5bca15c21 SHA256 ac455d3a8c979623ea49c5ba1cc2b8c092e382ccd473ba5c1b0503987286bb08 diff --git a/media-libs/panda3d/files/50panda3d b/media-libs/panda3d/files/50panda3d new file mode 100644 index 0000000..f94b0b6 --- /dev/null +++ b/media-libs/panda3d/files/50panda3d @@ -0,0 +1,3 @@ +PATH="/opt/panda3d/bin" +ROOTPATH="/opt/panda3d/bin" +LDPATH="/opt/panda3d/lib" diff --git a/media-libs/panda3d/files/panda3d-1.8.0-pkgconfig.patch b/media-libs/panda3d/files/panda3d-1.8.0-pkgconfig.patch new file mode 100644 index 0000000..28a175e --- /dev/null +++ b/media-libs/panda3d/files/panda3d-1.8.0-pkgconfig.patch @@ -0,0 +1,33 @@ +diff -Naur panda3d-1.8.0.old/makepanda/makepanda.py panda3d-1.8.0/makepanda/makepanda.py +--- panda3d-1.8.0.old/makepanda/makepanda.py 2012-02-13 02:17:47.000000000 -0500 ++++ panda3d-1.8.0/makepanda/makepanda.py 2012-06-05 15:59:57.000000000 -0400 +@@ -606,12 +606,12 @@ + + # Name pkg-config libs, include(dir)s + if (not RUNTIME): +- SmartPkgEnable("EIGEN", "", (), ("Eigen/Dense",), target_pkg = 'ALWAYS') ++ SmartPkgEnable("EIGEN", "eigen3", (), ("Eigen/Dense",), target_pkg = 'ALWAYS') + SmartPkgEnable("ARTOOLKIT", "", ("AR"), "AR/ar.h") + SmartPkgEnable("FCOLLADA", "", ChooseLib(*fcollada_libs), ("FCollada", "FCollada.h")) + SmartPkgEnable("FFMPEG", ffmpeg_libs, ffmpeg_libs, ffmpeg_libs) + SmartPkgEnable("SWSCALE", "libswscale", "libswscale", ("libswscale", "libswscale/swscale.h"), target_pkg = "FFMPEG") +- SmartPkgEnable("FFTW", "", ("fftw", "rfftw"), ("fftw.h", "rfftw.h")) ++ SmartPkgEnable("FFTW", "fftw2", ("fftw", "rfftw"), ("fftw.h", "rfftw.h")) + SmartPkgEnable("FMODEX", "", ("fmodex"), ("fmodex", "fmodex/fmod.h")) + SmartPkgEnable("FREETYPE", "freetype2", ("freetype"), ("freetype2", "freetype2/freetype/freetype.h")) + SmartPkgEnable("GL", "gl", ("GL"), ("GL/gl.h"), framework = "OpenGL") +diff -Naur panda3d-1.8.0.old/makepanda/makepandacore.py panda3d-1.8.0/makepanda/makepandacore.py +--- panda3d-1.8.0.old/makepanda/makepandacore.py 2012-01-28 08:12:36.000000000 -0500 ++++ panda3d-1.8.0/makepanda/makepandacore.py 2012-06-05 15:18:55.000000000 -0400 +@@ -1005,7 +1005,10 @@ + if (sys.platform == "win32" or not LocateBinary(tool)): + return [] + if (tool == "pkg-config"): +- handle = os.popen(LocateBinary("pkg-config") + " --silence-errors --libs-only-l " + pkgname) ++ if (pkgname == "opencv"): ++ handle = os.popen(LocateBinary("pkg-config") + " --silence-errors --libs " + pkgname) ++ else: ++ handle = os.popen(LocateBinary("pkg-config") + " --silence-errors --libs-only-l " + pkgname) + elif (tool == "fltk-config"): + handle = os.popen(LocateBinary("fltk-config") + " --ldstaticflags") + else: diff --git a/media-libs/panda3d/metadata.xml b/media-libs/panda3d/metadata.xml new file mode 100644 index 0000000..3447db5 --- /dev/null +++ b/media-libs/panda3d/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>mavrinac@gmail.com</email> + <name>Aaron Mavrinac</name> +</maintainer> +<use> + <flag name="artoolkit">Enable support for ARToolKit</flag> + <flag name="bullet">Enable support for Bullet</flag> + <flag name="eigen">Enable support for Eigen</flag> + <flag name="opencv">Enable support for OpenCV</flag> +</use> +</pkgmetadata> diff --git a/media-libs/panda3d/panda3d-1.8.0.ebuild b/media-libs/panda3d/panda3d-1.8.0.ebuild new file mode 100644 index 0000000..5bb6e7d --- /dev/null +++ b/media-libs/panda3d/panda3d-1.8.0.ebuild @@ -0,0 +1,128 @@ +# Copyright 2008-2012 Funtoo Technologies +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit base eutils python + +DESCRIPTION="A 3D game engine and framework for Python and C++." +HOMEPAGE="http://www.panda3d.org" +SRC_URI="http://www.panda3d.org/download/${P}/${P}.tar.gz" + +LICENSE="Panda3D" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="artoolkit bullet doc eigen ffmpeg fftw fmod jpeg openal opencv png python ssl tiff truetype zlib" + +DEPEND=" + artoolkit? ( media-libs/artoolkit ) + bullet? ( sci-physics/bullet ) + doc? ( dev-python/epydoc ) + eigen? ( dev-cpp/eigen:3 ) + ffmpeg? ( media-video/ffmpeg ) + fftw? ( sci-libs/fftw:2.1 ) + fmod? ( media-libs/fmod ) + jpeg? ( virtual/jpeg ) + openal? ( media-libs/openal ) + opencv? ( media-libs/opencv ) + png? ( media-libs/libpng ) + python? ( dev-lang/python ) + ssl? ( dev-libs/openssl ) + tiff? ( media-libs/tiff ) + truetype? ( media-libs/freetype ) + zlib? ( sys-libs/zlib ) + virtual/opengl" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-pkgconfig.patch" +) + +use_no() { + local UWORD="$2" + if [ -z "${UWORD}" ]; then + UWORD="$1" + fi + + if use $1 ; then + echo "--use-${UWORD}" + else + echo "--no-${UWORD}" + fi +} + +src_compile() { + ./makepanda/makepanda.py \ + $(use_no artoolkit) \ + $(use_no bullet) \ + $(use_no eigen) \ + $(use_no ffmpeg) \ + $(use_no fftw) \ + $(use_no fmod) \ + $(use_no jpeg) \ + $(use_no png) \ + $(use_no openal) \ + $(use_no opencv) \ + $(use_no python) \ + $(use_no ssl openssl) \ + $(use_no tiff) \ + $(use_no truetype freetype) \ + $(use_no zlib) \ + --no-fcollada \ + --no-gles \ + --no-gles2 \ + --no-osmesa \ + --no-ode \ + --no-rocket \ + --no-squish \ + --no-vrpn \ + || die "build failed" +} + +src_install() { + dodir /opt/panda3d + + doenvd "${FILESDIR}"/50panda3d + sed -i -e "s:lib:$(get_libdir):g" \ + "${D}"/etc/env.d/50panda3d \ + || die "libdir patching failed" + + if use doc; then + cp -R "${S}"/samples "${S}"/built + cp -R "${S}"/direct/src "${S}"/built/direct/src + cd "${S}"/built + fi + + if use python ; then + # python installation + dodir $(python_get_sitedir) + cat <<- EOF > "${D}"$(python_get_sitedir)/panda3d.pth + # This document sets up paths for python to access the + # panda3d modules + /opt/panda3d + /opt/panda3d/lib + /opt/panda3d/direct + /opt/panda3d/pandac + /opt/panda3d/built + /opt/panda3d/built/$(get_libdir) + EOF + fi + + cp -R "${S}"/direct/src "${S}"/built/direct/ + cp -R "${S}"/built/* "${D}"/opt/panda3d +} + +pkg_postinst() +{ + elog "Panda3D is installed in /opt/panda3d" + elog + if use doc ; then + elog "Documentation is installed in /opt/panda3d/doc" + elog "Samples are installed in /opt/panda3d/samples" + fi + elog "For C++ compiling, include directory must be set:" + elog "g++ -I/opt/panda3d/include [other flags]" + elog + elog "Tutorials available at http://panda3d.org" +} |