134 lines
4.7 KiB
Bash
134 lines
4.7 KiB
Bash
# Template file for 'godot'
|
|
pkgname=godot
|
|
version=4.7.1
|
|
revision=1
|
|
archs="x86_64* i686* aarch64* armv7* ppc64*"
|
|
build_style=scons
|
|
make_build_args="engine_update_check=false builtin_brotli=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_pcre2=false builtin_zlib=false builtin_zstd=false lto=auto platform=linuxbsd
|
|
production=yes progress=no wayland=yes x11=yes tests=yes"
|
|
hostmakedepends="pkg-config clang gettext wayland-devel"
|
|
makedepends="alsa-lib-devel brotli-devel freetype-devel glslang-devel glu-devel graphite-devel
|
|
harfbuzz-devel icu-devel libenet-devel libogg-devel libpng-devel libtheora-devel libvorbis-devel
|
|
libwebp-devel libX11-devel libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel
|
|
libXrender-devel libzstd-devel mbedtls2-devel mesa miniupnpc-devel pcre2-devel pulseaudio-devel
|
|
speech-dispatcher-devel wayland-devel zlib-devel"
|
|
depends="speech-dispatcher"
|
|
short_desc="Multiplatform 2D and 3D engine"
|
|
maintainer="zenobit <zen@osowoso.org>"
|
|
license="MIT"
|
|
homepage="https://www.godotengine.org/"
|
|
distfiles="https://github.com/godotengine/godot/archive/${version}-stable.tar.gz"
|
|
checksum=eb2378d76964b25d5ecb61e16c934b59ae4f605c42cdb1a2a49eb7bf6d33dcf0
|
|
nocross=https://build.voidlinux.org/builders/armv7l_builder/builds/6342/steps/shell_3/logs/stdio
|
|
|
|
CFLAGS+=" -fPIE -fPIC"
|
|
LDFLAGS+=" -pie"
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
|
makedepends+=" libexecinfo-devel"
|
|
depends+=" libexecinfo"
|
|
fi
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) arch="x86_32"; make_build_args="${make_build_args/lto=auto/lto=none}" ;;
|
|
x86_64*) arch="x86_64" ;;
|
|
aarch64*) arch="arm64" ;;
|
|
armv7*) arch="arm32" ;;
|
|
ppc64*) arch="ppc64" ;;
|
|
esac
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
x86_64*|aarch64*)
|
|
make_build_args+=" builtin_embree=false"
|
|
makedepends+=" embree-devel"
|
|
;;
|
|
*)
|
|
make_build_args+=" builtin_embree=true"
|
|
;;
|
|
esac
|
|
|
|
make_build_args+=" arch=$arch"
|
|
|
|
pre_build() {
|
|
export CXXFLAGS=" $CXXFLAGS "
|
|
export BUILD_NAME="voidlinux"
|
|
}
|
|
|
|
post_patch() {
|
|
vsed -i misc/dist/linux/org.godotengine.Godot.xml -e 's/name="x/name="application-x/g'
|
|
}
|
|
|
|
do_build() {
|
|
# Build editor
|
|
scons ${makejobs} target=editor ${make_build_args}
|
|
|
|
# Build export templates
|
|
echo -e "\n\n\nBuilding export templates\n\n\n"
|
|
scons ${makejobs} target=template_release ${make_build_args}
|
|
echo -e "\n\n\nBuilding export templates DEBUG\n\n\n"
|
|
scons ${makejobs} target=template_debug ${make_build_args}
|
|
}
|
|
|
|
do_check() {
|
|
# Run tests using the built editor
|
|
scons ${makejobs} target=editor ${make_build_args} tests=yes
|
|
}
|
|
|
|
do_install() {
|
|
vlicense LICENSE.txt
|
|
|
|
vinstall misc/dist/linux/org.godotengine.Godot.desktop 644 usr/share/applications/
|
|
vinstall misc/logo/icon.png 644 usr/share/pixmaps/ godot.png
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
x86_64*) vbin bin/godot.linuxbsd.editor.x86_64 godot;;
|
|
i686*) vbin bin/godot.linuxbsd.editor.x86_32 godot;;
|
|
aarch64*) vbin bin/godot.linuxbsd.editor.arm64 godot;;
|
|
armv7*) vbin bin/godot.linuxbsd.editor.arm32 godot;;
|
|
ppc64*) vbin bin/godot.linuxbsd.editor.ppc64 godot;;
|
|
esac
|
|
|
|
vinstall misc/dist/linux/org.godotengine.Godot.xml 644 usr/share/mime/packages/
|
|
vman misc/dist/linux/godot.6
|
|
|
|
# Install for export-templates sub-package
|
|
local templatesDir="/usr/lib/godot/export_templates/${version}.stable"
|
|
vmkdir "${templatesDir}"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
x86_64*)
|
|
vinstall bin/godot.linuxbsd.template_release.x86_64 755 "${templatesDir}" linux_release.x86_64
|
|
vinstall bin/godot.linuxbsd.template_debug.x86_64 755 "${templatesDir}" linux_debug.x86_64
|
|
;;
|
|
i686*)
|
|
vinstall bin/godot.linuxbsd.template_release.x86_32 755 "${templatesDir}" linux_release.x86_32
|
|
vinstall bin/godot.linuxbsd.template_debug.x86_32 755 "${templatesDir}" linux_debug.x86_32
|
|
;;
|
|
aarch64*)
|
|
vinstall bin/godot.linuxbsd.template_release.arm64 755 "${templatesDir}" linux_release.arm64
|
|
vinstall bin/godot.linuxbsd.template_debug.arm64 755 "${templatesDir}" linux_debug.arm64
|
|
;;
|
|
armv7*)
|
|
vinstall bin/godot.linuxbsd.template_release.arm32 755 "${templatesDir}" linux_release.arm32
|
|
vinstall bin/godot.linuxbsd.template_debug.arm32 755 "${templatesDir}" linux_debug.arm32
|
|
;;
|
|
ppc64*)
|
|
vinstall bin/godot.linuxbsd.template_release.ppc64 755 "${templatesDir}" linux_release.ppc64
|
|
vinstall bin/godot.linuxbsd.template_debug.ppc64 755 "${templatesDir}" linux_debug.ppc64
|
|
;;
|
|
esac
|
|
}
|
|
|
|
godot-export-templates_package() {
|
|
short_desc+=" - export templates"
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
|
|
pkg_install() {
|
|
vmove usr/lib/godot/export_templates
|
|
}
|
|
}
|