# -*- 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 muniversal 1.0 PortGroup boost 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup qt6 1.0 # Please keep the mkvtoolnix and mkvtoolnix-devel ports as similar as # possible. # The developer does not accept macOS-specific bug reports, but does # accept pull requests. name mkvtoolnix-devel conflicts mkvtoolnix set my_name mkvtoolnix version 83.0 revision 1 categories multimedia maintainers {ryandesign @ryandesign} {mascguy @mascguy} {i0ntempest @i0ntempest} openmaintainer license GPL-2+ LGPL-2.1+ description Matroska media files manipulation tools. long_description mkvtoolnix will evolve to a set of tools to create, \ alter and inspect Matroska files under Linux and other \ Unices, just what the OGMtools do for the OGM format. homepage https://mkvtoolnix.download master_sites ${homepage}/sources/ use_xz yes checksums rmd160 3ff6d7daae26a8924b292685d5596250fcdc66c4 \ sha256 6a8615436406c7fa45bfb2b6270da1bf06ea54cfcd13c3699643833e1d73ecbc \ size 11278152 distname ${my_name}-${version} dist_subdir ${my_name} # libc++ on 10.13 supports std::optional but the compilers that # shipped with 10.13's Xcode incorrectly believed that it didn't. # https://github.com/llvm/llvm-project/commit/7fb40e1569dd66292b647f4501b85517e9247953 # MacPorts clang 8 and later have applied this fix. # However, Xcode clangs prior to 10.0.1 have other issues, so exclude those. compiler.blacklist-append \ {clang < 1001} set version_ruby 3.2 set version_ruby_mp [join [split $version_ruby "."] ""] qt6.depends_lib qtmultimedia \ qtsvg depends_build port:ruby${version_ruby_mp} \ port:docbook-xsl-nons \ port:pkgconfig \ port:libxslt \ port:po4a depends_lib port:bzip2 \ port:expat \ port:flac \ port:gettext-runtime \ port:libebml \ port:libmatroska \ port:libogg \ port:libvorbis \ port:lzo2 \ port:zlib \ port:pugixml \ port:cmark \ port:libdvdread \ port:gmp \ port:nlohmann-json depends_run port:ruby${version_ruby_mp} depends_test port:gtest post-patch { fs-traverse f ${worksrcpath} { set t [file tail ${f}] set e [file extension ${f}] if {${t} eq "Rakefile" || ${e} eq ".rb"} { reinplace -q -E "s|^#!/usr/bin/(env )?ruby|#!${prefix}/bin/ruby${version_ruby}|g" ${f} } } } compiler.cxx_standard 2017 configure.cxxflags-append -std=c++17 set cxx_stdlibflags {} if {[string match *clang* ${configure.cxx}]} { set cxx_stdlibflags -stdlib=${configure.cxx_stdlib} } build.cmd rake${version_ruby} build.target default # disable silent rules build.args-append V=1 configure.args --mandir=${prefix}/share/man \ --with-boost=[boost::install_area] \ --with-extra-libs=${prefix}/lib \ --with-extra-includes=${prefix}/include \ --with-xsltproc=${prefix}/bin/xsltproc \ --with-docbook-xsl-root=${prefix}/share/xsl/docbook-xsl-nons \ --with-po4a=${prefix}/bin/po4a \ --with-po4a-translate=${prefix}/bin/po4a-translate \ --disable-update-check \ --disable-gui \ --with-qmake6=${qt6.dir}/bin/qmake6 configure.ldflags-append ${cxx_stdlibflags} test.run yes test.cmd rake test.target tests:unit variant qtgui description {Build with the qt6 GUI} { PortGroup app 1.0 app.name MKVToolNix app.executable mkvtoolnix-gui app.icon ${worksrcpath}/share/icons/256x256/mkvtoolnix-gui.png depends_build-append port:makeicns configure.args-replace \ --disable-gui \ --enable-gui configure.args-append \ --with-moc=${qt6.dir}/libexec/moc \ --with-uic=${qt6.dir}/libexec/uic \ --with-rcc=${qt6.dir}/libexec/rcc } default_variants +qtgui livecheck.type regex livecheck.url [lindex ${master_sites} 0] livecheck.regex ${my_name}-(\[0-9.\]+)${extract.suffix}