# xz-shared 5.8.3 — variante DINÁMICA (liblzma.so, PIC) para el escritorio KDE.
#
# El xz canónico (recipes/xz.toml) sella liblzma.a --disable-shared (cola static-musl). Ese .a sin PIC no
# enlaza dentro de libarchive.so/libzip.so. Como zlib-shared/bzip2-shared, esta variante construye
# liblzma.so con autotools --enable-shared (PIC nativo). Nombre distinto para no colisionar con el canónico.
name    = "xz-shared"
version = "5.8.3"

[source]
tarball = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.xz"
sha256  = "fff1ffcf2b0da84d308a14de513a1aa23d4e9aa3464d17e64b9714bfdd0bbfb6"

[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "dynamic"
flags    = []

[build.phases]
configure = '''./configure --build=$CBUILD --host=$CHOST --prefix=/usr \
  --enable-shared --disable-static \
  --disable-xz --disable-xzdec --disable-lzmadec --disable-lzmainfo --disable-scripts --disable-doc'''
compile = 'make -j"$(nproc)"'
install = "make DESTDIR=/out install && find /out -name '*.la' -delete"

[deps]
build = ["pkgconf"]
