virtualx-engine-arch/PKGBUILD

84 lines
3.2 KiB
Bash
Raw Normal View History

# Maintainer: HurricanePootis <hurricanepootis@protonmail.com>
# Contributor: seth <getchoo at tuta dot io>
# 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>
2024-10-27 17:34:14 +01:00
_pkgname=virtualx-engine
pkgname=virtualx-engine
2024-09-11 21:44:41 +02:00
pkgver=3.6
pkgrel=1
2024-10-27 17:34:14 +01:00
pkgdesc='Game Engine Forked From Godot 3.6'
url='https://godotengine.org'
license=(MIT)
arch=(x86_64)
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
libsquish libxcursor libxi libxinerama libxrandr opusfile miniupnpc
zstd zlib glibc libxrender pcre2 libx11 opus libogg libxext)
optdepends=(pipewire-alsa pipewire-pulse)
2024-10-27 17:34:14 +01:00
source=("$_pkgname-$pkgver-stable::git+https://git.asgardius.company/asgardius/virtualx-engine"
"godot3.patch")
2024-10-27 17:34:14 +01:00
b2sums=('SKIP'
'f466f6e37a5f1af4c75e7a9f675c6bb10b7cc4619df87dcff90cbca8bb83e6724181eea406d20497f45edb67c9916e9841208871967726a50288c3e47afa34d1')
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
# Make godot build a binary compatible with Godot 4
cd "$srcdir/$_pkgname-$pkgver-stable"
2024-10-27 17:34:14 +01:00
#patch -p1 < "$srcdir/godot3.patch"
sed -i 's/addr, 16/addr, 16, nullptr, 0/g' "$srcdir/$_pkgname-$pkgver-stable/modules/upnp/upnp.cpp"
}
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"
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) \
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() {
# make godot3 compatible with godot
cd "$srcdir/$_pkgname-$pkgver-stable/misc/dist/linux/"
2024-10-27 17:34:14 +01:00
#sed -i 's/Godot Engine/Virtualx Game Engine/g' org.godotengine.Godot.desktop
cd $srcdir/$_pkgname-$pkgver-stable
2024-10-27 17:34:14 +01:00
install -Dm644 misc/dist/linux/asgardius.page.virtualxengine.desktop \
"$pkgdir/usr/share/applications/asgardius.page.virtualxengine.desktop"
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"
install -Dm644 misc/dist/linux/org.godotengine.Godot.xml \
"$pkgdir/usr/share/mime/packages/org.godotengine.Godot3.xml"
}