# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup github 1.0 PortGroup cmake 1.0 PortGroup compiler_blacklist_versions 1.0 github.setup libjxl libjxl 0.11.0 v categories graphics maintainers {jmr @jmroot} license BSD description JPEG XL reference implementation long_description A reference implementation of JPEG XL. github.tarball_from archive # No option to use external skcms set skcms_commit 42030a771244ba67f86b1c1c76a6493f873c5f91 master_sites-append sourceforge:project/macports/distfiles/${name}:skcms # googlesource doesn't provide stable tarballs # https://skia.googlesource.com/skcms/+archive/${skcms_commit}.tar.gz?dummy= distfiles-append skcms-${skcms_commit}${extract.suffix}:skcms checksums ${name}-${version}${extract.suffix} \ rmd160 050d44d33d27ffb23bad5a2d907651d3f2969b17 \ sha256 7ce4ec8bb37a435a73ac18c4c9ff56c2dc6c98892bf3f53a328e3eca42efb9cf \ skcms-${skcms_commit}${extract.suffix} \ rmd160 441c5313197732e0756df440be91bd813a994c20 \ sha256 1ee4607d6fbcad26759fcbc95a6dcdccf3dfc1e55a5ca748e7853f9fb97b28ee depends_build-append \ port:asciidoc \ path:bin/pkg-config:pkgconfig depends_lib port:brotli \ port:giflib5 \ port:highway \ path:include/turbojpeg.h:libjpeg-turbo \ port:libpng \ port:openexr extract.only ${name}-${version}${extract.suffix} post-extract { system -W ${worksrcpath}/third_party/skcms \ "tar -xzf ${distpath}/skcms-${skcms_commit}${extract.suffix}" } patchfiles include_order.patch \ find_asciidoc.patch \ loop_filter.h-abs.patch if {${os.platform} eq "darwin" && ${os.major} <= 15} { # No support for sized operator delete patchfiles-append sized-deallocation.patch } cmake.out_of_source yes configure.args-append \ -DBUILD_TESTING=NO \ -DAVIF_FOUND=NO \ -DWebP_FOUND=NO \ -DJPEGXL_ENABLE_DOXYGEN=NO \ -DJPEGXL_ENABLE_JPEGLI=NO \ -DJPEGXL_ENABLE_JNI=NO \ -DJPEGXL_ENABLE_OPENEXR=YES \ -DJPEGXL_ENABLE_SJPEG=NO \ -DJPEGXL_ENABLE_SKCMS=YES \ -DJPEGXL_FORCE_SYSTEM_BROTLI=YES \ -DJPEGXL_FORCE_SYSTEM_HWY=YES \ -DASCIIDOC:FILEPATH=${prefix}/bin/a2x \ -DGIF_INCLUDE_DIR:FILEPATH=${prefix}/include/giflib5 \ -DGIF_LIBRARY:FILEPATH=${prefix}/lib/giflib5/lib/libgif.dylib compiler.cxx_standard 2011 # Compilation warning (from highway headers): # "x86 Clang <= 6: define HWY_COMPILE_ONLY_SCALAR or upgrade." # (Xcode Clang 10.0.1 ~= llvm.org Clang 7.0) compiler.blacklist {clang < 1001} variant tests description {Enable building of test code} { depends_build-append port:gtest configure.args-replace -DBUILD_TESTING=NO \ -DBUILD_TESTING=YES \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF configure.args-append -DJPEGXL_FORCE_SYSTEM_GTEST=YES test.run yes } github.livecheck.regex {([\d.]+)}