mirror of
https://github.com/nestriness/nestri.git
synced 2026-05-02 03:13:10 +03:00
feat: Init
This commit is contained in:
412
build/packages/lib32-mesa/PKGBUILD
Normal file
412
build/packages/lib32-mesa/PKGBUILD
Normal file
@@ -0,0 +1,412 @@
|
||||
pkgbase=lib32-mesa
|
||||
pkgname=(
|
||||
lib32-mesa
|
||||
lib32-vulkan-intel
|
||||
lib32-vulkan-nouveau
|
||||
lib32-vulkan-radeon
|
||||
lib32-vulkan-virtio
|
||||
lib32-vulkan-mesa-layers
|
||||
lib32-vulkan-mesa-implicit-layers
|
||||
)
|
||||
pkgver=26.1.0
|
||||
_pkgver=${pkgver/[a-z]/-&}
|
||||
pkgrel=1
|
||||
epoch=1
|
||||
pkgdesc="Open-source OpenGL drivers - 32-bit"
|
||||
url="https://gitlab.freedesktop.org/mesa/mesa"
|
||||
arch=(x86_64)
|
||||
license=("MIT AND BSD-3-Clause AND SGI-B-2.0")
|
||||
makedepends=(
|
||||
lib32-clang
|
||||
lib32-directx-headers
|
||||
lib32-expat
|
||||
lib32-gcc-libs
|
||||
lib32-glibc
|
||||
lib32-libdisplay-info
|
||||
lib32-libdrm
|
||||
lib32-libelf
|
||||
lib32-libglvnd
|
||||
lib32-libpng
|
||||
lib32-libva
|
||||
lib32-libx11
|
||||
lib32-libxcb
|
||||
lib32-libxext
|
||||
lib32-libxml2
|
||||
lib32-libxrandr
|
||||
lib32-libxshmfence
|
||||
lib32-libxxf86vm
|
||||
lib32-llvm
|
||||
lib32-llvm-libs
|
||||
lib32-lm_sensors
|
||||
lib32-rust-libs
|
||||
lib32-spirv-llvm-translator
|
||||
lib32-spirv-tools
|
||||
lib32-systemd
|
||||
lib32-vulkan-icd-loader
|
||||
lib32-wayland
|
||||
lib32-xcb-util-keysyms
|
||||
lib32-zlib
|
||||
lib32-zstd
|
||||
|
||||
# shared between mesa and lib32-mesa
|
||||
cbindgen
|
||||
clang
|
||||
cmake
|
||||
elfutils
|
||||
glslang
|
||||
libclc
|
||||
meson
|
||||
python-mako
|
||||
python-packaging
|
||||
python-ply
|
||||
python-pycparser
|
||||
python-yaml
|
||||
rust-bindgen
|
||||
wayland-protocols
|
||||
xorgproto
|
||||
)
|
||||
options=(
|
||||
# GCC 14 LTO causes segfault in LLVM under si_llvm_optimize_module
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
|
||||
#
|
||||
# In general, upstream considers LTO to be broken until explicit notice.
|
||||
!lto
|
||||
)
|
||||
source=("${pkgname}::git+${url}.git#branch=main")
|
||||
|
||||
# Rust crates for NVK, used as Meson subprojects
|
||||
declare -A _crates=(
|
||||
bitflags 2.9.1
|
||||
cfg-if 1.0.0
|
||||
equivalent 1.0.1
|
||||
errno 0.3.12
|
||||
hashbrown 0.14.1
|
||||
indexmap 2.2.6
|
||||
libc 0.2.171
|
||||
log 0.4.27
|
||||
once_cell 1.8.0
|
||||
paste 1.0.14
|
||||
pest 2.8.0
|
||||
pest_derive 2.8.0
|
||||
pest_generator 2.8.0
|
||||
pest_meta 2.8.0
|
||||
proc-macro2 1.0.86
|
||||
quote 1.0.35
|
||||
remain 0.2.12
|
||||
roxmltree 0.20.0
|
||||
rustc-hash 2.1.1
|
||||
rustix 1.1.2
|
||||
syn 2.0.87
|
||||
thiserror 2.0.11
|
||||
thiserror-impl 2.0.11
|
||||
ucd-trie 0.1.6
|
||||
unicode-ident 1.0.12
|
||||
windows-link 0.2.0
|
||||
windows-sys 0.61.1
|
||||
zerocopy 0.8.13
|
||||
zerocopy-derive 0.8.13
|
||||
)
|
||||
|
||||
# Used to generate the above table
|
||||
_gencrates() {
|
||||
grep '^source_url' subprojects/*-rs.wrap | \
|
||||
sed -r 's|.*crates/([^/]+)/([0-9.]+)/download|\1 \2|' | \
|
||||
column -t -S 2 | sed 's/^/ /'
|
||||
}
|
||||
|
||||
for _crate in "${!_crates[@]}"; do
|
||||
_ver="${_crates[$_crate]}"
|
||||
source+=(
|
||||
"$_crate-$_ver.tar.gz::https://crates.io/api/v1/crates/$_crate/$_ver/download"
|
||||
)
|
||||
done
|
||||
|
||||
# https://docs.mesa3d.org/relnotes.html
|
||||
sha256sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd lib32-mesa
|
||||
|
||||
local src
|
||||
for src in "${source[@]}"; do
|
||||
src="${src%%::*}"
|
||||
src="${src##*/}"
|
||||
src="${src%.zst}"
|
||||
[[ $src = *.patch ]] || continue
|
||||
echo "Applying patch $src..."
|
||||
patch -Np1 < "../$src"
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
local meson_options=(
|
||||
--cross-file lib32
|
||||
-D amdgpu-virtio=true
|
||||
-D intel-virtio-experimental=true
|
||||
-D android-libbacktrace=disabled
|
||||
-D b_ndebug=true
|
||||
-D gallium-drivers=all
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-mediafoundation=disabled
|
||||
-D gallium-rusticl-enable-drivers=asahi,freedreno,radeonsi
|
||||
-D gallium-rusticl=true
|
||||
-D gles1=disabled
|
||||
-D html-docs=disabled
|
||||
-D intel-rt=disabled
|
||||
-D libunwind=disabled
|
||||
-D microsoft-clc=disabled
|
||||
-D sysprof=false
|
||||
-D valgrind=disabled
|
||||
-D video-codecs=all
|
||||
-D vulkan-drivers=all
|
||||
-D vulkan-layers=device-select,intel-nullhw,overlay,screenshot,anti-lag,vram-report-limit
|
||||
-D vulkan-manifest-per-architecture=false
|
||||
)
|
||||
|
||||
# Build only minimal debug info to reduce size
|
||||
CFLAGS+=" -g1"
|
||||
CXXFLAGS+=" -g1"
|
||||
|
||||
# Inject subproject packages
|
||||
export MESON_PACKAGE_CACHE_DIR="$srcdir"
|
||||
|
||||
arch-meson lib32-mesa build "${meson_options[@]}"
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
_pick() {
|
||||
local p="$1" f d; shift
|
||||
for f; do
|
||||
d="$srcdir/$p/${f#$pkgdir/}"
|
||||
mkdir -p "$(dirname "$d")"
|
||||
mv -v "$f" "$d"
|
||||
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
||||
done
|
||||
}
|
||||
|
||||
package_lib32-mesa() {
|
||||
depends=(
|
||||
lib32-expat
|
||||
lib32-gcc-libs
|
||||
lib32-glibc
|
||||
lib32-libdrm
|
||||
lib32-libelf
|
||||
lib32-libglvnd
|
||||
lib32-libx11
|
||||
lib32-libxcb
|
||||
lib32-libxext
|
||||
lib32-libxshmfence
|
||||
lib32-libxxf86vm
|
||||
lib32-llvm-libs
|
||||
lib32-lm_sensors
|
||||
lib32-spirv-tools
|
||||
lib32-wayland
|
||||
lib32-zlib
|
||||
lib32-zstd
|
||||
|
||||
mesa
|
||||
)
|
||||
optdepends=("opengl-man-pages: for the OpenGL API man pages")
|
||||
provides=(
|
||||
"lib32-libva-mesa-driver=$epoch:$pkgver-$pkgrel"
|
||||
"lib32-mesa-libgl=$epoch:$pkgver-$pkgrel"
|
||||
lib32-libva-driver
|
||||
lib32-opengl-driver
|
||||
)
|
||||
conflicts=(
|
||||
'lib32-libva-mesa-driver<1:24.2.7-1'
|
||||
'lib32-mesa-libgl<17.0.1-2'
|
||||
)
|
||||
replaces=(
|
||||
'lib32-libva-mesa-driver<1:24.2.7-1'
|
||||
'lib32-mesa-libgl<17.0.1-2'
|
||||
)
|
||||
|
||||
meson install -C build --destdir "$pkgdir" --no-rebuild
|
||||
|
||||
(
|
||||
local libdir=usr/lib32
|
||||
|
||||
cd "$pkgdir"
|
||||
|
||||
_pick vkintel $libdir/libvulkan_intel{,_hasvk}.so
|
||||
|
||||
_pick vknvidia $libdir/libvulkan_nouveau.so
|
||||
|
||||
_pick vkradeon $libdir/libvulkan_radeon.so
|
||||
|
||||
_pick vkvirtio $libdir/libvulkan_virtio.so
|
||||
|
||||
_pick vkdevice $libdir/libVkLayer_MESA_anti_lag.so
|
||||
_pick vkdevice $libdir/libVkLayer_MESA_device_select.so
|
||||
|
||||
_pick vklayer $libdir/libVkLayer_*.so
|
||||
|
||||
rm -rv etc usr/{bin,include,share}
|
||||
|
||||
# indirect rendering
|
||||
ln -sr $libdir/libGLX_{mesa,indirect}.so.0
|
||||
)
|
||||
|
||||
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_lib32-vulkan-intel() {
|
||||
pkgdesc="Open-source Vulkan driver for Intel GPUs - 32-bit"
|
||||
depends=(
|
||||
lib32-expat
|
||||
lib32-gcc-libs
|
||||
lib32-glibc
|
||||
lib32-libdisplay-info
|
||||
lib32-libdrm
|
||||
lib32-libx11
|
||||
lib32-libxcb
|
||||
lib32-libxshmfence
|
||||
lib32-spirv-tools
|
||||
lib32-systemd
|
||||
lib32-vulkan-icd-loader
|
||||
lib32-vulkan-mesa-implicit-layers
|
||||
lib32-wayland
|
||||
lib32-xcb-util-keysyms
|
||||
lib32-zlib
|
||||
lib32-zstd
|
||||
|
||||
vulkan-intel
|
||||
)
|
||||
optdepends=("lib32-vulkan-mesa-layers: additional vulkan layers")
|
||||
provides=(lib32-vulkan-driver)
|
||||
|
||||
mv vkintel/* "$pkgdir"
|
||||
|
||||
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_lib32-vulkan-nouveau() {
|
||||
pkgdesc="Open-source Vulkan driver for Nvidia GPUs - 32-bit"
|
||||
depends=(
|
||||
lib32-expat
|
||||
lib32-gcc-libs
|
||||
lib32-glibc
|
||||
lib32-libdisplay-info
|
||||
lib32-libdrm
|
||||
lib32-libx11
|
||||
lib32-libxcb
|
||||
lib32-libxshmfence
|
||||
lib32-spirv-tools
|
||||
lib32-systemd
|
||||
lib32-vulkan-icd-loader
|
||||
lib32-vulkan-mesa-implicit-layers
|
||||
lib32-wayland
|
||||
lib32-xcb-util-keysyms
|
||||
lib32-zlib
|
||||
lib32-zstd
|
||||
|
||||
vulkan-nouveau
|
||||
)
|
||||
optdepends=("lib32-vulkan-mesa-layers: additional vulkan layers")
|
||||
provides=(lib32-vulkan-driver)
|
||||
|
||||
mv vknvidia/* "$pkgdir"
|
||||
|
||||
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_lib32-vulkan-radeon() {
|
||||
pkgdesc="Open-source Vulkan driver for AMD GPUs - 32-bit"
|
||||
depends=(
|
||||
lib32-expat
|
||||
lib32-gcc-libs
|
||||
lib32-glibc
|
||||
lib32-libdisplay-info
|
||||
lib32-libdrm
|
||||
lib32-libelf
|
||||
lib32-libx11
|
||||
lib32-libxcb
|
||||
lib32-libxshmfence
|
||||
lib32-llvm-libs
|
||||
lib32-spirv-tools
|
||||
lib32-systemd
|
||||
lib32-vulkan-icd-loader
|
||||
lib32-vulkan-mesa-implicit-layers
|
||||
lib32-wayland
|
||||
lib32-xcb-util-keysyms
|
||||
lib32-zlib
|
||||
lib32-zstd
|
||||
|
||||
vulkan-radeon
|
||||
)
|
||||
optdepends=("lib32-vulkan-mesa-layers: additional vulkan layers")
|
||||
provides=(lib32-vulkan-driver)
|
||||
replaces=('lib32-amdvlk<=2025.Q2.1-1')
|
||||
|
||||
mv vkradeon/* "$pkgdir"
|
||||
|
||||
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_lib32-vulkan-virtio() {
|
||||
pkgdesc="Open-source Vulkan driver for Virtio-GPU (Venus) - 32-bit"
|
||||
depends=(
|
||||
lib32-expat
|
||||
lib32-gcc-libs
|
||||
lib32-glibc
|
||||
lib32-libdisplay-info
|
||||
lib32-libdrm
|
||||
lib32-libx11
|
||||
lib32-libxcb
|
||||
lib32-libxshmfence
|
||||
lib32-systemd
|
||||
lib32-vulkan-icd-loader
|
||||
lib32-vulkan-mesa-implicit-layers
|
||||
lib32-wayland
|
||||
lib32-xcb-util-keysyms
|
||||
lib32-zlib
|
||||
lib32-zstd
|
||||
|
||||
vulkan-virtio
|
||||
)
|
||||
optdepends=("lib32-vulkan-mesa-layers: additional vulkan layers")
|
||||
provides=(lib32-vulkan-driver)
|
||||
|
||||
mv vkvirtio/* "$pkgdir"
|
||||
|
||||
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_lib32-vulkan-mesa-layers() {
|
||||
pkgdesc="Mesa's explicit Vulkan layers - 32-bit"
|
||||
depends=(
|
||||
lib32-gcc-libs
|
||||
lib32-glibc
|
||||
lib32-libpng
|
||||
|
||||
vulkan-mesa-layers
|
||||
)
|
||||
conflicts=(lib32-vulkan-mesa-layer)
|
||||
replaces=(lib32-vulkan-mesa-layer)
|
||||
|
||||
mv vklayer/* "$pkgdir"
|
||||
|
||||
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_lib32-vulkan-mesa-implicit-layers() {
|
||||
pkgdesc="Mesa's implicit Vulkan layers - 32-bit"
|
||||
depends=(
|
||||
lib32-gcc-libs
|
||||
lib32-glibc
|
||||
lib32-libdrm
|
||||
lib32-libxcb
|
||||
lib32-wayland
|
||||
|
||||
vulkan-mesa-implicit-layers
|
||||
)
|
||||
conflicts=(lib32-vulkan-mesa-device-select)
|
||||
replaces=(lib32-vulkan-mesa-device-select)
|
||||
|
||||
mv vkdevice/* "$pkgdir"
|
||||
|
||||
install -Dm644 lib32-mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
# vim:set sw=2 sts=-1 et:
|
||||
39
build/packages/libkrun/PKGBUILD
Normal file
39
build/packages/libkrun/PKGBUILD
Normal file
@@ -0,0 +1,39 @@
|
||||
pkgname=libkrun
|
||||
pkgver=1.17.3.r0.gvalpackett
|
||||
pkgrel=1
|
||||
pkgdesc="A dynamic library providing Virtualization-based process isolation capabilities (val/vluqsysxtqrk branch)"
|
||||
url='https://github.com/valpackett/libkrun'
|
||||
arch=('x86_64')
|
||||
license=('Apache-2.0')
|
||||
makedepends=('cargo' 'patchelf' 'clang' 'git')
|
||||
depends=('glibc' 'gcc-libs' 'libkrunfw' 'pipewire' 'virglrenderer')
|
||||
# Format: 'folder_name::git+url#branch=branch_name'
|
||||
source=("${pkgname}::git+${url}.git#branch=val/vluqsysxtqrk")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
# Generates a version string based on the latest tag and commit count
|
||||
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname"
|
||||
|
||||
cargo fetch --locked --target "$(rustc --print host-tuple)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname"
|
||||
|
||||
export ZSTD_SYS_USE_PKG_CONFIG=1
|
||||
make BLK=1 NET=1 EFI=0 GPU=1 SND=1 INPUT=1 VERBOSE=1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname"
|
||||
|
||||
make DESTDIR="$pkgdir" PREFIX=/usr LIBDIR_Linux=lib install
|
||||
|
||||
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
}
|
||||
51
build/packages/libkrunfw/PKGBUILD
Normal file
51
build/packages/libkrunfw/PKGBUILD
Normal file
@@ -0,0 +1,51 @@
|
||||
pkgname=libkrunfw
|
||||
_kver=6.12.68
|
||||
pkgver=5.2.1
|
||||
pkgrel=1
|
||||
pkgdesc="A dynamic library bundling the guest payload consumed by libkrun (with 32-bit support)"
|
||||
url="https://github.com/containers/libkrunfw"
|
||||
arch=('x86_64')
|
||||
license=('GPL-2.0-only' 'LGPL-2.1-only')
|
||||
depends=('glibc')
|
||||
makedepends=('bc' 'python-pyelftools' 'cpio')
|
||||
source=("https://github.com/containers/libkrunfw/archive/refs/tags/v$pkgver/$pkgname-$pkgver.tar.gz"
|
||||
"https://cdn.kernel.org/pub/linux/kernel/v${_kver%%.*}.x/linux-${_kver}.tar.xz")
|
||||
noextract=("linux-${_kver}.tar.xz")
|
||||
options=(!debug)
|
||||
sha256sums=('c7eebd7149b15e4d74d2dff9acd3137dc13eedf604adf1df2efa52d9f36fe0bb'
|
||||
'd367c7504bd4da520dd01eb08125d2d0ac088bc8af4cd56d236f2074dd4225b7')
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
mkdir -p tarballs
|
||||
cp -s "$srcdir/linux-${_kver}.tar.xz" tarballs/
|
||||
|
||||
_config="config-libkrunfw_x86_64"
|
||||
|
||||
# Enable IA32 (32-bit) emulation support
|
||||
sed -i 's/# CONFIG_IA32_EMULATION is not set/CONFIG_IA32_EMULATION=y/' "$_config"
|
||||
|
||||
# Enable modify_ldt syscall (needed by many 32-bit apps including Steam)
|
||||
sed -i 's/# CONFIG_MODIFY_LDT_SYSCALL is not set/CONFIG_MODIFY_LDT_SYSCALL=y/' "$_config"
|
||||
|
||||
# Enable 32-bit time compatibility
|
||||
sed -i 's/# CONFIG_COMPAT_32BIT_TIME is not set/CONFIG_COMPAT_32BIT_TIME=y/' "$_config"
|
||||
|
||||
# Enable x32 ABI
|
||||
sed -i 's/# CONFIG_X86_X32_ABI is not set/CONFIG_X86_X32_ABI=y/' "$_config"
|
||||
|
||||
# Increase max CPU count (default 16 is low for gaming)
|
||||
sed -i 's/CONFIG_NR_CPUS=16/CONFIG_NR_CPUS=128/' "$_config"
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
make DESTDIR="$pkgdir" PREFIX=/usr LIBDIR_Linux=lib install
|
||||
|
||||
install -Dm644 LICENSE-GPL-2.0-only "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-GPL-2.0-only
|
||||
install -Dm644 LICENSE-LGPL-2.1-only "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-LGPL-2.1-only
|
||||
}
|
||||
418
build/packages/mesa/PKGBUILD
Normal file
418
build/packages/mesa/PKGBUILD
Normal file
@@ -0,0 +1,418 @@
|
||||
pkgbase=mesa
|
||||
pkgname=(
|
||||
mesa
|
||||
vulkan-intel
|
||||
vulkan-nouveau
|
||||
vulkan-radeon
|
||||
vulkan-virtio
|
||||
vulkan-mesa-layers
|
||||
vulkan-mesa-implicit-layers
|
||||
)
|
||||
pkgver=26.1.0
|
||||
_pkgver=${pkgver/[a-z]/-&}
|
||||
pkgrel=1
|
||||
epoch=1
|
||||
pkgdesc="Open-source OpenGL drivers"
|
||||
url="https://gitlab.freedesktop.org/mesa/mesa"
|
||||
arch=(x86_64)
|
||||
license=("MIT AND BSD-3-Clause AND SGI-B-2.0")
|
||||
makedepends=(
|
||||
clang
|
||||
directx-headers
|
||||
expat
|
||||
glibc
|
||||
libdisplay-info
|
||||
libdrm
|
||||
libelf
|
||||
libgcc
|
||||
libglvnd
|
||||
libpng
|
||||
libstdc++
|
||||
libva
|
||||
libx11
|
||||
libxcb
|
||||
libxext
|
||||
libxml2
|
||||
libxrandr
|
||||
libxshmfence
|
||||
libxxf86vm
|
||||
llvm
|
||||
llvm-libs
|
||||
lm_sensors
|
||||
rust
|
||||
spirv-llvm-translator
|
||||
spirv-tools
|
||||
systemd-libs
|
||||
vulkan-icd-loader
|
||||
wayland
|
||||
xcb-util-keysyms
|
||||
zlib
|
||||
zstd
|
||||
|
||||
# shared between mesa and lib32-mesa
|
||||
cbindgen
|
||||
clang
|
||||
cmake
|
||||
elfutils
|
||||
glslang
|
||||
libclc
|
||||
meson
|
||||
python-mako
|
||||
python-packaging
|
||||
python-ply
|
||||
python-pycparser
|
||||
python-yaml
|
||||
rust-bindgen
|
||||
wayland-protocols
|
||||
xorgproto
|
||||
|
||||
# mesa-only deps
|
||||
libsysprof-capture
|
||||
valgrind
|
||||
|
||||
# html-docs
|
||||
python-sphinx
|
||||
python-sphinx-hawkmoth
|
||||
)
|
||||
options=(
|
||||
# GCC 14 LTO causes segfault in LLVM under si_llvm_optimize_module
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/11140
|
||||
#
|
||||
# In general, upstream considers LTO to be broken until explicit notice.
|
||||
!lto
|
||||
)
|
||||
source=("${pkgname}::git+${url}.git#branch=main")
|
||||
|
||||
# Rust crates for NVK, used as Meson subprojects
|
||||
declare -A _crates=(
|
||||
bitflags 2.9.1
|
||||
cfg-if 1.0.0
|
||||
equivalent 1.0.1
|
||||
errno 0.3.12
|
||||
hashbrown 0.14.1
|
||||
indexmap 2.2.6
|
||||
libc 0.2.171
|
||||
log 0.4.27
|
||||
once_cell 1.8.0
|
||||
paste 1.0.14
|
||||
pest 2.8.0
|
||||
pest_derive 2.8.0
|
||||
pest_generator 2.8.0
|
||||
pest_meta 2.8.0
|
||||
proc-macro2 1.0.86
|
||||
quote 1.0.35
|
||||
remain 0.2.12
|
||||
roxmltree 0.20.0
|
||||
rustc-hash 2.1.1
|
||||
rustix 1.1.2
|
||||
syn 2.0.87
|
||||
thiserror 2.0.11
|
||||
thiserror-impl 2.0.11
|
||||
ucd-trie 0.1.6
|
||||
unicode-ident 1.0.12
|
||||
windows-link 0.2.0
|
||||
windows-sys 0.61.1
|
||||
zerocopy 0.8.13
|
||||
zerocopy-derive 0.8.13
|
||||
)
|
||||
|
||||
# Used to generate the above table
|
||||
_gencrates() {
|
||||
grep '^source_url' subprojects/*-rs.wrap | \
|
||||
sed -r 's|.*crates/([^/]+)/([0-9.]+)/download|\1 \2|' | \
|
||||
column -t -S 2 | sed 's/^/ /'
|
||||
}
|
||||
|
||||
for _crate in "${!_crates[@]}"; do
|
||||
_ver="${_crates[$_crate]}"
|
||||
source+=(
|
||||
"$_crate-$_ver.tar.gz::https://crates.io/api/v1/crates/$_crate/$_ver/download"
|
||||
)
|
||||
done
|
||||
|
||||
# https://docs.mesa3d.org/relnotes.html
|
||||
sha256sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd mesa
|
||||
|
||||
local src
|
||||
for src in "${source[@]}"; do
|
||||
src="${src%%::*}"
|
||||
src="${src##*/}"
|
||||
src="${src%.zst}"
|
||||
[[ $src = *.patch ]] || continue
|
||||
echo "Applying patch $src..."
|
||||
patch -Np1 < "../$src"
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
local meson_options=(
|
||||
-D amdgpu-virtio=true
|
||||
-D intel-virtio-experimental=true
|
||||
-D android-libbacktrace=disabled
|
||||
-D b_ndebug=true
|
||||
-D gallium-drivers=all
|
||||
-D gallium-extra-hud=true
|
||||
-D gallium-mediafoundation=disabled
|
||||
-D gallium-rusticl-enable-drivers=asahi,freedreno,radeonsi
|
||||
-D gallium-rusticl=true
|
||||
-D gles1=disabled
|
||||
-D html-docs=enabled
|
||||
-D intel-rt=enabled
|
||||
-D libunwind=disabled
|
||||
-D microsoft-clc=disabled
|
||||
-D sysprof=true
|
||||
-D valgrind=enabled
|
||||
-D video-codecs=all
|
||||
-D vulkan-drivers=all
|
||||
-D vulkan-layers=device-select,intel-nullhw,overlay,screenshot,anti-lag,vram-report-limit
|
||||
-D vulkan-manifest-per-architecture=false
|
||||
)
|
||||
|
||||
# Build only minimal debug info to reduce size
|
||||
CFLAGS+=" -g1"
|
||||
CXXFLAGS+=" -g1"
|
||||
|
||||
# Inject subproject packages
|
||||
export MESON_PACKAGE_CACHE_DIR="$srcdir"
|
||||
|
||||
arch-meson mesa build "${meson_options[@]}"
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
_pick() {
|
||||
local p="$1" f d; shift
|
||||
for f; do
|
||||
d="$srcdir/$p/${f#$pkgdir/}"
|
||||
mkdir -p "$(dirname "$d")"
|
||||
mv -v "$f" "$d"
|
||||
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
|
||||
done
|
||||
}
|
||||
|
||||
package_mesa() {
|
||||
depends=(
|
||||
expat
|
||||
glibc
|
||||
libdrm
|
||||
libelf
|
||||
libgcc
|
||||
libglvnd
|
||||
libstdc++
|
||||
libx11
|
||||
libxcb
|
||||
libxext
|
||||
libxshmfence
|
||||
libxxf86vm
|
||||
llvm-libs
|
||||
lm_sensors
|
||||
spirv-tools
|
||||
wayland
|
||||
zlib
|
||||
zstd
|
||||
)
|
||||
optdepends=("opengl-man-pages: for the OpenGL API man pages")
|
||||
provides=(
|
||||
"libva-mesa-driver=$epoch:$pkgver-$pkgrel"
|
||||
"mesa-libgl=$epoch:$pkgver-$pkgrel"
|
||||
libva-driver
|
||||
opengl-driver
|
||||
)
|
||||
conflicts=(
|
||||
'libva-mesa-driver<1:24.2.7-1'
|
||||
'mesa-libgl<17.0.1-2'
|
||||
)
|
||||
replaces=(
|
||||
'libva-mesa-driver<1:24.2.7-1'
|
||||
'mesa-libgl<17.0.1-2'
|
||||
)
|
||||
|
||||
meson install -C build --destdir "$pkgdir" --no-rebuild
|
||||
|
||||
(
|
||||
local libdir=usr/lib
|
||||
|
||||
cd "$pkgdir"
|
||||
|
||||
_pick vkintel $libdir/libvulkan_intel{,_hasvk}.so
|
||||
_pick vkintel usr/share/vulkan/icd.d/intel{,_hasvk}_icd.json
|
||||
|
||||
_pick vknvidia $libdir/libvulkan_nouveau.so
|
||||
_pick vknvidia usr/share/vulkan/icd.d/nouveau_icd.json
|
||||
|
||||
_pick vkradeon $libdir/libvulkan_radeon.so
|
||||
_pick vkradeon usr/share/drirc.d/00-radv-defaults.conf
|
||||
_pick vkradeon usr/share/vulkan/icd.d/radeon_icd.json
|
||||
|
||||
_pick vkvirtio $libdir/libvulkan_virtio.so
|
||||
_pick vkvirtio usr/share/vulkan/icd.d/virtio_icd.json
|
||||
|
||||
_pick vkdevice $libdir/libVkLayer_MESA_anti_lag.so
|
||||
_pick vkdevice $libdir/libVkLayer_MESA_device_select.so
|
||||
_pick vkdevice usr/share/vulkan/implicit_layer.d
|
||||
|
||||
_pick vklayer $libdir/libVkLayer_*.so
|
||||
_pick vklayer usr/bin/mesa-*-control.py
|
||||
_pick vklayer usr/share/vulkan/explicit_layer.d
|
||||
|
||||
# indirect rendering
|
||||
ln -sr $libdir/libGLX_{mesa,indirect}.so.0
|
||||
)
|
||||
|
||||
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_vulkan-intel() {
|
||||
pkgdesc="Open-source Vulkan driver for Intel GPUs"
|
||||
depends=(
|
||||
expat
|
||||
glibc
|
||||
libdisplay-info
|
||||
libdrm
|
||||
libgcc
|
||||
libstdc++
|
||||
libx11
|
||||
libxcb
|
||||
libxshmfence
|
||||
spirv-tools
|
||||
systemd-libs
|
||||
vulkan-icd-loader
|
||||
vulkan-mesa-implicit-layers
|
||||
wayland
|
||||
xcb-util-keysyms
|
||||
zlib
|
||||
zstd
|
||||
)
|
||||
optdepends=("vulkan-mesa-layers: additional vulkan layers")
|
||||
provides=(vulkan-driver)
|
||||
|
||||
mv vkintel/* "$pkgdir"
|
||||
|
||||
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_vulkan-nouveau() {
|
||||
pkgdesc="Open-source Vulkan driver for Nvidia GPUs"
|
||||
depends=(
|
||||
expat
|
||||
glibc
|
||||
libdisplay-info
|
||||
libdrm
|
||||
libgcc
|
||||
libstdc++
|
||||
libx11
|
||||
libxcb
|
||||
libxshmfence
|
||||
spirv-tools
|
||||
systemd-libs
|
||||
vulkan-icd-loader
|
||||
vulkan-mesa-implicit-layers
|
||||
wayland
|
||||
xcb-util-keysyms
|
||||
zlib
|
||||
zstd
|
||||
)
|
||||
optdepends=("vulkan-mesa-layers: additional vulkan layers")
|
||||
provides=(vulkan-driver)
|
||||
|
||||
mv vknvidia/* "$pkgdir"
|
||||
|
||||
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_vulkan-radeon() {
|
||||
pkgdesc="Open-source Vulkan driver for AMD GPUs"
|
||||
depends=(
|
||||
expat
|
||||
glibc
|
||||
libdisplay-info
|
||||
libdrm
|
||||
libelf
|
||||
libgcc
|
||||
libstdc++
|
||||
libx11
|
||||
libxcb
|
||||
libxshmfence
|
||||
llvm-libs
|
||||
spirv-tools
|
||||
systemd-libs
|
||||
vulkan-icd-loader
|
||||
vulkan-mesa-implicit-layers
|
||||
wayland
|
||||
xcb-util-keysyms
|
||||
zlib
|
||||
zstd
|
||||
)
|
||||
optdepends=("vulkan-mesa-layers: additional vulkan layers")
|
||||
provides=(vulkan-driver)
|
||||
replaces=('amdvlk<=2025.Q2.1-1')
|
||||
|
||||
mv vkradeon/* "$pkgdir"
|
||||
|
||||
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_vulkan-virtio() {
|
||||
pkgdesc="Open-source Vulkan driver for Virtio-GPU (Venus)"
|
||||
depends=(
|
||||
expat
|
||||
glibc
|
||||
libdisplay-info
|
||||
libdrm
|
||||
libgcc
|
||||
libx11
|
||||
libxcb
|
||||
libxshmfence
|
||||
systemd-libs
|
||||
vulkan-icd-loader
|
||||
vulkan-mesa-implicit-layers
|
||||
wayland
|
||||
xcb-util-keysyms
|
||||
zlib
|
||||
zstd
|
||||
)
|
||||
optdepends=("vulkan-mesa-layers: additional vulkan layers")
|
||||
provides=(vulkan-driver)
|
||||
|
||||
mv vkvirtio/* "$pkgdir"
|
||||
|
||||
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_vulkan-mesa-layers() {
|
||||
pkgdesc="Mesa's explicit Vulkan layers"
|
||||
depends=(
|
||||
glibc
|
||||
libgcc
|
||||
libpng
|
||||
libstdc++
|
||||
|
||||
python
|
||||
)
|
||||
conflicts=(vulkan-mesa-layer)
|
||||
replaces=(vulkan-mesa-layer)
|
||||
|
||||
mv vklayer/* "$pkgdir"
|
||||
|
||||
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_vulkan-mesa-implicit-layers() {
|
||||
pkgdesc="Mesa's implicit Vulkan layers"
|
||||
depends=(
|
||||
glibc
|
||||
libdrm
|
||||
libxcb
|
||||
wayland
|
||||
)
|
||||
conflicts=(vulkan-mesa-device-select)
|
||||
replaces=(vulkan-mesa-device-select)
|
||||
|
||||
mv vkdevice/* "$pkgdir"
|
||||
|
||||
install -Dm644 mesa/docs/license.rst -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
# vim:set sw=2 sts=-1 et:
|
||||
28
build/packages/virglrenderer/PKGBUILD
Normal file
28
build/packages/virglrenderer/PKGBUILD
Normal file
@@ -0,0 +1,28 @@
|
||||
pkgname=virglrenderer
|
||||
pkgver=1.3.0
|
||||
pkgrel=1
|
||||
pkgdesc='A virtual 3D GPU library, that allows the guest operating system to use the host GPU to accelerate 3D rendering'
|
||||
arch=(x86_64)
|
||||
url='https://virgil3d.github.io/'
|
||||
license=(MIT)
|
||||
depends=(libepoxy mesa libva vulkan-icd-loader)
|
||||
makedepends=(python meson ninja vulkan-headers python-yaml)
|
||||
checkdepends=(check)
|
||||
_tag=virglrenderer-$pkgver
|
||||
source=(virglrenderer-$pkgver.tar.bz2::https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/$_tag/virglrenderer-$_tag.tar.bz2)
|
||||
sha256sums=('47a64189492a754685a430c713ac6700f4b1c3e7b871e87889ddb96e4d65e8ab')
|
||||
|
||||
build() {
|
||||
cd virglrenderer-$_tag
|
||||
meson --prefix=/usr --libexecdir=lib/$pkgname build \
|
||||
-Dvideo=true \
|
||||
-Dvenus=true \
|
||||
-Ddrm-renderers=amdgpu-experimental,i915-experimental
|
||||
ninja -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd virglrenderer-$_tag
|
||||
DESTDIR="$pkgdir" ninja -C build install
|
||||
install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
|
||||
}
|
||||
Reference in New Issue
Block a user