Files
hammer/recipes/libwebp.toml
T
sergioandClaude Opus 4.8 a503874f45 static: libwebp, kbd, sudo y lsof cumplen link=static (14 de 28)
Fases multilínea: LDFLAGS inyectado en las líneas make de compile e install.
Control de lista de ficheros intacta: libwebp 33, kbd 689, sudo 32, lsof 4.

libwebp b3:138b70a6962f · kbd b3:248de1120197 · sudo b3:6fdbe83990ef ·
lsof b3:d30ddb01b86e

mandoc revertida: no usa libtool ("Unknown Clang option: '-all-static'") y con
-static pierde binarios (apropos, demandoc) ⇒ el control la echó atrás. Necesita
otro enfoque, como xz y pcre2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 04:50:51 -04:00

48 lines
1.6 KiB
TOML

# 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 = "libwebp"
version = "1.6.0"
[source]
tarball = "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.6.0.tar.gz"
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
# sha512 = "5c159d9760efcb92749092536daada22c0a73c20926c76097a5f0448ddbf874cf761324ca97925ca5f578b30477564b2b072b47667e504673797128b31cafcbf"
sha256 = "e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564"
[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 -flto=auto -ffat-lto-objects" \
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--enable-libwebpmux \
--enable-libwebpdemux \
--enable-libwebpdecoder \
--disable-tiff # dependency-loop
make LDFLAGS="-all-static -no-pie"
}
_abuild_phase
'''
# de package() de Alpine (traducido $pkgdir→/out):
install = '''
_abuild_phase() {
make DESTDIR="/out" install LDFLAGS="-all-static -no-pie"
mkdir -p "/out"/usr/share/doc/libwebp
install -Dm644 PATENTS README.md "/out"/usr/share/doc/libwebp
}
_abuild_phase
'''
[deps]
build = ["giflib", "libjpeg-turbo", "libpng", "make"]