From 0c6290a0b663e7cc1e0fb2033a12832958a2114d Mon Sep 17 00:00:00 2001 From: sergio Date: Wed, 1 Jul 2026 05:24:44 -0400 Subject: [PATCH] =?UTF-8?q?Etapa=20G=20(clib):=20arregla=20brotli=20(cmake?= =?UTF-8?q?=20v=C3=ADa=20[deps].build,=20sin=20Ninja/wheel)=20+=20elimina?= =?UTF-8?q?=20bzip2=20duplicado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit brotli fallaba con 'cmake: not found' porque no declaraba cmake en [deps].build (patrón libjpeg-turbo/libtiff que sí materializa el tool). bzip2 en incoming-clib era un duplicado del ya-promovido recipes/bzip2.toml (sellado en dist/repo). Co-Authored-By: Claude Opus 4.8 (1M context) --- recipes/incoming-clib/brotli.toml | 60 ++++++------------------------- recipes/incoming-clib/bzip2.toml | 42 ---------------------- 2 files changed, 10 insertions(+), 92 deletions(-) delete mode 100644 recipes/incoming-clib/bzip2.toml diff --git a/recipes/incoming-clib/brotli.toml b/recipes/incoming-clib/brotli.toml index 1fe1b5d3..c4dd13e2 100644 --- a/recipes/incoming-clib/brotli.toml +++ b/recipes/incoming-clib/brotli.toml @@ -1,13 +1,12 @@ -# 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. +# brotli 1.2.0 — compresión Brotli (libbrotli{common,dec,enc} + CLI). Base de fuentes web +# (woff2/freetype/harfbuzz→GTK). De-Alpinizada: cmake static (generador Make, sin Ninja), +# sin wheel de python (BOOTSTRAP). El fallo previo era falta de `cmake` en el sandbox: +# hay que declararlo en [deps].build para que el lab lo materialice (patrón libjpeg-turbo/libtiff). name = "brotli" version = "1.2.0" [source] tarball = "https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz" -# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine: -# sha512 = "f94542afd2ecd96cc41fd21a805a3da314281ae558c10650f3e6d9ca732b8425bba8fde312823f0a564c7de3993bdaab5b43378edab65ebb798cefb6fd702256" sha256 = "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec" patches = ["optimize-mips.patch", "fix-lp64.patch"] @@ -18,49 +17,10 @@ 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() { -export CFLAGS="$CFLAGS -flto=auto -O2" +# CMAKE_INSTALL_LIBDIR=lib: el lab usa /usr/lib (no /usr/lib64) → pkg-config de los consumidores. +configure = "cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF" +compile = "cmake --build build" +install = "DESTDIR=/out cmake --install build" - # static libs, see https://github.com/google/brotli/issues/795 - cmake -B build -G Ninja \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DBUILD_SHARED_LIBS=OFF - cmake --build build - - cmake -B build -G Ninja \ - -DCMAKE_BUILD_TYPE=None \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DBUILD_SHARED_LIBS=ON - cmake --build build - - if [ -z "$BOOTSTRAP" ]; then - gpep517 build-wheel \ - --wheel-dir .dist \ - --output-fd 3 3>&1 >&2 - fi -} -_abuild_phase -''' -# de package() de Alpine (traducido $pkgdir→/out): -install = ''' -_abuild_phase() { -DESTDIR="/out" cmake --install build - - local file; for file in common dec enc; do - install -D -m 755 "$builddir"/build/libbrotli$file.a \ - "/out"/usr/lib/ - done - - local man; for man in docs/*.?; do - install -D -m644 $man "/out"/usr/share/man/man${man##*.}/${man##*/} - done - - if [ -z "$BOOTSTRAP" ]; then - python3 -m installer -d "/out" .dist/*.whl - fi -} -_abuild_phase -''' +[deps] +build = ["cmake"] diff --git a/recipes/incoming-clib/bzip2.toml b/recipes/incoming-clib/bzip2.toml deleted file mode 100644 index 36738fd2..00000000 --- a/recipes/incoming-clib/bzip2.toml +++ /dev/null @@ -1,42 +0,0 @@ -# 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 = "bzip2" -version = "1.0.8" - -[source] -tarball = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz" -# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine: -# sha512 = "083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3" -sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269" -patches = ["bzip2-1.0.4-makefile-CFLAGS.patch", "bzip2-1.0.4-man-links.patch", "bzip2-1.0.2-progress.patch", "bzip2-1.0.3-no-test.patch", "saneso.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() { -make -f Makefile-libbz2_so all - make all -} -_abuild_phase -''' -# de package() de Alpine (traducido $pkgdir→/out): -install = ''' -_abuild_phase() { -make PREFIX="/out"/usr install - install -D libbz2.so.1.0.8 "/out"/usr/lib/libbz2.so.1.0.8 - ln -s libbz2.so.1.0.8 "/out"/usr/lib/libbz2.so - ln -s libbz2.so.1.0.8 "/out"/usr/lib/libbz2.so.${pkgver%%.*} - - mkdir -p "/out"/usr/lib/pkgconfig/ - sed "s|@VERSION@|1.0.8|" "$srcdir"/bzip2.pc.in \ - > "/out"/usr/lib/pkgconfig/bzip2.pc -} -_abuild_phase -'''