From 3d327800f8e11377bcf34610e0f77643b4cc9829 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sat, 3 Feb 2024 10:58:20 -0600 Subject: [PATCH 1/4] WIP: Update to 23.08 runtime and newest asahi-mesa --- org.freedesktop.Platform.GL.asahi.yml | 78 +++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/org.freedesktop.Platform.GL.asahi.yml b/org.freedesktop.Platform.GL.asahi.yml index b0900d8..74d33b3 100644 --- a/org.freedesktop.Platform.GL.asahi.yml +++ b/org.freedesktop.Platform.GL.asahi.yml @@ -1,8 +1,8 @@ id: org.freedesktop.Platform.GL.asahi -branch: '22.08' +branch: '23.08' runtime: org.freedesktop.Platform sdk: org.freedesktop.Sdk -runtime-version: '22.08' +runtime-version: '23.08' build-extension: true sdk-extensions: - org.freedesktop.Sdk.Extension.llvm15 @@ -25,8 +25,10 @@ x-arch-build-options: # org.freedesktop.Sdk.Compat.arm is deprecated, so only build for aarch64. aarch64: &aarch64-build-options prefix: /usr/lib/aarch64-linux-gnu/GL/asahi - prepend-pkg-config-path: /usr/lib/aarch64-linux-gnu/GL/asahi/lib/pkgconfig + prepend-path: /usr/lib/x86_64-linux-gnu/GL/asahi/bin + prepend-pkg-config-path: /usr/lib/aarch64-linux-gnu/GL/asahi/lib/pkgconfig:/usr/lib/aarch64-linux-gnu/GL/asahi/share/pkgconfig libdir: /usr/lib/aarch64-linux-gnu/GL/asahi/lib + prepend-ld-library-path: /usr/lib/aarch64-linux-gnu/GL/asahi/lib cleanup: @@ -57,6 +59,66 @@ modules: # type: git # tag-pattern: ^libdrm-(\d[\d.]+\d)$ + - name: spirv-headers + build-options: + arch: + x86_64: *x86_64-build-options + aarch64: *aarch64-build-options + buildsystem: cmake-ninja + sources: + - type: archive + url: https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.3.268.0/spriv-headers-1.3.268.0.tar.gz + sha512: 3500c299a51dacc3e89066cfcfa8762cb6bc1be10ffff492fb3041831627e065cd836e3e0165df750dd22873a1772d916158e1e1c4701dc60efbb2edb17753ca + + - name: spirv-tools + build-options: + arch: + x86_64: *x86_64-build-options + aarch64: *aarch64-build-options + buildsystem: cmake-ninja + config-opts: + - '-DBUILD_SHARED_LIBS=ON' + - '-DSPIRV_TOOLS_BUILD_STATIC=OFF' + - '-DSPIRV-Headers_SOURCE_DIR=/usr/lib/aarch64-linux-gnu/GL/asahi' #fixme + - '-DCMAKE_INSTALL_LIBDIR=lib' + sources: + - type: archive + url: https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/v2023.5.rc1.tar.gz + sha256: aed90b51ce884ce3ac267acec75e785ee743a1e1fd294c25be33b49c5804d77c + + - name: llvm-spirv + build-options: + arch: + x86_64: *x86_64-build-options + aarch64: *aarch64-build-options + buildsystem: cmake-ninja + config-opts: + - '-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/lib/aarch64-linux-gnu/GL/asahi' + sources: + - type: archive + url: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v15.0.0.tar.gz + sha256: b1bebd77f72988758c00852e78c2ddc545815a612169a0cb377d021e2f846d88 + + - name: libclc + build-options: + arch: + x86_64: *x86_64-build-options + aarch64: *aarch64-build-options + config-opts: + - '-DCMAKE_INSTALL_LIBDIR=lib' + - '-DLLVM_SPIRV=/usr/lib/aarch64-linux-gnu/GL/asahi/bin/llvm-spirv' + - '-DLLVM_TOOLS_BINARY_DIR=/usr/lib/aarch64-linux-gnu/GL/asahi/bin' # Doesn't work... + buildsystem: cmake-ninja + sources: + - type: archive + url: https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.6/libclc-16.0.6.src.tar.xz + sha256: 61952af79c555d50bc88cb6f134d9abe9278f65dd34c2bc945cc3d324c2af224 + + # We might need to make this do some arch-specific stuff later for i386 builds, but as of the time of writing we only do 64-bit builds so we'll be fine. + - name: llvm + buildsystem: simple + build-commands: + - cp /usr/lib/sdk/llvm15/lib/libLLVM-15.so /usr/lib/$(uname -m)-linux-gnu/GL/asahi/lib - name: mesa build-options: @@ -100,16 +162,12 @@ modules: sources: - type: archive - url: https://gitlab.freedesktop.org/asahi/mesa/-/archive/asahi-20230904/mesa-asahi-20230904.tar.bz2 - sha256: ce96f78d81e558adf0521c44782bea6955bc02ab362e22712b8e0bc7b7eb74cd + url: https://gitlab.freedesktop.org/asahi/mesa/-/archive/asahi-20240123/mesa-asahi-20240123.tar.bz2 + sha256: 9113f76e6c17fb13ccda5702dca14e1b641d15900e32439ba3cd6409d28356e9 x-checker-data: type: html url: https://github.com/AsahiLinux/PKGBUILDs/raw/main/mesa-asahi-edge/PKGBUILD version-pattern: _asahiver=(.+) url-template: https://gitlab.freedesktop.org/asahi/mesa/-/archive/asahi-$version/mesa-asahi-$version.tar.bz2 - # We might need to make this do some arch-specific stuff later for i386 builds, but as of the time of writing we only do 64-bit builds so we'll be fine. - - name: llvm - buildsystem: simple - build-commands: - - cp /usr/lib/sdk/llvm15/lib/libLLVM-15.so /usr/lib/$(uname -m)-linux-gnu/GL/asahi/lib + From f3a2faf8d404864cbd5835553b6a099bae63df49 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 11 May 2024 17:30:56 +0200 Subject: [PATCH 2/4] strip old releases --- org.freedesktop.Platform.GL.asahi.metainfo.xml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/org.freedesktop.Platform.GL.asahi.metainfo.xml b/org.freedesktop.Platform.GL.asahi.metainfo.xml index 958ed74..2102522 100644 --- a/org.freedesktop.Platform.GL.asahi.metainfo.xml +++ b/org.freedesktop.Platform.GL.asahi.metainfo.xml @@ -7,18 +7,7 @@ Mesa git Asahi snapshot Mesa - The 3D Graphics Library - Asahi builds - - - - - - - - - - - - +

