summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Bainbridge <chrb@gentoo.org>2006-07-28 12:37:21 +0000
committerChris Bainbridge <chrb@gentoo.org>2006-07-28 12:37:21 +0000
commitbcfdf2441a30e405a210e022230fb7863698d02c (patch)
treea0a4f9e5c7a5f41d6b3206c9bceb81d5dab99a66 /dev-python/pyode
parentNew revisions to address CVE-2006-3747. Fixes bug 141986 (diff)
downloadgentoo-2-bcfdf2441a30e405a210e022230fb7863698d02c.tar.gz
gentoo-2-bcfdf2441a30e405a210e022230fb7863698d02c.tar.bz2
gentoo-2-bcfdf2441a30e405a210e022230fb7863698d02c.zip
Version bump made necessary by ode-0.6.
(Portage version: 2.1.1_pre3-r5)
Diffstat (limited to 'dev-python/pyode')
-rw-r--r--dev-python/pyode/ChangeLog10
-rw-r--r--dev-python/pyode/files/digest-pyode-1.1.02
-rw-r--r--dev-python/pyode/files/digest-pyode-1.1.0_p200607283
-rw-r--r--dev-python/pyode/files/setup.py97
-rw-r--r--dev-python/pyode/pyode-1.1.0_p20060728.ebuild32
5 files changed, 142 insertions, 2 deletions
diff --git a/dev-python/pyode/ChangeLog b/dev-python/pyode/ChangeLog
index 0439974da5ef..35a1e823399d 100644
--- a/dev-python/pyode/ChangeLog
+++ b/dev-python/pyode/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/pyode
-# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyode/ChangeLog,v 1.5 2005/08/04 15:05:35 dholm Exp $
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyode/ChangeLog,v 1.6 2006/07/28 12:37:21 chrb Exp $
+
+*pyode-1.1.0_p20060728 (28 Jul 2006)
+
+ 28 Jul 2006; Chris Bainbridge <chrb@gentoo.org> +files/setup.py,
+ +pyode-1.1.0_p20060728.ebuild:
+ Version bump made necessary by ode-0.6.
04 Aug 2005; David Holm <dholm@gentoo.org> pyode-1.1.0.ebuild:
Added to ~ppc.
diff --git a/dev-python/pyode/files/digest-pyode-1.1.0 b/dev-python/pyode/files/digest-pyode-1.1.0
index 8f839b2e078c..2bd42decad1d 100644
--- a/dev-python/pyode/files/digest-pyode-1.1.0
+++ b/dev-python/pyode/files/digest-pyode-1.1.0
@@ -1 +1,3 @@
MD5 ad7873c0977e275a9061898ac2e611cd PyODE-1.1.0.tar.bz2 140371
+RMD160 3e6807f6177de437569ed4a36c1188faae067b45 PyODE-1.1.0.tar.bz2 140371
+SHA256 5811121e25f81e55d65d4235baec623726096ce5cfdb980ed223ffde91ec066a PyODE-1.1.0.tar.bz2 140371
diff --git a/dev-python/pyode/files/digest-pyode-1.1.0_p20060728 b/dev-python/pyode/files/digest-pyode-1.1.0_p20060728
new file mode 100644
index 000000000000..51a4005c61e0
--- /dev/null
+++ b/dev-python/pyode/files/digest-pyode-1.1.0_p20060728
@@ -0,0 +1,3 @@
+MD5 67d8b3ef4c098fc85e76a06a0a325aa4 pyode-1.1.0_p20060728.tar.bz2 53300
+RMD160 719719b0b02d8fa4bfad12bfa5f19df7ae911560 pyode-1.1.0_p20060728.tar.bz2 53300
+SHA256 9a9cd3453019f2125ffbb705593423aad147e0032c5052355d222b57a20a1cb8 pyode-1.1.0_p20060728.tar.bz2 53300
diff --git a/dev-python/pyode/files/setup.py b/dev-python/pyode/files/setup.py
new file mode 100644
index 000000000000..d91d870e15e8
--- /dev/null
+++ b/dev-python/pyode/files/setup.py
@@ -0,0 +1,97 @@
+######################################################################
+# setup script for the Python wrapper of ODE
+######################################################################
+
+from distutils.core import setup, Extension
+import distutils.sysconfig
+import shutil, os, os.path, sys, glob
+from stat import *
+
+# Windows?
+if sys.platform=="win32":
+
+ try:
+ base = [ODE_BASE]
+ except NameError:
+ base = []
+ base.append("../ode_single_trimesh")
+ base.append("../ode_double_notrimesh")
+
+ LIBS = ["ode", "user32"] # user32 because of the MessageBox() call
+ CC_ARGS = ["/ML"]
+
+# Linux (and other)
+else:
+
+ LIBS = ["ode", "stdc++"]
+ CC_ARGS = []
+ INC_DIRS = ['/usr/include/ode']
+ LIB_DIRS = ['/usr/lib']
+
+# Generate the C source file (if necessary)
+def generate(name, trimesh_support):
+ # Generate the trimesh_switch file
+
+ f = file("_trimesh_switch.pyx", "wt")
+ print >>f, '# This file was generated by the setup script and is included in ode.pyx.\n'
+ if (trimesh_support):
+ print >>f, 'include "trimeshdata.pyx"'
+ print >>f, 'include "trimesh.pyx"'
+ else:
+ print >>f, 'include "trimesh_dummy.pyx"'
+ f.close()
+
+ cmd = "pyrexc -o %s -I. -Isrc src/ode.pyx" % name
+ pyrex_out = name
+
+ # Check if the pyrex output is still up to date or if it has to be generated
+ # (ode.c will be updated if any of the *.pyx files in the directory "src"
+ # is newer than ode.c)
+ if os.access(pyrex_out, os.F_OK):
+ ctime = os.stat(pyrex_out)[ST_MTIME]
+ for pyx in glob.glob("src/*.pyx"):
+ pytime = os.stat(pyx)[ST_MTIME]
+ if pytime>ctime:
+ print "Updating",pyrex_out
+ print cmd
+ err = os.system(cmd)
+ break
+ else:
+ print pyrex_out,"is up to date"
+ err = 0
+ else:
+ print "Creating",pyrex_out
+ print cmd
+ err = os.system(cmd)
+
+ # Check if calling pyrex produced an error
+ if err!=0:
+ print "An error occured while generating the C source file."
+ sys.exit(err)
+
+wrap_trimesh = not os.system('objdump --syms /usr/lib/libode.a | grep -q libOPCODE')
+
+if (wrap_trimesh):
+ print "Installing with trimesh support."
+ generate('ode_trimesh.c', True)
+ install = 'ode_trimesh.c'
+else:
+ print "Installing without trimesh support."
+ generate('ode_notrimesh.c', False)
+ install = 'ode_notrimesh.c'
+
+# Compile the module
+setup(name = "PyODE",
+ version = "1.1.0",
+ description = "Python wrapper for the Open Dynamics Engine",
+ author = "see file AUTHORS",
+ author_email = "timothy@stranex.com",
+ license = "BSD or LGPL",
+ url = "http://pyode.sourceforge.net/",
+ packages = ["xode"],
+ ext_modules = [Extension("ode", [install]
+ ,libraries=LIBS
+ ,include_dirs=INC_DIRS
+ ,library_dirs=LIB_DIRS
+ ,extra_compile_args=CC_ARGS)
+ ])
diff --git a/dev-python/pyode/pyode-1.1.0_p20060728.ebuild b/dev-python/pyode/pyode-1.1.0_p20060728.ebuild
new file mode 100644
index 000000000000..1ba4aefa8c78
--- /dev/null
+++ b/dev-python/pyode/pyode-1.1.0_p20060728.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyode/pyode-1.1.0_p20060728.ebuild,v 1.1 2006/07/28 12:37:21 chrb Exp $
+
+inherit distutils
+
+DESCRIPTION="python bindings to the ode physics engine"
+HOMEPAGE="http://pyode.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+DEPEND="virtual/python
+ >=dev-games/ode-0.5
+ >=dev-python/pyrex-0.9.3"
+
+S="$WORKDIR/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cp ${FILESDIR}/setup.py ${S}
+}
+
+src_install() {
+ distutils_src_install
+ # The build system doesnt error if it fails to build
+ # the ode library so we need our own sanity check
+ [[ -z $(find "${D}" -name ode.so) ]] && die "failed to build/install :("
+}