New package: blobby2-1.0

This commit is contained in:
selfsigned 2019-12-27 17:06:51 +01:00 committed by Daniel Kolesa
parent 9edce2f06b
commit 591ff2cd75
9 changed files with 382 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=Blobby Volley
Exec=blobby
Icon=blobby
Categories=Game;ArcadeGame
Terminal=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -0,0 +1,20 @@
Description: Use SDL by default since it's faster without hardware acceleration
Author: Felix Geyer <fgeyer@debian.org>
---
src/main.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -212,8 +212,8 @@ int main(int argc, char* argv[])
else
{
std::cerr << "Warning: Unknown renderer selected!";
- std::cerr << "Falling back to OpenGL" << std::endl;
- rmanager = RenderManager::createRenderManagerGL2D();
+ std::cerr << "Falling back to SDL" << std::endl;
+ rmanager = RenderManager::createRenderManagerSDL();
}
#else
#if MAC_OS_X

View File

@ -0,0 +1,60 @@
Description: Use system lua library instead of building a local copy
Author: Felix Geyer <fgeyer@debian.org>
---
src/CMakeLists.txt | 5 ++---
src/GameLogic.cpp | 6 +++---
src/ScriptedInputSource.cpp | 6 +++---
3 files changed, 8 insertions(+), 9 deletions(-)
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,3 @@
-add_subdirectory(lua)
add_subdirectory(tinyxml)
ADD_DEFINITIONS(-std=c++11)
add_subdirectory(raknet)
@@ -101,11 +101,11 @@ else (CMAKE_SYSTEM_NAME STREQUAL Windows)
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
add_executable(blobby ${blobby_SRC})
-target_link_libraries(blobby lua raknet blobnet tinyxml ${RAKNET_LIBRARIES} ${PHYSFS_LIBRARY} ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES} pthread)
+target_link_libraries(blobby lua5.2 raknet blobnet tinyxml ${RAKNET_LIBRARIES} ${PHYSFS_LIBRARY} ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES} pthread)
if (UNIX)
add_executable(blobby-server ${blobby-server_SRC})
- target_link_libraries(blobby-server lua raknet blobnet tinyxml ${RAKNET_LIBRARIES} ${PHYSFS_LIBRARY} ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(blobby-server lua5.2 raknet blobnet tinyxml ${RAKNET_LIBRARIES} ${PHYSFS_LIBRARY} ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif (UNIX)
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
--- a/src/ScriptedInputSource.cpp
+++ b/src/ScriptedInputSource.cpp
@@ -30,9 +30,9 @@ Foundation, Inc., 59 Temple Place, Suite
extern "C"
{
-#include "lua/lua.h"
-#include "lua/lauxlib.h"
-#include "lua/lualib.h"
+#include <lua5.2/lua.h>
+#include <lua5.2/lauxlib.h>
+#include <lua5.2/lualib.h>
}
#include "DuelMatch.h"
--- a/src/GameLogic.cpp
+++ b/src/GameLogic.cpp
@@ -28,9 +28,9 @@ Foundation, Inc., 59 Temple Place, Suite
extern "C"
{
-#include "lua/lua.h"
-#include "lua/lauxlib.h"
-#include "lua/lualib.h"
+#include <lua5.2/lua.h>
+#include <lua5.2/lauxlib.h>
+#include <lua5.2/lualib.h>
}
#include "FileRead.h"

View File

@ -0,0 +1,74 @@
Description: Use system tinyxml library instead of building a local copy
Author: Felix Geyer <fgeyer@debian.org>
---
src/CMakeLists.txt | 1 -
src/FileRead.cpp | 2 +-
src/ReplayRecorder.cpp | 2 +-
src/TextManager.cpp | 2 +-
src/UserConfig.cpp | 2 +-
src/state/NetworkSearchState.cpp | 2 +-
6 files changed, 5 insertions(+), 6 deletions(-)
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,3 @@
-add_subdirectory(tinyxml)
ADD_DEFINITIONS(-std=c++11)
add_subdirectory(raknet)
add_subdirectory(blobnet)
--- a/src/FileRead.cpp
+++ b/src/FileRead.cpp
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite
#include <boost/scoped_array.hpp>
#include <boost/algorithm/string.hpp>
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
extern "C"
{
--- a/src/ReplayRecorder.cpp
+++ b/src/ReplayRecorder.cpp
@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite
#include <boost/crc.hpp>
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#include "raknet/BitStream.h"
--- a/src/TextManager.cpp
+++ b/src/TextManager.cpp
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite
#include <algorithm>
#include <set>
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#include "Global.h"
#include "FileRead.h"
--- a/src/UserConfig.cpp
+++ b/src/UserConfig.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite
#include <boost/make_shared.hpp>
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#include "Global.h"
#include "FileRead.h"
--- a/src/state/NetworkSearchState.cpp
+++ b/src/state/NetworkSearchState.cpp
@@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite
#include "blobnet/layer/Http.hpp"
#include "blobnet/exception/HttpException.hpp"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#include "NetworkState.h"
#include "LobbyState.h"

View File

@ -0,0 +1,17 @@
Description: Append CXXFLAGS instead of overwriting them.
Otherwise the dpkg-buildflags are ignored.
Author: Felix Geyer <fgeyer@debian.org>
--- blobby-1.0~rc4.orig/src/CMakeLists.txt
+++ blobby-1.0~rc4/src/CMakeLists.txt
@@ -3,8 +3,8 @@ add_subdirectory(raknet)
add_subdirectory(blobnet)
add_definitions(-DTIXML_USE_STL)
-set(CMAKE_CXX_FLAGS "-std=c++11")
-set(CMAKE_CXX_FLAGS "-Wall")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
include_directories(.)
set(common_SRC

View File

@ -0,0 +1,170 @@
Description: Cherry-pick upstream commits 1528, 1530 and 1531.
Origin: upstream
Index: src/main.cpp
===================================================================
--- a/src/main.cpp (revision 1529)
+++ b/src/main.cpp (revision 1531)
@@ -26,16 +26,16 @@
#include <SDL2/SDL.h>
-#ifndef __APPLE__
-#ifndef __ANDROID__
-#include "config.h"
-#endif
-#endif
+#include "Global.h"
#ifdef __APPLE__
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
#include <physfs.h>
- #else
+ #endif
+#endif
+
+#if __DESKTOP__
+ #ifndef WIN32
#include "config.h"
#endif
#endif
@@ -99,14 +99,6 @@
#if defined(WIN32)
// Just write in installation directory
fs.setWriteDir("data");
-
- // handle the case when it is installed
- fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby");
- fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/gfx.zip");
- fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/sounds.zip");
- fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/scripts.zip");
- fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/backgrounds.zip");
- fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/rules.zip");
#else
#ifndef __ANDROID__
// Create a search path in the home directory and ensure that
@@ -118,7 +110,16 @@
std::string userdir = fs.getUserDir();
#endif
#else
+ // Linux
std::string userdir = fs.getUserDir();
+
+ // handle the case when it is installed
+ fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby");
+ fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/gfx.zip");
+ fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/sounds.zip");
+ fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/scripts.zip");
+ fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/backgrounds.zip");
+ fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/rules.zip");
#endif
std::string userAppend = ".blobby";
std::string homedir = userdir + userAppend;
Index: src/server/servermain.cpp
===================================================================
--- a/src/server/servermain.cpp (revision 1529)
+++ b/src/server/servermain.cpp (revision 1531)
@@ -36,6 +36,7 @@
#include "SpeedController.h"
#include "FileSystem.h"
#include "UserConfig.h"
+#include "Global.h"
// platform specific
#ifndef WIN32
@@ -45,8 +46,14 @@
#include <cstdarg>
#endif
+#if __DESKTOP__
+#ifndef WIN32
+#include "config.h"
+#endif
+#endif
+
/* implementation */
#ifdef WIN32
@@ -60,7 +67,7 @@
static bool g_run_in_foreground = false;
static bool g_print_syslog_to_stderr = false;
static bool g_workaround_memleaks = false;
-static std::string g_config_file = "server/server.xml";
+static std::string g_config_file = "server.xml";
static std::string g_rules_file = "";
// ...
@@ -85,8 +92,7 @@
process_arguments(argc, argv);
FileSystem fileSys(argv[0]);
- fileSys.addToSearchPath("data" + fileSys.getDirSeparator() + "rules.zip");
-
+
if (!g_run_in_foreground)
{
fork_to_background();
@@ -312,7 +318,15 @@
void setup_physfs(char* argv0)
{
FileSystem& fs = FileSystem::getSingleton();
+
+ #if __DESKTOP__
+ #ifndef WIN32
+ fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby");
+ fs.addToSearchPath(BLOBBY_INSTALL_PREFIX "/share/blobby/rules.zip");
+ #endif
+ #endif
fs.addToSearchPath("data");
+ fs.addToSearchPath("data" + fs.getDirSeparator() + "rules.zip");
}
Index: data/server/server.xml
===================================================================
--- a/data/server/server.xml (revision 1529)
+++ b/data/server/server.xml (revision 1531)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<userconfig>
- <var name="speed" value="75"/>
- <var name="port" value="1234"/>
- <var name="maximum_clients" value="100" />
- <var name="name" value="Blobby Volley 2 Server"/>
- <var name="description" value="replace this with a description of the server. To do this, edit data/server.xml"/>
- <var name="rules" value="default.lua"/>
-</userconfig>
Index: data/server.xml
===================================================================
--- a/data/server.xml (revision 0)
+++ b/data/server.xml (revision 1531)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<userconfig>
+ <var name="speed" value="75"/>
+ <var name="port" value="1234"/>
+ <var name="maximum_clients" value="100" />
+ <var name="name" value="Blobby Volley 2 Server"/>
+ <var name="description" value="replace this with a description of the server. To do this, edit data/server.xml"/>
+ <var name="rules" value="default.lua"/>
+</userconfig>
Index: data/CMakeLists.txt
===================================================================
--- a/data/CMakeLists.txt (revision 1527)
+++ b/data/CMakeLists.txt (revision 1531)
@@ -24,9 +24,10 @@
${CMAKE_CURRENT_BINARY_DIR}/scripts.zip
${CMAKE_CURRENT_BINARY_DIR}/backgrounds.zip
${CMAKE_CURRENT_BINARY_DIR}/rules.zip
+ Icon.bmp
config.xml
inputconfig.xml
- server/server.xml
+ server.xml
lang_de.xml
lang_en.xml
lang_fr.xml)

View File

@ -0,0 +1,13 @@
Description: added inlude
Origin: upstream, http://sourceforge.net/p/blobby/code/1542/
--- a/src/NetworkMessage.cpp
+++ b/src/NetworkMessage.cpp
@@ -23,6 +23,7 @@
/* includes */
#include <cstring>
+#include <ostream>
#include "UserConfig.h"
#include "SpeedController.h"

21
srcpkgs/blobby2/template Normal file
View File

@ -0,0 +1,21 @@
# Template file for 'blobby2'
pkgname=blobby2
version=1.0
revision=1
wrksrc="blobby-${version}"
build_style=cmake
hostmakedepends="cmake pkg-config zip"
makedepends="boost-devel SDL2-devel physfs-devel tinyxml-devel lua52-devel"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Arcade style volleyball game"
maintainer="selfsigned <selfsigned@protonmail.ch>"
license="GPL-2.0-or-later"
homepage="http://blobbyvolley.de"
distfiles="${SOURCEFORGE_SITE}/blobby/${pkgname}-linux-${version}.tar.gz"
checksum=ba7a049e298aaa2014c1e1ac1faf3b0256b4c66266cd4db06e7939e8695bf5e2
patch_args="-Np1"
post_install() {
vinstall ${FILESDIR}/blobby.desktop 644 usr/share/applications
vinstall ${FILESDIR}/blobby.png 644 usr/share/pixmaps
}