mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 15:08:57 +02:00
plee-the-bear: add WIP recipe for 0.7.1.
it builds, but the binary exits after starting mesa. note that it uses a version of the bear engine before it switches to gles2 (which we don't support).
This commit is contained in:
153
games-arcade/plee_the_bear/patches/bear-0.7.1.patchset
Normal file
153
games-arcade/plee_the_bear/patches/bear-0.7.1.patchset
Normal file
@@ -0,0 +1,153 @@
|
||||
From e03012cec6e22a0375d20f80cb1e07873087847b Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 6 Apr 2014 14:54:36 +0200
|
||||
Subject: Fix search paths for SDL2 header files.
|
||||
|
||||
|
||||
diff --git a/cmake-helper/FindSDL2.cmake b/cmake-helper/FindSDL2.cmake
|
||||
index 7665a55..bcd3050 100644
|
||||
--- a/cmake-helper/FindSDL2.cmake
|
||||
+++ b/cmake-helper/FindSDL2.cmake
|
||||
@@ -70,7 +70,7 @@
|
||||
find_path(SDL2_INCLUDE_DIR SDL.h
|
||||
HINTS
|
||||
ENV SDL2DIR
|
||||
- PATH_SUFFIXES include/SDL2 include
|
||||
+ PATH_SUFFIXES include/SDL2 include SDL2
|
||||
)
|
||||
|
||||
# SDL2-1.1 is the name used by FreeBSD ports...
|
||||
diff --git a/cmake-helper/FindSDL2_mixer.cmake b/cmake-helper/FindSDL2_mixer.cmake
|
||||
index 59ed911..d795965 100644
|
||||
--- a/cmake-helper/FindSDL2_mixer.cmake
|
||||
+++ b/cmake-helper/FindSDL2_mixer.cmake
|
||||
@@ -40,7 +40,7 @@ find_path(SDL2_MIXER_INCLUDE_DIR SDL_mixer.h
|
||||
HINTS
|
||||
ENV SDL2MIXERDIR
|
||||
ENV SDL2DIR
|
||||
- PATH_SUFFIXES include/SDL2 include
|
||||
+ PATH_SUFFIXES include/SDL2 include SDL2
|
||||
)
|
||||
|
||||
if(NOT SDL2_MIXER_LIBRARY AND SDL2MIXER_LIBRARY)
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
||||
From 285b9389a0d384a334962dd103aa3142076b4d2f Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 6 Apr 2014 17:02:35 +0200
|
||||
Subject: Link libintl on haiku.
|
||||
|
||||
|
||||
diff --git a/bear-engine/running_bear/CMakeLists.txt b/bear-engine/running_bear/CMakeLists.txt
|
||||
index 8b04d89..4fffd94 100644
|
||||
--- a/bear-engine/running_bear/CMakeLists.txt
|
||||
+++ b/bear-engine/running_bear/CMakeLists.txt
|
||||
@@ -38,7 +38,7 @@ set(
|
||||
${CLAW_APPLICATION_LIBRARIES}
|
||||
)
|
||||
|
||||
-if(WIN32)
|
||||
+if(WIN32 OR HAIKU)
|
||||
set(
|
||||
RUNNING_BEAR_LINK_LIBRARIES
|
||||
${RUNNING_BEAR_LINK_LIBRARIES}
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
||||
From 2b770fa4526c725034de15705eb8acc08d8fb85d Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 6 Apr 2014 19:41:58 +0200
|
||||
Subject: Fix install directories.
|
||||
|
||||
|
||||
diff --git a/cmake-helper/bear-config.cmake b/cmake-helper/bear-config.cmake
|
||||
index e66d79e..b483445 100644
|
||||
--- a/cmake-helper/bear-config.cmake
|
||||
+++ b/cmake-helper/bear-config.cmake
|
||||
@@ -47,7 +47,7 @@ if( NOT BEAR_ENGINE_INSTALL_LIBRARY_DIR )
|
||||
"${BEAR_ENGINE_INSTALL_EXECUTABLE_DIR}"
|
||||
)
|
||||
else( WIN32 )
|
||||
- set( BEAR_ENGINE_INSTALL_LIBRARY_DIR lib )
|
||||
+ set( BEAR_ENGINE_INSTALL_LIBRARY_DIR lib${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR} )
|
||||
endif( WIN32 )
|
||||
endif( NOT BEAR_ENGINE_INSTALL_LIBRARY_DIR )
|
||||
|
||||
diff --git a/cmake-module/CMakeLists.txt b/cmake-module/CMakeLists.txt
|
||||
index e182689..24c2113 100644
|
||||
--- a/cmake-module/CMakeLists.txt
|
||||
+++ b/cmake-module/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
project(bear:cmake-modules)
|
||||
|
||||
if( NOT BEAR_CMAKE_MODULES_INSTALL_PATH )
|
||||
- set( BEAR_CMAKE_MODULES_INSTALL_PATH "share/cmake/bear-engine" )
|
||||
+ set( BEAR_CMAKE_MODULES_INSTALL_PATH "data/cmake/bear-engine" )
|
||||
endif( NOT BEAR_CMAKE_MODULES_INSTALL_PATH )
|
||||
|
||||
set( BEAR_CMAKE_MODULES
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
||||
From aef84df916bf008859a2aab4ae4b9820b64abbbf Mon Sep 17 00:00:00 2001
|
||||
From: Theodore Kokkoris <t.kokkoris@gmail.com>
|
||||
Date: Wed, 24 Dec 2014 23:53:14 +0200
|
||||
Subject: Change settings location on Haiku
|
||||
|
||||
|
||||
diff --git a/bear-engine/core/src/engine/code/game_local_client.cpp b/bear-engine/core/src/engine/code/game_local_client.cpp
|
||||
index c4a1efb..a65ab13 100644
|
||||
--- a/bear-engine/core/src/engine/code/game_local_client.cpp
|
||||
+++ b/bear-engine/core/src/engine/code/game_local_client.cpp
|
||||
@@ -51,6 +51,11 @@
|
||||
#include <claw/string_algorithm.hpp>
|
||||
#include <sstream>
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+ #include <FindDirectory.h>
|
||||
+ #include <Path.h>
|
||||
+#endif
|
||||
+
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/**
|
||||
* \brief Print the options of the program.
|
||||
@@ -1113,6 +1118,15 @@ void bear::engine::game_local_client::init_game_filesystem()
|
||||
m_game_filesystem =
|
||||
freedesktop_game_filesystem( m_game_description.game_name() );
|
||||
|
||||
+#elif defined( __HAIKU__ )
|
||||
+ BPath path;
|
||||
+ status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, &path);
|
||||
+ if (status < B_OK)
|
||||
+ // fall back to default
|
||||
+ m_game_filesystem = default_game_filesystem( m_game_description.game_name() );
|
||||
+ else
|
||||
+ m_game_filesystem = default_game_filesystem( m_game_description.game_name(), path.Path());
|
||||
+
|
||||
#else
|
||||
|
||||
m_game_filesystem = default_game_filesystem( m_game_description.game_name() );
|
||||
diff --git a/bear-engine/core/src/engine/system/code/default_game_filesystem.cpp b/bear-engine/core/src/engine/system/code/default_game_filesystem.cpp
|
||||
index 99ea2f8..0435b5a 100644
|
||||
--- a/bear-engine/core/src/engine/system/code/default_game_filesystem.cpp
|
||||
+++ b/bear-engine/core/src/engine/system/code/default_game_filesystem.cpp
|
||||
@@ -107,7 +107,11 @@ std::string bear::engine::default_game_filesystem::get_game_directory() const
|
||||
boost::filesystem::path dir( m_root );
|
||||
|
||||
std::string result;
|
||||
- std::string subdir = '.' + get_name_as_filename( m_game_name );
|
||||
+ #if defined(__HAIKU__)
|
||||
+ std::string subdir = get_name_as_filename( m_game_name );
|
||||
+ #else
|
||||
+ std::string subdir = '.' + get_name_as_filename( m_game_name );
|
||||
+ #endif
|
||||
|
||||
dir /= boost::filesystem::path( subdir );
|
||||
|
||||
--
|
||||
2.19.0
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
From fa26352f4b7a8a32351a664f23a251ba08bc9556 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Tue, 18 Sep 2018 19:50:23 +0200
|
||||
Subject: patch from 0.7.0
|
||||
|
||||
* Link libintl on haiku.
|
||||
* Fix install directories.
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8a66e3c..f45efb3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -23,12 +23,12 @@ include( docbook-to-man )
|
||||
#-------------------------------------------------------------------------------
|
||||
# where the game resources are installed
|
||||
if( NOT PTB_INSTALL_DATA_DIR )
|
||||
- set( PTB_INSTALL_DATA_DIR share/plee-the-bear )
|
||||
+ set( PTB_INSTALL_DATA_DIR data/plee-the-bear )
|
||||
endif( NOT PTB_INSTALL_DATA_DIR )
|
||||
|
||||
# where the game executables are installed
|
||||
if( NOT PTB_INSTALL_EXECUTABLE_DIR )
|
||||
- set( PTB_INSTALL_EXECUTABLE_DIR bin )
|
||||
+ set( PTB_INSTALL_EXECUTABLE_DIR bin${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR} )
|
||||
endif( NOT PTB_INSTALL_EXECUTABLE_DIR )
|
||||
|
||||
# where the game libraries (the items) are installed
|
||||
@@ -38,7 +38,7 @@ if( NOT PTB_INSTALL_CUSTOM_LIBRARY_DIR )
|
||||
"${PTB_INSTALL_EXECUTABLE_DIR}"
|
||||
)
|
||||
else( WIN32 )
|
||||
- set( PTB_INSTALL_CUSTOM_LIBRARY_DIR lib )
|
||||
+ set( PTB_INSTALL_CUSTOM_LIBRARY_DIR lib${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR} )
|
||||
endif( WIN32 )
|
||||
endif( NOT PTB_INSTALL_CUSTOM_LIBRARY_DIR )
|
||||
|
||||
@@ -140,7 +140,7 @@ subdirs(
|
||||
|
||||
install(
|
||||
DIRECTORY "lib/item-description"
|
||||
- DESTINATION "share/bear-factory/plee-the-bear"
|
||||
+ DESTINATION "data/bear-factory/plee-the-bear"
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE
|
||||
GROUP_READ
|
||||
WORLD_READ
|
||||
diff --git a/launcher/src/CMakeLists.txt b/launcher/src/CMakeLists.txt
|
||||
index d4a6ee3..a1e02c5 100644
|
||||
--- a/launcher/src/CMakeLists.txt
|
||||
+++ b/launcher/src/CMakeLists.txt
|
||||
@@ -121,13 +121,13 @@ set(
|
||||
${CLAW_APPLICATION_LIBRARIES}
|
||||
)
|
||||
|
||||
-if(WIN32)
|
||||
+if(WIN32 OR HAIKU)
|
||||
set(
|
||||
PTB_LAUNCHER_LINK_LIBRARIES
|
||||
${PTB_LAUNCHER_LINK_LIBRARIES}
|
||||
${SDL2_LIBRARY}
|
||||
intl )
|
||||
-endif(WIN32)
|
||||
+endif(WIN32 OR HAIKU)
|
||||
|
||||
# FIXME: it would be even better to use "sdl-config"
|
||||
if(APPLE)
|
||||
--
|
||||
2.19.0
|
||||
|
||||
Reference in New Issue
Block a user