Etapa G: siembra 24 libs C de toolkit en incoming-clib (zlib/freetype/fontconfig/harfbuzz/cairo/pango/glib/...) — llenador de horas + ladrillos GUI
Delta semántico
Ninguna definición cambió: el cambio es de texto, documentación o datos.
51 archivos · +2335 −0
- recipes/incoming-clib/CVE-2021-40633.patch +30 −0
- recipes/incoming-clib/CVE-2025-31344.patch +15 −0
- recipes/incoming-clib/CVE-2026-6732-test.patch +84 −0
- recipes/incoming-clib/CVE-2026-6732.patch +32 −0
- recipes/incoming-clib/brotli.toml +66 −0
- recipes/incoming-clib/bzip2-1.0.2-progress.patch +175 −0
- recipes/incoming-clib/bzip2-1.0.3-no-test.patch +9 −0
- recipes/incoming-clib/bzip2-1.0.4-makefile-CFLAGS.patch +25 −0
- recipes/incoming-clib/bzip2-1.0.4-man-links.patch +12 −0
- recipes/incoming-clib/bzip2.toml +42 −0
- recipes/incoming-clib/cairo.toml +51 −0
- recipes/incoming-clib/correct-document-page-install.patch +58 −0
- recipes/incoming-clib/cwd.patch +14 −0
- recipes/incoming-clib/disable-broken-test.patch +18 −0
- recipes/incoming-clib/dont-build-html-pages-images.patch +18 −0
- recipes/incoming-clib/expat.toml +39 −0
- recipes/incoming-clib/fix-lp64.patch +43 −0
- recipes/incoming-clib/fix-tests-fortify.patch +13 −0
- recipes/incoming-clib/flaky-tests.patch +83 −0
- recipes/incoming-clib/fontconfig.toml +49 −0
- recipes/incoming-clib/freetype.toml +43 −0
- recipes/incoming-clib/fribidi.toml +40 −0
- recipes/incoming-clib/gdk-pixbuf.toml +50 −0
- recipes/incoming-clib/gettext.toml +52 −0
- recipes/incoming-clib/giflib.toml +37 −0
- recipes/incoming-clib/glib.toml +83 −0
- recipes/incoming-clib/harfbuzz.toml +51 −0
- recipes/incoming-clib/libffi.toml +41 −0
- recipes/incoming-clib/libjpeg-turbo.toml +72 −0
- recipes/incoming-clib/libpng-fix-arm-neon.patch +39 −0
- recipes/incoming-clib/libpng.toml +42 −0
- recipes/incoming-clib/libwebp.toml +47 −0
- recipes/incoming-clib/libxml2.toml +48 −0
- recipes/incoming-clib/lz4.toml +42 −0
- recipes/incoming-clib/musl-stacksize.patch +23 −0
- recipes/incoming-clib/optimize-mips.patch +50 −0
- recipes/incoming-clib/pango.toml +46 −0
- recipes/incoming-clib/pcf-family-names.patch +13 −0
- recipes/incoming-clib/pcre2.toml +50 −0
- recipes/incoming-clib/pixman.toml +56 −0
- recipes/incoming-clib/projectsdir.patch +102 −0
- recipes/incoming-clib/saneso.patch +23 −0
- recipes/incoming-clib/skip-meaningless-pthread-rwlock-test.patch +13 −0
- recipes/incoming-clib/skip-tests-musl.patch +70 −0
- recipes/incoming-clib/skip-unicode-16-tests.patch +89 −0
- recipes/incoming-clib/subpixel.patch +12 −0
- recipes/incoming-clib/table-validation-modules.patch +21 −0
- recipes/incoming-clib/tests-machine-id.patch +41 −0
- recipes/incoming-clib/xz.toml +54 −0
- recipes/incoming-clib/zlib.toml +39 −0
- recipes/incoming-clib/zstd.toml +70 −0
diff --git a/recipes/incoming-clib/CVE-2021-40633.patch b/recipes/incoming-clib/CVE-2021-40633.patch
new file mode 100644
index 00000000..9002088b
--- /dev/null
+++ b/recipes/incoming-clib/CVE-2021-40633.patch
@@ -0,0 +1,30 @@
+From ccbc956432650734c91acb3fc88837f7b81267ff Mon Sep 17 00:00:00 2001
+From: "Eric S. Raymond" <esr@thyrsus.com>
+Date: Wed, 21 Feb 2024 18:55:00 -0500
+Subject: [PATCH] Clean up memory better at end of run (CVE-2021-40633)
+
+---
+ gif2rgb.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gif2rgb.c b/gif2rgb.c
+index d51226d..fc2e683 100644
+--- a/gif2rgb.c
++++ b/gif2rgb.c
+@@ -515,10 +515,13 @@ static void GIF2RGB(int NumFiles, char *FileName, bool OneFileFlag,
+ }
+
+ DumpScreen2RGB(OutFileName, OneFileFlag, ColorMap, ScreenBuffer,
+ GifFile->SWidth, GifFile->SHeight);
+
++ for (i = 0; i < GifFile->SHeight; i++) {
++ (void)free(ScreenBuffer[i]);
++ }
+ (void)free(ScreenBuffer);
+
+ {
+ int Error;
+ if (DGifCloseFile(GifFile, &Error) == GIF_ERROR) {
+--
+2.43.0
+
diff --git a/recipes/incoming-clib/CVE-2025-31344.patch b/recipes/incoming-clib/CVE-2025-31344.patch
new file mode 100644
index 00000000..04ef6c3b
--- /dev/null
+++ b/recipes/incoming-clib/CVE-2025-31344.patch
@@ -0,0 +1,15 @@
+diff -up giflib-5.2.2/gif2rgb.c.omv~ giflib-5.2.2/gif2rgb.c
+--- giflib-5.2.2/gif2rgb.c.omv~ 2025-04-07 21:44:54.956355983 +0200
++++ giflib-5.2.2/gif2rgb.c 2025-04-07 21:45:29.630769589 +0200
+@@ -329,6 +329,11 @@ static void DumpScreen2RGB(char *FileNam
+ GifRow = ScreenBuffer[i];
+ GifQprintf("\b\b\b\b%-4d", ScreenHeight - i);
+ for (j = 0; j < ScreenWidth; j++) {
++ /* Check if color is within color palete */
++ if (GifRow[j] >= ColorMap->ColorCount) {
++ GIF_EXIT(GifErrorString(
++ D_GIF_ERR_IMAGE_DEFECT));
++ }
+ ColorMapEntry = &ColorMap->Colors[GifRow[j]];
+ Buffers[0][j] = ColorMapEntry->Red;
+ Buffers[1][j] = ColorMapEntry->Green;
diff --git a/recipes/incoming-clib/CVE-2026-6732-test.patch b/recipes/incoming-clib/CVE-2026-6732-test.patch
new file mode 100644
index 00000000..e88d2b8a
--- /dev/null
+++ b/recipes/incoming-clib/CVE-2026-6732-test.patch
@@ -0,0 +1,84 @@
+--- a/testparser.c
++++ b/testparser.c
+@@ -11,6 +11,7 @@
+ #include <libxml/xmlreader.h>
+ #include <libxml/xmlwriter.h>
+ #include <libxml/HTMLparser.h>
++#include <libxml/xmlschemas.h>
+
+ #include <string.h>
+
+@@ -777,6 +778,63 @@
+ }
+ #endif /* WIN32 */
+
++#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
++/*
++ * Regression test for CVE-2026-6732: a type confusion in xmlParseReference
++ * crashed a schema-validating xmlTextReader whenever the document expanded
++ * an internal entity. Without the fix this triggers SIGSEGV on the first
++ * read; with the fix the entity expansion is read and the schema correctly
++ * reports the substituted content as invalid against xs:integer.
++ *
++ * Backport of upstream commit 7cea3fd1 adapted for the libxml2 2.13
++ * testparser.c layout (which predates the testReaderSchemaResourceLoader
++ * helper that upstream uses as an anchor on master).
++ */
++static int
++testReaderSchemaEntityExpansion(void) {
++ static const char xsd[] =
++ "<?xml version='1.0'?>\n"
++ "<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>\n"
++ " <xs:element name='e' type='xs:integer'/>\n"
++ "</xs:schema>\n";
++ static const char xml[] =
++ "<!DOCTYPE e [<!ENTITY n \"not-an-int\">]>\n"
++ "<e>&n;</e>";
++ xmlSchemaParserCtxtPtr spc;
++ xmlSchemaPtr schema;
++ xmlTextReaderPtr reader;
++ int err = 0;
++ int ret;
++
++ spc = xmlSchemaNewMemParserCtxt(xsd, (int) sizeof(xsd) - 1);
++ schema = xmlSchemaParse(spc);
++ xmlSchemaFreeParserCtxt(spc);
++ if (schema == NULL) {
++ fprintf(stderr, "xmlSchemaParse failed\n");
++ return 1;
++ }
++
++ reader = xmlReaderForMemory(xml, (int) sizeof(xml) - 1, "doc.xml", NULL,
++ XML_PARSE_NOENT | XML_PARSE_DTDLOAD);
++ xmlTextReaderSetSchema(reader, schema);
++
++ while ((ret = xmlTextReaderRead(reader)) == 1)
++ ;
++ if (ret != 0) {
++ fprintf(stderr, "reader failed on entity-expanded document\n");
++ err = 1;
++ }
++ if (xmlTextReaderIsValid(reader) != 0) {
++ fprintf(stderr, "schema missed invalid entity-expanded text\n");
++ err = 1;
++ }
++
++ xmlFreeTextReader(reader);
++ xmlSchemaFree(schema);
++ return err;
++}
++#endif
++
+ int
+ main(void) {
+ int err = 0;
+@@ -807,6 +865,9 @@
+ #ifdef LIBXML_XINCLUDE_ENABLED
+ err |= testReaderXIncludeError();
+ #endif
++#ifdef LIBXML_SCHEMAS_ENABLED
++ err |= testReaderSchemaEntityExpansion();
++#endif
+ #endif
+ #ifdef LIBXML_WRITER_ENABLED
+ err |= testWriterClose();
diff --git a/recipes/incoming-clib/CVE-2026-6732.patch b/recipes/incoming-clib/CVE-2026-6732.patch
new file mode 100644
index 00000000..66ce0a32
--- /dev/null
+++ b/recipes/incoming-clib/CVE-2026-6732.patch
@@ -0,0 +1,32 @@
+diff --git a/parser.c b/parser.c
+index 6e7621a86b5b9256b7a068f09a7e1650e7264aa5..85bc39b1c2739574ab90fde34a24459e5ef9928f 100644
+--- a/parser.c
++++ b/parser.c
+@@ -7261,10 +7261,10 @@ xmlParseReference(xmlParserCtxt *ctxt) {
+ if ((cur->type == XML_TEXT_NODE) ||
+ (ctxt->options & XML_PARSE_NOCDATA)) {
+ if (ctxt->sax->characters != NULL)
+- ctxt->sax->characters(ctxt, cur->content, len);
++ ctxt->sax->characters(ctxt->userData, cur->content, len);
+ } else {
+ if (ctxt->sax->cdataBlock != NULL)
+- ctxt->sax->cdataBlock(ctxt, cur->content, len);
++ ctxt->sax->cdataBlock(ctxt->userData, cur->content, len);
+ }
+
+ cur = cur->next;
+@@ -7284,10 +7284,12 @@ xmlParseReference(xmlParserCtxt *ctxt) {
+ if ((cur->type == XML_TEXT_NODE) ||
+ (ctxt->options & XML_PARSE_NOCDATA)) {
+ if (ctxt->sax->characters != NULL)
+- ctxt->sax->characters(ctxt, cur->content, len);
++ ctxt->sax->characters(ctxt->userData, cur->content,
++ len);
+ } else {
+ if (ctxt->sax->cdataBlock != NULL)
+- ctxt->sax->cdataBlock(ctxt, cur->content, len);
++ ctxt->sax->cdataBlock(ctxt->userData, cur->content,
++ len);
+ }
+
+ break;
diff --git a/recipes/incoming-clib/brotli.toml b/recipes/incoming-clib/brotli.toml
new file mode 100644
index 00000000..1fe1b5d3
--- /dev/null
+++ b/recipes/incoming-clib/brotli.toml
@@ -0,0 +1,66 @@
+# 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 = "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"]
+
+[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() {
+export CFLAGS="$CFLAGS -flto=auto -O2"
+
+ # 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
+'''
diff --git a/recipes/incoming-clib/bzip2-1.0.2-progress.patch b/recipes/incoming-clib/bzip2-1.0.2-progress.patch
new file mode 100644
index 00000000..2f389cfa
--- /dev/null
+++ b/recipes/incoming-clib/bzip2-1.0.2-progress.patch
@@ -0,0 +1,175 @@
+Ripped from Mandrake.
+
+http://bugs.gentoo.org/show_bug.cgi?id=82192
+
+--- bzip2-1.0.2.org/bzip2.1
++++ bzip2-1.0.2/bzip2.1
+@@ -235,6 +235,10 @@
+ Suppress non-essential warning messages. Messages pertaining to
+ I/O errors and other critical events will not be suppressed.
+ .TP
++.B \-p --show-progress
++Show percentage of input-file done and while compressing show the percentage
++of the original file the new file is.
++.TP
+ .B \-v --verbose
+ Verbose mode -- show the compression ratio for each file processed.
+ Further \-v's increase the verbosity level, spewing out lots of
+--- bzip2-1.0.2.org/bzip2.c
++++ bzip2-1.0.2/bzip2.c
+@@ -145,6 +145,7 @@
+ #include <signal.h>
+ #include <math.h>
+ #include <errno.h>
++#include <time.h>
+ #include <ctype.h>
+ #include "bzlib.h"
+
+@@ -301,6 +302,7 @@
+ Char progNameReally[FILE_NAME_LEN];
+ FILE *outputHandleJustInCase;
+ Int32 workFactor;
++Char showProgress;
+
+ static void panic ( Char* ) NORETURN;
+ static void ioError ( void ) NORETURN;
+@@ -425,6 +427,12 @@
+ UInt32 nbytes_in_lo32, nbytes_in_hi32;
+ UInt32 nbytes_out_lo32, nbytes_out_hi32;
+ Int32 bzerr, bzerr_dummy, ret;
++ double fileSize = 0; /* initialized to make the compiler stop crying */
++ /* double because big files might otherwhise give
++ * overflows. not long long since not all compilers
++ * support that one
++ */
++ time_t startTime, currentTime;
+
+ SET_BINARY_MODE(stream);
+ SET_BINARY_MODE(zStream);
+@@ -432,12 +440,21 @@
+ if (ferror(stream)) goto errhandler_io;
+ if (ferror(zStream)) goto errhandler_io;
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ (void)fseek(stream, 0, SEEK_END);
++ fileSize = (double)ftell(stream);
++ rewind(stream);
++ if (verbosity >= 1)
++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
++ }
++
+ bzf = BZ2_bzWriteOpen ( &bzerr, zStream,
+ blockSize100k, verbosity, workFactor );
+ if (bzerr != BZ_OK) goto errhandler;
+
+ if (verbosity >= 2) fprintf ( stderr, "\n" );
+
++ time(&startTime);
+ while (True) {
+
+ if (myfeof(stream)) break;
+@@ -446,13 +463,32 @@
+ if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
+ if (bzerr != BZ_OK) goto errhandler;
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True)
++ {
++ time(¤tTime);
++
++ if ((currentTime - startTime) > 1) { /* show progress every 2 seconds */
++ double curInPos = (double)ftell(stream);
++ double curOutPos = (double)ftell(zStream);
++
++ startTime = currentTime;
++
++ fprintf(stderr, "%.2f%% done", (curInPos * 100.0) / fileSize);
++ if (srcMode == SM_F2F)
++ {
++ fprintf(stderr, ", new size: %.2f%%", (curOutPos * 100.0) / curInPos);
++ }
++
++ fprintf(stderr, " \r");
++ }
++ }
+ }
+
+ BZ2_bzWriteClose64 ( &bzerr, bzf, 0,
+ &nbytes_in_lo32, &nbytes_in_hi32,
+ &nbytes_out_lo32, &nbytes_out_hi32 );
+ if (bzerr != BZ_OK) goto errhandler;
+-
++
+ if (ferror(zStream)) goto errhandler_io;
+ ret = fflush ( zStream );
+ if (ret == EOF) goto errhandler_io;
+@@ -526,6 +562,8 @@
+ UChar unused[BZ_MAX_UNUSED];
+ Int32 nUnused;
+ UChar* unusedTmp;
++ double fileSize = 0; /* initialized to make the compiler stop crying */
++ time_t startTime, currentTime;
+
+ nUnused = 0;
+ streamNo = 0;
+@@ -533,9 +571,19 @@
+ SET_BINARY_MODE(stream);
+ SET_BINARY_MODE(zStream);
+
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ long dummy = ftell(zStream);
++ (void)fseek(zStream, 0, SEEK_END);
++ fileSize = (double)ftell(zStream);
++ (void)fseek(zStream, dummy, SEEK_SET);
++ if (verbosity >= 1)
++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize);
++ }
++
+ if (ferror(stream)) goto errhandler_io;
+ if (ferror(zStream)) goto errhandler_io;
+
++ time(&startTime);
+ while (True) {
+
+ bzf = BZ2_bzReadOpen (
+@@ -551,6 +599,17 @@
+ if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0)
+ fwrite ( obuf, sizeof(UChar), nread, stream );
+ if (ferror(stream)) goto errhandler_io;
++
++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) {
++ time(¤tTime);
++ if ((currentTime - startTime) >= 2)
++ {
++ double curInPos = (double)ftell(zStream);
++ startTime = currentTime;
++
++ fprintf(stderr, "%.2f%% done\r", (curInPos * 100.0) / fileSize);
++ }
++ }
+ }
+ if (bzerr != BZ_STREAM_END) goto errhandler;
+
+@@ -1872,6 +1931,7 @@
+ deleteOutputOnInterrupt = False;
+ exitValue = 0;
+ i = j = 0; /* avoid bogus warning from egcs-1.1.X */
++ showProgress = False;
+
+ /*-- Set up signal handlers for mem access errors --*/
+ signal (SIGSEGV, mySIGSEGVorSIGBUScatcher);
+@@ -1949,6 +2009,7 @@
+ case 'k': keepInputFiles = True; break;
+ case 's': smallMode = True; break;
+ case 'q': noisy = False; break;
++ case 'p': showProgress = True; break;
+ case '1': blockSize100k = 1; break;
+ case '2': blockSize100k = 2; break;
+ case '3': blockSize100k = 3; break;
+@@ -1985,6 +2046,7 @@
+ if (ISFLAG("--keep")) keepInputFiles = True; else
+ if (ISFLAG("--small")) smallMode = True; else
+ if (ISFLAG("--quiet")) noisy = False; else
++ if (ISFLAG("--show-progress")) showProgress = True; else
+ if (ISFLAG("--version")) license(); else
+ if (ISFLAG("--license")) license(); else
+ if (ISFLAG("--exponential")) workFactor = 1; else
diff --git a/recipes/incoming-clib/bzip2-1.0.3-no-test.patch b/recipes/incoming-clib/bzip2-1.0.3-no-test.patch
new file mode 100644
index 00000000..fc876d50
--- /dev/null
+++ b/recipes/incoming-clib/bzip2-1.0.3-no-test.patch
@@ -0,0 +1,9 @@
+--- ./Makefile
++++ ./Makefile
+@@ -23,5 +23,5 @@
+ bzlib.o
+
+-all: libbz2.a bzip2 bzip2recover test
++all: libbz2.a bzip2 bzip2recover
+
+ bzip2: libbz2.a bzip2.o
diff --git a/recipes/incoming-clib/bzip2-1.0.4-makefile-CFLAGS.patch b/recipes/incoming-clib/bzip2-1.0.4-makefile-CFLAGS.patch
new file mode 100644
index 00000000..6acdc28a
--- /dev/null
+++ b/recipes/incoming-clib/bzip2-1.0.4-makefile-CFLAGS.patch
@@ -0,0 +1,25 @@
+--- ./Makefile
++++ ./Makefile
+@@ -18,10 +18,9 @@
+ CC=gcc
+ AR=ar
+ RANLIB=ranlib
+-LDFLAGS=
+
+ BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
++CFLAGS+=-Wall -Winline $(BIGFILES) $(CPPFLAGS) -O2
+
+ # Where you want it installed when you do 'make install'
+ PREFIX=/usr/local
+--- ./Makefile-libbz2_so
++++ ./Makefile-libbz2_so
+@@ -24,7 +24,7 @@
+ SHELL=/bin/sh
+ CC=gcc
+ BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
++CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES) $(CPPFLAGS) -O2
+
+ OBJS= blocksort.o \
+ huffman.o \
diff --git a/recipes/incoming-clib/bzip2-1.0.4-man-links.patch b/recipes/incoming-clib/bzip2-1.0.4-man-links.patch
new file mode 100644
index 00000000..2427d6a7
--- /dev/null
+++ b/recipes/incoming-clib/bzip2-1.0.4-man-links.patch
@@ -0,0 +1,12 @@
+http://bugs.gentoo.org/172986
+
+--- bzip2-1.0.4/Makefile
++++ bzip2-1.0.4/Makefile
+@@ -85,4 +85,7 @@
+ cp -f bzip2.1 $(PREFIX)/share/man/man1
+ chmod a+r $(PREFIX)/share/man/man1/bzip2.1
++ ln -s bzip2.1 $(PREFIX)/share/man/man1/bunzip2.1
++ ln -s bzip2.1 $(PREFIX)/share/man/man1/bzcat.1
++ ln -s bzip2.1 $(PREFIX)/share/man/man1/bzip2recover.1
+ cp -f bzlib.h $(PREFIX)/include
+ chmod a+r $(PREFIX)/include/bzlib.h
diff --git a/recipes/incoming-clib/bzip2.toml b/recipes/incoming-clib/bzip2.toml
new file mode 100644
index 00000000..36738fd2
--- /dev/null
+++ b/recipes/incoming-clib/bzip2.toml
@@ -0,0 +1,42 @@
+# 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
+'''
diff --git a/recipes/incoming-clib/cairo.toml b/recipes/incoming-clib/cairo.toml
new file mode 100644
index 00000000..615f50b9
--- /dev/null
+++ b/recipes/incoming-clib/cairo.toml
@@ -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 = "cairo"
+version = "1.18.4"
+
+[source]
+tarball = "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.18.4/cairo-1.18.4.tar.bz2"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "27b98a17510b4d6f0187fcb280fea1b47ae31243f6999081a7ac94f8cf3c789c05fa6eb0fe65844808ef9ac11bcd29a4c3688c871a6950d888667840385acf9b"
+sha256 = "6d9281e786fd289d382324d4588d59973a36911e1865b40e64f9ec39936ceba8"
+patches = ["musl-stacksize.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() {
+abuild-meson \
+ -Db_lto=true \
+ -Ddefault_library=both \
+ -Dgtk_doc=true \
+ -Dtests="$(want_check && echo enabled || echo disabled)" \
+ -Dfontconfig=enabled \
+ -Dfreetype=enabled \
+ -Dglib=enabled \
+ -Dpng=enabled \
+ -Dtee=enabled \
+ -Dxcb=enabled \
+ -Dxlib=enabled \
+ -Dzlib=enabled \
+ . output
+ meson compile -C output
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" meson install --no-rebuild -C output
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["expat", "fontconfig", "freetype", "glib", "gtk-doc", "libpng", "libxext", "libxrender", "pixman", "xcb-util", "zlib"]
diff --git a/recipes/incoming-clib/correct-document-page-install.patch b/recipes/incoming-clib/correct-document-page-install.patch
new file mode 100644
index 00000000..4e10d866
--- /dev/null
+++ b/recipes/incoming-clib/correct-document-page-install.patch
@@ -0,0 +1,58 @@
+From 61f375082c80ee479eb8ff03189aea691a6a06aa Mon Sep 17 00:00:00 2001
+From: "Eric S. Raymond" <esr@thyrsus.com>
+Date: Wed, 21 Feb 2024 08:33:51 -0500
+Subject: [PATCH] Correct document page install.
+
+---
+ Makefile | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 87966a9..f4ecb24 100644
+--- a/Makefile
++++ b/Makefile
+@@ -61,19 +61,23 @@ UTILS = $(INSTALLABLE) \
+ gifsponge \
+ gifwedge
+
+ LDLIBS=libgif.a -lm
+
+-MANUAL_PAGES = \
++MANUAL_PAGES_1 = \
+ doc/gif2rgb.xml \
+ doc/gifbuild.xml \
+ doc/gifclrmp.xml \
+ doc/giffix.xml \
+- doc/giflib.xml \
+ doc/giftext.xml \
+ doc/giftool.xml
+
++MANUAL_PAGES_7 = \
++ doc/giflib.xml
++
++MANUAL_PAGES = $(MANUAL_PAGES_1) $(MANUAL_PAGES_7)
++
+ SOEXTENSION = so
+ LIBGIFSO = libgif.$(SOEXTENSION)
+ LIBGIFSOMAJOR = libgif.$(SOEXTENSION).$(LIBMAJOR)
+ LIBGIFSOVER = libgif.$(SOEXTENSION).$(LIBVER)
+ LIBUTILSO = libutil.$(SOEXTENSION)
+@@ -146,12 +150,13 @@ install-lib:
+ $(INSTALL) -m 644 libgif.a "$(DESTDIR)$(LIBDIR)/libgif.a"
+ $(INSTALL) -m 755 $(LIBGIFSO) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSOVER)"
+ ln -sf $(LIBGIFSOVER) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSOMAJOR)"
+ ln -sf $(LIBGIFSOMAJOR) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSO)"
+ install-man:
+- $(INSTALL) -d "$(DESTDIR)$(MANDIR)/man1"
+- $(INSTALL) -m 644 $(MANUAL_PAGES) "$(DESTDIR)$(MANDIR)/man1"
++ $(INSTALL) -d "$(DESTDIR)$(MANDIR)/man1" "$(DESTDIR)$(MANDIR)/man7"
++ $(INSTALL) -m 644 $(MANUAL_PAGES_1:xml=1) "$(DESTDIR)$(MANDIR)/man1"
++ $(INSTALL) -m 644 $(MANUAL_PAGES_7:xml=7) "$(DESTDIR)$(MANDIR)/man7"
+ uninstall: uninstall-man uninstall-include uninstall-lib uninstall-bin
+ uninstall-bin:
+ cd "$(DESTDIR)$(BINDIR)" && rm -f $(INSTALLABLE)
+ uninstall-include:
+ rm -f "$(DESTDIR)$(INCDIR)/gif_lib.h"
+--
+2.43.0
+
diff --git a/recipes/incoming-clib/cwd.patch b/recipes/incoming-clib/cwd.patch
new file mode 100644
index 00000000..cebc626b
--- /dev/null
+++ b/recipes/incoming-clib/cwd.patch
@@ -0,0 +1,14 @@
+seems to fail on ppc64le
+--
+diff --git a/gettext-tools/gnulib-tests/test-getcwd.sh b/gettext-tools/gnulib-tests/test-getcwd.sh
+index 64a3c7c..ccabb8f 100755
+--- a/gettext-tools/gnulib-tests/test-getcwd.sh
++++ b/gettext-tools/gnulib-tests/test-getcwd.sh
+@@ -1,5 +1,7 @@
+ #!/bin/sh
+
++exit 77
++
+ . "${srcdir=.}/init.sh"; path_prepend_ .
+
+ ${CHECKER} test-getcwd
diff --git a/recipes/incoming-clib/disable-broken-test.patch b/recipes/incoming-clib/disable-broken-test.patch
new file mode 100644
index 00000000..a89e65d6
--- /dev/null
+++ b/recipes/incoming-clib/disable-broken-test.patch
@@ -0,0 +1,18 @@
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -47,7 +47,6 @@ endif
+ if cairo_dep.found()
+ test_cflags += '-DHAVE_CAIRO'
+ tests += [
+- [ 'test-font-data', [ 'test-font-data.c', 'test-common.c' ], [ libpangocairo_dep ] + common_deps ],
+ [ 'test-bidi', [ 'test-bidi.c' ], [ libpangocairo_dep ] ],
+ [ 'testcontext', [ 'testcontext.c' ], [ libpangocairo_dep ] ],
+ [ 'testiter', [ 'testiter.c' ], [ libpangocairo_dep ] ],
+@@ -70,7 +69,6 @@ if cairo_dep.found()
+
+ if host_system != 'darwin'
+ tests += [
+- [ 'test-layout', [ 'test-layout.c', 'test-common.c' ], [ libpangocairo_dep, libpangoft2_dep ] + common_deps ],
+ [ 'test-layout2', [ 'test-layout2.c'], [ libpangocairo_dep, libpangoft2_dep ] + common_deps ],
+ [ 'test-fonts', [ 'test-fonts.c', 'test-common.c' ], [ libpangocairo_dep, libpangoft2_dep ] + common_deps ],
+ [ 'test-no-fonts', [ 'test-no-fonts.c' ], [ libpangocairo_dep, libpangoft2_dep ] ],
diff --git a/recipes/incoming-clib/dont-build-html-pages-images.patch b/recipes/incoming-clib/dont-build-html-pages-images.patch
new file mode 100644
index 00000000..7d4fe356
--- /dev/null
+++ b/recipes/incoming-clib/dont-build-html-pages-images.patch
@@ -0,0 +1,18 @@
+Description: Don't build the site HTML pages images.
+ It saves us to have ImageMagick as a b-depend.
+Author: David Suárez <david.sephirot@gmail.com>
+Origin: vendor
+Last-Update: 2024-03-24
+Forwarded: not-needed
+
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -46,7 +46,7 @@
+ convert $^ -resize 50x50 $@
+
+ # Philosophical choice: the website gets the internal manual pages
+-allhtml: $(XMLALL:.xml=.html) giflib-logo.gif
++allhtml: $(XMLALL:.xml=.html)
+
+ manpages: $(XMLMAN1:.xml=.1) $(XMLMAN7:.xml=.7) $(XMLINTERNAL:.xml=.1)
+
diff --git a/recipes/incoming-clib/expat.toml b/recipes/incoming-clib/expat.toml
new file mode 100644
index 00000000..3304a8d4
--- /dev/null
+++ b/recipes/incoming-clib/expat.toml
@@ -0,0 +1,39 @@
+# 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 = "expat"
+version = "2.8.2"
+
+[source]
+tarball = "https://github.com/libexpat/libexpat/releases/download/R_${pkgver//./_}/expat-2.8.2.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "68ee856b3eeefeb6bb800004951bbbe89a9a144354ae12bc9d670888fd89e8513243e0053c61674430c78e2beeeb85a3c86ac7644576a5bb9867fbce3643ff8d"
+sha256 = "FIXME-sha256"
+
+[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() {
+./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-static
+ make
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make DESTDIR="/out/" install
+}
+_abuild_phase
+'''
diff --git a/recipes/incoming-clib/fix-lp64.patch b/recipes/incoming-clib/fix-lp64.patch
new file mode 100644
index 00000000..55daa542
--- /dev/null
+++ b/recipes/incoming-clib/fix-lp64.patch
@@ -0,0 +1,43 @@
+Patch-Source: https://github.com/google/brotli/commit/e230f474b87134e8c6c85b630084c612057f253e
+From e230f474b87134e8c6c85b630084c612057f253e Mon Sep 17 00:00:00 2001
+From: Evgenii Kliuchnikov <eustas@google.com>
+Date: Mon, 3 Nov 2025 07:20:19 -0800
+Subject: [PATCH] disable BROTLI_MODEL macro for some targets
+
+PiperOrigin-RevId: 827486322
+---
+ c/common/platform.h | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/c/common/platform.h b/c/common/platform.h
+index b59f9b809..e1254d5ca 100644
+--- a/c/common/platform.h
++++ b/c/common/platform.h
+@@ -213,6 +213,10 @@ To apply compiler hint, enclose the branching condition into macros, like this:
+ #define BROTLI_TARGET_MIPS64
+ #endif
+
++#if defined(__ia64__) || defined(_M_IA64)
++#define BROTLI_TARGET_IA64
++#endif
++
+ #if defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8_64) || \
+ defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64) || \
+ defined(BROTLI_TARGET_LOONGARCH64) || defined(BROTLI_TARGET_MIPS64)
+@@ -665,13 +669,14 @@ BROTLI_UNUSED_FUNCTION void BrotliSuppressUnusedFunctions(void) {
+ #undef BROTLI_TEST
+ #endif
+
+-#if BROTLI_GNUC_HAS_ATTRIBUTE(model, 3, 0, 3)
++#if !defined(BROTLI_MODEL) && BROTLI_GNUC_HAS_ATTRIBUTE(model, 3, 0, 3) && \
++ !defined(BROTLI_TARGET_IA64) && !defined(BROTLI_TARGET_LOONGARCH64)
+ #define BROTLI_MODEL(M) __attribute__((model(M)))
+ #else
+ #define BROTLI_MODEL(M) /* M */
+ #endif
+
+-#if BROTLI_GNUC_HAS_ATTRIBUTE(cold, 4, 3, 0)
++#if !defined(BROTLI_COLD) && BROTLI_GNUC_HAS_ATTRIBUTE(cold, 4, 3, 0)
+ #define BROTLI_COLD __attribute__((cold))
+ #else
+ #define BROTLI_COLD /* cold */
diff --git a/recipes/incoming-clib/fix-tests-fortify.patch b/recipes/incoming-clib/fix-tests-fortify.patch
new file mode 100644
index 00000000..793a0a36
--- /dev/null
+++ b/recipes/incoming-clib/fix-tests-fortify.patch
@@ -0,0 +1,13 @@
+diff --git a/testsuite/libffi.bhaible/bhaible.exp b/testsuite/libffi.bhaible/bhaible.exp
+index 44aebc5..245f18c 100644
+--- a/testsuite/libffi.bhaible/bhaible.exp
++++ b/testsuite/libffi.bhaible/bhaible.exp
+@@ -24,7 +24,7 @@ global compiler_vendor
+ # was done in a pretty lazy fashion, and requires the use of compiler
+ # flags to disable warnings for now.
+ if { [string match $compiler_vendor "gnu"] } {
+- set warning_options "-Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-uninitialized";
++ set warning_options "-Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-uninitialized -Wno-stringop-overflow";
+ }
+ if { [string match $compiler_vendor "microsoft"] } {
+ # -wd4996 suggest use of vsprintf_s instead of vsprintf
diff --git a/recipes/incoming-clib/flaky-tests.patch b/recipes/incoming-clib/flaky-tests.patch
new file mode 100644
index 00000000..bc6f0aad
--- /dev/null
+++ b/recipes/incoming-clib/flaky-tests.patch
@@ -0,0 +1,83 @@
+https://gitlab.gnome.org/GNOME/glib/-/issues/3318
+https://gitlab.gnome.org/GNOME/glib/-/issues/3320
+
+diff --git a/glib/tests/meson.build b/glib/tests/meson.build
+index 85f40d2e1..059a786d3 100644
+--- a/glib/tests/meson.build
++++ b/glib/tests/meson.build
+@@ -54,6 +54,7 @@ glib_tests = {
+ 'gwakeup' : {
+ 'source' : ['gwakeuptest.c', '../gwakeup.c'],
+ 'install' : false,
++ 'can_fail': host_machine.cpu_family() == 's390x',
+ },
+ 'hash' : {},
+ 'hmac' : {},
+@@ -226,6 +227,7 @@ if glib_conf.has('HAVE_EVENTFD')
+ 'source' : ['gwakeuptest.c', '../gwakeup.c'],
+ 'c_args' : ['-DTEST_EVENTFD_FALLBACK'],
+ 'install' : false,
++ 'can_fail': host_machine.cpu_family() == 's390x',
+ },
+ }
+ endif
+diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build
+index a163e5f91..12c449519 100644
+--- a/gobject/tests/meson.build
++++ b/gobject/tests/meson.build
+@@ -78,7 +78,7 @@ gobject_tests = {
+ 'references' : {},
+ 'basic-signals' : {},
+ 'singleton' : {},
+- 'threadtests' : {},
++ 'threadtests' : { 'can_fail': 'aarch64' in host_machine.cpu_family() or 'riscv' in host_machine.cpu_family() },
+ 'dynamictests' : {},
+ 'binding' : {},
+ 'bindinggroup' : {},
+From ad2925ef361a7c889ff696a1ba9e677accaecd08 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 4 Apr 2024 10:15:07 +0200
+Subject: [PATCH] tests: increase timeout on slow architectures
+
+Prevent tests to timeout on architectures that are slow.
+
+Fixes https://gitlab.gnome.org/GNOME/glib/-/issues/3319
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ meson.build | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index f0c5e070b..4c6c87766 100644
+--- a/meson.build
++++ b/meson.build
+@@ -182,6 +182,12 @@ test_protocol = 'tap'
+ test_timeout = 30
+ test_timeout_slow = 90
+
++# give more time on slow architectures
++if 'riscv' in host_machine.cpu_family()
++ test_timeout = test_timeout * 4
++ test_timeout_slow = test_timeout_slow * 4
++endif
++
+ add_test_setup('default',
+ is_default: true,
+ exclude_suites: ['flaky', 'failing'],
+--
+2.44.0
+
+diff --git a/glib/tests/meson.build b/glib/tests/meson.build
+index 85f40d2e1..f2ee59678 100644
+--- a/glib/tests/meson.build
++++ b/glib/tests/meson.build
+@@ -113,6 +113,8 @@ glib_tests = {
+ 'regex' : {
+ 'dependencies' : [pcre2],
+ 'c_args' : use_pcre2_static_flag ? ['-DPCRE2_STATIC'] : [],
++ # https://gitlab.gnome.org/GNOME/glib/-/issues/3321
++ 'can_fail': host_machine.cpu_family() == 'riscv64',
+ },
+ 'relation' : {},
+ 'rwlock' : {},
diff --git a/recipes/incoming-clib/fontconfig.toml b/recipes/incoming-clib/fontconfig.toml
new file mode 100644
index 00000000..f87c84da
--- /dev/null
+++ b/recipes/incoming-clib/fontconfig.toml
@@ -0,0 +1,49 @@
+# 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 = "fontconfig"
+version = "2.18.1"
+
+[source]
+tarball = "https://gitlab.freedesktop.org/api/v4/projects/890/packages/generic/fontconfig/2.18.1/fontconfig-2.18.1.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "5d637a030625fa5b55399a2711b4dd48949429caae4b80503655bc7bd12b9a58cc278b520660845c9e93dcac4631ad5c36bf97793ac1af1b8f3131e7bd22077c"
+sha256 = "2300f3dbfa7253b3a44f4feecdbc8dfa45dde5dc2cfb71fceaf31f394cb41031"
+
+[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() {
+./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-static \
+ --enable-docs \
+ --disable-nls
+ make
+
+ # test tries to download google fonts from internet
+ # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/2.15.0/test/run-test.sh#L435
+ chmod -x test/test-crbug1004254
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make DESTDIR="/out" install
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["freetype", "expat", "python3", "gperf", "util-linux", "docbook2x"]
diff --git a/recipes/incoming-clib/freetype.toml b/recipes/incoming-clib/freetype.toml
new file mode 100644
index 00000000..d19d0226
--- /dev/null
+++ b/recipes/incoming-clib/freetype.toml
@@ -0,0 +1,43 @@
+# 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 = "freetype"
+version = "2.14.3"
+
+[source]
+tarball = "https://download.savannah.gnu.org/releases/freetype/freetype-2.14.3.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "43de86ea70b4b47f6efaae67f3440f65a24ffac29dc6d11203a9764e4f1a749ce1ba7645acd23525220b3ba12ddad8687b962b9f1254e2c0a86070854e85d5a0"
+sha256 = "36bc4f1cc413335368ee656c42afca65c5a3987e8768cc28cf11ba775e785a5f"
+patches = ["pcf-family-names.patch", "subpixel.patch", "table-validation-modules.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() {
+abuild-meson \
+ -Dfreetype2:default_library=both \
+ -Dlibrsvg=disabled \
+ "$srcdir"/ft2demos-2.14.3 output
+ meson compile -C output
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" meson install --no-rebuild -C output
+ install -Dm644 builds/unix/freetype2.m4 \
+ -t "/out"/usr/share/aclocal
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["brotli", "bzip2", "libpng", "libx11", "zlib"]
diff --git a/recipes/incoming-clib/fribidi.toml b/recipes/incoming-clib/fribidi.toml
new file mode 100644
index 00000000..fc932e18
--- /dev/null
+++ b/recipes/incoming-clib/fribidi.toml
@@ -0,0 +1,40 @@
+# 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 = "fribidi"
+version = "1.0.16"
+
+[source]
+tarball = "https://github.com/fribidi/fribidi/releases/download/v1.0.16/fribidi-1.0.16.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "e3a56f36155f6813e3609473639fc533de742309f561c463012dc90b412a1ac7694b765d92669b2cbfaee973ca0e92fa5e926e68a1a078921f26ef17d82ab651"
+sha256 = "1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c"
+
+[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() {
+abuild-muon \
+ -Ddefault_library=both \
+ -Dtests="$(want_check && echo true || echo false)" \
+ output .
+ ninja -C output
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" muon -C output install
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["muon", "python3"]
diff --git a/recipes/incoming-clib/gdk-pixbuf.toml b/recipes/incoming-clib/gdk-pixbuf.toml
new file mode 100644
index 00000000..fffeb446
--- /dev/null
+++ b/recipes/incoming-clib/gdk-pixbuf.toml
@@ -0,0 +1,50 @@
+# 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 = "gdk-pixbuf"
+version = "2.44.6"
+
+[source]
+tarball = "https://download.gnome.org/sources/gdk-pixbuf/${pkgver%.*}/gdk-pixbuf-2.44.6.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "45ad815dda5d7b86fafe4a14300a676130f1c404299989616e41fa84e872516304bc6c3ebee9e1153bce01245333b1f8dfedee4bcde27a323e27d7e70fcb597f"
+sha256 = "FIXME-sha256"
+
+[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() {
+abuild-meson \
+ -Db_lto=true \
+ -Dinstalled_tests=false \
+ -Dintrospection=enabled \
+ -Dglycin=enabled \
+ -Dgif=disabled \
+ -Djpeg=disabled \
+ -Dothers=disabled \
+ -Dpng=disabled \
+ -Dtiff=disabled \
+ -Dtests="$(want_check && echo true || echo false)" \
+ output .
+ meson compile -C output
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" meson install --no-rebuild -C output
+}
+_abuild_phase
+'''
+
+# depends de runtime de Alpine (NO build-deps): shared-mime-info
+
+[deps]
+build = ["glib", "gobject-introspection", "libglycin", "py3-docutils"]
diff --git a/recipes/incoming-clib/gettext.toml b/recipes/incoming-clib/gettext.toml
new file mode 100644
index 00000000..5cde30b0
--- /dev/null
+++ b/recipes/incoming-clib/gettext.toml
@@ -0,0 +1,52 @@
+# 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 = "gettext"
+version = "1.0"
+
+[source]
+tarball = "https://ftp.gnu.org/gnu/gettext/gettext-1.0.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "fa657faf5685dae7121a9b0293d3308a3910a72b90943a7a493b88cf88e95f29c5758e1573320169fe9beac6f101ef76f4165a279a7f3294155d7a773e2fa09f"
+sha256 = "71132a3fb71e68245b8f2ac4e9e97137d3e5c02f415636eb508ae607bc01add7"
+patches = ["cwd.patch", "skip-tests-musl.patch", "skip-meaningless-pthread-rwlock-test.patch", "skip-unicode-16-tests.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() {
+# force using system posix complaint printf
+ # the test is broken and fails with ash
+ gt_cv_func_printf_posix=yes \
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --enable-threads=posix \
+ --disable-java \
+ --enable-static
+ make
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+depends="gettext-envsubst=1.0-r$pkgrel"
+ make -j1 DESTDIR="/out" install
+
+ # nothing in here is particularly useful, mostly just hello world examples in
+ # every single programming language for using gettext
+ rm -r "/out"/usr/share/doc
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["perl", "ncurses", "libxml2-dev~2.13", "libunistring", "linux-headers"]
diff --git a/recipes/incoming-clib/giflib.toml b/recipes/incoming-clib/giflib.toml
new file mode 100644
index 00000000..94796942
--- /dev/null
+++ b/recipes/incoming-clib/giflib.toml
@@ -0,0 +1,37 @@
+# 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 = "giflib"
+version = "5.2.2"
+
+[source]
+tarball = "https://downloads.sourceforge.net/sourceforge/giflib/giflib-5.2.2.tar.gz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "0865ab2b1904fa14640c655fdb14bb54244ad18a66e358565c00287875d00912343f9be8bfac7658cc0146200d626f7ec9160d7a339f20ba3be6b9941d73975f"
+sha256 = "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb"
+patches = ["CVE-2021-40633.patch", "CVE-2025-31344.patch", "correct-document-page-install.patch", "dont-build-html-pages-images.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 CFLAGS="$CFLAGS -fPIC"
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make DESTDIR="/out" PREFIX=/usr install
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["xmlto"]
diff --git a/recipes/incoming-clib/glib.toml b/recipes/incoming-clib/glib.toml
new file mode 100644
index 00000000..5194d52a
--- /dev/null
+++ b/recipes/incoming-clib/glib.toml
@@ -0,0 +1,83 @@
+# 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 = "glib"
+version = "2.88.1"
+
+[source]
+tarball = "https://download.gnome.org/sources/glib/${pkgver%.*}/glib-2.88.1.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "74e6d6086081e5dfb5b7fd3b74f59171033be0c340ff2dd798fea9cb42e5f680e13b2ac3dde8dd423bceb9c6556103005f9542aeda166e9a3b89da8bacecca23"
+sha256 = "FIXME-sha256"
+patches = ["tests-machine-id.patch", "flaky-tests.patch", "projectsdir.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() {
+export CFLAGS="$CFLAGS -ffat-lto-objects -O2"
+ export CXXFLAGS="$CXXFLAGS -O2"
+ export CPPFLAGS="$CPPFLAGS -O2"
+ local _prefix="$PWD/boostrap-glib"
+
+ msg "build bootstrap glib"
+ meson setup \
+ --default-library=shared \
+ --prefix="$_prefix" \
+ -Dman-pages=disabled \
+ -Dlibmount=disabled \
+ -Dtests=false \
+ -Dintrospection=disabled \
+ -Dnls=disabled \
+ . output
+ meson compile -C output
+ meson install --no-rebuild -C output
+
+ msg "build bootstrap gobject-introspection"
+ meson setup \
+ --pkg-config-path="$_prefix"/lib/pkgconfig \
+ --prefix="$_prefix" \
+ -Dbuild_introspection_data=false \
+ -Dcairo=disabled \
+ -Ddoctool=disabled \
+ "$srcdir"/gobject-introspection-$_gi_version \
+ gioutput
+ meson compile -C gioutput
+ meson install --no-rebuild -C gioutput
+
+ msg "re-build glib with introspection"
+ PATH="$_prefix/bin:$PATH" LD_LIBRARY_PATH="$_prefix/lib" \
+ abuild-meson \
+ --reconfigure \
+ --pkg-config-path="$_prefix"/lib/pkgconfig \
+ --default-library=both \
+ -Dman-pages=enabled \
+ -Dlibmount=enabled \
+ -Dtests="$(want_check && echo true || echo false)" \
+ -Dintrospection=enabled \
+ -Dnls=enabled \
+ -Dglib_debug=disabled \
+ . output
+ PATH="$_prefix/bin:$PATH" LD_LIBRARY_PATH="$_prefix/lib" \
+ meson compile -C output
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" meson install --no-rebuild -C output
+}
+_abuild_phase
+'''
+
+# depends de runtime de Alpine (NO build-deps): gettext-static
+
+[deps]
+build = ["gettext-static_dev", "bash", "bison", "flex", "libffi", "pcre2", "py3-setuptools", "python3", "util-linux", "zlib", "py3-docutils"]
diff --git a/recipes/incoming-clib/harfbuzz.toml b/recipes/incoming-clib/harfbuzz.toml
new file mode 100644
index 00000000..fb7ccde3
--- /dev/null
+++ b/recipes/incoming-clib/harfbuzz.toml
@@ -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 = "harfbuzz"
+version = "14.2.1"
+
+[source]
+tarball = "https://github.com/harfbuzz/harfbuzz/releases/download/14.2.1/harfbuzz-14.2.1.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "481dca68900e57895d3671baf0595c2d3a26f4f08d0db5662e83089f0d0ff6dc0c28c64c2811eb0f812b0525ed428e90db44f091a88bef47ace2f97d8285b013"
+sha256 = "a54a5d8e9380a41fbb762ce367bcbf7704792dfca0d93f1bbca86c5a57902e0e"
+
+[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" \
+ CXXFLAGS="$CXXFLAGS -O2 -flto=auto -ffat-lto-objects" \
+ CPPFLAGS="$CPPFLAGS -O2 -flto=auto -ffat-lto-objects" \
+ abuild-meson \
+ --default-library=both \
+ -Dglib=enabled \
+ -Dgobject=enabled \
+ -Dgraphite=enabled \
+ -Dicu=enabled \
+ -Dfreetype=enabled \
+ -Dtests="$(want_check && echo enabled || echo disabled)" \
+ -Dcairo=enabled \
+ -Ddocs=enabled \
+ -Dintrospection=enabled \
+ . output
+ meson compile -C output
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" meson install --no-rebuild -C output
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["cairo", "freetype", "glib", "gobject-introspection", "graphite2", "gtk-doc", "icu"]
diff --git a/recipes/incoming-clib/libffi.toml b/recipes/incoming-clib/libffi.toml
new file mode 100644
index 00000000..d63b0677
--- /dev/null
+++ b/recipes/incoming-clib/libffi.toml
@@ -0,0 +1,41 @@
+# 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 = "libffi"
+version = "3.5.2"
+
+[source]
+tarball = "https://github.com/libffi/libffi/releases/download/v3.5.2/libffi-3.5.2.tar.gz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "76974a84e3aee6bbd646a6da2e641825ae0b791ca6efdc479b2d4cbcd3ad607df59cffcf5031ad5bd30822961a8c6de164ac8ae379d1804acd388b1975cdbf4d"
+sha256 = "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc"
+patches = ["fix-tests-fortify.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() {
+./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --enable-pax_emutramp \
+ --enable-portable-binary \
+ --disable-exec-static-tramp
+ make
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make DESTDIR="/out" install
+}
+_abuild_phase
+'''
diff --git a/recipes/incoming-clib/libjpeg-turbo.toml b/recipes/incoming-clib/libjpeg-turbo.toml
new file mode 100644
index 00000000..4bb2c499
--- /dev/null
+++ b/recipes/incoming-clib/libjpeg-turbo.toml
@@ -0,0 +1,72 @@
+# 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 = "libjpeg-turbo"
+version = "3.1.3"
+
+[source]
+tarball = "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.1.3/libjpeg-turbo-3.1.3.tar.gz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "d3410a072044b4962c1aa08eb144b4e4b959f4f65203dfac4013b14e2fd987b9a6ee9b59f5570980fa691ddf5e9f9d3aa328a63afb487a46c2e76de722f3d693"
+sha256 = "075920b826834ac4ddf97661cc73491047855859affd671d52079c6867c1c6c0"
+
+[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() {
+local _floattest=
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ case "$CARCH" in
+ ppc64le) export JSIMD_FORCENONE=1;;
+ s390x|riscv64) _floattest="-DFLOATTEST=fp-contract";;
+ esac
+
+ CFLAGS="$CFLAGS -O2 -DNDEBUG -flto=auto" \
+ CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG -flto=auto" \
+ cmake -B build-shared -G Ninja \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DENABLE_STATIC=False \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_SKIP_INSTALL_RPATH=ON \
+ -DWITH_JPEG8=1 \
+ $_floattest \
+ $CMAKE_CROSSOPTS
+ cmake --build build-shared
+
+ cmake -B build-static -G Ninja \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DBUILD_SHARED_LIBS=False \
+ -DENABLE_STATIC=True \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_SKIP_INSTALL_RPATH=ON \
+ -DWITH_JPEG8=1 \
+ $_floattest \
+ $CMAKE_CROSSOPTS
+ cmake --build build-static
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" cmake --install build-static
+ DESTDIR="/out" cmake --install build-shared
+ install -d "/out"/usr/share/licenses/libjpeg-turbo
+ ln -s ../../doc/libjpeg-turbo/LICENSE.md "/out/usr/share/licenses/libjpeg-turbo"
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["nasm", "samurai"]
diff --git a/recipes/incoming-clib/libpng-fix-arm-neon.patch b/recipes/incoming-clib/libpng-fix-arm-neon.patch
new file mode 100644
index 00000000..099083fd
--- /dev/null
+++ b/recipes/incoming-clib/libpng-fix-arm-neon.patch
@@ -0,0 +1,39 @@
+diff --git a/configure.ac b/configure.ac
+index 7b6d5b9..d02e16d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -357,17 +357,21 @@ AC_ARG_ENABLE([arm-neon],
+ [case "$enableval" in
+ no|off)
+ # disable the default enabling on __ARM_NEON__ systems:
++ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
+ AC_DEFINE([PNG_ARM_NEON_OPT], [0],
+ [Disable ARM Neon optimizations])
+ # Prevent inclusion of the assembler files below:
+ enable_arm_neon=no ;;
+ check)
++ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
+ AC_DEFINE([PNG_ARM_NEON_CHECK_SUPPORTED], [],
+ [Check for ARM Neon support at run-time]);;
+ api)
++ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
+ AC_DEFINE([PNG_ARM_NEON_API_SUPPORTED], [],
+ [Turn on ARM Neon optimizations at run-time]);;
+ yes|on)
++ AC_DEFINE([PNG_ARM_NEON], [], [ARM NEON support])
+ AC_DEFINE([PNG_ARM_NEON_OPT], [2],
+ [Enable ARM Neon optimizations])
+ AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api', if]
+diff --git a/pngpriv.h b/pngpriv.h
+index 2e426cf..fb521cf 100644
+--- a/pngpriv.h
++++ b/pngpriv.h
+@@ -127,7 +127,7 @@
+ * associated assembler code, pass --enable-arm-neon=no to configure
+ * or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS.
+ */
+-# if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
++# if defined(PNG_ARM_NEON) && (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
+ defined(PNG_ALIGNED_MEMORY_SUPPORTED)
+ # define PNG_ARM_NEON_OPT 2
+ # else
diff --git a/recipes/incoming-clib/libpng.toml b/recipes/incoming-clib/libpng.toml
new file mode 100644
index 00000000..4ab9afb4
--- /dev/null
+++ b/recipes/incoming-clib/libpng.toml
@@ -0,0 +1,42 @@
+# 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 = "libpng"
+version = "1.6.58"
+
+[source]
+tarball = "https://downloads.sourceforge.net/libpng/libpng-1.6.58.tar.gz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "177d81fd1ba1a46ff64da7f24260814876bd0a27ee5bed6dc9dbdd1fe28f3a67cb6f11c74a68f8380a9a7ab0d95c0022b847b1a3e4d939f2a562274627205789"
+sha256 = "8c9b05b675ca7301a458df2c2e46f26e1d41ff36b8863f8c33530bc58c2e6225"
+patches = ["libpng-fix-arm-neon.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() {
+./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make DESTDIR="/out" install
+ rm -f "/out"/usr/lib/*.la
+}
+_abuild_phase
+'''
diff --git a/recipes/incoming-clib/libwebp.toml b/recipes/incoming-clib/libwebp.toml
new file mode 100644
index 00000000..79dbaef3
--- /dev/null
+++ b/recipes/incoming-clib/libwebp.toml
@@ -0,0 +1,47 @@
+# 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
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make DESTDIR="/out" install
+ 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"]
diff --git a/recipes/incoming-clib/libxml2.toml b/recipes/incoming-clib/libxml2.toml
new file mode 100644
index 00000000..601bede5
--- /dev/null
+++ b/recipes/incoming-clib/libxml2.toml
@@ -0,0 +1,48 @@
+# 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 = "libxml2"
+version = "2.13.9"
+
+[source]
+tarball = "https://download.gnome.org/sources/libxml2/${pkgver%.*}/libxml2-2.13.9.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "62d4813860124c969f204aaf33b497105dbc32a6c5655f5a86168743660e10987d687d7e5e7ee49fdfdeb8f6ad9fa4503f81fcce2e4d459094895f02436d1b13"
+sha256 = "FIXME-sha256"
+patches = ["CVE-2026-6732.patch", "CVE-2026-6732-test.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() {
+./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-static \
+ --with-legacy \
+ --with-lzma \
+ --with-zlib \
+ $_py_configure
+ make
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make -j1 DESTDIR="/out" install
+}
+_abuild_phase
+'''
+
+# depends de runtime de Alpine (NO build-deps): python3
diff --git a/recipes/incoming-clib/lz4.toml b/recipes/incoming-clib/lz4.toml
new file mode 100644
index 00000000..b4ea9ca1
--- /dev/null
+++ b/recipes/incoming-clib/lz4.toml
@@ -0,0 +1,42 @@
+# 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 = "lz4"
+version = "1.10.0"
+
+[source]
+tarball = "https://github.com/lz4/lz4/archive/v1.10.0.tar.gz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "8c4ceb217e6dc8e7e0beba99adc736aca8963867bcf9f970d621978ba11ce92855912f8b66138037a1d2ae171e8e17beb7be99281fea840106aa60373c455b28"
+sha256 = "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b"
+
+[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() {
+export CFLAGS="$CFLAGS -O2 -flto=auto"
+ export CPPFLAGS="$CPPFLAGS -O2 -flto=auto"
+ make PREFIX="/usr"
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make PREFIX="/usr" DESTDIR="/out" install
+
+ (
+ cd tests/
+ rm -f ./*.c COPYING Makefile .gitignore
+ )
+ mkdir -p "/out"/usr/share/lz4
+ cp -rf tests "/out"/usr/share/lz4/
+}
+_abuild_phase
+'''
diff --git a/recipes/incoming-clib/musl-stacksize.patch b/recipes/incoming-clib/musl-stacksize.patch
new file mode 100644
index 00000000..d10469e1
--- /dev/null
+++ b/recipes/incoming-clib/musl-stacksize.patch
@@ -0,0 +1,23 @@
+Reduce the footprint of stack frame usage by turning
+some large(r) structures as `static __thread` instead.
+
+--- a/src/cairo-rectangular-scan-converter.c 2015-10-27 22:04:21.000000000 +0100
++++ b/src/cairo-rectangular-scan-converter.c 2016-05-07 04:25:26.640851782 +0200
+@@ -489,7 +489,7 @@
+ cairo_span_renderer_t *renderer,
+ rectangle_t **rectangles)
+ {
+- sweep_line_t sweep_line;
++ static __thread sweep_line_t sweep_line;
+ rectangle_t *start, *stop;
+ cairo_status_t status;
+
+@@ -656,7 +656,7 @@
+ cairo_span_renderer_t *renderer)
+ {
+ cairo_rectangular_scan_converter_t *self = converter;
+- rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)];
++ static __thread rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)];
+ rectangle_t **rectangles;
+ struct _cairo_rectangular_scan_converter_chunk *chunk;
+ cairo_status_t status;
diff --git a/recipes/incoming-clib/optimize-mips.patch b/recipes/incoming-clib/optimize-mips.patch
new file mode 100644
index 00000000..e8a5bfb3
--- /dev/null
+++ b/recipes/incoming-clib/optimize-mips.patch
@@ -0,0 +1,50 @@
+--- a/c/common/platform.h
++++ b/c/common/platform.h
+@@ -318,19 +326,34 @@
+ #else /* not BROTLI_USE_PACKED_FOR_UNALIGNED */
+
+ static BROTLI_INLINE uint16_t BrotliUnalignedRead16(const void* p) {
++#if defined(__mips__) && (!defined(__mips_isa_rev) || __mips_isa_rev < 6)
++ const struct { uint16_t x; } __attribute__((__packed__)) *t = p;
++ return t->x;
++#else
+ uint16_t t;
+ memcpy(&t, p, sizeof t);
+ return t;
++#endif
+ }
+ static BROTLI_INLINE uint32_t BrotliUnalignedRead32(const void* p) {
++#if defined(__mips__) && (!defined(__mips_isa_rev) || __mips_isa_rev < 6)
++ const struct { uint32_t x; } __attribute__((__packed__)) *t = p;
++ return t->x;
++#else
+ uint32_t t;
+ memcpy(&t, p, sizeof t);
+ return t;
++#endif
+ }
+ static BROTLI_INLINE uint64_t BrotliUnalignedRead64(const void* p) {
++#if defined(__mips__) && (!defined(__mips_isa_rev) || __mips_isa_rev < 6)
++ const struct { uint64_t x; } __attribute__((__packed__)) *t = p;
++ return t->x;
++#else
+ uint64_t t;
+ memcpy(&t, p, sizeof t);
+ return t;
++#endif
+ }
+ static BROTLI_INLINE size_t BrotliUnalignedReadSizeT(const void* p) {
+ size_t t;
+@@ -338,7 +361,12 @@
+ return t;
+ }
+ static BROTLI_INLINE void BrotliUnalignedWrite64(void* p, uint64_t v) {
++#if defined(__mips__) && (!defined(__mips_isa_rev) || __mips_isa_rev < 6)
++ struct { uint64_t x; } __attribute__((__packed__)) *t = p;
++ t->x = v;
++#else
+ memcpy(p, &v, sizeof v);
++#endif
+ }
+
+ #endif /* BROTLI_USE_PACKED_FOR_UNALIGNED */
diff --git a/recipes/incoming-clib/pango.toml b/recipes/incoming-clib/pango.toml
new file mode 100644
index 00000000..38d2eae6
--- /dev/null
+++ b/recipes/incoming-clib/pango.toml
@@ -0,0 +1,46 @@
+# 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 = "pango"
+version = "1.57.1"
+
+[source]
+tarball = "https://download.gnome.org/sources/pango/${pkgver%.*}/pango-1.57.1.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "ccfcec11f0beb0487d9225be227e7f31d03229ed1e0dc3309e2647ed5fa953cf036ad352232429f5604f97d20812074ff145ea622110afa4df3a410ebba4d26a"
+sha256 = "FIXME-sha256"
+patches = ["disable-broken-test.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() {
+abuild-meson \
+ -Db_lto=true \
+ -Dintrospection=enabled \
+ -Dfontconfig=enabled \
+ -Ddocumentation=false \
+ -Dman-pages=true \
+ -Dxft=enabled \
+ -Dfreetype=enabled \
+ build
+ meson compile -C build
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" meson install --no-rebuild -C build
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["cairo", "expat", "fontconfig", "fribidi", "glib", "gobject-introspection", "harfbuzz", "libxft", "py3-docutils"]
diff --git a/recipes/incoming-clib/pcf-family-names.patch b/recipes/incoming-clib/pcf-family-names.patch
new file mode 100644
index 00000000..773f1a44
--- /dev/null
+++ b/recipes/incoming-clib/pcf-family-names.patch
@@ -0,0 +1,13 @@
+diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
+index 9e03e17..1411db6 100644
+--- a/include/freetype/config/ftoption.h
++++ b/include/freetype/config/ftoption.h
+@@ -913,7 +913,7 @@ FT_BEGIN_HEADER
+ * If this option is activated, it can be controlled with the
+ * `no-long-family-names` property of the 'pcf' driver module.
+ */
+-/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
++#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+
+ /*************************************************************************/
diff --git a/recipes/incoming-clib/pcre2.toml b/recipes/incoming-clib/pcre2.toml
new file mode 100644
index 00000000..3b6bef5c
--- /dev/null
+++ b/recipes/incoming-clib/pcre2.toml
@@ -0,0 +1,50 @@
+# 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 = "pcre2"
+version = "10.47"
+
+[source]
+tarball = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.bz2"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "889a6fdc80f8a7285e4a75d189c183b4588df81bdf048302cf0830e11bbf9b9eeb387ba43dfd3aff8ffb3aa693291e8c535845c06e8ce92d1028cefa6b474804"
+sha256 = "47fe8c99461250d42f89e6e8fdaeba9da057855d06eb7fc08d9ca03fd08d7bc7"
+
+[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() {
+# Note: Forced -O3 is recommended (needed?) for Julia.
+ ./configure \
+ CFLAGS="$CFLAGS -O3" \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --docdir=/usr/share/doc/pcre2-10.47 \
+ --htmldir=/usr/share/doc/pcre2-10.47/html \
+ --enable-pcre2-16 \
+ --enable-pcre2-32 \
+ --enable-pcre2grep-libz \
+ --enable-pcre2test-libedit \
+ --disable-symvers \
+ $_enable_jit
+ make
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make DESTDIR="/out" install
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["libedit", "zlib"]
diff --git a/recipes/incoming-clib/pixman.toml b/recipes/incoming-clib/pixman.toml
new file mode 100644
index 00000000..ffed1b2c
--- /dev/null
+++ b/recipes/incoming-clib/pixman.toml
@@ -0,0 +1,56 @@
+# 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 = "pixman"
+version = "0.46.4"
+
+[source]
+tarball = "https://xorg.freedesktop.org/releases/individual/lib/pixman-0.46.4.tar.xz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "83b133e7969ba34f883f4e08dcc5d388c4397f43ce836c191c05945fe77c16ff501d531600780c12678a0d08105828a6bdeff2156b63f9c1a84087bc7f40ae9f"
+sha256 = "a098c33924754ad43f981b740f6d576c70f9ed1006e12221b1845431ebce1239"
+
+[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() {
+case "$CARCH" in
+ armhf|riscv64)
+ # target-specific builtin not available
+ local lto=false
+ ;;
+ *)
+ local lto=true
+ ;;
+ esac
+ # We need to increase the stacksize here: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
+ LDFLAGS="$LDFLAGS -Wl,-z,stack-size=2097152" \
+ # auto-features=auto: a lot of features are architecture dependent
+ abuild-meson \
+ --auto-features=auto \
+ -Db_lto=$lto \
+ -Ddefault_library=both \
+ -Dlibpng=enabled \
+ -Ddemos=disabled \
+ -Dtests="$(want_check && echo enabled || echo disabled)" \
+ . output
+ meson compile -C output
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" meson install --no-rebuild -C output
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["libpng", "linux-headers"]
diff --git a/recipes/incoming-clib/projectsdir.patch b/recipes/incoming-clib/projectsdir.patch
new file mode 100644
index 00000000..f746188d
--- /dev/null
+++ b/recipes/incoming-clib/projectsdir.patch
@@ -0,0 +1,102 @@
+From 5f3b178590df746544a48338f39025bf03aca46c Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Fri, 3 Apr 2026 12:17:31 +0100
+Subject: [PATCH] Support XDG_PROJECTS_DIR
+
+A new XDG user directory type, for non-document project files.
+
+See: https://gitlab.freedesktop.org/xdg/xdg-user-dirs/-/work_items/3
+---
+ gio/glocalfileinfo.c | 4 ++++
+ glib/gosxutils.m | 3 ++-
+ glib/gutils.c | 2 ++
+ glib/gutils.h | 9 +++++++++
+ glib/gutilsprivate.c | 5 +++++
+ 5 files changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
+index d2efb169eb..ec482988a6 100644
+--- a/gio/glocalfileinfo.c
++++ b/gio/glocalfileinfo.c
+@@ -1840,6 +1840,10 @@ get_icon_name (const char *path,
+ {
+ name = use_symbolic ? "folder-pictures-symbolic" : "folder-pictures";
+ }
++ else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_PROJECTS)) == 0)
++ {
++ name = use_symbolic ? "folder-projects-symbolic" : "folder-projects";
++ }
+ else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_PUBLIC_SHARE)) == 0)
+ {
+ name = use_symbolic ? "folder-publicshare-symbolic" : "folder-publicshare";
+diff --git a/glib/gosxutils.m b/glib/gosxutils.m
+index 4d2d962ef4..13860a31ce 100644
+--- a/glib/gosxutils.m
++++ b/glib/gosxutils.m
+@@ -43,7 +43,7 @@ find_folder (NSSearchPathDirectory type)
+ }
+
+ void
+-load_user_special_dirs_macos(gchar **table)
++load_user_special_dirs_macos (gchar **table)
+ {
+ table[G_USER_DIRECTORY_DESKTOP] = find_folder (NSDesktopDirectory);
+ table[G_USER_DIRECTORY_DOCUMENTS] = find_folder (NSDocumentDirectory);
+@@ -53,4 +53,5 @@ load_user_special_dirs_macos(gchar **table)
+ table[G_USER_DIRECTORY_PUBLIC_SHARE] = find_folder (NSSharedPublicDirectory);
+ table[G_USER_DIRECTORY_TEMPLATES] = NULL;
+ table[G_USER_DIRECTORY_VIDEOS] = find_folder (NSMoviesDirectory);
++ table[G_USER_DIRECTORY_PROJECTS] = find_folder (NSDocumentDirectory);
+ }
+diff --git a/glib/gutils.c b/glib/gutils.c
+index 02da41b688..90bd3bc3e7 100644
+--- a/glib/gutils.c
++++ b/glib/gutils.c
+@@ -2243,6 +2243,8 @@ load_user_special_dirs_unlocked (void)
+
+ g_user_special_dirs[G_USER_DIRECTORY_TEMPLATES] = get_special_folder (&FOLDERID_Templates);
+ g_user_special_dirs[G_USER_DIRECTORY_VIDEOS] = get_special_folder (&FOLDERID_Videos);
++
++ g_user_special_dirs[G_USER_DIRECTORY_PROJECTS] = get_special_folder (&FOLDERID_Documents);
+ }
+
+ #else /* default is unix */
+diff --git a/glib/gutils.h b/glib/gutils.h
+index dce1541ed7..f111938cae 100644
+--- a/glib/gutils.h
++++ b/glib/gutils.h
+@@ -248,6 +248,15 @@ typedef enum {
+ G_USER_DIRECTORY_TEMPLATES,
+ G_USER_DIRECTORY_VIDEOS,
+
++ /**
++ * G_USER_DIRECTORY_PROJECTS:
++ *
++ * The user's Projects directory.
++ *
++ * Since: 2.90
++ */
++ G_USER_DIRECTORY_PROJECTS,
++
+ G_USER_N_DIRECTORIES
+ } GUserDirectory;
+
+diff --git a/glib/gutilsprivate.c b/glib/gutilsprivate.c
+index 3b9206c45c..f8dac99ec0 100644
+--- a/glib/gutilsprivate.c
++++ b/glib/gutilsprivate.c
+@@ -89,6 +89,11 @@ load_user_special_dirs_from_string (const gchar *string, const gchar *home_dir,
+ directory = G_USER_DIRECTORY_VIDEOS;
+ p += strlen ("XDG_VIDEOS_DIR");
+ }
++ else if (strncmp (p, "XDG_PROJECTS_DIR", strlen ("XDG_PROJECTS_DIR")) == 0)
++ {
++ directory = G_USER_DIRECTORY_PROJECTS;
++ p += strlen ("XDG_PROJECTS_DIR");
++ }
+ else
+ continue;
+
+--
+GitLab
+
diff --git a/recipes/incoming-clib/saneso.patch b/recipes/incoming-clib/saneso.patch
new file mode 100644
index 00000000..529a0c20
--- /dev/null
+++ b/recipes/incoming-clib/saneso.patch
@@ -0,0 +1,23 @@
+diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
+index fb0f230..2c95a3a 100644
+--- a/Makefile-libbz2_so
++++ b/Makefile-libbz2_so
+@@ -35,13 +35,13 @@ OBJS= blocksort.o \
+ bzlib.o
+
+ all: $(OBJS)
+- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
++ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS)
+ $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
+- rm -f libbz2.so.1.0
+- ln -s libbz2.so.1.0.8 libbz2.so.1.0
++ rm -f libbz2.so.1
++ ln -s libbz2.so.1.0.8 libbz2.so.1
+
+ clean:
+- rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared
++ rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1 bzip2-shared
+
+ blocksort.o: blocksort.c
+ $(CC) $(CFLAGS) -c blocksort.c
+
diff --git a/recipes/incoming-clib/skip-meaningless-pthread-rwlock-test.patch b/recipes/incoming-clib/skip-meaningless-pthread-rwlock-test.patch
new file mode 100644
index 00000000..abe65cad
--- /dev/null
+++ b/recipes/incoming-clib/skip-meaningless-pthread-rwlock-test.patch
@@ -0,0 +1,13 @@
+diff --git a/gettext-tools/gnulib-tests/test-pthread-rwlock.c b/gettext-tools/gnulib-tests/test-pthread-rwlock.c
+index 90d6ac5..61009a7 100644
+--- a/gettext-tools/gnulib-tests/test-pthread-rwlock.c
++++ b/gettext-tools/gnulib-tests/test-pthread-rwlock.c
+@@ -198,6 +198,8 @@ test_rwlock (void)
+ int
+ main ()
+ {
++ fputs ("Skipping meaningless test which is expected to deadlock\n", stderr);
++ return 77;
+ #if HAVE_DECL_ALARM
+ /* Declare failure if test takes too long, by using default abort
+ caused by SIGALRM. */
diff --git a/recipes/incoming-clib/skip-tests-musl.patch b/recipes/incoming-clib/skip-tests-musl.patch
new file mode 100644
index 00000000..8b3e9214
--- /dev/null
+++ b/recipes/incoming-clib/skip-tests-musl.patch
@@ -0,0 +1,70 @@
+As upstream notes:
+
+# Note: This test fails on Linux with musl libc versions that don't support
+# the BIG5 encoding in 'iconv'.
+
+diff --git a/gettext-tools/tests/msgcat-22 b/gettext-tools/tests/msgcat-22
+index 6047188..abe5877 100755
+--- a/gettext-tools/tests/msgcat-22
++++ b/gettext-tools/tests/msgcat-22
+@@ -6,6 +6,8 @@
+ # Note: This test fails on Linux with musl libc versions that don't support
+ # the GB18030 encoding in 'iconv'.
+
++exit 77
++
+ cat <<\EOF > mcat-test22.po
+ msgid ""
+ msgstr ""
+diff --git a/gettext-tools/tests/msgconv-2 b/gettext-tools/tests/msgconv-2
+index d286cda..d96c487 100755
+--- a/gettext-tools/tests/msgconv-2
++++ b/gettext-tools/tests/msgconv-2
+@@ -7,6 +7,8 @@
+ # Note: This test fails on Linux with musl libc versions that don't support
+ # the BIG5 encoding in 'iconv'.
+
++Exit 77
++
+ cat <<\EOF > mco-test2.po
+ # Chinese translation for GNU gettext messages.
+ #
+diff --git a/gettext-tools/tests/msgconv-8 b/gettext-tools/tests/msgconv-8
+index 207b0f0..618de0f 100755
+--- a/gettext-tools/tests/msgconv-8
++++ b/gettext-tools/tests/msgconv-8
+@@ -6,6 +6,8 @@
+ # Note: This test fails on Linux with musl libc versions that don't support
+ # the GB18030 encoding in 'iconv'.
+
++exit 77
++
+ cat <<\EOF > mco-test8.po
+ msgid ""
+ msgstr ""
+diff --git a/gettext-tools/tests/msgmerge-compendium-6 b/gettext-tools/tests/msgmerge-compendium-6
+index 59eb00e..c4be0b2 100755
+--- a/gettext-tools/tests/msgmerge-compendium-6
++++ b/gettext-tools/tests/msgmerge-compendium-6
+@@ -10,6 +10,8 @@
+ # Note: This test fails on Linux with musl libc versions and on Solaris 11
+ # (OpenIndiana, OmniOS) that don't support the EUC-KR encoding in 'iconv'.
+
++Exit 77
++
+ : ${MSGCONV=msgconv}
+ ${MSGCONV} --to-code=UTF-8 -o mm-ko.utf-8.pot "$wabs_srcdir"/mm-ko.ascii.pot
+
+diff --git a/gettext-tools/tests/xgettext-python-3 b/gettext-tools/tests/xgettext-python-3
+index 1e13b57..7cd480d 100755
+--- a/gettext-tools/tests/xgettext-python-3
++++ b/gettext-tools/tests/xgettext-python-3
+@@ -6,6 +6,8 @@
+ # Note: This test fails on Linux with musl libc versions that don't support
+ # the EUC-JP encoding in 'iconv'.
+
++Exit 77
++
+ cat <<\EOF > xg-py-3a.py
+ #!/usr/bin/env python
+ # TRANSLATORS: Fran���ois Pinard is a hero.
diff --git a/recipes/incoming-clib/skip-unicode-16-tests.patch b/recipes/incoming-clib/skip-unicode-16-tests.patch
new file mode 100644
index 00000000..f1c6dc67
--- /dev/null
+++ b/recipes/incoming-clib/skip-unicode-16-tests.patch
@@ -0,0 +1,89 @@
+diff --git a/gettext-tools/gnulib-tests/unicase/test-mapping-part1.h b/gettext-tools/gnulib-tests/unicase/test-mapping-part1.h
+index d64bb32..f497ad4 100644
+--- a/gettext-tools/gnulib-tests/unicase/test-mapping-part1.h
++++ b/gettext-tools/gnulib-tests/unicase/test-mapping-part1.h
+@@ -22,6 +22,25 @@
+
+ #include "macros.h"
+
++#if HAVE_LIBUNISTRING
++/* The generated mappings in this source tree target Unicode 16.0.0.
++ Skip direct comparisons when an external libunistring provides a newer
++ Unicode database than the expected tables embedded in these tests. */
++extern int _libunistring_unicode_version;
++
++static int
++should_skip_for_external_libunistring_version (void)
++{
++ return _libunistring_unicode_version > 0x1000;
++}
++#else
++static int
++should_skip_for_external_libunistring_version (void)
++{
++ return 0;
++}
++#endif
++
+ /* Pair of Unicode characters. */
+ typedef struct { ucs4_t ch; ucs4_t value; } pair_t;
+
+diff --git a/gettext-tools/gnulib-tests/unicase/test-mapping-part2.h b/gettext-tools/gnulib-tests/unicase/test-mapping-part2.h
+index aa14384..80fb2b6 100644
+--- a/gettext-tools/gnulib-tests/unicase/test-mapping-part2.h
++++ b/gettext-tools/gnulib-tests/unicase/test-mapping-part2.h
+@@ -19,6 +19,9 @@
+ int
+ main ()
+ {
++ if (should_skip_for_external_libunistring_version ())
++ return 77;
++
+ unsigned int c;
+ size_t i;
+
+diff --git a/gettext-tools/gnulib-tests/unictype/test-predicate-part1.h b/gettext-tools/gnulib-tests/unictype/test-predicate-part1.h
+index caf2dc2..20a35df 100644
+--- a/gettext-tools/gnulib-tests/unictype/test-predicate-part1.h
++++ b/gettext-tools/gnulib-tests/unictype/test-predicate-part1.h
+@@ -22,6 +22,26 @@
+
+ #include "macros.h"
+
++#if HAVE_LIBUNISTRING
++/* The generated tables in this source tree target Unicode 16.0.0.
++ When these tests are linked against an external libunistring with a newer
++ Unicode database, direct table equality checks become stale and should be
++ skipped rather than reported as regressions in gettext's bundled data. */
++extern int _libunistring_unicode_version;
++
++static int
++should_skip_for_external_libunistring_version (void)
++{
++ return _libunistring_unicode_version > 0x1000;
++}
++#else
++static int
++should_skip_for_external_libunistring_version (void)
++{
++ return 0;
++}
++#endif
++
+ /* Interval of Unicode characters. */
+ typedef struct { ucs4_t start; ucs4_t end; } interval_t;
+
+diff --git a/gettext-tools/gnulib-tests/unictype/test-predicate-part2.h b/gettext-tools/gnulib-tests/unictype/test-predicate-part2.h
+index b4eef82..ac5071d 100644
+--- a/gettext-tools/gnulib-tests/unictype/test-predicate-part2.h
++++ b/gettext-tools/gnulib-tests/unictype/test-predicate-part2.h
+@@ -19,6 +19,9 @@
+ int
+ main ()
+ {
++ if (should_skip_for_external_libunistring_version ())
++ return 77;
++
+ unsigned int c;
+ size_t i;
+
diff --git a/recipes/incoming-clib/subpixel.patch b/recipes/incoming-clib/subpixel.patch
new file mode 100644
index 00000000..e5da0d74
--- /dev/null
+++ b/recipes/incoming-clib/subpixel.patch
@@ -0,0 +1,12 @@
+diff -Naur a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
+--- a/include/freetype/config/ftoption.h 2019-02-23 09:09:06.000000000 +0000
++++ b/include/freetype/config/ftoption.h 2019-03-17 11:42:04.315011932 +0000
+@@ -126,7 +126,7 @@
+ * macro is not defined, FreeType offers alternative LCD rendering
+ * technology that produces excellent output without LCD filtering.
+ */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+
+ /**************************************************************************
diff --git a/recipes/incoming-clib/table-validation-modules.patch b/recipes/incoming-clib/table-validation-modules.patch
new file mode 100644
index 00000000..968475e3
--- /dev/null
+++ b/recipes/incoming-clib/table-validation-modules.patch
@@ -0,0 +1,21 @@
+diff -Naur a/modules.cfg b/modules.cfg
+--- a/modules.cfg 2019-02-23 09:06:07.000000000 +0000
++++ b/modules.cfg 2019-03-15 17:13:56.465952994 +0000
+@@ -111,7 +111,7 @@
+
+ # TrueType GX/AAT table validation. Needs `ftgxval.c' below.
+ #
+-# AUX_MODULES += gxvalid
++AUX_MODULES += gxvalid
+
+ # Support for streams compressed with gzip (files with suffix .gz).
+ #
+@@ -130,7 +130,7 @@
+
+ # OpenType table validation. Needs `ftotval.c' below.
+ #
+-# AUX_MODULES += otvalid
++AUX_MODULES += otvalid
+
+ # Auxiliary PostScript driver component to share common code.
+ #
diff --git a/recipes/incoming-clib/tests-machine-id.patch b/recipes/incoming-clib/tests-machine-id.patch
new file mode 100644
index 00000000..66648984
--- /dev/null
+++ b/recipes/incoming-clib/tests-machine-id.patch
@@ -0,0 +1,41 @@
+From 5cf08a9a1041a9dc9975371fb62f8f22c3be76c4 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 3 Apr 2024 21:25:04 +0200
+Subject: [PATCH 2/3] tests: skip gio tests which fails with missing machine-id
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ gio/tests/meson.build | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/gio/tests/meson.build b/gio/tests/meson.build
+index f04ff43ff..71ec09750 100644
+--- a/gio/tests/meson.build
++++ b/gio/tests/meson.build
+@@ -46,6 +46,8 @@ if glib_build_shared
+ subdir('modules')
+ endif
+
++have_machine_id = import('fs').is_file('/etc/machine-id')
++
+ # Test programs buildable on all platforms
+ gio_tests = {
+ 'application-command-line': {},
+@@ -98,7 +100,7 @@ gio_tests = {
+ 'install_rpath' : installed_tests_execdir,
+ # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
+ # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148
+- 'can_fail' : host_system in ['darwin', 'windows', 'gnu'],
++ 'can_fail' : host_system in ['darwin', 'windows', 'gnu'] or not have_machine_id,
+ },
+ 'inet-address' : {},
+ 'io-stream' : {},
+@@ -147,7 +149,7 @@ gio_tests = {
+ 'extra_programs': host_system != 'windows' ? ['dbus-launch'] : [],
+ # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
+ # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148
+- 'can_fail' : host_system in ['darwin', 'gnu'],
++ 'can_fail' : host_system in ['darwin', 'gnu'] or not have_machine_id,
+ },
+ 'win32-appinfo' : {},
+ }
diff --git a/recipes/incoming-clib/xz.toml b/recipes/incoming-clib/xz.toml
new file mode 100644
index 00000000..5860226f
--- /dev/null
+++ b/recipes/incoming-clib/xz.toml
@@ -0,0 +1,54 @@
+# 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 = "xz"
+version = "5.8.3"
+
+[source]
+tarball = "https://github.com/tukaani-project/xz/archive/refs/tags/v5.8.3/xz-5.8.3.tar.gz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "8fb5e6a13397d259d8ff7484f9b63f8a6752ff1c63e1a4601170ad8175aadefb5126a1cae7f73370bfc6c2a0b4e1c0bad57a58fc5b781d3f7d45e5a483c091cc"
+sha256 = "8ec1767fa517642ecb4cf08b891ce667ba6f143551e382b07c7ef437bda335e2"
+
+[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() {
+# compression utility
+ CFLAGS="$CFLAGS -O3" \
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --disable-rpath \
+ --disable-werror \
+ --disable-doc
+
+ sed -i \
+ -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ libtool
+ make
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make DESTDIR="/out" install
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["autoconf", "automake", "libtool", "gettext-tiny"]
diff --git a/recipes/incoming-clib/zlib.toml b/recipes/incoming-clib/zlib.toml
new file mode 100644
index 00000000..18b39447
--- /dev/null
+++ b/recipes/incoming-clib/zlib.toml
@@ -0,0 +1,39 @@
+# 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 = "zlib"
+version = "1.3.2"
+
+[source]
+tarball = "https://zlib.net/fossils/zlib-1.3.2.tar.gz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "70963771ea5d763614278a69b474f09b7d237ef8f53b675a10fe31d9923aeef601504b35d7ebd1b1e7f347e9ebb048e6b3b47fffdf137e7bdc7e8d5eb4ec4692"
+sha256 = "bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16"
+
+[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() {
+# we trade size for a little more speed.
+ export CFLAGS="$CFLAGS -O2"
+ CHOST="$CHOST" ./configure \
+ --prefix=/usr \
+ --shared \
+ --disable-crcvx
+ make
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+make install DESTDIR="/out"
+}
+_abuild_phase
+'''
diff --git a/recipes/incoming-clib/zstd.toml b/recipes/incoming-clib/zstd.toml
new file mode 100644
index 00000000..29d357dc
--- /dev/null
+++ b/recipes/incoming-clib/zstd.toml
@@ -0,0 +1,70 @@
+# 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 = "zstd"
+version = "1.5.7"
+
+[source]
+tarball = "https://github.com/facebook/zstd/archive/v1.5.7.tar.gz"
+# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
+# sha512 = "26e441267305f6e58080460f96ab98645219a90d290a533410b1b0b1d2f870721c95f8384e342ee647c5e968385a5b7e30c2d04340c37f59b3e6d86762c3260c"
+sha256 = "37d7284556b20954e56e1ca85b80226768902e2edabd3b649e9e72c0c9012ee3"
+
+[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() {
+export CFLAGS="${CFLAGS/-Os/-O3} -flto=auto -ffat-lto-objects"
+ export CXXFLAGS="${CXXFLAGS/-Os/-O3} -flto=auto -ffat-lto-objects"
+ export CPPFLAGS="${CPPFLAGS/-Os/-O3} -flto=auto -ffat-lto-objects"
+ local pgo=false
+ if [ -z "$BOOTSTRAP" ]; then
+ pgo=true
+ fi
+ # 2-stage pgo+lto build (non-bootstrap), standard meson usage.
+ # note that with clang,
+ # llvm-profdata merge --output=output/somefilename(?) output/*.profraw
+ # is needed.
+ # believe it or not, this is +30% faster on x86_64 than the default makefile build (same params)..
+ # maybe needs more testing
+ # shellcheck disable=2046
+ abuild-meson \
+ --default-library=both \
+ -Db_ndebug=true \
+ $($pgo && echo -Db_pgo=generate) \
+ -Dbin_contrib=true \
+ -Dbin_programs=true \
+ -Dbin_tests="$(want_check && echo true || echo false)" \
+ -Dbacktrace=disabled \
+ -Dmulti_thread=enabled \
+ -Dlz4=disabled \
+ -Dlzma=disabled \
+ -Dzlib=disabled \
+ build/meson output
+
+ meson compile -C output
+
+ if $pgo; then
+ meson test -t 4 --print-errorlogs -C output
+ meson configure -Dbin_tests=false -Db_pgo=use output
+ meson compile -C output
+ fi
+}
+_abuild_phase
+'''
+# de package() de Alpine (traducido $pkgdir→/out):
+install = '''
+_abuild_phase() {
+DESTDIR="/out" meson install --no-rebuild -C output
+}
+_abuild_phase
+'''
+
+[deps]
+build = ["grep"]