archrelease: copy trunk to community-any
[ArchLinux/community.git] / godot / repos / community-x86_64 / PKGBUILD
bloba74f8f65cb8ff53cff0455a6f1e60bf8aec2a94e
1 # Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2 # Contributor: loqs
3 # Contributor: Jorge Araya Navarro <jorgejavieran@yahoo.com.mx>
4 # Contributor: Cristian Porras <porrascristian@gmail.com>
5 # Contributor: Matthew Bentley <matthew@mtbentley.us>
7 pkgbase=godot
8 pkgname=(godot)
9 pkgver=4.0.2
10 pkgrel=4
11 pkgdesc='Advanced cross-platform 2D and 3D game engine'
12 url='https://godotengine.org/'
13 license=(MIT)
14 arch=(x86_64)
15 makedepends=(alsa-lib pulseaudio scons yasm)
16 depends=(embree3 freetype2 graphite harfbuzz harfbuzz-icu libglvnd libspeechd
17          libsquish libtheora libvorbis libwebp libwslay libxcursor libxi
18          libxinerama libxrandr mbedtls miniupnpc pcre2)
19 optdepends=(pipewire-alsa pipewire-pulse)
20 source=("$pkgbase-$pkgver.tar.gz::https://github.com/godotengine/godot/archive/$pkgver-stable.tar.gz")
21 b2sums=('56069525ee31d6750c6c0107a58e8cb90ad0d06d5a521c127dbe5ba102577a1a8a906ac2c2eeb250156ad3ffbd5c3c3d2c3a590cfd2240ddc2b004b8e8dff208')
22 sha256sums=('d978282597c5e3a398ad3ade8b5a68d351178c82b197fa6a64045f4abc37e5a6')
24 prepare() {
25   # Update the MIME info, ref FS#77810
26   sed -i 's,xmlns="https://specifications.freedesktop.org/shared-mime-info-spec",xmlns="http://www.freedesktop.org/standards/shared-mime-info",g' \
27     $pkgbase-$pkgver-stable/misc/dist/linux/org.godotengine.Godot.xml
30 build() {
31   cd $pkgbase-$pkgver-stable
32   export BUILD_NAME=arch_linux
33   # Not unbundled (yet):
34   #  enet (contains no upstreamed IPv6 support)
35   #  AUR: libwebm, rvo2
36   #  recastnavigation, xatlas
37   scons -j$(nproc --all) \
38     CFLAGS="$CFLAGS -fPIC -Wl,-z,relro,-z,now -w" \
39     CXXFLAGS="$CXXFLAGS -fPIC -Wl,-z,relro,-z,now -w" \
40     LINKFLAGS="$LDFLAGS" \
41     arch=$CARCH \
42     builtin_embree=no \
43     builtin_enet=yes \
44     builtin_freetype=no \
45     builtin_msdfgen=yes \
46     builtin_glslang=yes \
47     builtin_graphite=no \
48     builtin_harfbuzz=no \
49     builtin_icu4c=yes \
50     builtin_libogg=no \
51     builtin_libpng=no \
52     builtin_libtheora=no \
53     builtin_libvorbis=no \
54     builtin_libwebp=no \
55     builtin_wslay=yes \
56     builtin_mbedtls=no \
57     builtin_miniupnpc=no \
58     builtin_pcre2=no \
59     builtin_pcre2_with_jit=no \
60     builtin_recastnavigation=yes \
61     builtin_rvo2=yes \
62     builtin_squish=no \
63     builtin_xatlas=yes \
64     builtin_zlib=no \
65     builtin_zstd=no \
66     colored=yes \
67     platform=linuxbsd \
68     production=yes \
69     pulseaudio=yes \
70     system_certs_path=/etc/ssl/certs/ca-certificates.crt \
71     target=editor \
72     use_llvm=no \
73     werror=no
76 package_godot() {
77   cd $pkgbase-$pkgver-stable
78   install -Dm644 misc/dist/linux/org.godotengine.Godot.desktop \
79     "$pkgdir/usr/share/applications/godot.desktop"
80   install -Dm644 icon.svg "$pkgdir/usr/share/pixmaps/godot.svg"
81   install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/godot/LICENSE"
82   install -Dm644 misc/dist/linux/godot.6 "$pkgdir/usr/share/man/man6/godot.6"
83   install -Dm644 misc/dist/linux/org.godotengine.Godot.xml \
84     "$pkgdir/usr/share/mime/packages/org.godotengine.Godot.xml"
85   install -Dm755 bin/godot.linuxbsd.editor.$CARCH "$pkgdir/usr/bin/godot"