[Python-ogre-commit] SF.net SVN: python-ogre:[697] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <mi...@us...> - 2008-08-18 08:56:34
|
Revision: 697
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=697&view=rev
Author: mithro
Date: 2008-08-18 08:56:44 +0000 (Mon, 18 Aug 2008)
Log Message:
-----------
Fix up the way boost_python_index target is built.
Modified Paths:
--------------
trunk/python-ogre/boost/Makefile
trunk/python-ogre/boost/debian/control
trunk/python-ogre/environment.py
Added Paths:
-----------
trunk/python-ogre/boost/debian/dsc
Modified: trunk/python-ogre/boost/Makefile
===================================================================
--- trunk/python-ogre/boost/Makefile 2008-08-18 08:35:42 UTC (rev 696)
+++ trunk/python-ogre/boost/Makefile 2008-08-18 08:56:44 UTC (rev 697)
@@ -1,19 +1,43 @@
-export GCC_VERSION=`gcc --version | head -1 | sed -e's/.*) \([0-9]\)\.\([0-9]\).*/\1\2/'`
-export PYTHON_VERSION=`python -V 2>&1 | sed -e's/Python \(2\.[45]\).*/\1/'`
+PREFIX := '/usr'
+GCC_VERSION=`gcc --version | head -1 | sed -e's/.*) \([0-9]\)\.\([0-9]\).*/\1\2/'`
+PYTHON_VERSION=`python -V 2>&1 | sed -e's/Python \(2\.[45]\).*/\1/'`
+MT_VERSION=`if [ x${MT} = True ]; then echo "mt-"; fi`
+MT_FLAGS=`if [ x${MT} = True ]; then echo "-D_MT"; fi`
+CXXFLAGS=-I. \
+ -I/usr/include/python${PYTHON_VERSION} \
+ -shared \
+ -Wl,-soname,libboost_python_index-gcc${GCC_VERSION}-${BOOST_VERSION}.so \
+ -o libboost_python_index-gcc${GCC_VERSION}-${BOOST_VERSION}.so -fPIC \
+ -lboost_python-gcc${GCC_VERSION}-${MT_VERSION}${BOOST_VERSION} \
+ -L${PREFIX}/lib/ \
+ -lpython${PYTHON_VERSION} \
+ $(MT_FLAGS)
+
+
all: libs/python/src/indexing/indexing_slice.cpp libs/python/src/indexing/python_iterator.cpp
- g++ $? \
- -I . \
- -I /usr/include/python${PYTHON_VERSION} \
- -shared -Wl,-soname,libboost_python_index-gcc${GCC_VERSION}-1_34_1.so -o libboost_python_index-gcc${GCC_VERSION}-1_34_1.so -fPIC \
- -lboost_python \
- -lpython${PYTHON_VERSION}
+ @make version
+ @echo "Current CXXFLAGS: ${CXXFLAGS}"
+ @echo "Running g++ ${CXXFLAGS} $?"
+ @g++ ${CXXFLAGS} $?
+version:
+ @if [ x${BOOST_VERSION} = x ]; then \
+ echo "You have not specified a BOOST_VERSION, please do so!"; \
+ exit 1; \
+ fi
+
install:
+ @make version
mkdir -p ${PREFIX}/usr/lib
- cp libboost_python_index-gcc${GCC_VERSION}-1_34_1.so ${PREFIX}/usr/lib
- ln -sf /usr/lib/libboost_python_index-gcc${GCC_VERSION}-1_34_1.so ${PREFIX}/usr/lib/libboost_python_index.so
+ if [ x${MT} = xTrue ]; then \
+ cp libboost_python_index-gcc${GCC_VERSION}-mt-${BOOST_VERSION}.so ${PREFIX}/usr/lib; \
+ ln -sf /usr/lib/libboost_python_index-gcc${GCC_VERSION}-mt-${BOOST_VERSION}.so ${PREFIX}/usr/lib/libboost_python_index.so; \
+ else \
+ cp libboost_python_index-gcc${GCC_VERSION}-${BOOST_VERSION}.so ${PREFIX}/usr/lib; \
+ ln -sf /usr/lib/libboost_python_index-gcc${GCC_VERSION}-${BOOST_VERSION}.so ${PREFIX}/usr/lib/libboost_python_index.so; \
+ fi
mkdir -p ${PREFIX}/usr/include
cp -rvf boost ${PREFIX}/usr/include
@@ -22,4 +46,4 @@
clean:
rm *.so
-.PHONY: install clean
+.PHONY: install clean version
Modified: trunk/python-ogre/boost/debian/control
===================================================================
--- trunk/python-ogre/boost/debian/control 2008-08-18 08:35:42 UTC (rev 696)
+++ trunk/python-ogre/boost/debian/control 2008-08-18 08:56:44 UTC (rev 697)
@@ -1,7 +1,7 @@
Source: boost-python1.34.1-index
Priority: extra
Maintainer: Tim Ansell <tim@unknown>
-Build-Depends: debhelper (>= 5)
+Build-Depends: debhelper (>= 5), libboost-python-dev (>= 1.34), libstdc++6-4.1-dev | libstdc++6-4.2-dev, python-dev
Standards-Version: 3.7.2
Section: libs
Added: trunk/python-ogre/boost/debian/dsc
===================================================================
--- trunk/python-ogre/boost/debian/dsc (rev 0)
+++ trunk/python-ogre/boost/debian/dsc 2008-08-18 08:56:44 UTC (rev 697)
@@ -0,0 +1,10 @@
+Format: 1.0
+Source: boost-python1.34.1-index
+Binary: libboost-python1.34.1-index-dev, libboost-python1.34.1-index
+Architecture: any
+Version: 0.0.0-1
+Maintainer: Tim 'Mithro' Ansell <mi...@mi...>
+Standards-Version: 3.7.2
+%%BUILDDEPS%%
+Files:
+ %%MD5SUM%% %%SIZE%%
Modified: trunk/python-ogre/environment.py
===================================================================
--- trunk/python-ogre/environment.py 2008-08-18 08:35:42 UTC (rev 696)
+++ trunk/python-ogre/environment.py 2008-08-18 08:56:44 UTC (rev 697)
@@ -518,18 +518,19 @@
class boost_python_index:
active = True
- version = "1.34.1"
+ version = boost.base[6:]
pythonModule = False
ModuleName = ""
- base = "libboost-python%s-index" % boost.base[6:].replace("_",".")
+ base = "libboost-python%s-index" % version.replace("_",".")
if isLinux() or isMac():
+ FLAGS = "PREFIX=%s BOOST_VERSION=%s" % (PREFIX, version)
source = [
["rm","-rf %s" % (base,), os.getcwd()],
["cp",'-rvf %s/ %s' % (os.path.join('python-ogre','boost'), base), os.getcwd()],
]
buildCmds = [
- [0,'make all', os.path.join(os.getcwd(), base)],
- [0,'PREFIX=%s make install' % PREFIX, os.path.join(os.getcwd(), base)],
+ [0,'make all %s' % FLAGS, os.path.join(os.getcwd(), base)],
+ [0,'make install %s' % FLAGS, os.path.join(os.getcwd(), base)],
]
lib = boost.lib.replace("python", "python_index")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|