Etapa G: cola del stack gráfico Mesa (iris) para el escritorio tawasuyu
Importa de Alpine aports (con parches musl) las recetas del stack que el greeter real de mirada necesita en el rootfs de producto: libdrm 2.4.134, wayland 1.25.0, wayland-protocols 1.48, seatd, mesa 26.1.1, + build-tools meson 1.11.1 y samurai (ninja). Quedan en recipes/incoming/ como puntos de partida: traen los parches musl de Alpine pero usan helpers de abuild — falta adaptarlas a fases hammer (meson/samurai directos, link=dynamic), como elfutils. docs/14-mesa-stack.md fija el plan: iris-only ⇒ SIN LLVM/Vulkan/X11 (el driver gallium iris no necesita LLVM), lo que recorta clang/llvm/libclc/spirv/bindgen. DAG de build (hojas→raíz) + estado por receta + el lado tawasuyu (recetas Cargo arje-splash/net-bring-up estáticas ya construibles; mirada-greeter dinámico, bloqueado por mesa). Contraparte de la seed arje-tawasuyu del monorepo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,76 @@
|
|||||||
|
# SDD 14 — Stack gráfico (Mesa iris) para el escritorio tawasuyu
|
||||||
|
|
||||||
|
> **Estado:** cola importada (2026-06-27). Contraparte en hammer del salto
|
||||||
|
> demo→producción de arje: el rootfs de producto necesita **Mesa** para que el
|
||||||
|
> greeter real de mirada (`mirada-greeter-llimphi`) tome el DRM tras el handoff
|
||||||
|
> del splash. Seed de producción: `tawasuyu/03_ukupacha/arje/seeds/arje-tawasuyu.card.json`
|
||||||
|
> (ente `display-manager-mesa`). Ver su contrato rootfs en `seeds/README.md`.
|
||||||
|
|
||||||
|
## Por qué iris-only (sin LLVM, sin Vulkan)
|
||||||
|
|
||||||
|
El target inmediato es una laptop **Intel Iris Xe**. El driver gallium **`iris`
|
||||||
|
NO necesita LLVM** (eso es `radeonsi`/`llvmpipe`). Recortando el build de Alpine
|
||||||
|
(que trae el kitchen-sink) a iris-only se elimina la cola pesada — clang, llvm,
|
||||||
|
libclc, spirv-llvm-translator, rust-bindgen, Vulkan, X11/glx:
|
||||||
|
|
||||||
|
```
|
||||||
|
-Dgallium-drivers=iris -Dvulkan-drivers= -Dllvm=disabled
|
||||||
|
-Dplatforms=wayland -Dglx=disabled -Dexpat=enabled
|
||||||
|
```
|
||||||
|
|
||||||
|
Eso deja un Mesa que sólo arrastra deps que hammer ya tiene o son chicas.
|
||||||
|
(Para AMD/NVIDIA-nouveau más adelante: `radeonsi`/`nouveau` sí piden LLVM →
|
||||||
|
otra rama del track.)
|
||||||
|
|
||||||
|
## DAG de dependencias (estado contra el corpus actual)
|
||||||
|
|
||||||
|
| Tier | Receta | meson? | Estado en hammer | Notas |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| build | `python3` | — | 🟢 en store | meson/mako lo usan |
|
||||||
|
| build | `meson` | — | 🟡 incoming | importada de Alpine 1.11.1; pyproject, necesita python3 |
|
||||||
|
| build | `samurai` (≡ninja) | — | 🟡 incoming | 1.3, clon C de ninja (lo que usa Alpine) |
|
||||||
|
| build | `pkgconf` | — | 🟢 receta | sustituto de pkg-config |
|
||||||
|
| build | `bison` / `flex` | — | 🟢 receta | mesa genera parsers |
|
||||||
|
| build | `mako` (módulo py) | — | ⚪ por verificar | templating de codegen de mesa; pip/source sobre python3 |
|
||||||
|
| lib | `expat` `zlib` `zstd` `libffi` | — | 🟢 receta | deps de wayland/mesa |
|
||||||
|
| lib | `libdrm` | sí | 🟡 incoming | 2.4.134; **fijar `-Dgallium`? no** — libdrm es agnóstico; `link=dynamic` |
|
||||||
|
| lib | `wayland` | sí | 🟡 incoming | 1.25.0; deps expat+libffi; `-Ddocumentation=false` |
|
||||||
|
| lib | `wayland-protocols` | sí | 🟡 incoming | 1.48; sólo datos (XML) + meson; dep wayland |
|
||||||
|
| lib | `seatd` (→`libseat`) | sí | 🟡 incoming | la sesión de mirada abre el DRM vía libseat |
|
||||||
|
| **top** | `mesa` | sí | 🟡 incoming | 26.1.1; recortar a iris-only (arriba); deps: libdrm, wayland, wayland-protocols, expat, zlib, zstd, python3+mako |
|
||||||
|
|
||||||
|
🟢 listo · 🟡 importada, **falta adaptar** (traducir `abuild-meson`/`_abuild_phase`
|
||||||
|
de Alpine a fases hammer + `meson`/`samurai` directos, como hizo `elfutils`) · ⚪ por crear.
|
||||||
|
|
||||||
|
## Trabajo de adaptación por receta (lo real)
|
||||||
|
|
||||||
|
Las recetas en `recipes/incoming/` son **puntos de partida** de `import-alpine`:
|
||||||
|
traen los parches musl de Alpine (lo valioso) pero usan los helpers de abuild que
|
||||||
|
el lab de hammer no tiene. Cada una necesita, mínimo:
|
||||||
|
|
||||||
|
1. Reemplazar `abuild-meson` por `meson setup output --prefix=/usr --buildtype=release <-Dflags>`
|
||||||
|
y `_abuild_phase`/`DESTDIR=/out` por las fases `configure`/`compile`/`install` de hammer.
|
||||||
|
2. `compiler = "zig-cc"`, `target = "x86_64-linux-musl"`, `link = "dynamic"` (son libs compartidas).
|
||||||
|
3. Declarar las deps de build en el grafo de hammer (no como `makedepends` de Alpine).
|
||||||
|
4. Verificar `zig_version` si zig 0.14 miscompila (patrón de `elfutils`/`binutils`/`flex`: fijar 0.13.0).
|
||||||
|
|
||||||
|
Orden de build (hojas→raíz): `meson`+`samurai` → `libdrm`,`wayland` → `wayland-protocols`,`seatd` → `mesa`.
|
||||||
|
|
||||||
|
## Lado tawasuyu (recetas Cargo, después de Mesa)
|
||||||
|
|
||||||
|
Modeladas sobre `recipes/arje-zero.toml` (fuente = monorepo tawasuyu a commit fijado, build hermético):
|
||||||
|
|
||||||
|
| Receta | bin | link | dep gráfica |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `arje-splash` | `/usr/lib/arje/arje-splash` | static-musl | sólo DRM dumb-buffer (sin Mesa) |
|
||||||
|
| `net-bring-up` | `/usr/lib/arje/net-bring-up` | static-musl | ninguna |
|
||||||
|
| `mirada-greeter` | `/usr/lib/arje/mirada-greeter-llimphi` | **dynamic** | EGL/GLES/GBM (mesa) + wayland + libseat |
|
||||||
|
|
||||||
|
`mirada-greeter` es el único que enlaza Mesa dinámico ⇒ **bloqueado por el tier `mesa`**.
|
||||||
|
Los otros dos pueden construirse e instalarse ya (no dependen de Mesa).
|
||||||
|
|
||||||
|
## Hecho cuando
|
||||||
|
|
||||||
|
`hammer bootstrap product` produce un rootfs que, con la seed `arje-tawasuyu`,
|
||||||
|
arranca `arje-zero` → splash → `mirada-greeter` toma el DRM con Mesa/iris, sin
|
||||||
|
caer a texto. Verificación: boot en QEMU (con virgl/GPU) o metal en la laptop Iris Xe.
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
From: Diederik de Haas <didi.debian@cknow.org>
|
||||||
|
Date: Sun, 22 Sep 2024 10:48:22 +0200
|
||||||
|
Subject: [PATCH] dri: Add Rockchip EBC to kmsro drivers
|
||||||
|
Forwarded: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23575
|
||||||
|
|
||||||
|
The Rockchip EBC driver is used in the Pine64 PineNote.
|
||||||
|
|
||||||
|
Link: https://lore.kernel.org/linux-arm-kernel/20220413221916.50995-1-samuel@sholland.org/
|
||||||
|
---
|
||||||
|
src/gallium/targets/dri/dri_target.c | 3 +++
|
||||||
|
src/gallium/targets/dril/dril_target.c | 1 +
|
||||||
|
src/gallium/targets/dril/meson.build | 1 +
|
||||||
|
3 files changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/gallium/targets/dril/dril_target.c b/src/gallium/targets/dril/dril_target.c
|
||||||
|
index a94ab09858f..2e628ae1c02 100644
|
||||||
|
--- a/src/gallium/targets/dril/dril_target.c
|
||||||
|
+++ b/src/gallium/targets/dril/dril_target.c
|
||||||
|
@@ -599,6 +599,7 @@ DEFINE_LOADER_DRM_ENTRYPOINT(pl111)
|
||||||
|
DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du)
|
||||||
|
DEFINE_LOADER_DRM_ENTRYPOINT(repaper)
|
||||||
|
DEFINE_LOADER_DRM_ENTRYPOINT(rockchip)
|
||||||
|
+DEFINE_LOADER_DRM_ENTRYPOINT(rockchip_ebc)
|
||||||
|
DEFINE_LOADER_DRM_ENTRYPOINT(rzg2l_du)
|
||||||
|
DEFINE_LOADER_DRM_ENTRYPOINT(ssd130x)
|
||||||
|
DEFINE_LOADER_DRM_ENTRYPOINT(st7586)
|
||||||
|
diff --git a/src/gallium/targets/dril/meson.build b/src/gallium/targets/dril/meson.build
|
||||||
|
index 3adf97b24a7..df802194bc5 100644
|
||||||
|
--- a/src/gallium/targets/dril/meson.build
|
||||||
|
+++ b/src/gallium/targets/dril/meson.build
|
||||||
|
@@ -89,6 +89,7 @@ foreach d : [[with_gallium_kmsro, [
|
||||||
|
'rcar-du_dri.so',
|
||||||
|
'repaper_dri.so',
|
||||||
|
'rockchip_dri.so',
|
||||||
|
+ 'rockchip-ebc_dri.so',
|
||||||
|
'rzg2l-du_dri.so',
|
||||||
|
'ssd130x_dri.so',
|
||||||
|
'st7586_dri.so',
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
|
||||||
|
index b97c526aeddfd94b28e322c2a7a8064d766c8e23..a0d551fb51e080f3ae487bdabdfa4c34b00fbbad 100644
|
||||||
|
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
|
||||||
|
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
|
||||||
|
@@ -150,6 +150,12 @@ pipe_loader_drm_probe_fd_nodup(struct pipe_loader_device **dev, int fd, bool zin
|
||||||
|
ddev->base.driver_name = strdup("radeonsi");
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* powervr has no Gallium driver and relies on Zink */
|
||||||
|
+ if (strcmp(ddev->base.driver_name, "powervr") == 0) {
|
||||||
|
+ FREE(ddev->base.driver_name);
|
||||||
|
+ ddev->base.driver_name = strdup("zink");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (strcmp(ddev->base.driver_name, "virtio_gpu") == 0) {
|
||||||
|
struct virgl_renderer_capset_drm caps;
|
||||||
|
if (get_nctx_caps(fd, &caps) == 0) {
|
||||||
|
@@ -172,14 +178,10 @@ pipe_loader_drm_probe_fd_nodup(struct pipe_loader_device **dev, int fd, bool zin
|
||||||
|
if (strcmp(ddev->base.driver_name, "vgem") == 0)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
- /* kmsro supports lots of drivers, try as a fallback for primary nodes */
|
||||||
|
- if (!ddev->dd && !zink && drmGetNodeTypeFromFd(fd) == DRM_NODE_PRIMARY)
|
||||||
|
+ /* kmsro supports lots of drivers, try as a fallback */
|
||||||
|
+ if (!ddev->dd && !zink)
|
||||||
|
ddev->dd = get_driver_descriptor("kmsro");
|
||||||
|
|
||||||
|
- /* Try zink for unknown render nodes */
|
||||||
|
- if (!ddev->dd && drmGetNodeTypeFromFd(fd) == DRM_NODE_RENDER)
|
||||||
|
- ddev->dd = get_driver_descriptor("zink");
|
||||||
|
-
|
||||||
|
if (!ddev->dd)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
the tests parse the tool output and expect one of the strings to match-
|
||||||
|
samurai outputs slightly different strings, and hence breaks the tests
|
||||||
|
--- a/unittests/baseplatformtests.py
|
||||||
|
+++ b/unittests/baseplatformtests.py
|
||||||
|
@@ -82,5 +82,5 @@
|
||||||
|
# Misc stuff
|
||||||
|
if cls.backend is Backend.ninja:
|
||||||
|
- cls.no_rebuild_stdout = ['ninja: no work to do.', 'samu: nothing to do']
|
||||||
|
+ cls.no_rebuild_stdout = ['ninja: no work to do.', 'samu: nothing to do', 'samu: explain all: phony and no inputs']
|
||||||
|
else:
|
||||||
|
# VS doesn't have a stable output when no changes are done
|
||||||
|
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
|
||||||
|
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
|
||||||
|
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
|
||||||
|
name = "libdrm"
|
||||||
|
version = "2.4.134"
|
||||||
|
|
||||||
|
[source]
|
||||||
|
tarball = "https://gitlab.freedesktop.org/mesa/libdrm/-/archive/libdrm-2.4.134/libdrm-libdrm-2.4.134.tar.gz"
|
||||||
|
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
|
||||||
|
# sha512 = "2e0125b54e77b6910b1a4961cb0bd0b8e9f157b4ddc47b2b72aced82d5080b570c72d65ddde6c0127bb7217abd88ab230dc301dbaf0fa59babe11ba66d2f36e1"
|
||||||
|
sha256 = "28af861f62e7a2c3a48c5ff2ad4d01cf440a419f7f877de5caa7f73d3afa5367"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
compiler = "zig-cc"
|
||||||
|
target = "x86_64-linux-musl"
|
||||||
|
link = "static"
|
||||||
|
flags = []
|
||||||
|
|
||||||
|
[build.phases]
|
||||||
|
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
|
||||||
|
compile = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
CFLAGS="$CFLAGS -O2" \
|
||||||
|
CPPFLAGS="$CPPFLAGS -O2" \
|
||||||
|
CXXFLAGS="$CXXFLAGS -O2" \
|
||||||
|
abuild-meson \
|
||||||
|
-Db_lto=true \
|
||||||
|
-Dintel=enabled \
|
||||||
|
-Dradeon=enabled \
|
||||||
|
-Damdgpu=enabled \
|
||||||
|
-Dnouveau=enabled \
|
||||||
|
-Dvmwgfx=enabled \
|
||||||
|
-Domap=enabled \
|
||||||
|
-Dexynos=enabled \
|
||||||
|
-Dfreedreno=enabled \
|
||||||
|
-Dtegra=enabled \
|
||||||
|
-Dvc4=enabled \
|
||||||
|
-Detnaviv=enabled \
|
||||||
|
-Dudev=true \
|
||||||
|
-Dinstall-test-programs=true \
|
||||||
|
-Dtests=true \
|
||||||
|
. output
|
||||||
|
meson compile -C output
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
# de package() de Alpine (traducido $pkgdir→/out):
|
||||||
|
install = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
DESTDIR="/out" meson install --no-rebuild -C output
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
build = ["linux-headers", "eudev", "libpciaccess", "xmlto"]
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
From db9728708d8a06f60bb850788d4cde487ac671f4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alessandro Astone <ales.astone@gmail.com>
|
||||||
|
Date: Sun, 1 Mar 2026 18:14:09 +0100
|
||||||
|
Subject: [PATCH] gallivm: Fix armhf build against LLVM 22
|
||||||
|
|
||||||
|
StringMapIterator<bool> became StringMapIterBase<bool, false /* IsConst */>;
|
||||||
|
Use `auto` to handle either case.
|
||||||
|
---
|
||||||
|
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
|
||||||
|
index ce8ca02bf745..86779f013c7b 100644
|
||||||
|
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
|
||||||
|
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
|
||||||
|
@@ -331,7 +331,7 @@ lp_build_fill_mattrs(std::vector<std::string> &MAttrs)
|
||||||
|
llvm::sys::getHostCPUFeatures(features);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- for (llvm::StringMapIterator<bool> f = features.begin();
|
||||||
|
+ for (auto f = features.begin();
|
||||||
|
f != features.end();
|
||||||
|
++f) {
|
||||||
|
MAttrs.push_back(((*f).second ? "+" : "-") + (*f).first().str());
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
|
||||||
|
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
|
||||||
|
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
|
||||||
|
name = "mesa"
|
||||||
|
version = "26.1.1"
|
||||||
|
|
||||||
|
[source]
|
||||||
|
tarball = "https://mesa.freedesktop.org/archive/mesa-${pkgver/_/-}.tar.xz"
|
||||||
|
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
|
||||||
|
# sha512 = "384a7db33d2f06e287337329f2f17503082ba6b1cd876a1884e940fdb6193ffae6d6b14344625256f3b3b39972ad697130a4d2ea25c40979f7aa76c2176f7988"
|
||||||
|
sha256 = "FIXME-sha256"
|
||||||
|
patches = ["23575.patch", "riscv64-tls.patch", "llvm22-armhf.patch", "armv7-exynos4.patch"]
|
||||||
|
|
||||||
|
[build]
|
||||||
|
compiler = "zig-cc"
|
||||||
|
target = "x86_64-linux-musl"
|
||||||
|
link = "static"
|
||||||
|
flags = []
|
||||||
|
|
||||||
|
[build.phases]
|
||||||
|
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
|
||||||
|
compile = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
# use -g1 to generate less debug info:
|
||||||
|
# 485 MiB -> ~80 MiB
|
||||||
|
export CFLAGS="$CFLAGS -O2 -g1"
|
||||||
|
export CXXFLAGS="$CXXFLAGS -O2 -g1"
|
||||||
|
export CPPFLAGS="$CPPFLAGS -O2 -g1"
|
||||||
|
|
||||||
|
case "$CARCH" in
|
||||||
|
armhf|armv7)
|
||||||
|
# gnu2 tlsdesc is broken in binutils, see
|
||||||
|
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/14140
|
||||||
|
# and
|
||||||
|
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/13236
|
||||||
|
export CFLAGS="$CFLAGS -mtls-dialect=gnu"
|
||||||
|
export CXXFLAGS="$CXXFLAGS -mtls-dialect=gnu"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
PATH="$PATH:/usr/lib/llvm$_llvmver/bin" \
|
||||||
|
abuild-meson \
|
||||||
|
-Db_ndebug=true \
|
||||||
|
-Db_lto=$_lto \
|
||||||
|
-Dallow-kcmp=enabled \
|
||||||
|
-Dexpat=enabled \
|
||||||
|
-Dintel-rt=$_intel_rt \
|
||||||
|
-Dshader-cache=enabled \
|
||||||
|
-Dxlib-lease=enabled \
|
||||||
|
-Dxmlconfig=enabled \
|
||||||
|
-Dzstd=enabled \
|
||||||
|
-Dbackend_max_links=2 \
|
||||||
|
-Dbuild-tests="$(want_check && echo true || echo false)" \
|
||||||
|
-Ddri-drivers-path=$_dri_driverdir \
|
||||||
|
-Dgallium-drivers=$_gallium_drivers \
|
||||||
|
-Dvulkan-drivers=$_vulkan_drivers \
|
||||||
|
-Dvulkan-layers=$_vulkan_layers \
|
||||||
|
-Damdgpu-virtio=true \
|
||||||
|
-Dfreedreno-kmds=msm,virtio \
|
||||||
|
-Dplatforms=x11,wayland \
|
||||||
|
-Dllvm=enabled \
|
||||||
|
-Dshared-llvm=enabled \
|
||||||
|
-Dgbm=enabled \
|
||||||
|
-Dglx=dri \
|
||||||
|
-Dopengl=true \
|
||||||
|
-Dgles1=enabled \
|
||||||
|
-Dgles2=enabled \
|
||||||
|
-Degl=enabled \
|
||||||
|
-Dgallium-extra-hud=true \
|
||||||
|
-Dgallium-rusticl=$_rusticl \
|
||||||
|
-Dgallium-rusticl-enable-drivers=auto,freedreno \
|
||||||
|
-Dgallium-va=enabled \
|
||||||
|
-Drust_std=2021 \
|
||||||
|
-Dvideo-codecs=all \
|
||||||
|
. output
|
||||||
|
|
||||||
|
# Print config
|
||||||
|
meson configure --no-pager output
|
||||||
|
|
||||||
|
meson compile -C output
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
# de package() de Alpine (traducido $pkgdir→/out):
|
||||||
|
install = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
DESTDIR="/out" meson install --no-rebuild -C output
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
|
||||||
|
# depends de runtime de Alpine (NO build-deps): python3
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
build = ["clang$_llvmver", "libclc-dev~$_llvmver", "rust-bindgen", "spirv-llvm-translator", "clang22", "libclc-dev~22"]
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
|
||||||
|
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
|
||||||
|
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
|
||||||
|
name = "meson"
|
||||||
|
version = "1.11.1"
|
||||||
|
|
||||||
|
[source]
|
||||||
|
tarball = "https://github.com/mesonbuild/meson/releases/download/1.11.1/meson-1.11.1.tar.gz"
|
||||||
|
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
|
||||||
|
# sha512 = "c30c98714ab595ca1b5241fbb546c9c5fbb3eada53bfe782652a5734b04d45d66944a5fc8673ee602797c8173e27473036bcb01e09032bbc518567ee89dd6d70"
|
||||||
|
sha256 = "6788ae299979643f8d841bcaf64352558436cae45a0355148a3aeeccf7913866"
|
||||||
|
patches = ["fix-ninja-output-test.patch", "skip-broken-tests.patch"]
|
||||||
|
|
||||||
|
[build]
|
||||||
|
compiler = "zig-cc"
|
||||||
|
target = "x86_64-linux-musl"
|
||||||
|
link = "static"
|
||||||
|
flags = []
|
||||||
|
|
||||||
|
[build.phases]
|
||||||
|
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
|
||||||
|
compile = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
gpep517 build-wheel \
|
||||||
|
--wheel-dir .dist \
|
||||||
|
--output-fd 3 3>&1 >&2
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
# de package() de Alpine (traducido $pkgdir→/out):
|
||||||
|
install = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
python3 -m installer -d "/out" .dist/*.whl
|
||||||
|
|
||||||
|
install -Dm644 data/shell-completions/zsh/* -t "/out"/usr/share/zsh/site-functions
|
||||||
|
install -Dm644 data/shell-completions/bash/* -t "/out"/usr/share/bash-completion/completions
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
|
||||||
|
# depends de runtime de Alpine (NO build-deps): abuild
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
build = ["py3-gpep517", "py3-setuptools", "py3-wheel"]
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
upstream: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11729
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 3d72bb56f25..5161c97af11 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -496,7 +496,7 @@ foreach c_arg : get_option('c_args')
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
-if not have_mtls_dialect
|
||||||
|
+if not have_mtls_dialect and host_machine.cpu_family() != 'riscv64'
|
||||||
|
# need .run to check libc support. meson aborts when calling .run when
|
||||||
|
# cross-compiling, but because this is just an optimization we can skip it
|
||||||
|
if meson.is_cross_build() and not meson.can_run_host_binaries()
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
|
||||||
|
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
|
||||||
|
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
|
||||||
|
name = "samurai"
|
||||||
|
version = "1.3"
|
||||||
|
|
||||||
|
[source]
|
||||||
|
tarball = "https://github.com/michaelforney/samurai/releases/download/1.3/samurai-1.3.tar.gz"
|
||||||
|
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
|
||||||
|
# sha512 = "f155745fdb90cca07d8e7178e60337173fee3a8f1dadc3773a80fe189f5864229afb409d946fb2a418820d7e6ef8332cd9e3e3627abd170146802277f30b4b4e"
|
||||||
|
sha256 = "1bc020a9e133432df51911ac71cc34322f828934d9a2282ba2916d88c15976af"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
compiler = "zig-cc"
|
||||||
|
target = "x86_64-linux-musl"
|
||||||
|
link = "static"
|
||||||
|
flags = []
|
||||||
|
|
||||||
|
[build.phases]
|
||||||
|
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
|
||||||
|
compile = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
make CFLAGS="${CFLAGS//-Os/-O2}"
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
# de package() de Alpine (traducido $pkgdir→/out):
|
||||||
|
install = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
make install PREFIX="/usr" DESTDIR="/out"
|
||||||
|
ln -s samu "/out"/usr/bin/ninja
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
|
||||||
|
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
|
||||||
|
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
|
||||||
|
name = "seatd"
|
||||||
|
version = "0.9.3"
|
||||||
|
|
||||||
|
[source]
|
||||||
|
tarball = "https://git.sr.ht/~kennylevinsen/seatd/archive/0.9.3.tar.gz"
|
||||||
|
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
|
||||||
|
# sha512 = "8cb21cfbd9aa25966fe3f586de75d24a8625142ffb49e6ec357875c347d3e92d535467b817d79fdc704f80858a145f1107c488adbf22a1c337dbc6ccccc8b00a"
|
||||||
|
sha256 = "302564d54d8e28191fadfd734f2675ecb0c9e0615a58011b89ef15dfa4dbaa96"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
compiler = "zig-cc"
|
||||||
|
target = "x86_64-linux-musl"
|
||||||
|
link = "static"
|
||||||
|
flags = []
|
||||||
|
|
||||||
|
[build.phases]
|
||||||
|
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
|
||||||
|
compile = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
if [ "$CARCH" = 'ppc64le' ]; then
|
||||||
|
# https://todo.sr.ht/~kennylevinsen/seatd/10
|
||||||
|
# https://www.openwall.com/lists/musl/2020/01/20/3
|
||||||
|
export CFLAGS="$CFLAGS -Wno-error=overflow"
|
||||||
|
fi
|
||||||
|
|
||||||
|
abuild-meson \
|
||||||
|
-Dlibseat-logind=elogind \
|
||||||
|
-Dman-pages=enabled \
|
||||||
|
. output
|
||||||
|
|
||||||
|
meson compile -C output
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
# de package() de Alpine (traducido $pkgdir→/out):
|
||||||
|
install = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
DESTDIR="/out" meson install --no-rebuild -C output
|
||||||
|
chmod u+s "/out"/usr/bin/seatd-launch
|
||||||
|
|
||||||
|
install -Dm755 "$srcdir"/seatd.initd "/out"/etc/init.d/seatd
|
||||||
|
install -Dm644 "$srcdir"/seatd.confd "/out"/etc/conf.d/seatd
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
build = ["scdoc", "elogind", "linux-headers"]
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
--- a/unittests/linuxliketests.py
|
||||||
|
+++ b/unittests/linuxliketests.py
|
||||||
|
@@ -993,6 +993,8 @@
|
||||||
|
self.assertEqual(got_rpath, yonder_libdir, rpath_format)
|
||||||
|
|
||||||
|
@skip_if_not_base_option('b_sanitize')
|
||||||
|
+ # https://github.com/mesonbuild/meson/issues/8283
|
||||||
|
+ @unittest.skip('broken with improperly detected sanitizers')
|
||||||
|
def test_pch_with_address_sanitizer(self):
|
||||||
|
if is_cygwin():
|
||||||
|
raise SkipTest('asan not available on Cygwin')
|
||||||
|
@@ -1192,6 +1192,7 @@
|
||||||
|
self.build()
|
||||||
|
|
||||||
|
@skipIfNoPkgconfig
|
||||||
|
+ @unittest.skip('fails because of GNU libintl mess on alpine :)')
|
||||||
|
def test_pkgconfig_formatting(self):
|
||||||
|
testdir = os.path.join(self.unit_test_dir, '38 pkgconfig format')
|
||||||
|
self.init(testdir)
|
||||||
|
--- a/unittests/allplatformstests.py
|
||||||
|
+++ b/unittests/allplatformstests.py
|
||||||
|
@@ -377,5 +377,6 @@
|
||||||
|
self.assertNotEqual(before, after)
|
||||||
|
|
||||||
|
+ @unittest.skip('samurai has a reverse order')
|
||||||
|
def test_static_compile_order(self):
|
||||||
|
'''
|
||||||
|
Test that the order of files in a compiler command-line while compiling
|
||||||
|
@@ -3198,6 +3198,7 @@
|
||||||
|
else:
|
||||||
|
self.assertEqual(o, e)
|
||||||
|
|
||||||
|
+ @unittest.skip('broken with current version of samurai')
|
||||||
|
def test_meson_compile(self):
|
||||||
|
"""Test the meson compile command."""
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
|
||||||
|
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
|
||||||
|
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
|
||||||
|
name = "wayland-protocols"
|
||||||
|
version = "1.48"
|
||||||
|
|
||||||
|
[source]
|
||||||
|
tarball = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.48/downloads/wayland-protocols-1.48.tar.xz"
|
||||||
|
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
|
||||||
|
# sha512 = "24950c6181f576f8926e2631a3f017986f809cd4fe8efe6fc8e4d872e98aacabb9eb79877371fb5def1fc78027c8e1e1e25bb98d455c22624a810707be0b2c24"
|
||||||
|
sha256 = "398036ac0eb6484982ddbde7ff86848d753231f9cdeeae983f06b52946625aa1"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
compiler = "zig-cc"
|
||||||
|
target = "x86_64-linux-musl"
|
||||||
|
link = "static"
|
||||||
|
flags = []
|
||||||
|
|
||||||
|
[build.phases]
|
||||||
|
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
|
||||||
|
compile = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
abuild-meson . output
|
||||||
|
meson compile -C output
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
# de package() de Alpine (traducido $pkgdir→/out):
|
||||||
|
install = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
DESTDIR="/out" meson install --no-rebuild -C output
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
build = ["wayland"]
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
|
||||||
|
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
|
||||||
|
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
|
||||||
|
name = "wayland"
|
||||||
|
version = "1.25.0"
|
||||||
|
|
||||||
|
[source]
|
||||||
|
tarball = "https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.25.0/downloads/wayland-1.25.0.tar.xz"
|
||||||
|
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
|
||||||
|
# sha512 = "20ae71ecc8b6d61b3e111171260911469cc7c3470048629db28eb4115415124e5a9392e1d9be84adb324cf1a29e557ae8e033e17c51fbab2fc80d9c6b9aad82c"
|
||||||
|
sha256 = "c065f040afdff3177680600f249727e41a1afc22fccf27222f15f5306faa1f03"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
compiler = "zig-cc"
|
||||||
|
target = "x86_64-linux-musl"
|
||||||
|
link = "static"
|
||||||
|
flags = []
|
||||||
|
|
||||||
|
[build.phases]
|
||||||
|
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
|
||||||
|
compile = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
abuild-meson \
|
||||||
|
-Db_lto=true \
|
||||||
|
-Ddocumentation=false \
|
||||||
|
-Ddefault_library=both \
|
||||||
|
. output
|
||||||
|
|
||||||
|
meson compile -C output
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
# de package() de Alpine (traducido $pkgdir→/out):
|
||||||
|
install = '''
|
||||||
|
_abuild_phase() {
|
||||||
|
depends="
|
||||||
|
wayland-libs-client=1.25.0-r$pkgrel
|
||||||
|
wayland-libs-cursor=1.25.0-r$pkgrel
|
||||||
|
wayland-libs-egl=1.25.0-r$pkgrel
|
||||||
|
wayland-libs-server=1.25.0-r$pkgrel
|
||||||
|
"
|
||||||
|
DESTDIR="/out" meson install --no-rebuild -C output
|
||||||
|
}
|
||||||
|
_abuild_phase
|
||||||
|
'''
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
build = ["_dev", "libxml2-dev~2.13"]
|
||||||
Reference in New Issue
Block a user