diff --git a/dev-games/godot/godot-2.1.4.recipe b/dev-games/godot/godot-2.1.4.recipe new file mode 100644 index 000000000..cb7a2d00a --- /dev/null +++ b/dev-games/godot/godot-2.1.4.recipe @@ -0,0 +1,97 @@ +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-2017 Juan Linietsky, Ariel Manzur" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/godotengine/godot/archive/$portVersion-stable.tar.gz" +CHECKSUM_SHA256="07cf3b01367d5ea53805f144bc60711bd79efb53f1f88d57d6a706e6944de8d7" +SOURCE_DIR="godot-$portVersion-stable" +PATCHES="godot-$portVersion.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:libmpcdec$secondaryArchSuffix + lib:libogg$secondaryArchSuffix +# lib:libopus$secondaryArchSuffix +# lib:libopusfile$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix +# lib:libspeex$secondaryArchSuffix + lib:libssl$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:libmpcdec$secondaryArchSuffix + devel:libogg$secondaryArchSuffix +# devel:libopus$secondaryArchSuffix +# devel:libopusfile$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix +# devel:libspeex$secondaryArchSuffix + devel:libssl$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 + " + +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_openssl=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 + mv bin/godot.haiku.tools* $appsDir/Godot/Godot + + addAppDeskbarSymlink $appsDir/Godot/Godot "Godot" +} diff --git a/dev-games/godot/patches/godot-2.1.4.patchset b/dev-games/godot/patches/godot-2.1.4.patchset new file mode 100644 index 000000000..e801ed7bb --- /dev/null +++ b/dev-games/godot/patches/godot-2.1.4.patchset @@ -0,0 +1,79 @@ +From 5d7c5db31a7159f73a2bec8e6e6741088bdb8ef9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 1 Oct 2017 17:20:21 +0200 +Subject: Godot: platform detection patch for AMD64 arch. + + +diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py +index e38f06e..690c0a7 100644 +--- a/platform/haiku/detect.py ++++ b/platform/haiku/detect.py +@@ -42,8 +42,12 @@ def configure(env): + + env.Append(CPPPATH=['#platform/haiku']) + +- env["CC"] = "gcc-x86" +- env["CXX"] = "g++-x86" ++ if (is64): ++ env["CC"] = "gcc" ++ env["CXX"] = "g++" ++ else: ++ env["CC"] = "gcc-x86" ++ env["CXX"] = "g++-x86" + + if (env["target"] == "release"): + if (env["debug_release"] == "yes"): +-- +2.7.0 + + +From 0fda477887db92077ee046e1aeaefbfce0e2a1ec Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 1 Oct 2017 17:22:22 +0200 +Subject: Build fix for Haiku + + +diff --git a/core/image.h b/core/image.h +index c2f556a..6a38726 100644 +--- a/core/image.h ++++ b/core/image.h +@@ -30,6 +30,11 @@ + #ifndef IMAGE_H + #define IMAGE_H + ++/*Hack to get it work on Haiku*/ ++#ifdef __HAIKU__ ++#include_next ++#endif ++ + #include "color.h" + #include "dvector.h" + #include "math_2d.h" +-- +2.7.0 + + +From b8c1eec487ecc9aef959946b1686aac1b64b4ada Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 1 Oct 2017 17:25:05 +0200 +Subject: Sysleebs needst to be added manually as LDFLAGS + + +diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py +index 690c0a7..b8cb77f 100644 +--- a/platform/haiku/detect.py ++++ b/platform/haiku/detect.py +@@ -65,6 +65,10 @@ def configure(env): + env.Append(CPPFLAGS=['-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL']) + env.Append(LIBS=['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL']) + ++ # Stuff for Haikuports ++ # You need to adjust it every time if you add or remove a syslib in the recipe ++ env.Append(LIBS=['GLEW', 'GLU', 'mpcdec', 'ogg', 'png16', 'ssl', 'crypto', 'theora', 'vorbis', 'vorbisfile', 'webp']) ++ + import methods + env.Append(BUILDERS={'GLSL120': env.Builder(action=methods.build_legacygl_headers, suffix='glsl.gen.h', src_suffix='.glsl')}) + env.Append(BUILDERS={'GLSL': env.Builder(action=methods.build_glsl_headers, suffix='glsl.gen.h', src_suffix='.glsl')}) +-- +2.7.0 +