diff options
author | jose1711 | 2016-01-09 23:26:18 +0100 |
---|---|---|
committer | jose1711 | 2016-01-09 23:26:18 +0100 |
commit | 1c04deddd3a02b26a49c6b3f562f938340af972d (patch) | |
tree | 54368952ba1f63591eec1b4d702a39d4495c34fa | |
download | aur-1c04deddd3a02b26a49c6b3f562f938340af972d.tar.gz |
adopted from aur3
-rw-r--r-- | .SRCINFO | 38 | ||||
-rw-r--r-- | PKGBUILD | 89 | ||||
-rw-r--r-- | boost.patch | 159 | ||||
-rw-r--r-- | launcher-ded.sh | 4 | ||||
-rw-r--r-- | launcher.sh | 4 | ||||
-rw-r--r-- | multiple_fixes.patch | 129 | ||||
-rw-r--r-- | zero-ballistics.desktop | 10 |
7 files changed, 433 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8153f338609f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,38 @@ +# Generated by mksrcinfo v8 +# Sat Jan 9 22:26:15 UTC 2016 +pkgbase = zero-ballistics + pkgdesc = A unique blend of multiplayer first person shooter and tank combat game + pkgver = 2.0 + pkgrel = 10 + url = http://www.zeroballistics.com/ + arch = i686 + arch = x86_64 + license = GPL + depends = libgl + depends = openscenegraph-2.8 + depends = raknet-3.261 + depends = cegui-0.5 + depends = loki-lib + depends = freealut + depends = tinyxml + depends = ode-011 + depends = libvorbis + depends = boost + depends = sdl + source = http://downloads.sourceforge.net/project/zeroballistics/models/blender_models.zip + source = http://www.zeroballistics.com/public/readme.html + source = launcher.sh + source = launcher-ded.sh + source = zero-ballistics.desktop + source = boost.patch + source = multiple_fixes.patch + md5sums = 85ceb55c221468d2ce5a1d50cc98fd0a + md5sums = d9490617a757ad6c3253d995ba84be57 + md5sums = 3c3be3b2599c2b5b9ae7b68d8bd48234 + md5sums = 24fcd633a625eee14bc84934be6ac5b3 + md5sums = 95c9a541679510597a737b63cbd72c4f + md5sums = 2ac9d41d161b85a6a614f482e8415f54 + md5sums = 93589787bb795af199e7540fff515616 + +pkgname = zero-ballistics + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..400823ff1cf8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,89 @@ +# Maintainer: Jose Riha <jose1711 gmail com> +# Contributor: Jakub Luzny <limoto94@gmail.com> +pkgname=zero-ballistics +pkgver=2.0 +pkgrel=10 +_pgname=zb_20 +pkgdesc='A unique blend of multiplayer first person shooter and tank combat game' +arch=('i686' 'x86_64') +url='http://www.zeroballistics.com/' +license=('GPL') +depends=('libgl' 'openscenegraph-2.8' 'raknet-3.261' 'cegui-0.5' 'loki-lib' 'freealut' 'tinyxml' 'ode-011' 'libvorbis' 'boost' 'sdl') +source=(http://downloads.sourceforge.net/project/zeroballistics/models/blender_models.zip +http://www.zeroballistics.com/public/readme.html +launcher.sh +launcher-ded.sh +zero-ballistics.desktop +boost.patch +multiple_fixes.patch) +md5sums=('85ceb55c221468d2ce5a1d50cc98fd0a' + 'd9490617a757ad6c3253d995ba84be57' + '3c3be3b2599c2b5b9ae7b68d8bd48234' + '24fcd633a625eee14bc84934be6ac5b3' + '95c9a541679510597a737b63cbd72c4f' + '2ac9d41d161b85a6a614f482e8415f54' + '93589787bb795af199e7540fff515616') + +build() { + cd "$srcdir" + msg "Connecting to SVN server...." + + if [[ -d "$pkgname/.svn" ]]; then + (cd "$pkgname" && svn up) + else + svn co "https://zeroballistics.svn.sourceforge.net/svnroot/zeroballistics/tags/v2.0" --config-dir ./ "$pkgname" + fi + + msg "SVN checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$pkgname-build" + cp -r "$srcdir/$pkgname" "$srcdir/$pkgname-build" + cd "$srcdir/$pkgname-build" + + patch -Np1 -i $srcdir/boost.patch + + find . -name CMakeLists.txt -exec sed -i 's/RakNet/raknet/g' '{}' \; + find . -name CMakeLists.txt -exec sed -i 's|/usr/local/include/CEGUI|/usr/include/CEGUI|g' '{}' \; + cd .. + patch -p1 -i $srcdir/multiple_fixes.patch + cd $pkgname-build + + cd code/ + cmake . + make + +} + +package() { + cd $srcdir/$pkgname-build/code/games/tank + + mkdir -p "$pkgdir/opt/$pkgname" + cp -r 'config_client.xml' \ + 'config_common.xml'\ + 'config_server.xml'\ + 'ranking.pub'\ + "$pkgdir/opt/$pkgname" + + cp -r "$srcdir/$pkgname-build/data" "$pkgdir/opt/$pkgname" + + #models + cp -r "$srcdir/data" "$pkgdir/opt/$pkgname" + + #game crashes when connecting without write rights + find "$pkgdir/opt/$pkgname/data/" -type f -exec chmod 666 {} \; + find "$pkgdir/opt/$pkgname/data/" -type d -exec chmod 777 {} \; + + install -Dm 755 'tank' "$pkgdir/opt/$pkgname" + install -Dm 755 'server_ded' "$pkgdir/opt/$pkgname" + + cd "$srcdir" + install -Dm 755 'launcher.sh' "$pkgdir/usr/bin/zero-ballistics" + install -Dm 755 'launcher-ded.sh' "$pkgdir/usr/bin/zero-ballistics-ded" + install -Dm 644 'readme.html' "$pkgdir/usr/share/doc/zero-ballistics/README.html" + install -Dm 644 'zero-ballistics.desktop' "$pkgdir/usr/share/applications/zero-ballistics.desktop" + +} + +#category: games +# vim:set ts=2 sw=2 et: diff --git a/boost.patch b/boost.patch new file mode 100644 index 000000000000..5486801eedc0 --- /dev/null +++ b/boost.patch @@ -0,0 +1,159 @@ +--- ./code/games/tank/src/GUIHostMenu.cpp 2011-11-17 16:09:07.937053377 +0100 ++++ ../../v2.0/./code/games/tank/src/GUIHostMenu.cpp 2011-11-17 15:38:27.210467518 +0100 +@@ -126,11 +126,11 @@ + cur_path /= "objects.xml"; + if (is_regular(cur_path)) + { +- maps.push_back(it->path().leaf()); ++ maps.push_back(it->path().leaf().string()); + } + } + +- } catch (basic_filesystem_error<path> & be) ++ } catch (filesystem_error & be) + { + s_log << Log::error << "Could not retrieve map names in GUIHostMenu\n"; + } +--- ./code/bluebeard/src/Shadow.cpp 2011-11-17 16:09:00.967595771 +0100 ++++ ../../v2.0/./code/bluebeard/src/Shadow.cpp 2011-11-17 15:11:54.584422287 +0100 +@@ -105,9 +105,9 @@ + + } else if (flip_fbo_ == FFS_RENDERED) + { +- osg::Texture::TextureObject * obj = depth_tex_->getTextureObject(s_scene_manager.getOsgState().getContextID()); ++ osg::Texture::Texture::TextureObject * obj = depth_tex_->getTextureObject(s_scene_manager.getOsgState().getContextID()); + +- std::vector<float> tex_data(obj->_width * obj->_height, 0.0f); ++ std::vector<float> tex_data(depth_tex_->getTextureWidth() * depth_tex_->getTextureHeight(), 0.0f); + + obj->bind(); + glGetTexImage(GL_TEXTURE_2D, +--- ./code/bluebeard/src/ObjectParts.cpp 2011-11-17 16:09:00.964262697 +0100 ++++ ../../v2.0/./code/bluebeard/src/ObjectParts.cpp 2011-11-17 14:14:29.902094854 +0100 +@@ -51,7 +51,7 @@ + it != directory_iterator(); + ++it) + { +- std::string name = it->path().leaf(); ++ std::string name = it->path().leaf().string(); + + // only handle xml, not bbm files. + if (name.rfind(".xml") != name.length()-4) continue; +@@ -59,7 +59,7 @@ + // strip .xml suffix + part_names.push_back(cur_full_name + "/" + name.substr(0, name.length()-4)); + } +- } catch (basic_filesystem_error<path> & e) ++ } catch (filesystem_error & e) + { + // directory listing cannot be done, assume single file object + if (!existsFile((MODEL_PATH + "/" + cur_full_name + ".xml").c_str())) continue; +@@ -80,7 +80,7 @@ + it != directory_iterator(); + ++it) + { +- std::string name = it->path().leaf(); ++ std::string name = it->path().leaf().string(); + if (name.rfind(".xml") == name.length()-4) + { + name = name.substr(0,name.length()-4); +@@ -111,7 +111,7 @@ + } + cur_name = cur_name.substr(0, sep_pos); + } +- } catch (basic_filesystem_error<path> & e) ++ } catch (filesystem_error & e) + { + s_log << Log::warning + << "GameLogicServer::getObjectPartNames(" +--- ./code/bluebeard/src/Paths.cpp 2011-11-17 16:09:00.964262697 +0100 ++++ ../../v2.0/./code/bluebeard/src/Paths.cpp 2011-11-17 15:22:09.679903707 +0100 +@@ -82,7 +82,7 @@ + { + data_dir = base_dir / USER_DATA_SUBDIR; + create_directories(data_dir); +- } catch (basic_filesystem_error<path> & ) ++ } catch (filesystem_error & ) + { + Exception e("Could not create user data directory \""); + e << data_dir +--- ./code/bluebeard/src/UserPreferences.cpp 2011-11-17 16:09:00.957596549 +0100 ++++ ../../v2.0/./code/bluebeard/src/UserPreferences.cpp 2011-11-17 15:25:34.370634715 +0100 +@@ -61,7 +61,7 @@ + try
+ {
+ copy_file(path(CONFIG_PATH) / USER_CONFIG_TEMPLATE_FILE, user_config_filepath);
+- } catch(basic_filesystem_error<path> & be) {}
++ } catch(filesystem_error & be) {}
+ #else
+ remove(user_config_filepath);
+ copy_file(path(CONFIG_PATH) / USER_CONFIG_TEMPLATE_FILE, user_config_filepath);
+@@ -74,7 +74,7 @@ +
+ return user_config_filepath.string();
+
+- } catch (basic_filesystem_error<path> & be)
++ } catch (filesystem_error & be)
+ {
+ Exception e("Unable to save user preferences in ");
+ e << user_config_filepath << ".";
+@@ -100,7 +100,7 @@ + user_config_filepath = path(getOrCreateUserDataDir()) / USER_CONFIG_FILE;
+
+ if (!exists(user_config_filepath)) throw Exception("Could not find user settings.");
+- } catch (basic_filesystem_error<path> & be)
++ } catch (filesystem_error & be)
+ {
+ throw Exception("Could not find user settings.");
+ }
+--- ./code/bluebeard/src/PuppetMasterServer.cpp 2011-11-17 16:09:00.944264253 +0100 ++++ ../../v2.0/./code/bluebeard/src/PuppetMasterServer.cpp 2011-11-17 14:59:07.510738210 +0100 +@@ -1052,7 +1052,7 @@ + it != directory_iterator(); + ++it) + { +- std::string name = it->path().leaf(); ++ std::string name = it->path().leaf().string(); + ret.push_back(name); + } + +@@ -1060,7 +1060,7 @@ + + return ret; + +- } catch (basic_filesystem_error<path> & be) ++ } catch (filesystem_error & be) + { + return ret; + } +--- ./code/tools/particleviewer/src/ParticleViewer.cpp 2011-11-17 16:08:51.781643995 +0100 ++++ ../../v2.0/./code/tools/particleviewer/src/ParticleViewer.cpp 2011-11-17 15:47:01.487018110 +0100 +@@ -271,7 +271,7 @@ + it != directory_iterator(); + ++it) + { +- std::string name = it->path().leaf(); ++ std::string name = it->path().leaf().string(); + std::size_t p = name.rfind(".xml"); + if (p != name.length()-4) continue; + +--- ./code/tools/modelviewer/src/ModelViewer.cpp 2011-11-17 16:08:51.671652557 +0100 ++++ ../../v2.0/./code/tools/modelviewer/src/ModelViewer.cpp 2011-11-17 15:49:55.670107212 +0100 +@@ -487,7 +487,7 @@ + // strip model name to plain file name + boost::filesystem::path full_model_name; + full_model_name = args[0]; +- current_model_name_ = full_model_name.leaf(); ++ current_model_name_ = full_model_name.leaf().string(); + current_model_name_ = current_model_name_.substr(0, current_model_name_.rfind(".bbm")); + + current_model_ = ReaderWriterBbm::loadModel(current_model_name_); +@@ -532,7 +532,7 @@ + it != directory_iterator(); + ++it) + { +- std::string name = it->path().leaf(); ++ std::string name = it->path().leaf().string(); + std::size_t p = name.rfind(".bbm"); + if (p != name.length()-4) continue; + diff --git a/launcher-ded.sh b/launcher-ded.sh new file mode 100644 index 000000000000..91710fa3285d --- /dev/null +++ b/launcher-ded.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd '/opt/zero-ballistics/' + +./server_ded diff --git a/launcher.sh b/launcher.sh new file mode 100644 index 000000000000..71226189db19 --- /dev/null +++ b/launcher.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd '/opt/zero-ballistics/' + +./tank diff --git a/multiple_fixes.patch b/multiple_fixes.patch new file mode 100644 index 000000000000..993504f0229c --- /dev/null +++ b/multiple_fixes.patch @@ -0,0 +1,129 @@ +Only in src.orig/zero-ballistics-build/code/bluebeard: CMakeFiles +Only in src.orig/zero-ballistics-build/code/bluebeard: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/bluebeard: libbluebeard.a +Only in src.orig/zero-ballistics-build/code/bluebeard: Makefile +Only in src.orig/zero-ballistics-build/code: CMakeCache.txt +Only in src.orig/zero-ballistics-build/code: CMakeFiles +Only in src.orig/zero-ballistics-build/code: cmake_install.cmake +diff -aur -x '*.o' -x '*.db' src/zero-ballistics-build/code/CMakeLists.txt src.orig/zero-ballistics-build/code/CMakeLists.txt +--- src/zero-ballistics-build/code/CMakeLists.txt 2016-01-04 22:24:45.053655107 +0100 ++++ src.orig/zero-ballistics-build/code/CMakeLists.txt 2016-01-04 15:54:16.132015890 +0100 +@@ -5,6 +5,7 @@ + + + ++set (CMAKE_CXX_FLAGS "-fpermissive") + option(ENABLE_GCC_PROFILING "Enable -pg profiling(release only)" OFF) + option(ENABLE_DEV_FEATURES "Enable development features" ON) + option(NO_ZLIB "zlib / gzstream dependence" OFF) +Only in src.orig/zero-ballistics-build/code/games/tank: CMakeFiles +Only in src.orig/zero-ballistics-build/code/games/tank: cmake_install.cmake +diff -aur -x '*.o' -x '*.db' src/zero-ballistics-build/code/games/tank/CMakeLists.txt src.orig/zero-ballistics-build/code/games/tank/CMakeLists.txt +--- src/zero-ballistics-build/code/games/tank/CMakeLists.txt 2016-01-04 22:24:45.050321797 +0100 ++++ src.orig/zero-ballistics-build/code/games/tank/CMakeLists.txt 2016-01-04 22:07:28.937186596 +0100 +@@ -14,6 +14,12 @@ + CEGUIBase CEGUIOpenGLRenderer + + boost_filesystem ++ ++boost_system ++ ++pcre ++ ++OpenThreads + ) + + +@@ -38,6 +44,8 @@ + + boost_filesystem + ++boost_system ++ + pcre + ) + +Only in src.orig/zero-ballistics-build/code/games/tank: Makefile +Only in src.orig/zero-ballistics-build/code/games/tank: server_ded +Only in src.orig/zero-ballistics-build/code/games/tank: tank +Only in src.orig/zero-ballistics-build/code/libs/bbmloader: CMakeFiles +Only in src.orig/zero-ballistics-build/code/libs/bbmloader: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/libs/bbmloader: libbbmloader.a +Only in src.orig/zero-ballistics-build/code/libs/bbmloader: Makefile +Only in src.orig/zero-ballistics-build/code/libs/gzstream: CMakeFiles +Only in src.orig/zero-ballistics-build/code/libs/gzstream: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/libs/gzstream: libgzstream.a +Only in src.orig/zero-ballistics-build/code/libs/gzstream: Makefile +Only in src.orig/zero-ballistics-build/code/libs/master: CMakeFiles +Only in src.orig/zero-ballistics-build/code/libs/master: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/libs/master: libmaster.a +Only in src.orig/zero-ballistics-build/code/libs/master: Makefile +Only in src.orig/zero-ballistics-build/code/libs/network: CMakeFiles +Only in src.orig/zero-ballistics-build/code/libs/network: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/libs/network: libnetwork.a +Only in src.orig/zero-ballistics-build/code/libs/network: Makefile +Only in src.orig/zero-ballistics-build/code/libs/ranking: CMakeFiles +Only in src.orig/zero-ballistics-build/code/libs/ranking: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/libs/ranking: libranking.a +Only in src.orig/zero-ballistics-build/code/libs/ranking: Makefile +Only in src.orig/zero-ballistics-build/code/libs/toolbox: CMakeFiles +Only in src.orig/zero-ballistics-build/code/libs/toolbox: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/libs/toolbox: libtoolbox.a +Only in src.orig/zero-ballistics-build/code/libs/toolbox: Makefile +diff -aur -x '*.o' -x '*.db' src/zero-ballistics-build/code/libs/toolbox/src/utility_Math.cpp src.orig/zero-ballistics-build/code/libs/toolbox/src/utility_Math.cpp +--- src/zero-ballistics-build/code/libs/toolbox/src/utility_Math.cpp 2016-01-04 22:24:44.676990995 +0100 ++++ src.orig/zero-ballistics-build/code/libs/toolbox/src/utility_Math.cpp 2016-01-04 15:57:11.643235754 +0100 +@@ -5,6 +5,7 @@ + + #include <iostream> + #include <fcntl.h> ++#include <unistd.h> + + + #include "Exception.h" +Only in src.orig/zero-ballistics-build/code: Makefile +Only in src.orig/zero-ballistics-build/code/tools/autopatcher_client: CMakeFiles +Only in src.orig/zero-ballistics-build/code/tools/autopatcher_client: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/tools/autopatcher_client: Makefile +Only in src.orig/zero-ballistics-build/code/tools/autopatcher_server: CMakeFiles +Only in src.orig/zero-ballistics-build/code/tools/autopatcher_server: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/tools/autopatcher_server: Makefile +Only in src.orig/zero-ballistics-build/code/tools/master_server: CMakeFiles +Only in src.orig/zero-ballistics-build/code/tools/master_server: cmake_install.cmake +Only in src.orig/zero-ballistics-build/code/tools/master_server: Makefile +Only in src.orig/zero-ballistics-build/code/tools/modelviewer: CMakeFiles +Only in src.orig/zero-ballistics-build/code/tools/modelviewer: cmake_install.cmake +diff -aur -x '*.o' -x '*.db' src/zero-ballistics-build/code/tools/modelviewer/CMakeLists.txt src.orig/zero-ballistics-build/code/tools/modelviewer/CMakeLists.txt +--- src/zero-ballistics-build/code/tools/modelviewer/CMakeLists.txt 2016-01-04 22:24:45.030321932 +0100 ++++ src.orig/zero-ballistics-build/code/tools/modelviewer/CMakeLists.txt 2016-01-04 22:10:10.749453784 +0100 +@@ -11,6 +11,10 @@ + CEGUIBase CEGUIOpenGLRenderer + + boost_filesystem ++ ++boost_system ++ ++OpenThreads + ) + + if (ENABLE_DEV_FEATURES) +Only in src.orig/zero-ballistics-build/code/tools/modelviewer: Makefile +Only in src.orig/zero-ballistics-build/code/tools/modelviewer: model_viewer +Only in src.orig/zero-ballistics-build/code/tools/particleviewer: CMakeFiles +Only in src.orig/zero-ballistics-build/code/tools/particleviewer: cmake_install.cmake +diff -aur -x '*.o' -x '*.db' src/zero-ballistics-build/code/tools/particleviewer/CMakeLists.txt src.orig/zero-ballistics-build/code/tools/particleviewer/CMakeLists.txt +--- src/zero-ballistics-build/code/tools/particleviewer/CMakeLists.txt 2016-01-04 22:24:45.043655175 +0100 ++++ src.orig/zero-ballistics-build/code/tools/particleviewer/CMakeLists.txt 2016-01-04 22:10:56.019155572 +0100 +@@ -11,6 +11,10 @@ + CEGUIBase CEGUIOpenGLRenderer + + boost_filesystem ++ ++boost_system ++ ++OpenThreads + ) + + if (ENABLE_DEV_FEATURES) +Only in src.orig/zero-ballistics-build/code/tools/particleviewer: Makefile +Only in src.orig/zero-ballistics-build/code/tools/particleviewer: particle_viewer diff --git a/zero-ballistics.desktop b/zero-ballistics.desktop new file mode 100644 index 000000000000..23d1329ecb4f --- /dev/null +++ b/zero-ballistics.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Exec=/usr/bin/zero-ballistics +Icon=/opt/zero-ballistics/data/window_icon.bmp +Type=Application +Categories=Game;ActionGame; +Name=Zero Ballistics +Comment=First person shooter and tank combat game +StartupNotify=true +Terminal=false |