void-packages/srcpkgs/godot/template
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

54 lines
2.1 KiB
Bash

# Template file for 'godot'
pkgname=godot
version=3.3
revision=2
archs="x86_64* i686* aarch64* armv7* ppc64*"
wrksrc="${pkgname}-${version}-stable"
build_style=scons
# Godot contains private copies of libraries
# that already have been packaged elsewhere.
# Use builtin bullet for now as it's too old in repos (needs 2.89)
# Toggle to not use builtin once bullet has been updated
make_build_args="platform=x11 tools=yes target=release_debug dev=no progress=no
pulseaudio=no builtin_bullet=false builtin_libpng=false builtin_libvpx=false
builtin_libwebp=false builtin_libogg=false builtin_libtheora=false
builtin_opus=false builtin_libvorbis=false builtin_enet=false
builtin_zlib=false builtin_freetype=false builtin_mbedtls=false
builtin_miniupnpc=false builtin_pcre2=false"
hostmakedepends="pkg-config clang"
makedepends="
alsa-lib-devel freetype-devel glu-devel libXcursor-devel libXi-devel
libXinerama-devel libXrender-devel libXrandr-devel libX11-devel
bullet-devel libpng-devel libvpx-devel libwebp-devel libogg-devel libtheora-devel
opus-devel opusfile-devel libvorbis-devel libenet-devel zlib-devel mbedtls-devel
miniupnpc-devel pcre2-devel"
short_desc="Multiplatform 2D and 3D engine"
maintainer="Nick Hahn <nick.hahn@hotmail.de>"
license="MIT"
homepage="https://www.godotengine.org/"
distfiles="https://github.com/godotengine/${pkgname}/archive/${version}-stable.tar.gz"
checksum=595ff16eaef3d0b6c030575f4b7fcae8b805e407b90a2f71af3e4142362c1794
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/x11/crash_handler_x11.cpp
}
pre_build() {
export CXXFLAGS=" $CXXFLAGS "
}
do_install() {
vlicense LICENSE.txt
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*|aarch64*|ppc64*) vbin bin/godot.x11.opt.tools.64 godot;;
*) vbin bin/godot.x11.opt.tools.32 godot;;
esac
}