# -*- 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 cmake 1.1 PortGroup compiler_blacklist_versions 1.0 PortGroup github 1.0 PortGroup legacysupport 1.1 name libheif categories multimedia license LGPL-3+ maintainers {mcalhoun @MarcusCalhoun-Lopez} {mascguy @mascguy} openmaintainer description a ISO/IEC 23008-12:2017 HEIF file format decoder and encoder long_description ${name} is {*}${description}. # filesystem legacysupport.newest_darwin_requires_legacy 18 legacysupport.use_mp_libcxx yes set port_latest yes platform darwin { # Fallback to last pre-C++20 release for 10.5 and earlier # On 10.6 is a failure happens during the linking phase # even with the latest compatible version of ld if {${os.major} < 11} { set port_latest no } } if {${port_latest}} { github.setup strukturag libheif 1.19.5 v revision 1 checksums rmd160 1c2230194b3c37fd61c156e7a65c4ea0ad0551e5 \ sha256 d3cf0a76076115a070f9bc87cf5259b333a1f05806500045338798486d0afbaf \ size 1716856 compiler.cxx_standard 2020 } else { github.setup strukturag libheif 1.18.2 v revision 1 checksums rmd160 fb41f7c4d109883a214b8db5db1039809a3fb8eb \ sha256 c4002a622bec9f519f29d84bfdc6024e33fd67953a5fb4dc2c2f11f67d5e45bf \ size 1525096 compiler.cxx_standard 2011 } github.tarball_from releases depends_build-append \ path:bin/pkg-config:pkgconfig depends_lib-append \ port:aom \ port:dav1d \ path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \ port:libde265 \ path:include/turbojpeg.h:libjpeg-turbo \ port:libpng \ port:openh264 \ port:svt-av1 \ port:webp configure.args-append \ -DBUILD_TESTING:BOOL=OFF \ -DWITH_EXAMPLES:BOOL=OFF \ -DWITH_KVAZAAR:BOOL=OFF \ -DWITH_RAV1E:BOOL=OFF \ -DWITH_X265:BOOL=OFF # Disable dynamic plugin loading, due to upstream issue: # clang: error: invalid argument '-compatibility_version 1.0.0' only allowed with '-dynamiclib' # We don't lose any functionality though, as we're building with everything enabled as built-ins. configure.args-append \ -DENABLE_PLUGIN_LOADING:BOOL=OFF # error: unknown warning option '-Werror=potentially-evaluated-expression' compiler.blacklist-append {clang < 700} platform darwin { if {${os.major} >= 10 && [string match *clang* ${configure.compiler}]} { # Fix for error: non-portable path to file and # https://trac.macports.org/ticket/67404 # Flags are Clang-specific, they break build with GCC. configure.cxxflags-append \ -Wno-nonportable-include-path \ -Wno-error=nonportable-include-path \ -Wno-unknown-warning-option \ -Wno-error=unknown-warning-option } if {${os.major} < 10 || (${os.major} == 10 && ${configure.build_arch} eq "ppc")} { # TODO: Disable rav1e on <10.6, due to issues with cargo-c; enable if fixed. # Do not enable on PPC until Rust is fixed or it becomes possible to build with gccrs. # See: https://trac.macports.org/ticket/65434 if {[variant_isset rav1e]} { error "Variant rav1e not supported for macOS 10.5 and earlier, or PPC" } } } variant kvazaar conflicts x265 description {Use kvazaar for HEIC encoding} { depends_lib-append port:kvazaar configure.args-replace \ -DWITH_KVAZAAR:BOOL=OFF \ -DWITH_KVAZAAR:BOOL=ON } variant x265 conflicts kvazaar description {Use x265 for HEIC encoding} { depends_lib-append port:x265 configure.args-replace \ -DWITH_X265:BOOL=OFF \ -DWITH_X265:BOOL=ON } variant rav1e description {Enable codec rav1e} { depends_lib-append \ port:rav1e configure.args-replace \ -DWITH_RAV1E:BOOL=OFF \ -DWITH_RAV1E:BOOL=ON } variant examples description {Enable building examples} { configure.args-replace \ -DWITH_EXAMPLES:BOOL=OFF \ -DWITH_EXAMPLES:BOOL=ON } variant tests description {Enable tests} { configure.args-replace \ -DBUILD_TESTING:BOOL=OFF \ -DBUILD_TESTING:BOOL=ON configure.args-append \ -DWITH_REDUCED_VISIBILITY:BOOL=OFF test.run yes } if {![variant_isset x265]} { default_variants-append +kvazaar } if {![variant_isset rav1e]} { notes-append "Support for rav1e now disabled by default; enable via +rav1e" } # Exclude pre-release candidates github.livecheck.regex {([0-9.]+)}