From 11dc4c7cc59dde8d7940cd41dbb2815b48add712 Mon Sep 17 00:00:00 2001 From: dataCobra Date: Wed, 18 Jan 2023 09:59:07 +0100 Subject: [PATCH] New package: godot-beta --- common/shlibs | 1 + srcpkgs/godot-beta/files/godot-beta.desktop | 9 ++++ srcpkgs/godot-beta/patches/10-fix-musl.patch | 13 +++++ srcpkgs/godot-beta/template | 51 ++++++++++++++++++++ srcpkgs/godot-beta/update | 1 + 5 files changed, 75 insertions(+) create mode 100644 srcpkgs/godot-beta/files/godot-beta.desktop create mode 100644 srcpkgs/godot-beta/patches/10-fix-musl.patch create mode 100644 srcpkgs/godot-beta/template create mode 100644 srcpkgs/godot-beta/update diff --git a/common/shlibs b/common/shlibs index 0a803960ab55..28d069e9e7a2 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2391,6 +2391,7 @@ libtbbmalloc_proxy_debug.so.2 tbb-4.3_1 libtbbmalloc_proxy.so.2 tbb-4.3_1 libtbbmalloc.so.2 tbb-4.3_1 libembree.so.3 embree-3.12.2_1 +libembree3.so.3 embree-3.12.2_1 libtbb_debug.so.2 tbb-4.3_1 libtbb.so.2 tbb-4.3_1 libtbbmalloc_debug.so.2 tbb-4.3_1 diff --git a/srcpkgs/godot-beta/files/godot-beta.desktop b/srcpkgs/godot-beta/files/godot-beta.desktop new file mode 100644 index 000000000000..acce6dd12c93 --- /dev/null +++ b/srcpkgs/godot-beta/files/godot-beta.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Godot(Beta) +Comment=Application for making games +Exec=/usr/bin/godot-beta %U +Icon=godot-beta +Terminal=false +Type=Application +Categories=Utility;Game; + diff --git a/srcpkgs/godot-beta/patches/10-fix-musl.patch b/srcpkgs/godot-beta/patches/10-fix-musl.patch new file mode 100644 index 000000000000..42e6111c6afe --- /dev/null +++ b/srcpkgs/godot-beta/patches/10-fix-musl.patch @@ -0,0 +1,13 @@ +--- a/joystick_linux.cpp 2017-12-12 21:28:08.263329050 +0100 ++++ b/platform/linuxbsd/joypad_linux.cpp 2017-12-12 21:29:25.500336429 +0100 +@@ -42,6 +42,10 @@ + #include + #endif + ++#if !defined(__GLIBC__) ++#include ++#endif ++ + #define LONG_BITS (sizeof(long) * 8) + #define test_bit(nr, addr) (((1UL << ((nr) % LONG_BITS)) & ((addr)[(nr) / LONG_BITS])) != 0) + #define NBITS(x) ((((x)-1) / LONG_BITS) + 1) diff --git a/srcpkgs/godot-beta/template b/srcpkgs/godot-beta/template new file mode 100644 index 000000000000..165c714cba8b --- /dev/null +++ b/srcpkgs/godot-beta/template @@ -0,0 +1,51 @@ +# Template file for 'godot-beta' +pkgname=godot-beta +version=4.0 +_betaver=beta13 +revision=1 +archs="x86_64* i686* aarch64* armv7* ppc64*" +build_style=scons +make_build_args="platform=linuxbsd target=editor progress=no production=yes + optimize=speed deprecated=no builtin_embree=false builtin_enet=false + builtin_freetype=false builtin_graphite=false builtin_harfbuzz=false + builtin_libogg=false builtin_libpng=false builtin_libtheora=false + builtin_libvorbis=false builtin_libwebp=false builtin_mbedtls=false + builtin_miniupnpc=false builtin_pcre2=false builtin_zlib=false + builtin_zstd=false" +hostmakedepends="pkg-config clang" +makedepends="alsa-lib-devel freetype-devel mesa glu-devel libXcursor-devel + libXi-devel libXinerama-devel libXrender-devel libXrandr-devel libX11-devel + libpng-devel libwebp-devel libogg-devel libtheora-devel libvorbis-devel + libenet-devel zlib-devel mbedtls-devel miniupnpc-devel pcre2-devel + pulseaudio-devel graphite-devel embree-devel harfbuzz-devel libzstd-devel" +short_desc="Multiplatform 2D and 3D engine" +maintainer="dataCobra " +license="MIT" +homepage="https://www.godotengine.org/" +distfiles="https://downloads.tuxfamily.org/godotengine/${version}/${_betaver}/godot-${version}-${_betaver}.tar.xz" +checksum=1d3f85c48a644b75a27c8ce4a8b4a7f25a9de703e9efc63cd65d2d714814c144 +nocross=https://build.voidlinux.org/builders/armv7l_builder/builds/6342/steps/shell_3/logs/stdio + +CFLAGS+=" -fPIE -fPIC" +LDFLAGS+=" -pie" + +post_extract() { + vsed -e 's/#ifdef CRASH_HANDLER_ENABLED/#if defined(CRASH_HANDLER_ENABLED) \&\& defined(__GLIBC__)/' \ + -i platform/linuxbsd/crash_handler_linuxbsd.cpp +} + +pre_build() { + export CXXFLAGS=" $CXXFLAGS " +} + +do_install() { + vlicense LICENSE.txt + vinstall ${FILESDIR}/godot-beta.desktop 644 /usr/share/applications/ + vinstall ${wrksrc}/icon.png 644 /usr/share/pixmaps/godot-beta.png + + case "$XBPS_TARGET_MACHINE" in + x86_64*|aarch64*) vbin bin/godot.linuxbsd.editor.x86_64 godot-beta;; + ppc64*) vbin bin/godot.linuxbsd.editor.ppc64 godot-beta;; + *) vbin bin/godot.linuxbsd.editor.x86_32 godot-beta;; + esac +} diff --git a/srcpkgs/godot-beta/update b/srcpkgs/godot-beta/update new file mode 100644 index 000000000000..6aa1db057e86 --- /dev/null +++ b/srcpkgs/godot-beta/update @@ -0,0 +1 @@ +pattern='/archive/refs/tags/(v?|\Q'"$pkgname"'\E-)?\K[\d\.]+(?=-stable\.tar\.gz")'