summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris White <chriswhite@gentoo.org>2005-06-24 05:28:52 +0000
committerChris White <chriswhite@gentoo.org>2005-06-24 05:28:52 +0000
commit8cfeb26f656d9db22ed1ccb6ab1febe20bc61572 (patch)
tree4d4aac44efa0da0debd24eca4a0c85fbad810bf9 /media-libs
parentAdded nspr and fmod local use flags for new panda3d package. (diff)
downloadgentoo-2-8cfeb26f656d9db22ed1ccb6ab1febe20bc61572.tar.gz
gentoo-2-8cfeb26f656d9db22ed1ccb6ab1febe20bc61572.tar.bz2
gentoo-2-8cfeb26f656d9db22ed1ccb6ab1febe20bc61572.zip
Initial import into the tree. This closes bug #95995. Wow, this build system was a doozy.
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/panda3d/ChangeLog11
-rw-r--r--media-libs/panda3d/Manifest4
-rw-r--r--media-libs/panda3d/files/50panda3d6
-rw-r--r--media-libs/panda3d/files/digest-panda3d-1.0.41
-rw-r--r--media-libs/panda3d/files/panda3d-1.0.4-makepanda.patch170
-rw-r--r--media-libs/panda3d/metadata.xml16
-rw-r--r--media-libs/panda3d/panda3d-1.0.4.ebuild84
7 files changed, 292 insertions, 0 deletions
diff --git a/media-libs/panda3d/ChangeLog b/media-libs/panda3d/ChangeLog
new file mode 100644
index 000000000000..6c35421e235c
--- /dev/null
+++ b/media-libs/panda3d/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for media-libs/panda3d
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/panda3d/ChangeLog,v 1.1 2005/06/24 05:28:52 chriswhite Exp $
+
+*panda3d-1.0.4 (24 Jun 2005)
+
+ 24 Jun 2005; Chris White <chriswhite@gentoo.org> +files/50panda3d,
+ +files/panda3d-1.0.4-makepanda.patch, +metadata.xml,
+ +panda3d-1.0.4.ebuild:
+ Initial import into the tree. This closes bug #95995.
+
diff --git a/media-libs/panda3d/Manifest b/media-libs/panda3d/Manifest
new file mode 100644
index 000000000000..4a26da0e3f75
--- /dev/null
+++ b/media-libs/panda3d/Manifest
@@ -0,0 +1,4 @@
+MD5 614fce5bbd1df53e1c15364930a91cf9 panda3d-1.0.4.ebuild 1777
+MD5 afabf922d82cce22ed050446ba7185e2 files/panda3d-1.0.4-makepanda.patch 8796
+MD5 95f7b5695cef5a419d432c347c2ba429 files/50panda3d 116
+MD5 978479bc4bc45efcd9df722ffe0745e9 files/digest-panda3d-1.0.4 67
diff --git a/media-libs/panda3d/files/50panda3d b/media-libs/panda3d/files/50panda3d
new file mode 100644
index 000000000000..aaad025fbc12
--- /dev/null
+++ b/media-libs/panda3d/files/50panda3d
@@ -0,0 +1,6 @@
+# /etc/env.d/50panda3d:
+# $Header: /var/cvsroot/gentoo-x86/media-libs/panda3d/files/50panda3d,v 1.1 2005/06/24 05:28:52 chriswhite Exp $
+
+PATH="/opt/panda3d/bin"
+ROOTPATH="/opt/panda3d/bin"
+LDPATH="/opt/panda3d/lib"
diff --git a/media-libs/panda3d/files/digest-panda3d-1.0.4 b/media-libs/panda3d/files/digest-panda3d-1.0.4
new file mode 100644
index 000000000000..93c4c1a698ae
--- /dev/null
+++ b/media-libs/panda3d/files/digest-panda3d-1.0.4
@@ -0,0 +1 @@
+MD5 ffcf3b0636d431b4a212216a980c2aea panda3d-1.0.4.tar.gz 28253758
diff --git a/media-libs/panda3d/files/panda3d-1.0.4-makepanda.patch b/media-libs/panda3d/files/panda3d-1.0.4-makepanda.patch
new file mode 100644
index 000000000000..237946af3bc3
--- /dev/null
+++ b/media-libs/panda3d/files/panda3d-1.0.4-makepanda.patch
@@ -0,0 +1,170 @@
+--- /home/chris/panda3d-1.0.4/makepanda/makepanda.py 2005-05-15 03:17:57.000000000 +0900
++++ makepanda/makepanda.py 2005-06-24 14:03:21.000000000 +0900
+@@ -179,6 +179,7 @@
+ if (sys.platform == "win32"): COMPILERS=["MSVC7"]
+ if (sys.platform == "linux2"): COMPILERS=["LINUXA"]
+ PREFIX="built"
++LIBDIR="lib"
+ COMPILER=COMPILERS[0]
+ OPTIMIZE="3"
+ INSTALLER=0
+@@ -452,6 +453,7 @@
+ print " --help (print the help message you're reading now)"
+ print " --package-info (help info about the optional packages)"
+ print " --prefix X (install into prefix dir, default \"built\")"
++ print " --libdir X (install libs into libdir, default \"lib\")"
+ print " --compiler X (currently, compiler can only be MSVC7,LINUXA)"
+ print " --optimize X (optimization level can be 1,2,3,4)"
+ print " --thirdparty X (directory containing third-party software)"
+@@ -482,7 +484,7 @@
+ global PREFIX,COMPILER,OPTIMIZE,OMIT,THIRDPARTY,INSTALLER,GENMAN
+ global PPGAME,COPYEXTRAS,VERSION,COMPRESSOR,DIRECTXSDK,VERBOSE
+ longopts = [
+- "help","package-info","prefix=","compiler=","directx-sdk=","thirdparty=",
++ "help","package-info","prefix=","libdir=","compiler=","directx-sdk=","thirdparty=",
+ "optimize=","everything","nothing","installer","ppgame=","quiet","verbose",
+ "version=","lzma"]
+ anything = 0
+@@ -494,6 +496,7 @@
+ if (option=="--help"): raise "usage"
+ elif (option=="--package-info"): raise "package-info"
+ elif (option=="--prefix"): PREFIX=value
++ elif (option=="--libdir"): LIBDIR=value
+ elif (option=="--compiler"): COMPILER=value
+ elif (option=="--directx-sdk"): DIRECTXSDK=value
+ elif (option=="--thirdparty"): THIRDPARTY=value
+@@ -522,7 +525,8 @@
+ except "package-info": packageInfo()
+ except: usage(0)
+ if (anything==0): usage(0)
+- if (OPTIMIZE=="1"): OPTIMIZE=1
++ if (OPTIMIZE=="0"): OPTIMIZE=0
++ elif (OPTIMIZE=="1"): OPTIMIZE=1
+ elif (OPTIMIZE=="2"): OPTIMIZE=2
+ elif (OPTIMIZE=="3"): OPTIMIZE=3
+ elif (OPTIMIZE=="4"): OPTIMIZE=4
+@@ -784,7 +788,7 @@
+ ##########################################################################################
+
+ if (sys.platform != "win32"):
+- BUILTLIB = os.path.abspath(PREFIX+"/lib")
++ BUILTLIB = os.path.abspath(PREFIX+"/"+LIBDIR)
+ try:
+ LDPATH = []
+ f = file("/etc/ld.so.conf","r")
+@@ -794,7 +798,7 @@
+ if (os.environ.has_key("LD_LIBRARY_PATH")):
+ LDPATH = LDPATH + os.environ["LD_LIBRARY_PATH"].split(":")
+ if (LDPATH.count(BUILTLIB)==0):
+- WARNINGS.append("Caution: the "+PREFIX+"/lib directory is not in LD_LIBRARY_PATH")
++ WARNINGS.append("Caution: the "+PREFIX+"/"+LIBDIR+" directory is not in LD_LIBRARY_PATH")
+ WARNINGS.append("or /etc/ld.so.conf. You must add it before using panda.")
+ if (os.environ.has_key("LD_LIBRARY_PATH")):
+ os.environ["LD_LIBRARY_PATH"] = BUILTLIB + ":" + os.environ["LD_LIBRARY_PATH"]
+@@ -819,6 +823,7 @@
+ if (OMIT.count(x)==0): tkeep = tkeep + x + " "
+ else: tomit = tomit + x + " "
+ print "Makepanda: Prefix Directory:",PREFIX
++ print "Makepanda: Lib Directory:",PREFIX+"/"+LIBDIR
+ print "Makepanda: Compiler:",COMPILER
+ print "Makepanda: Optimize:",OPTIMIZE
+ print "Makepanda: Keep Pkg:",tkeep
+@@ -850,7 +855,10 @@
+
+ MakeDirectory(PREFIX)
+ MakeDirectory(PREFIX+"/bin")
+-MakeDirectory(PREFIX+"/lib")
++if (sys.platform == "win32"):
++ MakeDirectory(PREFIX+"/lib")
++else:
++ MakeDirectory(PREFIX+"/"+LIBDIR)
+ MakeDirectory(PREFIX+"/etc")
+ MakeDirectory(PREFIX+"/plugins")
+ MakeDirectory(PREFIX+"/pandac")
+@@ -1205,17 +1213,26 @@
+ if (older(wobj, dep)):
+ if VERBOSE >= 0:
+ checkIfNewDir(ipath[1])
+- if (src[-2:]==".c"): cmd = 'gcc -c -o ' + wobj
+- else: cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj
++ if (src[-2:]==".c"):
++ if os.environ.has_key("CFLAGS"):
++ cmd = 'gcc ' + os.environ["CFLAGS"] + ' -c -o ' + wobj
++ else:
++ cmd = 'gcc -c -o ' + wobj
++ else:
++ if os.environ.has_key("CXXFLAGS"):
++ cmd = 'g++ ' + os.environ["CXXFLAGS"] + ' -c -o ' + wobj
++ else:
++ cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj
+ cmd = cmd + ' -I"' + PythonSDK + '"'
+ if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/vrpn/include'
+ if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fftw/include'
+- if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/fmod/include'
++ if (PkgSelected(opts,"FMOD")): pass
+ if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/nvidiacg/include'
+- if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -I' + THIRDPARTY + '/linux-libs-a/nspr/include'
++ if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -I/usr/include/nspr'
+ if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2'
+ for x in ipath: cmd = cmd + ' -I' + x
+ if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA'
++ if (OPTIMIZE==0): pass
+ if (OPTIMIZE==1): cmd = cmd + " -g"
+ if (OPTIMIZE==2): cmd = cmd + " -O1"
+ if (OPTIMIZE==3): cmd = cmd + " -O2"
+@@ -1366,7 +1383,7 @@
+
+ if (COMPILER=="LINUXA"):
+ if (lib[-4:]==".ilb"): wlib = PREFIX+"/tmp/" + lib[:-4] + ".a"
+- else: wlib = PREFIX+"/lib/" + lib[:-4] + ".a"
++ else: wlib = PREFIX+"/"+ LIBDIR + "/" + lib[:-4] + ".a"
+ wobj = []
+ for x in obj: wobj.append(PREFIX + "/tmp/" + x[:-4] + ".o")
+ if (older(wlib, wobj)):
+@@ -1488,15 +1505,15 @@
+ CopyFile(dll[:-4]+"_d.dll", dll)
+
+ if (COMPILER=="LINUXA"):
+- ALLTARGETS.append(PREFIX+"/lib/"+dll[:-4]+".so")
++ ALLTARGETS.append(PREFIX+"/"+LIBDIR+dll[:-4]+".so")
+ if (dll[-4:]==".exe"): wdll = PREFIX+"/bin/"+dll[:-4]
+- else: wdll = PREFIX+"/lib/"+dll[:-4]+".so"
++ else: wdll = PREFIX+"/"+LIBDIR+"/"+dll[:-4]+".so"
+ wobj = []
+ for x in obj:
+ suffix = x[-4:]
+ if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".o")
+- elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".so")
+- elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x[:-4]+".a")
++ elif (suffix==".dll"): wobj.append(PREFIX+"/"+LIBDIR+"/"+x[:-4]+".so")
++ elif (suffix==".lib"): wobj.append(PREFIX+"/"+LIBDIR+"/"+x[:-4]+".a")
+ elif (suffix==".ilb"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".a")
+ else: sys.exit("unknown suffix in object list.")
+ if (older(wdll, wobj+xdep)):
+@@ -1506,14 +1523,14 @@
+ suffix = x[-4:]
+ if (suffix==".obj"): cmd = cmd + ' ' + PREFIX + '/tmp/' + x[:-4] + '.o'
+ elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4]
+- elif (suffix==".lib"): cmd = cmd + ' ' + PREFIX + '/lib/' + x[:-4] + '.a'
++ elif (suffix==".lib"): cmd = cmd + ' ' + PREFIX + '/'+ LIBDIR + "/" + x[:-4] + '.a'
+ elif (suffix==".ilb"): cmd = cmd + ' ' + PREFIX + '/tmp/' + x[:-4] + '.a'
+- if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/fmod/lib -lfmod-3.74'
++ if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -lfmod'
+ if (PkgSelected(opts,"NVIDIACG")):
+ cmd = cmd + ' -L' + THIRDPARTY + 'nvidiacg/lib '
+ if (opts.count("CGGL")): cmd = cmd + " -lCgGL"
+ cmd = cmd + " -lCg"
+- if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -L' + THIRDPARTY + '/linux-libs-a/nspr/lib -lpandanspr4'
++ if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -L/usr/' + LIBDIR + '/nspr -lnspr4'
+ if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz"
+ if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng"
+ if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg"
+@@ -1891,7 +1908,7 @@
+ CopyAllFiles(PREFIX+"/bin/",THIRDPARTY+"/win-libs-vc7/"+pkg.lower()+"/bin/")
+ if (COMPILER == "LINUXA"):
+ if (os.path.exists(THIRDPARTY+"/linux-libs-a/"+pkg.lower()+"/lib")):
+- CopyAllFiles(PREFIX+"/lib/",THIRDPARTY+"/linux-libs-a/"+pkg.lower()+"/lib/")
++ CopyAllFiles(PREFIX+"/"+LIBDIR,THIRDPARTY+"/linux-libs-a/"+pkg.lower()+"/"+LIBDIR)
+
+ if (sys.platform == "win32"):
+ CopyTree(PREFIX+'/python', 'thirdparty/win-python')
diff --git a/media-libs/panda3d/metadata.xml b/media-libs/panda3d/metadata.xml
new file mode 100644
index 000000000000..880ad6bdb8ea
--- /dev/null
+++ b/media-libs/panda3d/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>chriswhite</herd>
+<maintainer>
+<email>chriswhite@gentoo.org</email>
+<name>Chris White</name>
+</maintainer>
+<longdescription lang="en">
+Panda3D is a 3D engine: a library of subroutines for 3D rendering and game
+development. The library is C++ with a set of Python bindings. Game development
+with Panda3D usually consists of writing a Python program that controls the the
+Panda3D library.
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-libs/panda3d/panda3d-1.0.4.ebuild b/media-libs/panda3d/panda3d-1.0.4.ebuild
new file mode 100644
index 000000000000..3b00a722d7ac
--- /dev/null
+++ b/media-libs/panda3d/panda3d-1.0.4.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/panda3d/panda3d-1.0.4.ebuild,v 1.1 2005/06/24 05:28:52 chriswhite Exp $
+
+inherit eutils
+
+DESCRIPTION="A 3D framework in C++ with python bindings"
+HOMEPAGE="http://panda3d.org"
+SRC_URI="http://panda3d.org/download/${P}.tar.gz"
+
+LICENSE="Panda3D"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="png jpeg tiff fmod nspr ssl freetype doc zlib"
+
+DEPEND="doc?( dev-python/epydoc )
+ png?( media-libs/libpng )
+ jpeg?( media-libs/jpeg )
+ tiff?( media-libs/tiff )
+ fmod?( media-libs/fmod )
+ ssl?( dev-libs/openssl )
+ freetype?( media-libs/freetype )
+ zlib?( sys-libs/zlib )"
+
+use_no()
+{
+ if useq $1 ; then
+ echo "--use-${1}"
+ else
+ echo "--no-${1}"
+ fi
+}
+
+src_unpack()
+{
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${P}-makepanda.patch
+}
+
+src_compile()
+{
+ ./makepanda/makepanda.py \
+ --compiler LINUXA \
+ --prefix built \
+ --libdir $(get_libdir) \
+ $(use_no png) $(use_no jpeg) \
+ $(use_no tiff) $(use_no fmod) \
+ $(use_no ssl) $(use_no freetype) \
+ $(use_no zlib) $(use_no nspr) \
+ || die "build failed"
+}
+
+src_install()
+{
+ dodir /opt/panda3d
+ cp -R ${S}/direct ${S}/built
+
+ 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
+ cd ${S}/built
+ epydoc --html direct
+ fi
+
+ cp -R ${S}/built/* ${D}/opt/panda3d
+}
+
+pkg_postinst()
+{
+ einfo "Panda3d is installed in /opt/panda3d"
+ if use doc ; then
+ einfo "Documentation is avaliable in /opt/panda3d/html"
+ einfo "Samples are avalaible in /opt/panda3d/samples"
+ fi
+ einfo "For C++ compiling, include directory must be set:"
+ einfo "g++ -I/opt/panda3d/include [other flags]"
+ einfo "Python scripts must be ran with ppython"
+ einfo "Tutorials avaliable at http://panda3d.org"
+}