+function getpyver {
+ if [ "$1" = "15" ]; then
+ PYVER=1.5
+ elif [ "$1" = "20" ]; then
+ PYVER=2.0
+ elif [ "$1" = "21" ]; then
+ PYVER=2.1
+ elif [ "$1" = "22" ]; then
+ PYVER=2.2
+ elif [ "$1" = "23" ]; then
+ PYVER=2.3
+ else
+ echo You must specify Python version as first parameter.
+ exit
+ fi
+}
+
+getpyver $1
+shift
+
+python$PYVER -c "import sys;print '\n', sys.version, '\n'"
+
+
+SETUP="python$PYVER -u setup.py"
+FLAGS="USE_SWIG=1 SWIG=/opt/swig/bin/swig"
+OTHERFLAGS=""
+PORTFLAGS=""
+
+
+if [ "$1" = "gtk1" ]; then
+ PORTFLAGS=""