# pcre2 10.47 — biblioteca de regex Perl-compatible (C). Lib FUNDACIONAL: dep de grep-variants,
# pcre2-sys (crates Rust), y mucha cola C. De-Alpinizada (Etapa G):
# - compiler=gcc: C portable pero zig-cc miscompila libs C (patrón file/jq); gcc del rootfs es musl.
# - --disable-shared --enable-static: el lab linkea estático; queremos libpcre2-*.a en /usr/lib.
# - sin --enable-pcre2test-libedit (libedit no está en corpus, es solo para el test interactivo).
name    = "pcre2"
version = "10.47"

[source]
tarball = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.bz2"
sha256  = "47fe8c99461250d42f89e6e8fdaeba9da057855d06eb7fc08d9ca03fd08d7bc7"

[build]
compiler = "gcc"
target   = "x86_64-linux-musl"
link     = "static"
flags    = []

[build.phases]
compile = '''
./configure \
	--build=$CBUILD --host=$CHOST \
	--prefix=/usr \
	--disable-shared --enable-static \
	--enable-pcre2-16 --enable-pcre2-32 \
	--enable-jit \
	--enable-pcre2grep-libz \
	--disable-symvers
make
'''
install = 'make DESTDIR=/out install'

[deps]
build = ["zlib"]
