diff --git a/games-strategy/vcmi/patches/vcmi-0.94.patchset b/games-strategy/vcmi/patches/vcmi-0.94.patchset index 72ca005b8..a1d6a870b 100644 --- a/games-strategy/vcmi/patches/vcmi-0.94.patchset +++ b/games-strategy/vcmi/patches/vcmi-0.94.patchset @@ -1,4 +1,4 @@ -From b5923cc7d6a06a08421e439e4c5de353ae2bcd77 Mon Sep 17 00:00:00 2001 +From d1531a4d6125f9542d8729eb3712fd41cc88a565 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 7 Jan 2014 23:02:10 +0100 Subject: Link to libnetwork, since we use sockets. @@ -23,14 +23,14 @@ index 2110879..d1fed38 100644 1.8.3.4 -From 8f2e997081b524b6f97a124df1abed2ec18b23a7 Mon Sep 17 00:00:00 2001 +From 17615226b8b9b67a81330aade5609e7eb5a22024 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 8 Jan 2014 21:14:51 +0100 Subject: Support for renaming threads. diff --git a/lib/CThreadHelper.cpp b/lib/CThreadHelper.cpp -index 3774c4b..b0aca56 100644 +index 6a4a89e..983ee5b 100644 --- a/lib/CThreadHelper.cpp +++ b/lib/CThreadHelper.cpp @@ -3,6 +3,8 @@ @@ -54,3 +54,62 @@ index 3774c4b..b0aca56 100644 -- 1.8.3.4 + +From ea422b71bc3fa1af3f84ab5cd2da02649e42a227 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Mon, 27 Jan 2014 20:18:36 +0100 +Subject: Fix settings dir path. + + +diff --git a/lib/VCMIDirs.cpp b/lib/VCMIDirs.cpp +index be00323..9fed4f8 100644 +--- a/lib/VCMIDirs.cpp ++++ b/lib/VCMIDirs.cpp +@@ -123,12 +123,22 @@ std::string VCMIDirs::libraryName(std::string basename) const + + #else + ++#if defined(__haiku__) ++std::string VCMIDirs::userDataPath() const ++{ ++ BPath settingsDir; ++ if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) ++ return std::string(path.Path()) + "vcmi"; ++ return "."; ++} ++#else + std::string VCMIDirs::userDataPath() const + { + if (getenv("HOME") != nullptr ) + return std::string(getenv("HOME")) + "/.vcmi"; + return "."; + } ++#endif + + std::string VCMIDirs::libraryPath() const + { +diff --git a/vcmibuilder b/vcmibuilder +index 472a00d..1f60b12 100755 +--- a/vcmibuilder ++++ b/vcmibuilder +@@ -64,7 +64,7 @@ then + echo " --download " "Automatically download requied packages using wget" + echo " " "Requires wget and Internet connection" + echo +- echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is ~/.vcmi" ++ echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is `finddir B_USER_SETTINGS_DIRECTORY`/vcmi" + echo + echo " --validate " "Run basic validness checks" + exit 0 +@@ -163,7 +163,7 @@ fi + + if [[ -z "$dest_dir" ]] + then +- dest_dir="$HOME/.vcmi" ++ dest_dir="`finddir B_USER_SETTINGS_DIRECTORY`/vcmi" + fi + + temp_dir="$dest_dir"/buildertmp +-- +1.8.3.4 + diff --git a/games-strategy/vcmi/vcmi-0.94.recipe b/games-strategy/vcmi/vcmi-0.94.recipe index 5cefcd55e..99180116d 100644 --- a/games-strategy/vcmi/vcmi-0.94.recipe +++ b/games-strategy/vcmi/vcmi-0.94.recipe @@ -69,6 +69,8 @@ BUILD() { mkdir -p build cd build + export CFLAGS=-DUSE_FILE32API + export CXXFLAGS=$CFLAGS cmake .. -DDATA_DIR=$relativeDataDir/vcmi -DCMAKE_INSTALL_PREFIX=$prefix \ -DLIB_DIR=$relativeLibDir make $jobArgs