From d8d54b144fb87cc1127640c917d9496e6d2a8116 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 11 May 2024 17:31:42 +0200 Subject: [PATCH 3/4] update mesah-asahi to 20240228 Updates all dependencies to llvm-17 --- org.freedesktop.Platform.GL.asahi.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/org.freedesktop.Platform.GL.asahi.yml b/org.freedesktop.Platform.GL.asahi.yml index 74d33b3..10509a7 100644 --- a/org.freedesktop.Platform.GL.asahi.yml +++ b/org.freedesktop.Platform.GL.asahi.yml @@ -5,10 +5,10 @@ sdk: org.freedesktop.Sdk runtime-version: '23.08' build-extension: true sdk-extensions: - - org.freedesktop.Sdk.Extension.llvm15 + - org.freedesktop.Sdk.Extension.llvm17 build-options: - prepend-path: /usr/lib/sdk/llvm15/bin - prepend-ld-library-path: /usr/lib/sdk/llvm15/lib + prepend-path: /usr/lib/sdk/llvm17/bin + prepend-ld-library-path: /usr/lib/sdk/llvm17/lib x-arch-build-options: @@ -25,7 +25,7 @@ x-arch-build-options: # org.freedesktop.Sdk.Compat.arm is deprecated, so only build for aarch64. aarch64: &aarch64-build-options prefix: /usr/lib/aarch64-linux-gnu/GL/asahi - prepend-path: /usr/lib/x86_64-linux-gnu/GL/asahi/bin + prepend-path: /usr/lib/aarch64-linux-gnu/GL/asahi/bin prepend-pkg-config-path: /usr/lib/aarch64-linux-gnu/GL/asahi/lib/pkgconfig:/usr/lib/aarch64-linux-gnu/GL/asahi/share/pkgconfig libdir: /usr/lib/aarch64-linux-gnu/GL/asahi/lib prepend-ld-library-path: /usr/lib/aarch64-linux-gnu/GL/asahi/lib @@ -96,8 +96,8 @@ modules: - '-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/lib/aarch64-linux-gnu/GL/asahi' sources: - type: archive - url: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v15.0.0.tar.gz - sha256: b1bebd77f72988758c00852e78c2ddc545815a612169a0cb377d021e2f846d88 + url: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v17.0.0.tar.gz + sha256: eba381e1dd99b4ff6c672a28f52755d1adf2d810a97b51e6074ad4fa67937fb2 - name: libclc build-options: @@ -111,14 +111,14 @@ modules: buildsystem: cmake-ninja sources: - type: archive - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.6/libclc-16.0.6.src.tar.xz - sha256: 61952af79c555d50bc88cb6f134d9abe9278f65dd34c2bc945cc3d324c2af224 + url: https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/libclc-17.0.6.src.tar.xz + sha256: 122f641d94d5dfbb3c37534f2b76612fa59d15c36c2a4917369a85eaaca32148 # We might need to make this do some arch-specific stuff later for i386 builds, but as of the time of writing we only do 64-bit builds so we'll be fine. - name: llvm buildsystem: simple build-commands: - - cp /usr/lib/sdk/llvm15/lib/libLLVM-15.so /usr/lib/$(uname -m)-linux-gnu/GL/asahi/lib + - cp /usr/lib/sdk/llvm17/lib/libLLVM-17.so /usr/lib/$(uname -m)-linux-gnu/GL/asahi/lib - name: mesa build-options: @@ -162,8 +162,8 @@ modules: sources: - type: archive - url: https://gitlab.freedesktop.org/asahi/mesa/-/archive/asahi-20240123/mesa-asahi-20240123.tar.bz2 - sha256: 9113f76e6c17fb13ccda5702dca14e1b641d15900e32439ba3cd6409d28356e9 + url: https://gitlab.freedesktop.org/asahi/mesa/-/archive/asahi-20240228/mesa-asahi-20240228.tar.bz2 + sha256: 076bb4b78fa0645be6199ecdb4a0cc6c15c2a52514b73942f0da670857628974 x-checker-data: type: html url: https://github.com/AsahiLinux/PKGBUILDs/raw/main/mesa-asahi-edge/PKGBUILD From 3a27a692089901b7b940076a585c23a501375d17 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 11 May 2024 17:42:20 +0200 Subject: [PATCH 4/4] Clean files from the build --- org.freedesktop.Platform.GL.asahi.yml | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/org.freedesktop.Platform.GL.asahi.yml b/org.freedesktop.Platform.GL.asahi.yml index 10509a7..7e0ccd4 100644 --- a/org.freedesktop.Platform.GL.asahi.yml +++ b/org.freedesktop.Platform.GL.asahi.yml @@ -32,11 +32,50 @@ x-arch-build-options: cleanup: + - /bin - /include - /lib/cmake + - /lib/dri/armada-drm_dri.so + - /lib/dri/exynos_dri.so + - /lib/dri/gm12u320_dri.so + - /lib/dri/hdlcd_dri.so + - /lib/dri/hx8357d_dri.so + - /lib/dri/ili9163_dri.so + - /lib/dri/ili9225_dri.so + - /lib/dri/ili9341_dri.so + - /lib/dri/ili9486_dri.so + - /lib/dri/imx-dcss_dri.so + - /lib/dri/imx-drm_dri.so + - /lib/dri/imx-lcdif_dri.so + - /lib/dri/ingenic-drm_dri.so + - /lib/dri/kirin_dri.so + - /lib/dri/komeda_dri.so + - /lib/dri/mali-dp_dri.so + - /lib/dri/mcde_dri.so + - /lib/dri/mediatek_dri.so + - /lib/dri/meson_dri.so + - /lib/dri/mi0283qt_dri.so + - /lib/dri/mxsfb-drm_dri.so + - /lib/dri/panel-mipi-dbi_dri.so + - /lib/dri/pl111_dri.so + - /lib/dri/rcar-du_dri.so + - /lib/dri/repaper_dri.so + - /lib/dri/rockchip_dri.so + - /lib/dri/ssd130x_dri.so + - /lib/dri/st7586_dri.so + - /lib/dri/st7735r_dri.so + - /lib/dri/sti_dri.so + - /lib/dri/stm_dri.so + - /lib/dri/sun4i-drm_dri.so + - /lib/dri/udl_dri.so + - '/lib/libSPIRV-Tools*' - /lib/pkgconfig - /share/aclocal + - /share/clc + - /share/cmake + - /share/libdrm - /share/man + - /share/pkgconfig - '*.la' - '*.a' modules: