# libjpeg-turbo-shared 3.1.3 — variante DINÁMICA (libjpeg.so.8 + libturbojpeg.so.0, PIC) para el
# escritorio KDE. El canónico (recipes/incoming-kde/libjpeg-turbo.toml) es ENABLE_SHARED=0 (sólo .a sin
# PIC) ⇒ no enlaza dentro de un .so ('R_X86_64_32S ... recompile with -fPIC', jpeg_nbits_table). Como
# zlib-shared/bzip2-shared. Nombre distinto para no colisionar con el canónico. gwenview lo linkea.
name    = "libjpeg-turbo-shared"
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"
sha256  = "075920b826834ac4ddf97661cc73491047855859affd671d52079c6867c1c6c0"

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

[build.phases]
configure = "cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=1 -DENABLE_STATIC=0 -DWITH_SIMD=0"
compile   = "cmake --build build"
install   = "DESTDIR=/out cmake --install build"

[deps]
build = ["cmake", "samurai"]
