aports/testing/godot/APKBUILD
2023-11-08 21:13:30 +01:00

146 lines
3.6 KiB
Plaintext

# Contributor: Díaz Urbaneja Diego <sodomon2@gmail.com>
# Maintainer: Díaz Urbaneja Diego <sodomon2@gmail.com>
pkgname=godot
pkgver=4.1.1
pkgrel=1
pkgdesc="Multi-platform 2D and 3D game engine"
url="https://godotengine.org"
license="MIT"
# Only armv7 and x86_64 are tested, give other architectures a try
# build system is completely broken and refuses to detect anything correctly
arch="x86_64 x86 armv7 aarch64"
makedepends="
alsa-lib-dev
enet-dev
freetype-dev
glslang-dev
graphite2-dev
harfbuzz-dev
icu-dev
libgudev-dev
libogg-dev
libpng-dev
libtheora-dev
libvorbis-dev
libwebp-dev
libx11-dev
libxcursor-dev
libxi-dev
libxinerama-dev
libxrandr-dev
mbedtls-dev
mesa-dev
miniupnpc-dev
opusfile-dev
pcre2-dev
pulseaudio-dev
python3-dev
scons
wslay-dev
zlib-dev
zstd-dev
"
depends="ca-certificates-bundle"
subpackages="$pkgname-doc $pkgname-templates"
source="https://github.com/godotengine/godot/releases/download/$pkgver-stable/godot-$pkgver-stable.tar.xz
gcc13.patch
no-execinfo.patch
"
options="!check" # No tests
builddir="$srcdir"/godot-"$pkgver"-stable
_sconsflags="
builtin_certs=false
builtin_enet=false
builtin_freetype=false
builtin_glslang=false
builtin_graphite=false
builtin_harfbuzz=false
builtin_icu4c=false
builtin_libogg=false
builtin_libpng=false
builtin_libtheora=false
builtin_libvorbis=false
builtin_libwebp=false
builtin_mbedtls=false
builtin_miniupnpc=false
builtin_opus=false
builtin_pcre2=false
builtin_wslay=false
builtin_zlib=false
builtin_zstd=false
execinfo=false
system_certs_path=/etc/ssl/cert.pem
use_sowrap=false
speechd=false
use_static_cpp=false
"
case "$CARCH" in
aarch64|x86_64)
makedepends="$makedepends embree3-dev"
_sconsflags="$_sconsflags builtin_embree=false"
;;
esac
case "$CARCH" in
x86_64)
;;
*)
# only builds on x86_64
_sconsflags="$_sconsflags module_denoise_enabled=false"
;;
esac
build() {
case "$CARCH" in
x86_64)
local arch="x86_64"
;;
x86)
local arch="x86_32"
;;
armv7)
local arch="arm32"
;;
aarch64)
local arch="arm64"
;;
esac
export BUILD_NAME="alpine_linux"
for target in editor template_release template_debug; do
scons -j${JOBS:-1} \
platform=linuxbsd \
target=$target \
arch=$arch \
$_sconsflags \
CFLAGS="$CFLAGS -O2 -flto=auto" \
CXXFLAGS="$CXXFLAGS -O2 -flto=auto" \
LINKFLAGS="$LDFLAGS"
done
}
package() {
pkgdesc="$pkgdesc (GUI editor)"
install -Dm644 misc/dist/linux/org.godotengine.Godot.desktop \
-t "$pkgdir"/usr/share/applications/
install -Dm644 misc/dist/linux/org.godotengine.Godot.appdata.xml \
-t "$pkgdir"/usr/share/metainfo/
install -Dm644 icon.png "$pkgdir"/usr/share/icons/hicolor/256x256/apps/godot.png
install -Dm644 icon.svg "$pkgdir"/usr/share/icons/hicolor/scalable/apps/godot.svg
install -Dm644 misc/dist/linux/godot.6 -t "$pkgdir"/usr/share/man/man6/
install -Dm755 bin/godot.*.editor.* "$pkgdir"/usr/bin/godot
install -Dm755 bin/godot.*.template_debug.* "$pkgdir"/usr/bin/godot-template-debug
install -Dm755 bin/godot.*.template_release.* "$pkgdir"/usr/bin/godot-template-release
}
templates() {
pkgdesc="$pkgdesc (templates)"
amove usr/bin/*template*
}
sha512sums="
9fc4bdff2ef3f5ad173514709591941f1dff32dd7cc54224a85691b34b6a5f1d01addc9b4f8d996bc6f774cee5c722181122a39b498b23e48e8d70629ff8ff0b godot-4.1.1-stable.tar.xz
129cf8c0331190a111b8d397b7975ef2087486d3fb083b3e02612d2a07b2601d989842f2ec591e2300819d37c4070f74b8d50194f8f9af3219452b856d534ff8 gcc13.patch
7563942223564d5235d96a27c840ce0c9d7ceb9690ce1ed02f43c0c4e7b28e85f8311a18b79aeab545bdb83822604f05f98b561d2d00dd3a1b9cea60f528a7d8 no-execinfo.patch
"