void-packages/srcpkgs/libjxl/template

71 lines
2.3 KiB
Bash

# Template file for 'libjxl'
pkgname=libjxl
version=0.8.2
revision=2
_testdata_hash=d6168ffb9e1cc24007e64b65dd84d822ad1fc759
_skcms_hash=b25b07b4b07990811de121c0356155b2ba0f4318
build_style=cmake
build_wrksrc="libjxl-${version}"
configure_args="-DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF
-DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}"
hostmakedepends="tar pkg-config asciidoc"
makedepends="brotli-devel highway libpng-devel giflib-devel libjpeg-turbo-devel
libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel"
checkdepends="gtest-devel xdg-utils"
short_desc="JPEG XL image format reference implementation"
maintainer="Joshua Krämer <joshua@kraemer.link>"
license="BSD-3-Clause, custom:Patent grant"
homepage="https://jpeg.org/jpegxl/"
changelog="https://raw.githubusercontent.com/libjxl/libjxl/main/CHANGELOG.md"
distfiles="https://github.com/libjxl/libjxl/archive/v${version}.tar.gz
https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz
https://skia.googlesource.com/skcms/+archive/${_skcms_hash}.tar.gz>skcms-${_skcms_hash}.tar.gz"
checksum="c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420
64658d3341bff2976899cb8b140242ffa4de1cd41aed507dfec4aa9e7e05ca24
@8feb1e33c38ca13f91a0d5bd8ce25f976eb239edf38f49e6db8895ae9f1e833c"
skip_extraction="skcms-${_skcms_hash}.tar.gz"
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
fi
post_extract() {
mv "testdata-${_testdata_hash}"/* "${build_wrksrc}/testdata/"
bsdtar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/skcms-${_skcms_hash}.tar.gz" -C "${build_wrksrc}/third_party/skcms"
}
post_install() {
vlicense LICENSE
vlicense PATENTS
}
libjxl-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} highway brotli-devel"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}
libjxl-tools_package() {
short_desc+=" - tools"
pkg_install() {
vmove usr/bin
vmove usr/share/man/man1
}
}
libjxl-plugins_package() {
short_desc+=" - plugins"
depends="desktop-file-utils"
pkg_install() {
vmove usr/lib/gdk-pixbuf-2.0
vmove usr/lib/gimp
vmove usr/share/mime
vmove usr/share/thumbnailers
}
}