Repository navigation
pkgs: accept the Borealis driver names in omarchy-mlx and mesa-aurora #3177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| pkgbase=mesa-aurora | ||
| pkgname=('mesa-aurora' 'vulkan-aurora') | ||
| epoch=1 | ||
|
|
@@ -34,9 +34,15 @@ | |
| 'lm_sensors' 'zlib' 'zstd' 'xcb-util-keysyms') | ||
| # Use a distinct VCS cache name when changing repository origin. Existing | ||
| # makepkg caches named mesa belong to Aurora and reject a different URL. | ||
| source=("$_src::git+$url.git#commit=$_commit") | ||
| sha256sums=('SKIP') | ||
| source=("$_src::git+$url.git#commit=$_commit" | ||
| 'vulkan-driver-names.sh') | ||
| sha256sums=('SKIP' | ||
| 'e9b50d18a6e5dfd91f3b09ed768f143594316c5934b37a08d09d5b8a1bcd8102') | ||
| options=('!debug') | ||
| # The Vulkan driver meson option is "borealis" after Aurora's rename, with | ||
| # "asahi" kept as a warning alias (Ryan 2026-11-20). "asahi" still selects | ||
| # the same driver on today's pin; the bump carrying the rename quotes the | ||
| # renamed meson.options declaration and switches this once it is real. | ||
| _options=(-Dplatforms=x11,wayland | ||
| -Dgallium-drivers=asahi,zink,softpipe,llvmpipe -Dvulkan-drivers=asahi | ||
| -Degl=enabled -Dgbm=enabled -Dglx=dri -Dgles1=enabled -Dgles2=enabled | ||
|
|
@@ -108,21 +114,31 @@ | |
| 'vulkan-mesa-implicit-layers') | ||
| provides=("mesa=$epoch:$pkgver" 'mesa-libgl' 'opengl-driver' 'libgbm.so') | ||
| conflicts=('mesa') | ||
| source "$srcdir/vulkan-driver-names.sh" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: nothing in — Marcelo's agent |
||
| cp -a "$srcdir/mesa-stage/usr" "$pkgdir/" | ||
| rm "$pkgdir/usr/lib/libvulkan_asahi.so" | ||
| rm "$pkgdir"/usr/share/vulkan/icd.d/*asahi*.json | ||
| # The Vulkan driver moves to its own package under either name (Aurora | ||
| # renamed it to Borealis, Ryan 2026-11-20). Incremental stages can hold | ||
| # both spellings, so remove both libraries here. | ||
| rm -f "$pkgdir"/usr/lib/libvulkan_{asahi,borealis}.so | ||
| rm -f "$pkgdir"/usr/share/vulkan/icd.d/*asahi*.json \ | ||
| "$pkgdir"/usr/share/vulkan/icd.d/*borealis*.json | ||
| rmdir "$pkgdir/usr/share/vulkan/icd.d" "$pkgdir/usr/share/vulkan" 2>/dev/null || true | ||
|
|
||
| } | ||
| package_vulkan-aurora() { | ||
| pkgdesc='Aurora Honeykrisp Vulkan driver' | ||
| pkgdesc='Aurora Borealis Vulkan driver' | ||
| depends=('expat' 'glibc' 'gcc-libs' 'libdrm' 'libdisplay-info' 'libx11' 'libxcb' | ||
| 'libxshmfence' 'systemd-libs' 'vulkan-icd-loader' 'wayland' | ||
| 'xcb-util-keysyms' 'zlib' 'zstd') | ||
| provides=("vulkan-asahi=$epoch:$pkgver" "vulkan-asahi-aurora=$epoch:$pkgver" 'vulkan-driver') | ||
| conflicts=('vulkan-asahi' 'vulkan-asahi-aurora') | ||
| replaces=('vulkan-asahi-aurora') | ||
| install -Dm755 "$srcdir/mesa-stage/usr/lib/libvulkan_asahi.so" "$pkgdir/usr/lib/libvulkan_asahi.so" | ||
| source "$srcdir/vulkan-driver-names.sh" | ||
| local drv_lib drv_icd | ||
| drv_lib=$(driver_library "$srcdir/mesa-stage/usr/lib") | ||
| install -Dm755 "$srcdir/mesa-stage/usr/lib/$drv_lib" "$pkgdir/usr/lib/$drv_lib" | ||
| install -d "$pkgdir/usr/share/vulkan/icd.d" | ||
| cp -a "$srcdir"/mesa-stage/usr/share/vulkan/icd.d/*asahi*.json "$pkgdir/usr/share/vulkan/icd.d/" | ||
| drv_icd=$(driver_icd "$srcdir/mesa-stage/usr/share/vulkan/icd.d") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: only the resolved manifest is installed now. — Marcelo's agent |
||
| install -Dm644 "$srcdir/mesa-stage/usr/share/vulkan/icd.d/$drv_icd" \ | ||
| "$pkgdir/usr/share/vulkan/icd.d/$drv_icd" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/usr/bin/env bash | ||
| # Resolve the Vulkan driver file names inside a staged Mesa tree. | ||
| # | ||
| # Aurora renamed its Vulkan driver to Borealis (Ryan 2026-11-20): the driver | ||
| # library becomes libvulkan_borealis.so and the ICD manifest becomes | ||
| # borealis_icd.<arch>.json. The Khronos enum entry keeps its Honeykrisp | ||
| # name and the meson option keeps an "asahi" alias, so a build tree can hold | ||
| # either spelling. These helpers name whichever spelling is present. | ||
| # | ||
| # Usage: | ||
| # source vulkan-driver-names.sh | ||
| # driver_library "$srcdir/mesa-stage/usr/lib" # -> libvulkan_asahi.so or libvulkan_borealis.so | ||
| # driver_icd "$srcdir/mesa-stage/usr/share/vulkan/icd.d" # -> the ICD JSON file name | ||
|
|
||
| # The driver library file name, preferring the Borealis name. | ||
| driver_library() { | ||
| local dir=$1 | ||
| if [[ -f "$dir/libvulkan_borealis.so" ]]; then | ||
| echo "libvulkan_borealis.so" | ||
| elif [[ -f "$dir/libvulkan_asahi.so" ]]; then | ||
| echo "libvulkan_asahi.so" | ||
| else | ||
| echo "no Vulkan driver library (libvulkan_borealis.so or libvulkan_asahi.so) in $dir" >&2 | ||
| return 1 | ||
| fi | ||
| } | ||
|
|
||
| # The ICD manifest file name, preferring the Borealis name. | ||
| driver_icd() { | ||
| local dir=$1 | ||
| local candidate | ||
| for candidate in "$dir"/borealis_icd.*.json "$dir"/asahi_icd.*.json; do | ||
| if [[ -f "$candidate" ]]; then | ||
| basename "$candidate" | ||
| return 0 | ||
| fi | ||
| done | ||
| echo "no Vulkan ICD manifest (borealis_icd.*.json or asahi_icd.*.json) in $dir" >&2 | ||
| return 1 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/usr/bin/env bash | ||
| # Resolve the Vulkan driver file names inside a staged Mesa tree. | ||
| # | ||
| # Aurora renamed its Vulkan driver to Borealis (Ryan 2026-11-20): the driver | ||
| # library becomes libvulkan_borealis.so and the ICD manifest becomes | ||
| # borealis_icd.<arch>.json. The Khronos enum entry keeps its Honeykrisp | ||
| # name and the meson option keeps an "asahi" alias, so a build tree can hold | ||
| # either spelling. These helpers name whichever spelling is present. | ||
| # | ||
| # Usage: | ||
| # source vulkan-driver-names.sh | ||
| # driver_library "$srcdir/mesa-stage/usr/lib" # -> libvulkan_asahi.so or libvulkan_borealis.so | ||
| # driver_icd "$srcdir/mesa-stage/usr/share/vulkan/icd.d" # -> the ICD JSON file name | ||
|
|
||
| # The driver library file name, preferring the Borealis name. | ||
| driver_library() { | ||
| local dir=$1 | ||
| if [[ -f "$dir/libvulkan_borealis.so" ]]; then | ||
| echo "libvulkan_borealis.so" | ||
| elif [[ -f "$dir/libvulkan_asahi.so" ]]; then | ||
| echo "libvulkan_asahi.so" | ||
| else | ||
| echo "no Vulkan driver library (libvulkan_borealis.so or libvulkan_asahi.so) in $dir" >&2 | ||
| return 1 | ||
| fi | ||
| } | ||
|
|
||
| # The ICD manifest file name, preferring the Borealis name. | ||
| driver_icd() { | ||
| local dir=$1 | ||
| local candidate | ||
| for candidate in "$dir"/borealis_icd.*.json "$dir"/asahi_icd.*.json; do | ||
| if [[ -f "$candidate" ]]; then | ||
| basename "$candidate" | ||
| return 0 | ||
| fi | ||
| done | ||
| echo "no Vulkan ICD manifest (borealis_icd.*.json or asahi_icd.*.json) in $dir" >&2 | ||
| return 1 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| #!/usr/bin/env bash | ||
| # Self-test for the Vulkan driver file-name resolver used by the omarchy-mlx | ||
| # and mesa-aurora PKGBUILDs: Aurora renamed the driver to Borealis, and the | ||
| # staged Mesa tree can carry either spelling (Ryan 2026-11-20). | ||
| set -euo pipefail | ||
| ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..") | ||
| # One helper copy must stay byte-identical to the other: both PKGBUILDs | ||
| # source their own file, so drift here means the packages disagree. | ||
| if ! cmp -s "$ROOT/pkgbuilds/omarchy-mlx/vulkan-driver-names.sh" \ | ||
| "$ROOT/pkgbuilds/mesa-aurora/vulkan-driver-names.sh"; then | ||
| echo "FAIL: pkgbuilds/omarchy-mlx/vulkan-driver-names.sh and pkgbuilds/mesa-aurora/vulkan-driver-names.sh differ" >&2 | ||
| exit 1 | ||
| fi | ||
| # shellcheck source=pkgbuilds/omarchy-mlx/vulkan-driver-names.sh | ||
| source "$ROOT/pkgbuilds/omarchy-mlx/vulkan-driver-names.sh" | ||
| pass() { echo "PASS: $1"; } | ||
| fail() { echo "FAIL: $1"; exit 1; } | ||
|
|
||
| expect() { | ||
| local what=$1 want=$2 got=$3 | ||
| if [[ "$got" == "$want" ]]; then | ||
| pass "$what" | ||
| else | ||
| fail "$what: wanted '$want', got '$got'" | ||
| fi | ||
| } | ||
|
|
||
| tmp=$(mktemp -d) | ||
| trap 'rm -rf "$tmp"' EXIT | ||
|
|
||
| # The Borealis spelling (what Aurora's tree carries after the rename). | ||
| mkdir -p "$tmp/borealis/usr/lib" "$tmp/borealis/usr/share/vulkan/icd.d" | ||
| touch "$tmp/borealis/usr/lib/libvulkan_borealis.so" | ||
| touch "$tmp/borealis/usr/share/vulkan/icd.d/borealis_icd.aarch64.json" | ||
| expect "the Borealis driver library is found" "libvulkan_borealis.so" \ | ||
| "$(driver_library "$tmp/borealis/usr/lib")" | ||
| expect "the Borealis ICD manifest is found" "borealis_icd.aarch64.json" \ | ||
| "$(driver_icd "$tmp/borealis/usr/share/vulkan/icd.d")" | ||
|
|
||
| # The legacy spelling (today's Mesa tree). | ||
| mkdir -p "$tmp/legacy/usr/lib" "$tmp/legacy/usr/share/vulkan/icd.d" | ||
| touch "$tmp/legacy/usr/lib/libvulkan_asahi.so" | ||
| touch "$tmp/legacy/usr/share/vulkan/icd.d/asahi_icd.aarch64.json" | ||
| expect "the legacy driver library is found" "libvulkan_asahi.so" \ | ||
| "$(driver_library "$tmp/legacy/usr/lib")" | ||
| expect "the legacy ICD manifest is found" "asahi_icd.aarch64.json" \ | ||
| "$(driver_icd "$tmp/legacy/usr/share/vulkan/icd.d")" | ||
|
|
||
| # Both present: the renamed one wins, so a mixed tree is not ambiguous. | ||
| cp "$tmp/borealis/usr/lib/libvulkan_borealis.so" "$tmp/legacy/usr/lib/" | ||
| cp "$tmp/borealis/usr/share/vulkan/icd.d/borealis_icd.aarch64.json" \ | ||
| "$tmp/legacy/usr/share/vulkan/icd.d/" | ||
| expect "a tree with both spellings resolves to Borealis" "libvulkan_borealis.so" \ | ||
| "$(driver_library "$tmp/legacy/usr/lib")" | ||
| expect "a tree with both ICD spellings resolves to Borealis" "borealis_icd.aarch64.json" \ | ||
| "$(driver_icd "$tmp/legacy/usr/share/vulkan/icd.d")" | ||
|
|
||
| # Neither present: the helper refuses instead of naming a file that is not there. | ||
| mkdir -p "$tmp/empty/usr/lib" "$tmp/empty/usr/share/vulkan/icd.d" | ||
| if driver_library "$tmp/empty/usr/lib" >/dev/null 2>&1; then | ||
| fail "an empty tree must not resolve a driver library" | ||
| else | ||
| pass "an empty tree refuses a driver library" | ||
| fi | ||
| if driver_icd "$tmp/empty/usr/share/vulkan/icd.d" >/dev/null 2>&1; then | ||
| fail "an empty tree must not resolve an ICD manifest" | ||
| else | ||
| pass "an empty tree refuses an ICD manifest" | ||
| fi | ||
|
|
||
| echo "All driver-name resolver checks passed." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this job lands under the namcap comment meant for
recipes. Please move it above the comment.— Marcelo's agent