VCMI: get it to actually build and install things to the right places.

This commit is contained in:
Adrien Destugues
2014-01-08 23:41:04 +01:00
parent 7d19e6a9e2
commit fe43a1097c
2 changed files with 69 additions and 4 deletions

View File

@@ -0,0 +1,56 @@
From b5923cc7d6a06a08421e439e4c5de353ae2bcd77 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.
diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
index 2110879..d1fed38 100644
--- a/server/CMakeLists.txt
+++ b/server/CMakeLists.txt
@@ -19,6 +19,10 @@ endif()
target_link_libraries(vcmiserver vcmi ${Boost_LIBRARIES} ${RT_LIB} ${DL_LIB})
+if (HAIKU)
+ target_link_libraries(vcmiserver network)
+endif()
+
if (NOT APPLE) # Already inside vcmiclient bundle
install(TARGETS vcmiserver DESTINATION ${BIN_DIR})
endif()
--
1.8.3.4
From 8f2e997081b524b6f97a124df1abed2ec18b23a7 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
--- a/lib/CThreadHelper.cpp
+++ b/lib/CThreadHelper.cpp
@@ -3,6 +3,8 @@
#ifdef _WIN32
#include <windows.h>
+#elif defined(__HAIKU__)
+ #include <OS.h>
#elif !defined(__APPLE__)
#include <sys/prctl.h>
#endif
@@ -80,6 +82,8 @@ void setThreadName(const std::string &name)
//not supported
#endif
+#elif defined(__HAIKU__)
+ rename_thread(find_thread(NULL), name.c_str());
#elif defined(__linux__)
prctl(PR_SET_NAME, name.c_str(), 0, 0, 0);
#endif
--
1.8.3.4

View File

@@ -18,14 +18,19 @@ if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
fi
SECONDARY_ARCHITECTURES="x86"
#PATCHES="vcmi-0.94.patchset"
PATCHES="vcmi-0.94.patchset"
PROVIDES="
vcmi$secondaryArchSuffix = $portVersion
cmd:vcmibuilder
cmd:vcmiclient
cmd:vcmiserver
lib:libminizip$secondaryArchSuffix
lib:libvcmi$secondaryArchSuffix
"
REQUIRES="
haiku >= $haikuVersion
lib:libSDL$secondaryArchSuffix
haiku$secondaryArchSuffix >= $haikuVersion
lib:libSDL_1.2$secondaryArchSuffix
lib:libsdl_mixer$secondaryArchSuffix
lib:libsdl_image$secondaryArchSuffix
lib:libsdl_ttf$secondaryArchSuffix
@@ -64,13 +69,17 @@ BUILD()
{
mkdir -p build
cd build
cmake ..
cmake .. -DDATA_DIR=$relativeDataDir/vcmi -DCMAKE_INSTALL_PREFIX=$prefix \
-DLIB_DIR=$relativeLibDir
make $jobArgs
}
INSTALL()
{
cd build
make install
rm -r $prefix/share # desktop file and png icons we don't care about
}
COPYRIGHT="2005-2013 VCMI Team"