mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Minetest: bump version
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
SUMMARY="An InfiniMiner/Minecraft inspired game"
|
||||
DESCRIPTION="Minetest, an open source infinite-world block sandbox game engine with support for survival and crafting."
|
||||
HOMEPAGE="https://www.minetest.net/"
|
||||
COPYRIGHT="2018 The Minetest Team"
|
||||
COPYRIGHT="2019 The Minetest Team"
|
||||
LICENSE="GNU LGPL v2.1
|
||||
Apache v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/minetest/minetest/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="cd25d40c53f492325edabd2f6397250f40a61cb9fe4a1d4dd6eb030e0d1ceb59"
|
||||
CHECKSUM_SHA256="1ba816f77dc9dbd5a4995f0c1d482f8f22b9aa75b6d6999dbfd1f3d698363d0a"
|
||||
SOURCE_FILENAME="minetest-$portVersion.tar.gz"
|
||||
SOURCE_DIR="minetest-$portVersion"
|
||||
gameVersion="0.4.17"
|
||||
SOURCE_URI_2="https://github.com/minetest/minetest_game/archive/$gameVersion.tar.gz"
|
||||
CHECKSUM_SHA256_2="f0ab07cb47c1540b2016bf76a36e2eec28b0ea7827bf66fc5447e0c5e5d4495d"
|
||||
SOURCE_URI_2="https://github.com/minetest/minetest_game/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256_2="83688d802f9d8308acf6f95e6845cdbe1ee1bc088a963a30f94cf72ec7265cf8"
|
||||
SOURCE_FILENAME_2="minetest_game-$portVersion.tar.gz"
|
||||
SOURCE_DIR_2="minetest_game-$gameVersion"
|
||||
SOURCE_DIR_2="minetest_game-$portVersion"
|
||||
PATCHES="minetest-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="minetest.rdef.in"
|
||||
|
||||
@@ -62,7 +61,7 @@ BUILD_REQUIRES="
|
||||
devel:libncurses$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libopenal$secondaryArchSuffix
|
||||
devel:libpng$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libsqlite3$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
@@ -1,190 +0,0 @@
|
||||
From 680087f6e70369dca3c4a3bbaf19109d83d5fa62 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 14 Sep 2018 21:41:28 +1000
|
||||
Subject: Fix build for Haiku
|
||||
|
||||
|
||||
diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake
|
||||
index 8dda157..b1cfeea 100644
|
||||
--- a/cmake/Modules/FindIrrlicht.cmake
|
||||
+++ b/cmake/Modules/FindIrrlicht.cmake
|
||||
@@ -42,12 +42,16 @@ else()
|
||||
PATHS
|
||||
/usr/local/include/irrlicht
|
||||
/usr/include/irrlicht
|
||||
+ /system/develop/headers/x86/irrlicht
|
||||
+ /system/develop/headers/irrlicht
|
||||
)
|
||||
|
||||
find_library(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
+ /system/develop/lib/x86
|
||||
+ /system/develop/lib
|
||||
)
|
||||
endif()
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 6663b3c..05b2e5b 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -254,6 +254,12 @@ if(NOT MSVC)
|
||||
set(USE_GPROF FALSE CACHE BOOL "Use -pg flag for g++")
|
||||
endif()
|
||||
|
||||
+# Haiku endian support
|
||||
+if(HAIKU)
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_BSD_SOURCE")
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_BSD_SOURCE")
|
||||
+endif()
|
||||
+
|
||||
# Use cmake_config.h
|
||||
add_definitions(-DUSE_CMAKE_CONFIG_H)
|
||||
|
||||
@@ -297,7 +303,9 @@ if(WIN32)
|
||||
else()
|
||||
# Unix probably
|
||||
if(BUILD_CLIENT)
|
||||
- find_package(X11 REQUIRED)
|
||||
+ if (NOT HAIKU)
|
||||
+ find_package(X11 REQUIRED)
|
||||
+ endif()
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(JPEG REQUIRED)
|
||||
find_package(BZip2 REQUIRED)
|
||||
@@ -315,7 +323,11 @@ else()
|
||||
endif(APPLE)
|
||||
endif(BUILD_CLIENT)
|
||||
find_package(ZLIB REQUIRED)
|
||||
- set(PLATFORM_LIBS -lpthread ${CMAKE_DL_LIBS})
|
||||
+ if(HAIKU)
|
||||
+ set(PLATFORM_LIBS ${PLATFORM_LIBS} -lintl -lnetwork)
|
||||
+ else()
|
||||
+ set(PLATFORM_LIBS -lpthread ${CMAKE_DL_LIBS})
|
||||
+ endif(HAIKU)
|
||||
if(APPLE)
|
||||
set(PLATFORM_LIBS "-framework CoreFoundation" ${PLATFORM_LIBS})
|
||||
else()
|
||||
@@ -325,12 +337,12 @@ else()
|
||||
endif(HAVE_LIBRT)
|
||||
endif(APPLE)
|
||||
|
||||
- if(NOT APPLE)
|
||||
+ if(NOT APPLE AND NOT HAIKU)
|
||||
# This way Xxf86vm is found on OpenBSD too
|
||||
find_library(XXF86VM_LIBRARY Xxf86vm)
|
||||
mark_as_advanced(XXF86VM_LIBRARY)
|
||||
set(CLIENT_PLATFORM_LIBS ${CLIENT_PLATFORM_LIBS} ${XXF86VM_LIBRARY})
|
||||
- endif(NOT APPLE)
|
||||
+ endif(NOT APPLE AND NOT HAIKU)
|
||||
|
||||
# Prefer local iconv if installed
|
||||
find_library(ICONV_LIBRARY iconv)
|
||||
diff --git a/src/porting.cpp b/src/porting.cpp
|
||||
index 0a9de2a..bfa7ecb 100644
|
||||
--- a/src/porting.cpp
|
||||
+++ b/src/porting.cpp
|
||||
@@ -43,7 +43,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
#if !defined(_WIN32) && !defined(__APPLE__) && \
|
||||
- !defined(__ANDROID__) && !defined(SERVER)
|
||||
+ !defined(__ANDROID__) && !defined(SERVER) && !defined(__HAIKU__)
|
||||
#define XORG_USED
|
||||
#endif
|
||||
#ifdef XORG_USED
|
||||
@@ -238,7 +238,10 @@ bool getCurrentWorkingDir(char *buf, size_t len)
|
||||
|
||||
bool getExecPathFromProcfs(char *buf, size_t buflen)
|
||||
{
|
||||
-#ifndef _WIN32
|
||||
+#if defined(__HAIKU__)
|
||||
+ sprintf(buf, "/boot/system/apps/Minetest/Minetest");
|
||||
+ return true;
|
||||
+#elif defined(_WIN32)
|
||||
buflen--;
|
||||
|
||||
ssize_t len;
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
||||
From 2c6a5e5a93abf41392be44a0ad8fa9dfd6bba268 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 14 Sep 2018 23:06:52 +1000
|
||||
Subject: Disable install man
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 95f1f28..39521c8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -177,7 +177,7 @@ install(FILES "doc/texture_packs.txt" DESTINATION "${DOCDIR}")
|
||||
install(FILES "doc/world_format.txt" DESTINATION "${DOCDIR}")
|
||||
install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
|
||||
|
||||
-if(UNIX AND NOT APPLE)
|
||||
+if(UNIX AND NOT APPLE AND NOT HAIKU)
|
||||
install(FILES "doc/minetest.6" "doc/minetestserver.6" DESTINATION "${MANDIR}/man6")
|
||||
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
|
||||
install(FILES "misc/net.minetest.minetest.appdata.xml" DESTINATION "${APPDATADIR}")
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
||||
From 2e975d60e6b08c11d24728ff9c1dfdfff9725cfb Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 14 Sep 2018 23:29:14 +1000
|
||||
Subject: Default settings for Haiku
|
||||
|
||||
|
||||
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
|
||||
index 181a12b..116a4cd 100644
|
||||
--- a/src/defaultsettings.cpp
|
||||
+++ b/src/defaultsettings.cpp
|
||||
@@ -361,6 +361,11 @@ void set_default_settings(Settings *settings)
|
||||
settings->setDefault("high_precision_fpu", "true");
|
||||
settings->setDefault("enable_console", "false");
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+ settings->setDefault("enable_shaders", "false");
|
||||
+ settings->setDefault("video_driver", "burningsvideo");
|
||||
+#endif
|
||||
+
|
||||
#ifdef __ANDROID__
|
||||
settings->setDefault("screenW", "0");
|
||||
settings->setDefault("screenH", "0");
|
||||
--
|
||||
2.19.0
|
||||
|
||||
|
||||
From 568546787f697349f3d91892d10de1c4b29b7b99 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 14 Sep 2018 23:29:43 +1000
|
||||
Subject: Path for settings
|
||||
|
||||
|
||||
diff --git a/src/porting.cpp b/src/porting.cpp
|
||||
index bfa7ecb..ce4bb7e 100644
|
||||
--- a/src/porting.cpp
|
||||
+++ b/src/porting.cpp
|
||||
@@ -471,6 +471,15 @@ bool setSystemPaths()
|
||||
return true;
|
||||
}
|
||||
|
||||
+//// Haiku
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+bool setSystemPaths()
|
||||
+{
|
||||
+ path_share = STATIC_SHAREDIR;
|
||||
+ path_user = std::string(getenv("HOME")) + "/config/settings/" + lowercase(PROJECT_NAME);
|
||||
+ return true;
|
||||
+}
|
||||
|
||||
#else
|
||||
|
||||
--
|
||||
2.19.0
|
||||
|
||||
132
games-action/minetest/patches/minetest-5.0.0.patchset
Normal file
132
games-action/minetest/patches/minetest-5.0.0.patchset
Normal file
@@ -0,0 +1,132 @@
|
||||
From 8f372e66ab5254248a303f59aa31ecc5de8747e8 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Tue, 5 Mar 2019 20:24:16 +1000
|
||||
Subject: Add haiku support
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1210866..5b0e40c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -187,7 +187,7 @@ install(FILES "doc/texture_packs.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
|
||||
install(FILES "doc/world_format.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
|
||||
install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
|
||||
|
||||
-if(UNIX AND NOT APPLE)
|
||||
+if(UNIX AND NOT APPLE AND NOT HAIKU)
|
||||
install(FILES "doc/minetest.6" "doc/minetestserver.6" DESTINATION "${MANDIR}/man6")
|
||||
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
|
||||
install(FILES "misc/net.minetest.minetest.appdata.xml" DESTINATION "${APPDATADIR}")
|
||||
diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake
|
||||
index 37349b8..1d48114 100644
|
||||
--- a/cmake/Modules/FindIrrlicht.cmake
|
||||
+++ b/cmake/Modules/FindIrrlicht.cmake
|
||||
@@ -42,6 +42,7 @@ else()
|
||||
PATHS
|
||||
/usr/local/include/irrlicht
|
||||
/usr/include/irrlicht
|
||||
+ /system/develop/headers/x86/irrlicht #Haiku hybrid
|
||||
/system/develop/headers/irrlicht #Haiku
|
||||
)
|
||||
|
||||
@@ -49,6 +50,7 @@ else()
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
+ /system/develop/lib/x86 #Haiku hybrid
|
||||
/system/develop/lib # Haiku
|
||||
)
|
||||
endif()
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 7647067..c2d254f 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -318,7 +318,11 @@ else()
|
||||
endif(APPLE)
|
||||
endif(BUILD_CLIENT)
|
||||
find_package(ZLIB REQUIRED)
|
||||
- set(PLATFORM_LIBS -lpthread ${CMAKE_DL_LIBS})
|
||||
+ if(HAIKU)
|
||||
+ set(PLATFORM_LIBS ${PLATFORM_LIBS} -lintl -lnetwork -lbe)
|
||||
+ else()
|
||||
+ set(PLATFORM_LIBS -lpthread ${CMAKE_DL_LIBS})
|
||||
+ endif(HAIKU)
|
||||
if(APPLE)
|
||||
set(PLATFORM_LIBS "-framework CoreFoundation" ${PLATFORM_LIBS})
|
||||
else()
|
||||
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
|
||||
index 1df6dcc..9cc7aab 100644
|
||||
--- a/src/defaultsettings.cpp
|
||||
+++ b/src/defaultsettings.cpp
|
||||
@@ -425,6 +425,11 @@ void set_default_settings(Settings *settings)
|
||||
settings->setDefault("fps_max", "0");
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+ settings->setDefault("enable_shaders", "false");
|
||||
+ settings->setDefault("video_driver", "burningsvideo");
|
||||
+#endif
|
||||
+
|
||||
// Altered settings for Android
|
||||
#ifdef __ANDROID__
|
||||
settings->setDefault("screen_w", "0");
|
||||
diff --git a/src/porting.cpp b/src/porting.cpp
|
||||
index 76fd592..908780a 100644
|
||||
--- a/src/porting.cpp
|
||||
+++ b/src/porting.cpp
|
||||
@@ -43,6 +43,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include <sys/pstat.h>
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#include <Application.h>
|
||||
+#include <FindDirectory.h>
|
||||
+#include <Path.h>
|
||||
+#include <Roster.h>
|
||||
+#include <OS.h>
|
||||
+#endif
|
||||
+
|
||||
#include "config.h"
|
||||
#include "debug.h"
|
||||
#include "filesys.h"
|
||||
@@ -232,7 +240,16 @@ bool getCurrentWorkingDir(char *buf, size_t len)
|
||||
|
||||
bool getExecPathFromProcfs(char *buf, size_t buflen)
|
||||
{
|
||||
-#ifndef _WIN32
|
||||
+#if defined(__HAIKU__)
|
||||
+ app_info appInfo;
|
||||
+ if (be_app->GetAppInfo(&appInfo) == B_OK) {
|
||||
+ BPath path(&appInfo.ref);
|
||||
+ sprintf(buf, path.Path());
|
||||
+ } else {
|
||||
+ sprintf(buf, "/system/apps/Minetest/Minetest");
|
||||
+ }
|
||||
+ return true;
|
||||
+#elif defined(_WIN32)
|
||||
buflen--;
|
||||
|
||||
ssize_t len;
|
||||
@@ -484,6 +501,19 @@ bool setSystemPaths()
|
||||
return true;
|
||||
}
|
||||
|
||||
+//// Haiku
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+bool setSystemPaths()
|
||||
+{
|
||||
+ path_share = STATIC_SHAREDIR;
|
||||
+ static char dir[PATH_MAX] = "";
|
||||
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, dir, sizeof(dir)) != B_OK)
|
||||
+ sprintf(dir, "/boot/home/config/settings");
|
||||
+ dir[sizeof(dir) - 1] = 0;
|
||||
+ path_user = std::string(dir) + "/" + lowercase(PROJECT_NAME);
|
||||
+ return true;
|
||||
+}
|
||||
|
||||
#else
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
Reference in New Issue
Block a user