summaryrefslogtreecommitdiff
path: root/community/freeorion
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-09-12 00:03:33 +0000
committerroot <root@rshg054.dnsready.net>2012-09-12 00:03:33 +0000
commitdb1cd10264e7cd2810148efd50ce612288343839 (patch)
tree86a6657c9a3f606e6821f6af65bf2952fe56b6be /community/freeorion
parent870527386e33c72826da94aee783bb212b06c53a (diff)
Wed Sep 12 00:03:32 UTC 2012
Diffstat (limited to 'community/freeorion')
-rw-r--r--community/freeorion/PKGBUILD43
-rw-r--r--community/freeorion/cmake_python.patch23
2 files changed, 50 insertions, 16 deletions
diff --git a/community/freeorion/PKGBUILD b/community/freeorion/PKGBUILD
index ffb155e59..f79d9cd07 100644
--- a/community/freeorion/PKGBUILD
+++ b/community/freeorion/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 73989 2012-07-18 01:06:32Z ibiru $
+# $Id: PKGBUILD 76059 2012-09-10 08:39:54Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: guini <sidtrun@googlemail.com>
# Contributor: Forrest Loomis <cybercyst _ at _ gmail dot com>
@@ -6,12 +6,11 @@
# Contributor: fana-m <geminin@gmx.net>
pkgname=freeorion
-pkgver=0.4
-_fixedrevision=4635
-pkgrel=6
-pkgdesc="Turn-based galactic conquest game inspired by Master of Orion"
+pkgver=0.4.1
+pkgrel=1
+pkgdesc='Turn-based galactic conquest game inspired by Master of Orion'
arch=('x86_64' 'i686')
-url="http://www.freeorion.org/"
+url='http://www.freeorion.org/'
license=('GPL')
if [ "$CARCH" == "x86_64" ]
then
@@ -20,26 +19,31 @@ else
depends=('nvidia-cg-toolkit')
fi
depends=('bullet' 'freealut' 'libvorbis' 'python2' 'gigi' 'desktop-file-utils')
-makedepends=('boost>=1.49.0' 'ogre' 'sdl' 'gigi>=0.8.0-11' 'graphviz' 'libogg'
- 'desktop-file-utils' 'setconf' 'clang' 'cmake' 'gendesk' 'subversion')
+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")
+ "$pkgname.png::https://a.fsdn.com/con/icons/fr/freeorion@sf.net/FO_Icon_256x256.png"
+ "cmake_python.patch")
sha256sums=('111532e460aec847ff455ee67dd64f46e2fa5ceba39a0349d25a84b69c646eaf'
- 'a6a253eed31b77b00bf4f721f4b1c6bbd95505b9e4b38b736101e551dd12ff5f')
+ 'a6a253eed31b77b00bf4f721f4b1c6bbd95505b9e4b38b736101e551dd12ff5f'
+ '3dbe8df9c3a4a0d6451f42727ebf9bcb21fed41a08d1181d1cf77ef4ab5ee81a')
+_svnrepo='https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk/FreeOrion/'
+_pyversion=2.7
build() {
cd "$srcdir"
gendesk -n
+ msg2 'Looking up revision from version number...'
+ _fixedrevision=`curl --progress-bar -o- ${url}index.php/Compile | grep "$pkgver" | cut -d':' -f2 | cut -d' ' -f10 | tail -1`
msg2 "Checking out svn revision $_fixedrevision..."
if [[ -d "$pkgname/.svn" ]]; then
(cd "$pkgname" && svn up -r "$_fixedrevision")
else
- svn co \
- https://freeorion.svn.sourceforge.net/svnroot/freeorion/trunk/FreeOrion/ \
- --config-dir ./ -r "$_fixedrevision" "$pkgname"
+ svn co "$_svnrepo" --config-dir ./ -r "$_fixedrevision" "$pkgname"
fi
msg2 "Setting up build directory..."
@@ -47,15 +51,22 @@ 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 -G "Unix 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 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -lGL -lGLU '"
+ 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
diff --git a/community/freeorion/cmake_python.patch b/community/freeorion/cmake_python.patch
new file mode 100644
index 000000000..b875fa844
--- /dev/null
+++ b/community/freeorion/cmake_python.patch
@@ -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 ()