From 096ce7c05492ade49aa7f9a415c9a0666daefab4 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 4 Jan 2024 01:52:31 -0600 Subject: [PATCH 1/2] godot: provide template --- srcpkgs/godot-template-debug | 1 + srcpkgs/godot-template-release | 1 + srcpkgs/godot/template | 39 +++++++++++++++++++++++++--------- 3 files changed, 31 insertions(+), 10 deletions(-) create mode 120000 srcpkgs/godot-template-debug create mode 120000 srcpkgs/godot-template-release diff --git a/srcpkgs/godot-template-debug b/srcpkgs/godot-template-debug new file mode 120000 index 0000000000000..9ac33e8ef4315 --- /dev/null +++ b/srcpkgs/godot-template-debug @@ -0,0 +1 @@ +godot \ No newline at end of file diff --git a/srcpkgs/godot-template-release b/srcpkgs/godot-template-release new file mode 120000 index 0000000000000..9ac33e8ef4315 --- /dev/null +++ b/srcpkgs/godot-template-release @@ -0,0 +1 @@ +godot \ No newline at end of file diff --git a/srcpkgs/godot/template b/srcpkgs/godot/template index 8eb76127acc48..a290266693e71 100644 --- a/srcpkgs/godot/template +++ b/srcpkgs/godot/template @@ -1,17 +1,18 @@ # Template file for 'godot' pkgname=godot version=4.2.1 -revision=1 -archs="x86_64* i686* aarch64* armv7* ppc64*" +revision=2 +archs="x86_64* i686* aarch64* armv7* ppc64* riscv64*" build_style=scons # Build currently fails with embree-4.X -make_build_args="platform=linuxbsd target=editor progress=no production=yes +_make_build_args="platform=linuxbsd progress=no production=yes lto=auto builtin_brotli=false builtin_embree=true builtin_enet=false builtin_freetype=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" +make_build_args="target=editor $_make_build_args" 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 @@ -42,6 +43,7 @@ case "$XBPS_TARGET_MACHINE" in aarch64*) arch="arm64" ;; armv7*) arch="arm32" ;; ppc64*) arch="ppc64" ;; + riscv64*) arch="rv64" ;; esac make_build_args+=" arch=$arch" @@ -51,6 +53,13 @@ pre_build() { export BUILD_NAME="voidlinux" } +post_build() { + make_build_args="target=template_release $_make_build_args arch=$arch" + do_build + make_build_args="target=template_debug $_make_build_args arch=$arch" + do_build +} + post_patch() { vsed -i misc/dist/linux/org.godotengine.Godot.xml -e 's/name="x/name="application-x/g' } @@ -60,14 +69,24 @@ do_install() { vinstall ${FILESDIR}/godot.desktop 644 /usr/share/applications/ vinstall ${wrksrc}/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 + vbin bin/godot.linuxbsd.editor.$arch godot + vbin bin/godot.linuxbsd.template_release.$arch godot-template-release + vbin bin/godot.linuxbsd.template_debug.$arch godot-template-debug vinstall misc/dist/linux/org.godotengine.Godot.xml 644 /usr/share/mime/packages/ vman misc/dist/linux/godot.6 } + +godot-template-release_package() { + short_desc+=" (templates)" + pkg_install() { + vmove usr/bin/godot-template-release + } +} + +godot-template-debug_package() { + short_desc+=" (templates)" + pkg_install() { + vmove usr/bin/godot-template-debug + } +} From 675a511ea6431699f1fc251a7fa7e374e0d3223c Mon Sep 17 00:00:00 2001 From: John Date: Thu, 4 Jan 2024 07:54:39 -0600 Subject: [PATCH 2/2] New package: pixelorama-0.11.3.1 --- srcpkgs/pixelorama/template | 73 +++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 srcpkgs/pixelorama/template diff --git a/srcpkgs/pixelorama/template b/srcpkgs/pixelorama/template new file mode 100644 index 0000000000000..92c94fec45734 --- /dev/null +++ b/srcpkgs/pixelorama/template @@ -0,0 +1,73 @@ +# Template file for 'pixelorama' +pkgname=pixelorama +version=0.11.3.1 +_commit=33ffa88a5b8edec7dc4827c48d70e476fe4dff37 +revision=1 +build_style=godot +hostmakedepends="godot" +makedepends="godot-template-release" +depends="godot-template-release>=4<5" +short_desc="2D sprite editor, made with the Godot Engine" +maintainer="John " +license="MIT" +homepage="https://orama-interactive.itch.io/pixelorama" +distfiles="https://github.com/Orama-Interactive/Pixelorama/archive/${_commit}.tar.gz" +checksum=1f542ad919a563d65c3735209a30ab66306b200063b72180176ef3f381acd948 + +do_configure() { + case "$XBPS_TARGET_MACHINE" in + i686*) godot_arch="x86_32" ;; + x86_64*) godot_arch="x86_64" ;; + aarch64*) godot_arch="arm64" ;; + armv7*) godot_arch="arm32" ;; + ppc64*) godot_arch="ppc64" ;; + riscv64*) godot_arch="rv64" ;; + esac + + cat > export_presets.cfg <<-_EOF + [preset.0] + + name="Void" + platform="Linux/X11" + runnable=false + dedicated_server=false + custom_features="" + export_filter="all_resources" + include_filter="" + exclude_filter="" + export_path="" + encryption_include_filters="" + encryption_exclude_filters="" + encrypt_pck=false + encrypt_directory=false + + [preset.0.options] + + custom_template/debug="${XBPS_CROSS_BASE}/usr/bin/godot-template-debug" + custom_template/release="${XBPS_CROSS_BASE}/usr/bin/godot-template-release" + debug/export_console_wrapper=1 + binary_format/embed_pck=false + texture_format/bptc=true + texture_format/s3tc=true + texture_format/etc=false + texture_format/etc2=false + binary_format/architecture="${godot_arch}" + binary_format/64_bits=true + texture_format/no_bptc_fallbacks=true + _EOF + +} + +do_build() { + mkdir -p build + godot --headless -v --export-pack "Void" ./build/${pkgname}.pck +} + +do_install() { + vinstall build/${pkgname}.pck 644 usr/share/${pkgname} + cat > run.sh <<-_EOF + #!/bin/sh + exec godot-template-release --main-pack /usr/share/${pkgname}/${pkgname}.pck $@ + _EOF + vbin run.sh ${pkgname} +}