base-system-2: mandoc construye — man/mandoc 1.14.6 estático
b3:a7b8a634. Quité shared-libmandoc.patch (forzaba .so); fase configure explícita que escribe configure.local (PREFIX=/usr, LDFLAGS=-static, CC='zig cc'). 3er caso del libz.a-UBSan: acá se resuelve fijando CC=zig cc (su compiler-rt trae __ubsan_handle_*). TODO durable: rebuildear zlib sin instrumentación UBSan (afecta a todo lo que linkee libz.a estático).
This commit is contained in:
@@ -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 = "mandoc"
|
||||
version = "1.14.6"
|
||||
|
||||
[source]
|
||||
tarball = "https://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz"
|
||||
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
|
||||
# sha512 = "54286070812a47b629f68757046d3c9a1bdd2b5d1c3b84a5c8e4cb92f1331afa745443f7238175835d8cfbe5b8dd442e00c75c3a5b5b8f8efd8d2ec8f636dad4"
|
||||
sha256 = "8bf0d570f01e70a6e124884088870cbed7537f36328d512909eb10cd53179d9c"
|
||||
# shared-libmandoc.patch QUITADO: fuerza libmandoc.so ⇒ el binario queda dinámico y no
|
||||
# resuelve la .so standalone. Con link=static queremos libmandoc.a linkeada adentro.
|
||||
patches = ["dynamic-tagfile-support.patch", "fix-core-dump-tag-put-assertion.patch", "outdated-warn-disable.patch", "empty-title.patch"]
|
||||
|
||||
[build]
|
||||
compiler = "zig-cc"
|
||||
target = "x86_64-linux-musl"
|
||||
link = "static"
|
||||
flags = []
|
||||
|
||||
[build.phases]
|
||||
# mandoc trae su PROPIO ./configure (no autotools): NO acepta --prefix/--build/--host.
|
||||
# Lee variables desde ./configure.local. Fase explícita para no chocar con el autogen de hammer.
|
||||
configure = '''
|
||||
cat > configure.local <<'EOF'
|
||||
PREFIX=/usr
|
||||
BINDIR=/usr/bin
|
||||
SBINDIR=/usr/sbin
|
||||
LIBDIR=/usr/lib
|
||||
INCLUDEDIR=/usr/include
|
||||
MANDIR=/usr/share/man
|
||||
CC="zig cc -mcpu=baseline"
|
||||
AR="zig ar"
|
||||
LDFLAGS="-static"
|
||||
EOF
|
||||
./configure
|
||||
'''
|
||||
compile = '''
|
||||
make -j"$(nproc)"
|
||||
'''
|
||||
# de package() de Alpine (traducido $pkgdir→/out):
|
||||
install = '''
|
||||
_abuild_phase() {
|
||||
make -j1 DESTDIR="/out" base-install lib-install
|
||||
}
|
||||
_abuild_phase
|
||||
'''
|
||||
|
||||
[deps]
|
||||
build = ["zlib"]
|
||||
Reference in New Issue
Block a user