[arch-commits] Commit in freeorion/repos (10 files)

arodseth at nymeria.archlinux.org arodseth at nymeria.archlinux.org
Thu Jan 24 00:02:05 UTC 2013


    Date: Thursday, January 24, 2013 @ 01:02:05
  Author: arodseth
Revision: 82762

archrelease: copy trunk to community-staging-x86_64, community-staging-i686

Added:
  freeorion/repos/community-staging-i686/
  freeorion/repos/community-staging-i686/PKGBUILD
    (from rev 82761, freeorion/trunk/PKGBUILD)
  freeorion/repos/community-staging-i686/cmake_python.patch
    (from rev 82761, freeorion/trunk/cmake_python.patch)
  freeorion/repos/community-staging-i686/freeorion.install
    (from rev 82761, freeorion/trunk/freeorion.install)
  freeorion/repos/community-staging-i686/freeorion.sh
    (from rev 82761, freeorion/trunk/freeorion.sh)
  freeorion/repos/community-staging-x86_64/
  freeorion/repos/community-staging-x86_64/PKGBUILD
    (from rev 82761, freeorion/trunk/PKGBUILD)
  freeorion/repos/community-staging-x86_64/cmake_python.patch
    (from rev 82761, freeorion/trunk/cmake_python.patch)
  freeorion/repos/community-staging-x86_64/freeorion.install
    (from rev 82761, freeorion/trunk/freeorion.install)
  freeorion/repos/community-staging-x86_64/freeorion.sh
    (from rev 82761, freeorion/trunk/freeorion.sh)

---------------------------------------------+
 community-staging-i686/PKGBUILD             |  126 ++++++++++++++++++++++
 community-staging-i686/cmake_python.patch   |   23 ++++
 community-staging-i686/freeorion.install    |   13 ++
 community-staging-i686/freeorion.sh         |  143 ++++++++++++++++++++++++++
 community-staging-x86_64/PKGBUILD           |  126 ++++++++++++++++++++++
 community-staging-x86_64/cmake_python.patch |   23 ++++
 community-staging-x86_64/freeorion.install  |   13 ++
 community-staging-x86_64/freeorion.sh       |  143 ++++++++++++++++++++++++++
 8 files changed, 610 insertions(+)

