sergio/takana
> Una distribución Linux construida con un laboratorio funcional y hermético en el > sótano, y una terminal mutable, clásica y anárquica en el piso de arriba — diseñada > desde el suelo para que una IA programadora entienda, modifique y co…
1# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
2# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
3# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
4name = "gettext"
5version = "1.0"
6
7[source]
8tarball = "https://ftp.gnu.org/gnu/gettext/gettext-1.0.tar.xz"
9# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
10# sha512 = "fa657faf5685dae7121a9b0293d3308a3910a72b90943a7a493b88cf88e95f29c5758e1573320169fe9beac6f101ef76f4165a279a7f3294155d7a773e2fa09f"
11sha256 = "71132a3fb71e68245b8f2ac4e9e97137d3e5c02f415636eb508ae607bc01add7"
12patches = ["cwd.patch", "skip-tests-musl.patch", "skip-meaningless-pthread-rwlock-test.patch", "skip-unicode-16-tests.patch"]
13
14[build]
15compiler = "zig-cc"
16target = "x86_64-linux-musl"
17link = "static"
18flags = []
19
20[build.phases]
21# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
22compile = '''
23_abuild_phase() {
24# force using system posix complaint printf
25 # the test is broken and fails with ash
26 gt_cv_func_printf_posix=yes \
27 ./configure \
28 --build=$CBUILD \
29 --host=$CHOST \
30 --prefix=/usr \
31 --enable-threads=posix \
32 --disable-java \
33 --enable-static
34 make
35}
36_abuild_phase
37'''
38# de package() de Alpine (traducido $pkgdir→/out):
39install = '''
40_abuild_phase() {
41depends="gettext-envsubst=1.0-r$pkgrel"
42 make -j1 DESTDIR="/out" install
43
44 # nothing in here is particularly useful, mostly just hello world examples in
45 # every single programming language for using gettext
46 rm -r "/out"/usr/share/doc
47}
48_abuild_phase
49'''
50
51[deps]
52build = ["perl", "ncurses", "libxml2-dev~2.13", "libunistring", "linux-headers"]