mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Godot: also add a recipe for current trunk.
Unfortunately it does not run any better (stuck on splash screen).
This commit is contained in:
@@ -9,7 +9,7 @@ click to a number of platforms, including the major desktop platforms \
|
||||
HOMEPAGE="https://godotengine.org/"
|
||||
COPYRIGHT="2007-2018 Juan Linietsky, Ariel Manzur"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/godotengine/godot/archive/$portVersion-stable.tar.gz"
|
||||
CHECKSUM_SHA256="123723ebb6f59b2da00451963177309d0bc8c5cb4168e14f44dcbd00d4f12296"
|
||||
SOURCE_DIR="godot-$portVersion-stable"
|
||||
|
||||
103
dev-games/godot/godot-3.0.6~git.recipe
Normal file
103
dev-games/godot/godot-3.0.6~git.recipe
Normal file
@@ -0,0 +1,103 @@
|
||||
SUMMARY="2D and 3D cross-platform game engine"
|
||||
DESCRIPTION="Godot Engine is a feature-packed, cross-platform game engine \
|
||||
to create 2D and 3D games from a unified interface. It provides a \
|
||||
comprehensive set of common tools, so that users can focus on making \
|
||||
games without having to reinvent the wheel. Games can be exported in one \
|
||||
click to a number of platforms, including the major desktop platforms \
|
||||
(Linux, Mac OSX, Windows) as well as mobile (Android, iOS) and web-based \
|
||||
(HTML5) platforms."
|
||||
HOMEPAGE="https://godotengine.org/"
|
||||
COPYRIGHT="2007-2018 Juan Linietsky, Ariel Manzur"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
COMMIT="229d217a51ae9bba3c356331574e8d0b0be7aa95"
|
||||
SOURCE_URI="https://github.com/godotengine/godot/archive/$COMMIT.tar.gz"
|
||||
CHECKSUM_SHA256="613b21598d5efce2e145fee309630bb8f60d75a4f8f6a73cebacda3aba703f7d"
|
||||
SOURCE_DIR="godot-$COMMIT"
|
||||
PATCHES="godot-3.0.6.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
godot$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
# lib:libfreetype$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libglew$secondaryArchSuffix
|
||||
lib:libGLU$secondaryArchSuffix
|
||||
lib:libmbedtls$secondaryArchSuffix
|
||||
lib:libminiupnpc$secondaryArchSuffix
|
||||
lib:libmpcdec$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
# lib:libopus$secondaryArchSuffix
|
||||
# lib:libopusfile$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
# lib:libspeex$secondaryArchSuffix
|
||||
lib:libtheora$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libwebp$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
# devel:libfreetype$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libglew$secondaryArchSuffix
|
||||
devel:libGLU$secondaryArchSuffix
|
||||
devel:libmbedtls$secondaryArchSuffix
|
||||
devel:libminiupnpc$secondaryArchSuffix
|
||||
devel:libmpcdec$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
# devel:libopus$secondaryArchSuffix
|
||||
# devel:libopusfile$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
# devel:libspeex$secondaryArchSuffix
|
||||
devel:libtheora$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libwebp$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python
|
||||
cmd:scons
|
||||
cmd:yasm
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
scons $jobArgs \
|
||||
build=release \
|
||||
platform=haiku \
|
||||
builtin_glew=no \
|
||||
builtin_libmpcdec=no \
|
||||
builtin_libogg=no \
|
||||
builtin_libpng=no \
|
||||
builtin_libtheora=no \
|
||||
builtin_libvorbis=no \
|
||||
builtin_libwebp=no \
|
||||
builtin_libwebsockets=yes \
|
||||
builtin_mbedtls=no \
|
||||
builtin_miniupnpc=no \
|
||||
builtin_zlib=no \
|
||||
unix_global_settings_path=`finddir B_USER_SETTINGS_DIRECTORY`/Godot
|
||||
#builtin_speex=no
|
||||
#builtin_opus=no
|
||||
#builtin_freetype=no
|
||||
#builtin_squish=no
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/Godot
|
||||
cp bin/godot.haiku.tools* $appsDir/Godot/Godot
|
||||
|
||||
addAppDeskbarSymlink $appsDir/Godot/Godot "Godot"
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
From 3fed3c2aa2d0f784c1d9b703f05f0c9dfc93bb69 Mon Sep 17 00:00:00 2001
|
||||
From a38f9962cbe28ef3040641fd5f93f44e33fb8991 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Mon, 9 Jul 2018 15:36:13 +0200
|
||||
Subject: Fix various hings for Godot 3
|
||||
Subject: Fix various things for Godot 3
|
||||
|
||||
Our upstream code is unmaintained and does not compile.
|
||||
Fix various things.
|
||||
Rework event management, renderer initialization, haiku support in GLAD.
|
||||
We now get all the way up to the splash screen without crashing, but the
|
||||
editor does not start.
|
||||
|
||||
diff --git a/platform/haiku/audio_driver_media_kit.cpp b/platform/haiku/audio_driver_media_kit.cpp
|
||||
index 278a994..e513212 100644
|
||||
@@ -134,10 +136,43 @@ index f92969b..d8e43d9 100644
|
||||
class HaikuApplication : public BApplication {
|
||||
public:
|
||||
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp
|
||||
index b234a2f..64f038d 100644
|
||||
index b234a2f..db15d4d 100644
|
||||
--- a/platform/haiku/haiku_direct_window.cpp
|
||||
+++ b/platform/haiku/haiku_direct_window.cpp
|
||||
@@ -152,39 +152,36 @@ void HaikuDirectWindow::HandleMouseButton(BMessage *message) {
|
||||
@@ -41,10 +41,14 @@ HaikuDirectWindow::HaikuDirectWindow(BRect p_frame) :
|
||||
last_buttons_state = 0;
|
||||
last_button_mask = 0;
|
||||
last_key_modifier_state = 0;
|
||||
+
|
||||
+ view = NULL;
|
||||
+ update_runner = NULL;
|
||||
+ input = NULL;
|
||||
+ main_loop = NULL;
|
||||
}
|
||||
|
||||
HaikuDirectWindow::~HaikuDirectWindow() {
|
||||
- delete update_runner;
|
||||
}
|
||||
|
||||
void HaikuDirectWindow::SetHaikuGLView(HaikuGLView *p_view) {
|
||||
@@ -53,7 +57,7 @@ void HaikuDirectWindow::SetHaikuGLView(HaikuGLView *p_view) {
|
||||
|
||||
void HaikuDirectWindow::StartMessageRunner() {
|
||||
update_runner = new BMessageRunner(BMessenger(this),
|
||||
- new BMessage(REDRAW_MSG), 1000000 / 30 /* 30 fps */);
|
||||
+ new BMessage(REDRAW_MSG), 1000000 / 60 /* 60 fps */);
|
||||
}
|
||||
|
||||
void HaikuDirectWindow::StopMessageRunner() {
|
||||
@@ -69,6 +73,7 @@ void HaikuDirectWindow::SetMainLoop(MainLoop *p_main_loop) {
|
||||
}
|
||||
|
||||
bool HaikuDirectWindow::QuitRequested() {
|
||||
+ StopMessageRunner();
|
||||
main_loop->notification(MainLoop::NOTIFICATION_WM_QUIT_REQUEST);
|
||||
return false;
|
||||
}
|
||||
@@ -152,39 +157,36 @@ void HaikuDirectWindow::HandleMouseButton(BMessage *message) {
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -145,7 +180,7 @@ index b234a2f..64f038d 100644
|
||||
- mouse_event.type = Ref<InputEvent>::MOUSE_BUTTON;
|
||||
- mouse_event.device = 0;
|
||||
+ Ref<InputEventMouseButton> mouse_event;
|
||||
+ mouse_event->set_device(0);
|
||||
+ mouse_event.instance();
|
||||
|
||||
- mouse_event.mouse_button.mod = GetKeyModifierState(modifiers);
|
||||
- mouse_event->get_button_mask() = GetMouseButtonState(buttons);
|
||||
@@ -188,7 +223,7 @@ index b234a2f..64f038d 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,22 +205,18 @@ void HaikuDirectWindow::HandleMouseMoved(BMessage *message) {
|
||||
@@ -208,22 +210,18 @@ void HaikuDirectWindow::HandleMouseMoved(BMessage *message) {
|
||||
|
||||
Point2i rel = pos - last_mouse_position;
|
||||
|
||||
@@ -196,7 +231,7 @@ index b234a2f..64f038d 100644
|
||||
- motion_event.type = Ref<InputEvent>::MOUSE_MOTION;
|
||||
- motion_event.device = 0;
|
||||
+ Ref<InputEventMouseMotion> motion_event;
|
||||
+ motion_event->set_device(0);
|
||||
+ motion_event.instance();
|
||||
+ GetKeyModifierState(motion_event, modifiers);
|
||||
|
||||
- motion_event.mouse_motion.mod = GetKeyModifierState(modifiers);
|
||||
@@ -220,7 +255,7 @@ index b234a2f..64f038d 100644
|
||||
|
||||
last_mouse_position = pos;
|
||||
|
||||
@@ -236,22 +229,21 @@ void HaikuDirectWindow::HandleMouseWheelChanged(BMessage *message) {
|
||||
@@ -236,22 +234,21 @@ void HaikuDirectWindow::HandleMouseWheelChanged(BMessage *message) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -228,7 +263,7 @@ index b234a2f..64f038d 100644
|
||||
- mouse_event.type = Ref<InputEvent>::MOUSE_BUTTON;
|
||||
- mouse_event.device = 0;
|
||||
+ Ref<InputEventMouseButton> mouse_event;
|
||||
+ mouse_event->set_device(0);
|
||||
+ mouse_event.instance();
|
||||
+ //GetKeyModifierState(mouse_event, modifiers);
|
||||
|
||||
- mouse_event->get_button_index() = wheel_delta_y < 0 ? 4 : 5;
|
||||
@@ -254,7 +289,7 @@ index b234a2f..64f038d 100644
|
||||
input->parse_input_event(mouse_event);
|
||||
}
|
||||
|
||||
@@ -272,24 +264,23 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) {
|
||||
@@ -272,24 +269,23 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -267,7 +302,7 @@ index b234a2f..64f038d 100644
|
||||
- event->is_echo() = message->HasInt32("be:key_repeat");
|
||||
- event.key.unicode = 0;
|
||||
+ Ref<InputEventKey> event;
|
||||
+ event->set_device(0);
|
||||
+ event.instance();
|
||||
+ GetKeyModifierState(event, modifiers);
|
||||
+ event->set_pressed(message->what == B_KEY_DOWN);
|
||||
+ event->set_scancode(KeyMappingHaiku::get_keysym(raw_char, key));
|
||||
@@ -289,7 +324,7 @@ index b234a2f..64f038d 100644
|
||||
}
|
||||
|
||||
input->parse_input_event(event);
|
||||
@@ -309,14 +300,14 @@ void HaikuDirectWindow::HandleKeyboardModifierEvent(BMessage *message) {
|
||||
@@ -309,14 +305,14 @@ void HaikuDirectWindow::HandleKeyboardModifierEvent(BMessage *message) {
|
||||
|
||||
int32 key = old_modifiers ^ modifiers;
|
||||
|
||||
@@ -302,7 +337,7 @@ index b234a2f..64f038d 100644
|
||||
- event->is_echo() = false;
|
||||
- event.key.unicode = 0;
|
||||
+ Ref<InputEventWithModifiers> event;
|
||||
+ event->set_device(0);
|
||||
+ event.instance();
|
||||
+ GetKeyModifierState(event, modifiers);
|
||||
+
|
||||
+ event->set_shift(key & B_SHIFT_KEY);
|
||||
@@ -312,7 +347,7 @@ index b234a2f..64f038d 100644
|
||||
|
||||
input->parse_input_event(event);
|
||||
}
|
||||
@@ -333,18 +324,17 @@ void HaikuDirectWindow::HandleWindowResized(BMessage *message) {
|
||||
@@ -333,18 +329,17 @@ void HaikuDirectWindow::HandleWindowResized(BMessage *message) {
|
||||
current_video_mode->height = height;
|
||||
}
|
||||
|
||||
@@ -615,7 +650,7 @@ index 2fe85cd..0000000
|
||||
-
|
||||
-#endif /* PLATFORM_HAIKU_POWER_HAIKU_H_ */
|
||||
diff --git a/thirdparty/glad/glad.c b/thirdparty/glad/glad.c
|
||||
index f87ec8c..f02fb97 100644
|
||||
index f87ec8c..81795c2 100644
|
||||
--- a/thirdparty/glad/glad.c
|
||||
+++ b/thirdparty/glad/glad.c
|
||||
@@ -55,7 +55,7 @@ void close_gl(void) {
|
||||
@@ -645,40 +680,15 @@ index f87ec8c..f02fb97 100644
|
||||
if(gladGetProcAddressPtr != NULL) {
|
||||
result = gladGetProcAddressPtr(namez);
|
||||
}
|
||||
@@ -127,7 +127,9 @@ int gladLoadGL(void) {
|
||||
@@ -127,7 +127,7 @@ int gladLoadGL(void) {
|
||||
if(open_gl()) {
|
||||
status = gladLoadGLLoader(&get_proc);
|
||||
close_gl();
|
||||
- }
|
||||
+ } else {
|
||||
+ puts("failed open_gl :(");
|
||||
+ }
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -1811,8 +1813,11 @@ int gladLoadGLLoader(GLADloadproc load) {
|
||||
GLVersion.major = 0; GLVersion.minor = 0;
|
||||
glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
|
||||
if(glGetString == NULL) return 0;
|
||||
+ puts("version");
|
||||
if(glGetString(GL_VERSION) == NULL) return 0;
|
||||
+ puts("core");
|
||||
find_coreGL();
|
||||
+ puts("loadglversion");
|
||||
load_GL_VERSION_1_0(load);
|
||||
load_GL_VERSION_1_1(load);
|
||||
load_GL_VERSION_1_2(load);
|
||||
@@ -1826,8 +1831,10 @@ int gladLoadGLLoader(GLADloadproc load) {
|
||||
load_GL_VERSION_3_2(load);
|
||||
load_GL_VERSION_3_3(load);
|
||||
|
||||
+ puts("extgl");
|
||||
if (!find_extensionsGL()) return 0;
|
||||
load_GL_ARB_debug_output(load);
|
||||
+ puts("testversion");
|
||||
return GLVersion.major != 0 || GLVersion.minor != 0;
|
||||
}
|
||||
|
||||
diff --git a/thirdparty/thekla_atlas/nvcore/nvcore.h b/thirdparty/thekla_atlas/nvcore/nvcore.h
|
||||
index a3deb66..5ef6966 100644
|
||||
--- a/thirdparty/thekla_atlas/nvcore/nvcore.h
|
||||
|
||||
1014
dev-games/godot/patches/godot-3.0.6.patchset
Normal file
1014
dev-games/godot/patches/godot-3.0.6.patchset
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user