diff --git a/srcpkgs/godot/INSTALL.msg b/srcpkgs/godot/INSTALL.msg new file mode 100644 index 00000000000..71063735a1d --- /dev/null +++ b/srcpkgs/godot/INSTALL.msg @@ -0,0 +1,4 @@ +If you want to export your games, you should either +install godot-templates or download it from +godotengine.org . If godot-template should not be +available, just open an issue on GitHub. diff --git a/srcpkgs/godot/files/godot.desktop b/srcpkgs/godot/files/godot.desktop new file mode 100644 index 00000000000..e63874e9abb --- /dev/null +++ b/srcpkgs/godot/files/godot.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Godot +Comment=Application for making games +Exec=/usr/bin/godot %U +Icon=godot +Terminal=false +Type=Application +Categories=Utility;Game; + diff --git a/srcpkgs/godot/patches/10-fix-musl b/srcpkgs/godot/patches/10-fix-musl new file mode 100644 index 00000000000..b3aa4cb7a83 --- /dev/null +++ b/srcpkgs/godot/patches/10-fix-musl @@ -0,0 +1,14 @@ +--- joystick_linux.cpp 2017-12-12 21:28:08.263329050 +0100 ++++ platform/x11/joystick_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/template b/srcpkgs/godot/template new file mode 100644 index 00000000000..e2113dbf02f --- /dev/null +++ b/srcpkgs/godot/template @@ -0,0 +1,39 @@ +# Template file for 'godot' +pkgname=godot +version=2.1.4 +revision=1 +wrksrc="${pkgname}-${version}-stable" +build_style=scons +hostmakedepends="scons pkg-config clang" +makedepends=" + alsa-lib-devel freetype-devel glu-devel libXcursor-devel + libXinerama-devel libXrender-devel libXrandr-devel libressl-devel libX11-devel" +short_desc="A multiplatform 2D and 3D engine" +maintainer="Nick Hahn " +license="MIT" +homepage="https://www.godotengine.org/" +distfiles="https://github.com/godotengine/${pkgname}/archive/${version}-stable.tar.gz" +checksum=07cf3b01367d5ea53805f144bc60711bd79efb53f1f88d57d6a706e6944de8d7 +# Godot contains private copies of libraries +# that already have been packaged elsewhere. +make_build_args="use_llvm=yes platform=x11 tools=yes target=release_debug colored=yes pulseaudio=no" + +# Specifing nopie=yes crashes clang, because -no-pie is not implemented, +# only -no-pie is +CFLAGS+=" -fPIE -fPIC" +LDFLAGS+=" -pie" + +post_extract() { + sed -i -e "/openssl_version =/,+4d" platform/x11/detect.py +} + +do_install() { + vlicense LICENSE.txt + vinstall ${FILESDIR}/godot.desktop 644 /usr/share/applications/ + vinstall ${wrksrc}/logo.png 644 /usr/share/pixmaps/ godot.png + + case "$XBPS_TARGET_MACHINE" in + x86_64*|aarch64*) vbin bin/godot.x11.opt.tools.64.llvm godot;; + *) vbin bin/godot.x11.opt.tools.32.llvm godot;; + esac +}