Copied: freeorion/repos/community-staging-i686/PKGBUILD (from rev 82761, freeorion/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD	                        (rev 0)
+++ community-staging-i686/PKGBUILD	2013-01-24 00:02:05 UTC (rev 82762)
@@ -0,0 +1,126 @@
+# $Id$
+# Maintainer: Alexander Rødseth <rodseth at gmail.com>
+# Contributor: guini <sidtrun at googlemail.com>
+# Contributor: Forrest Loomis <cybercyst _ at _ gmail dot com>
+# Contributor: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Contributor: fana-m <geminin at gmx.net>
+
+pkgname=freeorion
+pkgver=0.4.1
+pkgrel=5
+pkgdesc='Turn-based galactic conquest game inspired by Master of Orion'
+arch=('x86_64' 'i686')
+url='http://www.freeorion.org/'
+license=('GPL')
+if [ "$CARCH" == "x86_64" ]
+then
+  depends=('lib32-nvidia-cg-toolkit')
+else
+  depends=('nvidia-cg-toolkit')
+fi
+depends=('bullet>=2.81' 'freealut' 'libvorbis' 'python2' 'gigi' 'desktop-file-utils')
+makedepends=('boost>=1.49.0' 'ogre' 'sdl' 'gigi>=0.8.0-12' 'graphviz' 'clang'
+             'desktop-file-utils' 'setconf' 'cmake' 'gendesk' 'subversion'
+             'libogg')
+options=('!strip' '!emptydirs')
+install=$pkgname.install
+source=("$pkgname.sh"
+        "$pkgname.png::https://a.fsdn.com/con/icons/fr/freeorion@sf.net/FO_Icon_256x256.png"
+        "cmake_python.patch")
+sha256sums=('111532e460aec847ff455ee67dd64f46e2fa5ceba39a0349d25a84b69c646eaf'
+            'a6a253eed31b77b00bf4f721f4b1c6bbd95505b9e4b38b736101e551dd12ff5f'
+            '3dbe8df9c3a4a0d6451f42727ebf9bcb21fed41a08d1181d1cf77ef4ab5ee81a')
+_svnrepo='https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk/FreeOrion/'
+_pyversion=2.7
+_revision=5671 #5379
+
+build() {
+  cd "$srcdir"
+  gendesk -n
+
+  # Sometimes the latest revision works, sometimes it's the "release" revision that works.
+  # Sometimes the release tarball works, sometimes not. Sometimes there is a release tarball, sometimes not.
+  # Search for "Arch" in the sf.net/projects/freeorion issue tracker to see a list of past issues.
+
+  #msg2 'Looking up revision from version number...'
+  #_releaserevision=`curl --progress-bar -o- ${url}index.php/Compile | grep "$pkgver" | cut -d':' -f2 | cut -d' ' -f10 | tail -1`
+  #msg2 "The revision for the latest official release is $_releaserevision"
+  ## _revision=$_releaserevision
+
+  msg2 "Compiling with revision $_revision"
+
+  msg2 "Checking out svn revision $_revision..."
+  if [[ -d "$pkgname/.svn" ]]; then
+    (cd "$pkgname" && svn up -r "$_revision")
+  else
+    svn co "$_svnrepo" --config-dir ./ -r "$_revision" "$pkgname"
+  fi
+
+  msg2 "Setting up build directory..."
+  rm -rf "$srcdir/$pkgname-build"
+  cp -r "$srcdir/$pkgname" "$srcdir/$pkgname-build"
+  cd "$srcdir/$pkgname-build"
+
+  msg2 "CMake/Python fix..."
+  patch -N -p1 -i "$srcdir/cmake_python.patch"
+
+  msg2 "Generating makefiles..."
+  cmake \
+    -DPYTHON_INCLUDE_DIR:PATH="/usr/include/python$_pyversion" \
+    -DPYTHON_LIBRARY:FILEPATH="/usr/lib/libpython$_pyversion.so" \
+    -G "Unix Makefiles"
+  
+  msg2 "GLU fix..."
+  setconf CMakeCache.txt CMAKE_CXX_FLAGS:STRING \
+    "'-march=x86-64 -mtune=generic -O2 -fno-var-tracking -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -lGL -lGLU '"
+
+  #msg2 "Boost fix..."
+  #sed -i 's:TIME_UTC:TIME_UTC_:' util/MultiplayerCommon.cpp
+  
+  msg2 "Compiling..."
+  make -j1
+
+  msg2 "OGRE fix..."
+  sed -i 's:PluginFolder=.:PluginFolder=/usr/lib/OGRE/:g' \
+    "$srcdir/$pkgname-build/ogre_plugins.cfg"
+}
+
+package() {
+  cd "$srcdir/$pkgname-build"
+
+  msg2 "Packaging documentation..."
+  install -Dm644 loki_setup/README.txt \
+    "$pkgdir/usr/share/doc/$pkgname/README.txt"
+
+  msg2 "Packaging binaries..."
+  install -Dm 755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/freeorion"
+  install -Dm 755 freeorion "$pkgdir/usr/bin/freeorion.elf"
+  install -Dm 755 freeorionca "$pkgdir/usr/bin/freeorionca"
+  install -Dm 755 freeoriond "$pkgdir/usr/bin/freeoriond"
+
+  msg2 "Packaging data..."
+  mkdir -p "$pkgdir/usr/share/$pkgname" "$pkgdir/usr/lib/$pkgname"
+  cp -r default "$pkgdir/usr/share/$pkgname"
+  install -Dm 644 OISInput.cfg "$pkgdir/usr/share/OISInput.cfg"
+
+  msg2 "Packaging license..."
+  install -Dm 644 default/COPYING \
+    "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+
+  cd "$srcdir"
+
+  msg2 "Packaging icon and shortcut..."
+  install -Dm 644 "$pkgname.png" \
+    "$pkgdir/usr/share/pixmaps/freeorion.png"
+  install -Dm 644 "$pkgname.desktop" \
+    "$pkgdir/usr/share/applications/freeorion.desktop"
+
+  msg2 "Packaging OGRE plugins configuration..."
+  install -Dm 644 "$srcdir/$pkgname-build/ogre_plugins.cfg" \
+    "$pkgdir/usr/share/freeorion/ogre_plugins.cfg"
+
+  msg2 "Cleaning up..."
+  find "$pkgdir" -name ".svn" -print0 | xargs -0 rm -rf
+}
+
+# vim:set ts=2 sw=2 et:

Copied: freeorion/repos/community-staging-i686/cmake_python.patch (from rev 82761, freeorion/trunk/cmake_python.patch)
===================================================================
--- community-staging-i686/cmake_python.patch	                        (rev 0)
+++ community-staging-i686/cmake_python.patch	2013-01-24 00:02:05 UTC (rev 82762)
@@ -0,0 +1,23 @@
+--- a/client/AI/CMakeLists.txt	2012-09-10 00:11:18.659341865 +0200
++++ b/client/AI/CMakeLists.txt	2012-09-10 00:12:37.659345189 +0200
+@@ -33,6 +33,20 @@
+ find_package(PythonLibs)
+ if (PYTHONLIBS_FOUND)
+     include_directories(${PYTHON_INCLUDE_PATH})
++    SET(_VERSION_REGEX
++      "^#define[ \t]+PY([A-Z_]*_VERSION)[ \t]+[\"]*([0-9A-Za-z\\.]+)[\"]*[ \t]*$")
++    FILE(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" _VERSION_STRINGS
++       LIMIT_COUNT 10 REGEX ${_VERSION_REGEX})
++    FOREACH(_VERSION_STRING ${_VERSION_STRINGS})
++        STRING(REGEX REPLACE ${_VERSION_REGEX} "PYTHON\\1"
++           _VERSION_VARIABLE "${_VERSION_STRING}")
++        STRING(REGEX REPLACE ${_VERSION_REGEX} "\\2"
++           _VERSION_NUMBER "${_VERSION_STRING}")
++        SET(${_VERSION_VARIABLE} ${_VERSION_NUMBER})
++    ENDFOREACH(_VERSION_STRING ${_VERSION_STRINGS})
++    IF(PYTHON_MAJOR_VERSION EQUAL 3)
++        MESSAGE(FATAL_ERROR "Python 3 is not supported!")
++    ENDIF()
+ else ()
+     message(FATAL_ERROR " library not found.")
+ endif ()

Copied: freeorion/repos/community-staging-i686/freeorion.install (from rev 82761, freeorion/trunk/freeorion.install)
===================================================================
--- community-staging-i686/freeorion.install	                        (rev 0)
+++ community-staging-i686/freeorion.install	2013-01-24 00:02:05 UTC (rev 82762)
@@ -0,0 +1,13 @@
+post_upgrade() {
+  update-desktop-database -q
+}
+
+post_install() {
+  post_upgrade
+}
+
+post_remove() {
+  post_upgrade
+}
+
+# vim:set ts=2 sw=2 et:

Copied: freeorion/repos/community-staging-i686/freeorion.sh (from rev 82761, freeorion/trunk/freeorion.sh)
===================================================================
--- community-staging-i686/freeorion.sh	                        (rev 0)
+++ community-staging-i686/freeorion.sh	2013-01-24 00:02:05 UTC (rev 82762)
@@ -0,0 +1,143 @@
+#!/bin/sh
+#
+# written by Markus Sinner, http://psitronic.de
+#
+# Nightly builds on.
+# http://freeorion.psitronic.de/download/nightly/
+#
+# This is a wrapper-script for starting FreeOrion on
+# ix86 (and maybe x64) Linux Systems.
+# This script will CD into application and set some
+# enviroment variables.
+
+# ---- commandline PARAMETERS and ENVIROMENT variables -----
+# This script supports parameters, that will be evaluated
+# BEFORE freeorion binary is called and will be removed, 
+# because the binary won't support them.
+# Currently only one parameter at a time is supported!
+# Parameters other than these will be appended as command
+# line parameters to the call of the freeorion binary.
+#
+# --strace
+#   This starts freeorion using the "strace" utility. 
+#   Generates a strace logifle /tmp/freeorion.trace.
+#   Make sure it is installed on your system!
+# --gdb
+#   Runs freeorion in a gdb instance, passes the original
+#   parameters through the --args parameter of gdb
+#
+#
+# ENVIROMENT variables
+# This script supports some enviroment variables. To set them
+# either use the followin command BEFORE you execute this script.
+#    export XXXX="value"
+# This permanently set the variable in you current shell script.
+# Or you prepend the options when running this script, like this:
+#    PARAM1="hello" PARAM2="yo man" /usr/bin/freeorion.elf
+#
+# Supportet are:
+#   FO_TRACE=
+#      Use this to prepend something to calling freorion.
+#      This variables also is used internally, when --gdb or --trace
+#      appear on the command line.
+#   FO_GDB_ARGS=
+#      If you use --gbd, you should uses this env to add GDB parameters.
+#      Make sure you end this list of parameters with --args, otherwise
+#      gdb won't start. Example: FO_GDB_ARGS="-q -s fo.symbols --args"
+#   LD_LIBRARY_PATH=
+#      This is a well known env and will be honored by this script.
+#
+
+
+# ---------- STARTS HERE ---------------
+# Change into application directory
+# If this is a symlink, then we
+# need to change into the dir of symlink-target.
+if [ -h $0 ]; then
+  echo "I am Symlink. Following into my targets basedir"
+  ME=`readlink $0`
+else
+  echo "Following into my basedir"
+  ME=$0
+fi
+
+# This is important! Script won't work outside its installation dir
+ROOT=/usr/share/freeorion
+cd ${ROOT}
+echo -n "CWD: "
+pwd
+
+
+
+# Check for python. If freeorionca binary is missing it, use
+# the shipped version.
+if ldd /usr/bin/freeorionca | grep "libpython.*not found"; then
+    #echo "python2.5 missing. Using shipped version."
+    PYTHON_USE_SHIPPED=1
+else 
+    #echo "python2.5 found. Using it."
+    PYTHON_USE_SHIPPED=0
+fi
+
+# Set Python library home for loading modules
+# If no python 2.5 is detected, use shipped python 2.5
+if [ "$PYTHON_USE_SHIPPED" = "1" ]; then
+    export PYTHONHOME=/usr/lib/freeorion/python2.5
+    export PYTHONPATH=${PYTHONHOME}
+    export PYTHONDEBUG=1
+    export PYTHONVERBOSE=1
+    echo "PYTHONHOME=${PYTHONHOME}"
+    
+    export LD_LIBRARY_PATH=${PYTHONHOME}:${LD_LIBRARY_PATH}
+    export LD_PRELOAD=${PYTHONHOME}/libutil.so.1:${PYTHONHOME}/libpython2.5.so
+fi
+
+
+# Command line Parameter --gdb forces running in gdb
+# Setting FO_TRACE to gdb results in other settings, see
+# below
+if [ "$1" = "--gdb" ]; then
+    FO_TRACE="gdb"
+
+    # Don't forget to remove the param
+    shift
+fi
+
+if [ "$1" = "--strace" ]; then
+    TRACEFILE=/tmp/freeorion.trace
+    echo
+    echo "Tracing to ${TRACEFILE}"
+    echo
+    FO_TRACE="strace -f -o ${TRACEFILE}"
+
+    # Don't forget to remove the param
+    shift
+fi
+
+
+
+# Add a parameter FO_GDB_ARGS to support gdb
+# Or warn the user, if he changed FO_GDB_ARGS and has
+# forgotten to end it with --args
+if [ "$FO_TRACE" = "gdb" ]; then
+    if [ "$FO_GDB_ARGS" = "" ]; then
+	FO_GDB_ARGS="--args"
+    else
+	echo "****************************************************"
+	echo "** NOTE         NOTE         NOTE         NOTE    **"
+	echo "Running FO in gdb"
+	echo "If you use FO_GDB_ARGS on your command line, make"
+	echo "sure that you END this variabble with --args."
+	echo "Otherwise gdb will not start."
+	echo
+	echo "Type 'start' when the gdb instance has loaded!"
+	echo	
+    fi
+fi
+
+
+# Support loading libs from application/lib
+export LD_LIBRARY_PATH=./lib:${LD_LIBRARY_PATH}
+
+# Call with settings-dir to avoid conflicting installations
+${FO_TRACE} ${FO_GDB_ARGS} /usr/bin/freeorion.elf  --resource-dir ./default $@

Copied: freeorion/repos/community-staging-x86_64/PKGBUILD (from rev 82761, freeorion/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2013-01-24 00:02:05 UTC (rev 82762)
@@ -0,0 +1,126 @@
+# $Id$
+# Maintainer: Alexander Rødseth <rodseth at gmail.com>
+# Contributor: guini <sidtrun at googlemail.com>
+# Contributor: Forrest Loomis <cybercyst _ at _ gmail dot com>
+# Contributor: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Contributor: fana-m <geminin at gmx.net>
+
+pkgname=freeorion
+pkgver=0.4.1
+pkgrel=5
+pkgdesc='Turn-based galactic conquest game inspired by Master of Orion'
+arch=('x86_64' 'i686')
+url='http://www.freeorion.org/'
+license=('GPL')
+if [ "$CARCH" == "x86_64" ]
+then
+  depends=('lib32-nvidia-cg-toolkit')
+else
+  depends=('nvidia-cg-toolkit')
+fi
+depends=('bullet>=2.81' 'freealut' 'libvorbis' 'python2' 'gigi' 'desktop-file-utils')
+makedepends=('boost>=1.49.0' 'ogre' 'sdl' 'gigi>=0.8.0-12' 'graphviz' 'clang'
+             'desktop-file-utils' 'setconf' 'cmake' 'gendesk' 'subversion'
+             'libogg')
+options=('!strip' '!emptydirs')
+install=$pkgname.install
+source=("$pkgname.sh"
+        "$pkgname.png::https://a.fsdn.com/con/icons/fr/freeorion@sf.net/FO_Icon_256x256.png"
+        "cmake_python.patch")
+sha256sums=('111532e460aec847ff455ee67dd64f46e2fa5ceba39a0349d25a84b69c646eaf'
+            'a6a253eed31b77b00bf4f721f4b1c6bbd95505b9e4b38b736101e551dd12ff5f'
+            '3dbe8df9c3a4a0d6451f42727ebf9bcb21fed41a08d1181d1cf77ef4ab5ee81a')
+_svnrepo='https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk/FreeOrion/'
+_pyversion=2.7
+_revision=5671 #5379
+
+build() {
+  cd "$srcdir"
+  gendesk -n
+
+  # Sometimes the latest revision works, sometimes it's the "release" revision that works.
+  # Sometimes the release tarball works, sometimes not. Sometimes there is a release tarball, sometimes not.
+  # Search for "Arch" in the sf.net/projects/freeorion issue tracker to see a list of past issues.
+
+  #msg2 'Looking up revision from version number...'
+  #_releaserevision=`curl --progress-bar -o- ${url}index.php/Compile | grep "$pkgver" | cut -d':' -f2 | cut -d' ' -f10 | tail -1`
+  #msg2 "The revision for the latest official release is $_releaserevision"
+  ## _revision=$_releaserevision
+
+  msg2 "Compiling with revision $_revision"
+
+  msg2 "Checking out svn revision $_revision..."
+  if [[ -d "$pkgname/.svn" ]]; then
+    (cd "$pkgname" && svn up -r "$_revision")
+  else
+    svn co "$_svnrepo" --config-dir ./ -r "$_revision" "$pkgname"
+  fi
+
+  msg2 "Setting up build directory..."
+  rm -rf "$srcdir/$pkgname-build"
+  cp -r "$srcdir/$pkgname" "$srcdir/$pkgname-build"
+  cd "$srcdir/$pkgname-build"
+
+  msg2 "CMake/Python fix..."
+  patch -N -p1 -i "$srcdir/cmake_python.patch"
+
+  msg2 "Generating makefiles..."
+  cmake \
+    -DPYTHON_INCLUDE_DIR:PATH="/usr/include/python$_pyversion" \
+    -DPYTHON_LIBRARY:FILEPATH="/usr/lib/libpython$_pyversion.so" \
+    -G "Unix Makefiles"
+  
+  msg2 "GLU fix..."
+  setconf CMakeCache.txt CMAKE_CXX_FLAGS:STRING \
+    "'-march=x86-64 -mtune=generic -O2 -fno-var-tracking -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -lGL -lGLU '"
+
+  #msg2 "Boost fix..."
+  #sed -i 's:TIME_UTC:TIME_UTC_:' util/MultiplayerCommon.cpp
+  
+  msg2 "Compiling..."
+  make -j1
+
+  msg2 "OGRE fix..."
+  sed -i 's:PluginFolder=.:PluginFolder=/usr/lib/OGRE/:g' \
+    "$srcdir/$pkgname-build/ogre_plugins.cfg"
+}
+
+package() {
+  cd "$srcdir/$pkgname-build"
+
+  msg2 "Packaging documentation..."
+  install -Dm644 loki_setup/README.txt \
+    "$pkgdir/usr/share/doc/$pkgname/README.txt"
+
+  msg2 "Packaging binaries..."
+  install -Dm 755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/freeorion"
+  install -Dm 755 freeorion "$pkgdir/usr/bin/freeorion.elf"
+  install -Dm 755 freeorionca "$pkgdir/usr/bin/freeorionca"
+  install -Dm 755 freeoriond "$pkgdir/usr/bin/freeoriond"
+
+  msg2 "Packaging data..."
+  mkdir -p "$pkgdir/usr/share/$pkgname" "$pkgdir/usr/lib/$pkgname"
+  cp -r default "$pkgdir/usr/share/$pkgname"
+  install -Dm 644 OISInput.cfg "$pkgdir/usr/share/OISInput.cfg"
+
+  msg2 "Packaging license..."
+  install -Dm 644 default/COPYING \
+    "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+
+  cd "$srcdir"
+
+  msg2 "Packaging icon and shortcut..."
+  install -Dm 644 "$pkgname.png" \
+    "$pkgdir/usr/share/pixmaps/freeorion.png"
+  install -Dm 644 "$pkgname.desktop" \
+    "$pkgdir/usr/share/applications/freeorion.desktop"
+
+  msg2 "Packaging OGRE plugins configuration..."
+  install -Dm 644 "$srcdir/$pkgname-build/ogre_plugins.cfg" \
+    "$pkgdir/usr/share/freeorion/ogre_plugins.cfg"
+
+  msg2 "Cleaning up..."
+  find "$pkgdir" -name ".svn" -print0 | xargs -0 rm -rf
+}
+
+# vim:set ts=2 sw=2 et:

Copied: freeorion/repos/community-staging-x86_64/cmake_python.patch (from rev 82761, freeorion/trunk/cmake_python.patch)
===================================================================
--- community-staging-x86_64/cmake_python.patch	                        (rev 0)
+++ community-staging-x86_64/cmake_python.patch	2013-01-24 00:02:05 UTC (rev 82762)
@@ -0,0 +1,23 @@
+--- a/client/AI/CMakeLists.txt	2012-09-10 00:11:18.659341865 +0200
++++ b/client/AI/CMakeLists.txt	2012-09-10 00:12:37.659345189 +0200
+@@ -33,6 +33,20 @@
+ find_package(PythonLibs)
+ if (PYTHONLIBS_FOUND)
+     include_directories(${PYTHON_INCLUDE_PATH})
++    SET(_VERSION_REGEX
++      "^#define[ \t]+PY([A-Z_]*_VERSION)[ \t]+[\"]*([0-9A-Za-z\\.]+)[\"]*[ \t]*$")
++    FILE(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" _VERSION_STRINGS
++       LIMIT_COUNT 10 REGEX ${_VERSION_REGEX})
++    FOREACH(_VERSION_STRING ${_VERSION_STRINGS})
++        STRING(REGEX REPLACE ${_VERSION_REGEX} "PYTHON\\1"
++           _VERSION_VARIABLE "${_VERSION_STRING}")
++        STRING(REGEX REPLACE ${_VERSION_REGEX} "\\2"
++           _VERSION_NUMBER "${_VERSION_STRING}")
++        SET(${_VERSION_VARIABLE} ${_VERSION_NUMBER})
++    ENDFOREACH(_VERSION_STRING ${_VERSION_STRINGS})
++    IF(PYTHON_MAJOR_VERSION EQUAL 3)
++        MESSAGE(FATAL_ERROR "Python 3 is not supported!")
++    ENDIF()
+ else ()
+     message(FATAL_ERROR " library not found.")
+ endif ()

Copied: freeorion/repos/community-staging-x86_64/freeorion.install (from rev 82761, freeorion/trunk/freeorion.install)
===================================================================
--- community-staging-x86_64/freeorion.install	                        (rev 0)
+++ community-staging-x86_64/freeorion.install	2013-01-24 00:02:05 UTC (rev 82762)
@@ -0,0 +1,13 @@
+post_upgrade() {
+  update-desktop-database -q
+}
+
+post_install() {
+  post_upgrade
+}
+
+post_remove() {
+  post_upgrade
+}
+
+# vim:set ts=2 sw=2 et:

Copied: freeorion/repos/community-staging-x86_64/freeorion.sh (from rev 82761, freeorion/trunk/freeorion.sh)
===================================================================
--- community-staging-x86_64/freeorion.sh	                        (rev 0)
+++ community-staging-x86_64/freeorion.sh	2013-01-24 00:02:05 UTC (rev 82762)
@@ -0,0 +1,143 @@
+#!/bin/sh
+#
+# written by Markus Sinner, http://psitronic.de
+#
+# Nightly builds on.
+# http://freeorion.psitronic.de/download/nightly/
+#
+# This is a wrapper-script for starting FreeOrion on
+# ix86 (and maybe x64) Linux Systems.
+# This script will CD into application and set some
+# enviroment variables.
+
+# ---- commandline PARAMETERS and ENVIROMENT variables -----
+# This script supports parameters, that will be evaluated
+# BEFORE freeorion binary is called and will be removed, 
+# because the binary won't support them.
+# Currently only one parameter at a time is supported!
+# Parameters other than these will be appended as command
+# line parameters to the call of the freeorion binary.
+#
+# --strace
+#   This starts freeorion using the "strace" utility. 
+#   Generates a strace logifle /tmp/freeorion.trace.
+#   Make sure it is installed on your system!
+# --gdb
+#   Runs freeorion in a gdb instance, passes the original
+#   parameters through the --args parameter of gdb
+#
+#
+# ENVIROMENT variables
+# This script supports some enviroment variables. To set them
+# either use the followin command BEFORE you execute this script.
+#    export XXXX="value"
+# This permanently set the variable in you current shell script.
+# Or you prepend the options when running this script, like this:
+#    PARAM1="hello" PARAM2="yo man" /usr/bin/freeorion.elf
+#
+# Supportet are:
+#   FO_TRACE=
+#      Use this to prepend something to calling freorion.
+#      This variables also is used internally, when --gdb or --trace
+#      appear on the command line.
+#   FO_GDB_ARGS=
+#      If you use --gbd, you should uses this env to add GDB parameters.
+#      Make sure you end this list of parameters with --args, otherwise
+#      gdb won't start. Example: FO_GDB_ARGS="-q -s fo.symbols --args"
+#   LD_LIBRARY_PATH=
+#      This is a well known env and will be honored by this script.
+#
+
+
+# ---------- STARTS HERE ---------------
+# Change into application directory
+# If this is a symlink, then we
+# need to change into the dir of symlink-target.
+if [ -h $0 ]; then
+  echo "I am Symlink. Following into my targets basedir"
+  ME=`readlink $0`
+else
+  echo "Following into my basedir"
+  ME=$0
+fi
+
+# This is important! Script won't work outside its installation dir
+ROOT=/usr/share/freeorion
+cd ${ROOT}
+echo -n "CWD: "
+pwd
+
+
+
+# Check for python. If freeorionca binary is missing it, use
+# the shipped version.
+if ldd /usr/bin/freeorionca | grep "libpython.*not found"; then
+    #echo "python2.5 missing. Using shipped version."
+    PYTHON_USE_SHIPPED=1
+else 
+    #echo "python2.5 found. Using it."
+    PYTHON_USE_SHIPPED=0
+fi
+
+# Set Python library home for loading modules
+# If no python 2.5 is detected, use shipped python 2.5
+if [ "$PYTHON_USE_SHIPPED" = "1" ]; then
+    export PYTHONHOME=/usr/lib/freeorion/python2.5
+    export PYTHONPATH=${PYTHONHOME}
+    export PYTHONDEBUG=1
+    export PYTHONVERBOSE=1
+    echo "PYTHONHOME=${PYTHONHOME}"
+    
+    export LD_LIBRARY_PATH=${PYTHONHOME}:${LD_LIBRARY_PATH}
+    export LD_PRELOAD=${PYTHONHOME}/libutil.so.1:${PYTHONHOME}/libpython2.5.so
+fi
+
+
+# Command line Parameter --gdb forces running in gdb
+# Setting FO_TRACE to gdb results in other settings, see
+# below
+if [ "$1" = "--gdb" ]; then
+    FO_TRACE="gdb"
+
+    # Don't forget to remove the param
+    shift
+fi
+
+if [ "$1" = "--strace" ]; then
+    TRACEFILE=/tmp/freeorion.trace
+    echo
+    echo "Tracing to ${TRACEFILE}"
+    echo
+    FO_TRACE="strace -f -o ${TRACEFILE}"
+
+    # Don't forget to remove the param
+    shift
+fi
+
+
+
+# Add a parameter FO_GDB_ARGS to support gdb
+# Or warn the user, if he changed FO_GDB_ARGS and has
+# forgotten to end it with --args
+if [ "$FO_TRACE" = "gdb" ]; then
+    if [ "$FO_GDB_ARGS" = "" ]; then
+	FO_GDB_ARGS="--args"
+    else
+	echo "****************************************************"
+	echo "** NOTE         NOTE         NOTE         NOTE    **"
+	echo "Running FO in gdb"
+	echo "If you use FO_GDB_ARGS on your command line, make"
+	echo "sure that you END this variabble with --args."
+	echo "Otherwise gdb will not start."
+	echo
+	echo "Type 'start' when the gdb instance has loaded!"
+	echo	
+    fi
+fi
+
+
+# Support loading libs from application/lib
+export LD_LIBRARY_PATH=./lib:${LD_LIBRARY_PATH}
+
+# Call with settings-dir to avoid conflicting installations
+${FO_TRACE} ${FO_GDB_ARGS} /usr/bin/freeorion.elf  --resource-dir ./default $@




More information about the arch-commits mailing list