Fixed vcmi recipe. Now works!

This commit is contained in:
Adrien Destugues
2014-01-27 20:42:15 +01:00
parent 3ae41aea11
commit 7eafe431be
2 changed files with 64 additions and 3 deletions

View File

@@ -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 <pulkomandy@pulkomandy.tk>
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 <pulkomandy@pulkomandy.tk>
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 <pulkomandy@pulkomandy.tk>
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

View File

@@ -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