diff --git a/recipes/cmake.toml b/recipes/cmake.toml new file mode 100644 index 00000000..231d35ae --- /dev/null +++ b/recipes/cmake.toml @@ -0,0 +1,32 @@ +# CMake 3.31.6 — dependencia de build del frente rust (variante b, SDD 11 §7.2b). +# +# rustc construye su LLVM bundled con CMake (mrustc README: "cmake ≥3.4.3, required for building llvm +# in rustc"). El toolchain Alpine lo trae como paquete; esta receta lo construye desde fuente para +# de-Alpinizar el camino de bootstrap de rust. +# +# CMake es una HERRAMIENTA del toolchain (corre en build-time, no se enlaza en el 4/4): no necesita +# casar byte-a-byte con la de Alpine, sólo configurar/generar igual. Build vainilla, sin patches. +# +# CMake trae su propio `bootstrap` (no autotools): compila un cmake mínimo con CC/CXX y luego se +# auto-configura. El sandbox exporta CC="zig cc -mcpu=baseline" / CXX="zig c++ -mcpu=baseline"; el +# bootstrap los respeta. Enlace dinámico (un cmake estático con libc++/libstdc++ es impráctico y no +# aporta nada a una herramienta de build-time; la VM ya tiene libstdc++ runtime). + +name = "cmake" +version = "3.31.6" + +[source] +tarball = "https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6.tar.gz" +sha256 = "653427f0f5014750aafff22727fb2aa60c6c732ca91808cfb78ce22ddd9e55f0" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "dynamic" + +[build.phases] +# bootstrap = configure de CMake. --parallel acelera el cmake mínimo. -- pasa flags al cmake final; +# CMAKE_USE_OPENSSL=OFF evita depender de openssl-dev (el bootstrap de rust no usa el https de cmake). +configure = "./bootstrap --prefix=/usr --parallel=\"$(nproc)\" -- -DCMAKE_BUILD_TYPE=Release -DCMAKE_USE_OPENSSL=OFF" +compile = "make -j\"$(nproc)\"" +install = "make install DESTDIR=/out" diff --git a/recipes/python3.toml b/recipes/python3.toml new file mode 100644 index 00000000..007286f1 --- /dev/null +++ b/recipes/python3.toml @@ -0,0 +1,33 @@ +# CPython 3.12.10 — dependencia de build del frente rust (variante b, SDD 11 §7.2b). +# +# El bootstrap de rust/LLVM corre scripts python3 (mrustc README: "python3, required for building llvm +# in rustc"). El toolchain Alpine lo trae como paquete; esta receta lo construye desde fuente para +# de-Alpinizar el camino de bootstrap de rust. +# +# python3 es una HERRAMIENTA del toolchain (corre scripts en build-time, no se enlaza en el 4/4): no +# necesita casar byte-a-byte con el de Alpine, sólo interpretar igual. Build vainilla, sin patches. +# +# CPython usa autotools (./configure). zlib viene de recipes/zlib.toml (deps.build → materialize en +# /usr); --without-ensurepip evita la red (pip), --disable-test-modules acorta el build (no se necesita +# el test-suite). Enlace dinámico: el intérprete linkea libpython/libc; estático no aporta a una +# herramienta de build-time y CPython estático es frágil. El sandbox exporta CC="zig cc -mcpu=baseline". + +name = "python3" +version = "3.12.10" + +[source] +tarball = "https://www.python.org/ftp/python/3.12.10/Python-3.12.10.tgz" +sha256 = "15d9c623abfd2165fe816ea1fb385d6ed8cf3c664661ab357f1782e3036a6dac" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "dynamic" + +[deps] +build = ["zlib"] + +[build.phases] +configure = "./configure --prefix=/usr --without-ensurepip --disable-test-modules --with-ensurepip=no" +compile = "make -j\"$(nproc)\"" +install = "make install DESTDIR=/out"