diff --git a/srcpkgs/blobby2/files/blobby.desktop b/srcpkgs/blobby2/files/blobby.desktop new file mode 100644 index 00000000000..1c547d36594 --- /dev/null +++ b/srcpkgs/blobby2/files/blobby.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Blobby Volley +Exec=blobby +Icon=blobby +Categories=Game;ArcadeGame +Terminal=false diff --git a/srcpkgs/blobby2/files/blobby.png b/srcpkgs/blobby2/files/blobby.png new file mode 100644 index 00000000000..cb707faf63b Binary files /dev/null and b/srcpkgs/blobby2/files/blobby.png differ diff --git a/srcpkgs/blobby2/patches/01_sdl_default.patch b/srcpkgs/blobby2/patches/01_sdl_default.patch new file mode 100644 index 00000000000..e2d0943d7de --- /dev/null +++ b/srcpkgs/blobby2/patches/01_sdl_default.patch @@ -0,0 +1,20 @@ +Description: Use SDL by default since it's faster without hardware acceleration +Author: Felix Geyer + +--- + 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 diff --git a/srcpkgs/blobby2/patches/02_use_system_lua.patch b/srcpkgs/blobby2/patches/02_use_system_lua.patch new file mode 100644 index 00000000000..adc679248d3 --- /dev/null +++ b/srcpkgs/blobby2/patches/02_use_system_lua.patch @@ -0,0 +1,60 @@ +Description: Use system lua library instead of building a local copy +Author: Felix Geyer + +--- + 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 ++#include ++#include + } + + #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 ++#include ++#include + } + + #include "FileRead.h" diff --git a/srcpkgs/blobby2/patches/04_use_system_tinyxml.patch b/srcpkgs/blobby2/patches/04_use_system_tinyxml.patch new file mode 100644 index 00000000000..cf49bafcd2b --- /dev/null +++ b/srcpkgs/blobby2/patches/04_use_system_tinyxml.patch @@ -0,0 +1,74 @@ +Description: Use system tinyxml library instead of building a local copy +Author: Felix Geyer + +--- + 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 + #include + +-#include "tinyxml/tinyxml.h" ++#include + + extern "C" + { +--- a/src/ReplayRecorder.cpp ++++ b/src/ReplayRecorder.cpp +@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite + + #include + +-#include "tinyxml/tinyxml.h" ++#include + + #include "raknet/BitStream.h" + +--- a/src/TextManager.cpp ++++ b/src/TextManager.cpp +@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place, Suite + #include + #include + +-#include "tinyxml/tinyxml.h" ++#include + + #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 + +-#include "tinyxml/tinyxml.h" ++#include + + #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 + + #include "NetworkState.h" + #include "LobbyState.h" diff --git a/srcpkgs/blobby2/patches/07_cxxflags_append.patch.1 b/srcpkgs/blobby2/patches/07_cxxflags_append.patch.1 new file mode 100644 index 00000000000..445cc3eaa9c --- /dev/null +++ b/srcpkgs/blobby2/patches/07_cxxflags_append.patch.1 @@ -0,0 +1,17 @@ +Description: Append CXXFLAGS instead of overwriting them. + Otherwise the dpkg-buildflags are ignored. +Author: Felix Geyer + +--- 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 diff --git a/srcpkgs/blobby2/patches/08_config_loading.patch b/srcpkgs/blobby2/patches/08_config_loading.patch new file mode 100644 index 00000000000..e8f35481432 --- /dev/null +++ b/srcpkgs/blobby2/patches/08_config_loading.patch @@ -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 + +-#ifndef __APPLE__ +-#ifndef __ANDROID__ +-#include "config.h" +-#endif +-#endif ++#include "Global.h" + + #ifdef __APPLE__ + #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR + #include +- #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 + #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 @@ +- +- +- +- +- +- +- +- +- +- +Index: data/server.xml +=================================================================== +--- a/data/server.xml (revision 0) ++++ b/data/server.xml (revision 1531) +@@ -0,0 +1,10 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +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) diff --git a/srcpkgs/blobby2/patches/10_ostream_include.patch b/srcpkgs/blobby2/patches/10_ostream_include.patch new file mode 100644 index 00000000000..cccd77e8fb2 --- /dev/null +++ b/srcpkgs/blobby2/patches/10_ostream_include.patch @@ -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 ++#include + + #include "UserConfig.h" + #include "SpeedController.h" diff --git a/srcpkgs/blobby2/template b/srcpkgs/blobby2/template new file mode 100644 index 00000000000..ad004607868 --- /dev/null +++ b/srcpkgs/blobby2/template @@ -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 " +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 +}