Update plee-the-bear recipe and patchset

* Mark plee-the-bear as working on x86
* Add lib:libplee_the_bear to PROVIDES
* Rename boost devel requirement
* Add -DNDEBUG to CXX_FLAGS
* Regenerate patchset (i.e. add [PATCH N/M] to subject lines)
* Make sure Plee the Bear library get installed in the
  appropriate directory if there is a secondary arch suffix
* Change data directory on Haiku
This commit is contained in:
Theodore Kokkoris
2014-12-21 22:03:22 +02:00
parent 5292799b7f
commit 2a60c74d7d
2 changed files with 110 additions and 27 deletions

View File

@@ -1,8 +1,12 @@
From 03033c51349e01d5d06ee74545a15a534525d785 Mon Sep 17 00:00:00 2001
From 33e29a8c2f19b290ed6e9056a60aac6fd27426c6 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.
Subject: [PATCH 1/4] Fix search paths for SDL2 header files.
---
bear/cmake-helper/FindSDL2.cmake | 2 +-
bear/cmake-helper/FindSDL2_mixer.cmake | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bear/cmake-helper/FindSDL2.cmake b/bear/cmake-helper/FindSDL2.cmake
index 7665a55..bcd3050 100644
@@ -33,12 +37,15 @@ index 59ed911..d795965 100644
--
1.8.3.4
From 4a4404ab5a5b9c67925ec6d910ddc5f47fb1b910 Mon Sep 17 00:00:00 2001
From 864a651724bec4acce7b92fd3e1bddaa00f17c19 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.
Subject: [PATCH 2/4] Link libintl on haiku.
---
bear/bear-engine/running_bear/CMakeLists.txt | 2 +-
plee-the-bear/launcher/src/CMakeLists.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bear/bear-engine/running_bear/CMakeLists.txt b/bear/bear-engine/running_bear/CMakeLists.txt
index 8b04d89..4fffd94 100644
@@ -69,12 +76,16 @@ index 9ed5d32..ff88206 100644
--
1.8.3.4
From 415c83accad83bf6677dd3d578ab6712582910b9 Mon Sep 17 00:00:00 2001
From c929f602fb74adcdf495e144b66f4981c0655ba5 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.
Subject: [PATCH 3/4] Fix install directories.
---
bear/cmake-helper/bear-config.cmake | 2 +-
bear/cmake-module/CMakeLists.txt | 2 +-
plee-the-bear/CMakeLists.txt | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/bear/cmake-helper/bear-config.cmake b/bear/cmake-helper/bear-config.cmake
index e66d79e..b483445 100644
@@ -103,7 +114,7 @@ index e182689..24c2113 100644
set( BEAR_CMAKE_MODULES
diff --git a/plee-the-bear/CMakeLists.txt b/plee-the-bear/CMakeLists.txt
index 6a123d9..9bc8df3 100644
index 6a123d9..c3dbb90 100644
--- a/plee-the-bear/CMakeLists.txt
+++ b/plee-the-bear/CMakeLists.txt
@@ -23,7 +23,7 @@ include( docbook-to-man )
@@ -115,6 +126,15 @@ index 6a123d9..9bc8df3 100644
endif( NOT PTB_INSTALL_DATA_DIR )
# where the game executables 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 )
@@ -154,7 +154,7 @@ subdirs(
install(
@@ -127,3 +147,65 @@ index 6a123d9..9bc8df3 100644
--
1.8.3.4
From 34aca4d0b287e50d35957badf3e72060264f7a45 Mon Sep 17 00:00:00 2001
From: Theodore Kokkoris <t.kokkoris@gmail.com>
Date: Wed, 24 Dec 2014 23:53:14 +0200
Subject: [PATCH 4/4] Change settings location on Haiku
---
.../bear-engine/core/src/engine/code/game_local_client.cpp | 14 ++++++++++++++
.../src/engine/system/code/default_game_filesystem.cpp | 6 +++++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/bear/bear-engine/core/src/engine/code/game_local_client.cpp b/bear/bear-engine/core/src/engine/code/game_local_client.cpp
index 51c055b..83ab880 100644
--- a/bear/bear-engine/core/src/engine/code/game_local_client.cpp
+++ b/bear/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.
@@ -1107,6 +1112,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/bear-engine/core/src/engine/system/code/default_game_filesystem.cpp b/bear/bear-engine/core/src/engine/system/code/default_game_filesystem.cpp
index 99ea2f8..0435b5a 100644
--- a/bear/bear-engine/core/src/engine/system/code/default_game_filesystem.cpp
+++ b/bear/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 );
--
1.8.3.4