2023-03-01 19:35:43 +01:00
|
|
|
# Maintainer: HurricanePootis <hurricanepootis@protonmail.com>
|
2023-03-11 02:01:01 +01:00
|
|
|
# Contributor: seth <getchoo at tuta dot io>
|
2023-03-01 19:35:43 +01:00
|
|
|
# Contributor: Alexander F. Rødseth <xyproto@archlinux.org>
|
|
|
|
# Contributor: loqs
|
|
|
|
# Contributor: Jorge Araya Navarro <jorgejavieran@yahoo.com.mx>
|
|
|
|
# Contributor: Cristian Porras <porrascristian@gmail.com>
|
|
|
|
# Contributor: Matthew Bentley <matthew@mtbentley.us>
|
|
|
|
|
|
|
|
_pkgname=godot
|
|
|
|
pkgname=godot3
|
2024-09-11 21:44:41 +02:00
|
|
|
pkgver=3.6
|
|
|
|
pkgrel=1
|
2023-03-01 19:35:43 +01:00
|
|
|
pkgdesc='Advanced cross-platform 2D and 3D game engine (3.x Branch)'
|
|
|
|
url='https://godotengine.org'
|
|
|
|
license=(MIT)
|
|
|
|
arch=(x86_64)
|
2024-08-11 02:36:54 +02:00
|
|
|
makedepends=(gcc scons yasm alsa-lib pulse-native-provider)
|
2023-08-17 01:08:27 +02:00
|
|
|
depends=(embree3 freetype2 libglvnd libtheora libvorbis libvpx libwebp libwslay
|
2024-09-06 23:52:01 +02:00
|
|
|
libsquish libxcursor libxi libxinerama libxrandr opusfile miniupnpc
|
|
|
|
zstd zlib glibc libxrender pcre2 libx11 opus libogg libxext)
|
2023-03-01 19:35:43 +01:00
|
|
|
optdepends=(pipewire-alsa pipewire-pulse)
|
2023-03-11 02:01:01 +01:00
|
|
|
source=("$_pkgname-$pkgver.tar.gz::https://github.com/godotengine/godot/archive/$pkgver-stable.tar.gz"
|
|
|
|
"godot3.patch")
|
2024-09-11 21:44:41 +02:00
|
|
|
b2sums=('d70e80218b37be9673f913a24e367c892ab0462ddc42134a8c1707cb038327fc4c5ae1a5ca8c83dc77c0bb5b226d68426a7625074f677e6c178433f762c4a451'
|
2023-03-11 02:01:01 +01:00
|
|
|
'5ed41b79e0121e66614cce997d8c05b3efafefb45d93a426fe4f63bc9917a8dad8519d3f11021a62d6b3a8f7210f2cc86d03361a51dcf79007b0eb71289c1370')
|
2023-03-01 19:35:43 +01:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
# Disable the check that adds -no-pie to LINKFLAGS, for gcc != 6
|
|
|
|
sed -i 's,0] >,0] =,g' $_pkgname-$pkgver-stable/platform/x11/detect.py
|
2023-03-11 02:01:01 +01:00
|
|
|
|
|
|
|
# Make godot build a binary compatible with Godot 4
|
|
|
|
cd "$srcdir/$_pkgname-$pkgver-stable"
|
|
|
|
patch -p1 < "$srcdir/godot3.patch"
|
2024-09-06 23:52:01 +02:00
|
|
|
sed -i 's/addr, 16/addr, 16, nullptr, 0/g' "$srcdir/$_pkgname-$pkgver-stable/modules/upnp/upnp.cpp"
|
2023-03-01 19:35:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# Not unbundled (yet):
|
|
|
|
# bullet (FS#72924, https://github.com/godotengine/godot/issues/55599)
|
|
|
|
# certs (FS#72762)
|
|
|
|
# enet (contains no upstreamed IPv6 support)
|
|
|
|
# recast, xatlas
|
|
|
|
# AUR: libwebm
|
2024-07-07 01:06:30 +02:00
|
|
|
local to_unbundle="embree freetype libogg libpng libsquish libtheora libvorbis libvpx libwebp opus pcre2 wslay zlib zstd miniupnpc"
|
2023-03-01 19:35:43 +01:00
|
|
|
local system_libs=""
|
|
|
|
for _lib in $to_unbundle; do
|
|
|
|
system_libs+="builtin_"$_lib"=no "
|
|
|
|
rm -rf $srcdir/$_pkgname-$pkgver-stable/thirdparty/$_lib
|
|
|
|
done
|
|
|
|
|
|
|
|
cd $srcdir/$_pkgname-$pkgver-stable
|
|
|
|
export BUILD_NAME=arch_linux
|
2023-03-01 19:47:13 +01:00
|
|
|
scons -j$(nproc) \
|
2023-03-01 19:35:43 +01:00
|
|
|
bits=64 \
|
|
|
|
colored=yes \
|
|
|
|
platform=x11 \
|
|
|
|
pulseaudio=yes \
|
|
|
|
system_certs_path=/etc/ssl/certs/ca-certificates.crt \
|
|
|
|
target=release_debug \
|
|
|
|
tools=yes \
|
|
|
|
use_llvm=no \
|
|
|
|
CFLAGS="$CFLAGS -fPIC -Wl,-z,relro,-z,now -w" \
|
|
|
|
CXXFLAGS="$CXXFLAGS -fPIC -Wl,-z,relro,-z,now -w" \
|
|
|
|
LINKFLAGS="$LDFLAGS" \
|
|
|
|
$system_libs
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2023-03-11 02:01:01 +01:00
|
|
|
# make godot3 compatible with godot
|
|
|
|
cd "$srcdir/$_pkgname-$pkgver-stable/misc/dist/linux/"
|
|
|
|
|
|
|
|
sed -i 's/Godot Engine/Godot Engine 3 LTS/g' org.godotengine.Godot.desktop
|
|
|
|
|
2023-03-01 19:35:43 +01:00
|
|
|
cd $srcdir/$_pkgname-$pkgver-stable
|
|
|
|
install -Dm644 misc/dist/linux/org.godotengine.Godot.desktop \
|
2023-10-01 01:31:05 +02:00
|
|
|
"$pkgdir/usr/share/applications/org.godotengine.Godot3.desktop"
|
2023-03-11 02:01:01 +01:00
|
|
|
install -Dm644 icon.svg "$pkgdir/usr/share/pixmaps/$pkgname.svg"
|
|
|
|
install -Dm755 bin/godot.x11.opt.tools.64 "$pkgdir/usr/bin/$pkgname"
|
|
|
|
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
2024-06-29 20:50:09 +02:00
|
|
|
install -Dm644 misc/dist/linux/godot.6 "$pkgdir/usr/share/man/man6/$pkgname.6"
|
2023-03-01 19:35:43 +01:00
|
|
|
install -Dm644 misc/dist/linux/org.godotengine.Godot.xml \
|
2023-03-11 02:01:01 +01:00
|
|
|
"$pkgdir/usr/share/mime/packages/org.godotengine.Godot3.xml"
|
2023-03-01 19:35:43 +01:00
|
|
|
}
|