# -*- 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 set ECM extra-cmake-modules name kde-${ECM} subport ${name}-devel {} conflicts ${name} ${name}-devel conflicts-delete ${subport} set kf5.branch 5.86 patch.pre_args-append -N patch.pre_args-replace -p0 -p1 if {${subport} eq "${name}-devel"} { fetch.type git git.url https://invent.kde.org/kde/extra-cmake-modules git.branch a670c57c193c8632bd6d12bdf1afd237b5d753a3 if {${os.platform} eq "darwin" && ${os.major} < 16} { # avoid certificate issues on kde.org depends_fetch-replace bin:git:git port:git git.cmd ${prefix}/bin/git } # v5.75.0-7-ga670c57 version 5.75.0.7 distname ECM-5.1x.git patchfiles-append \ patch-BUNDLEDIR-devel.diff } else { version ${kf5.branch}.0 set branch [join [lrange [split ${version} .] 0 1] .] master_sites kde:stable/frameworks/${branch}/ distname ${ECM}-${version} use_xz yes checksums rmd160 168f590b77154eea2e72ad506d31d92d41efefa3 \ sha256 aacc5ccdc5799efe34e2dae33418c379466caf7c9802b78348ccfb5782fe6ab5 \ size 318384 patchfiles-append \ patch-BUNDLEDIR.diff } supported_archs noarch platforms any installs_libs no categories kde kf5 devel license GPL-2+ maintainers {gmail.com:rjvbertin @RJVB} openmaintainer description Extra modules and scripts for CMake. long_description Extra CMake Modules, or ECM, aims to augment CMake with additional \ modules. It serves as both a staging ground for new modules before \ they are moved upstream to CMake and a place for modules that, for \ whatever reason, are not a good fit for CMake itself. homepage https://invent.kde.org/frameworks/${ECM} # https://phabricator.kde.org/D5865 patchfiles-append patch-enable-named-operators.diff # https://phabricator.kde.org/D5972 patchfiles-append patch-qt_no_exceptions.diff if {${subport} eq "${name}-devel"} { # https://phabricator.kde.org/D16894 patchfiles-append patch-kdecompilerflags.diff } # https://phabricator.kde.org/T10112 patchfiles-append patch-mac-installdirs.diff post-patch { reinplace "s|@APPLICATIONSDIR@|${applications_dir}|g" ${worksrcpath}/kde-modules/KDEInstallDirs.cmake } configure.args-append -DBUILD_HTML_DOCS=OFF \ -DBUILD_MAN_DOCS=OFF \ -DBUILD_QTHELP_DOCS=OFF variant qt4 conflicts qt5 description {Use Qt4 to build the Qt documentation} {} variant qt5 conflicts qt4 description {Use Qt5 to build the Qt documentation} {} variant docs description {Build documentation} {} if {[variant_isset docs]} { if {![variant_isset qt4] && ![variant_isset qt5]} { # user didn't request a Qt variant to use for building the documentation if {[file exists ${prefix}/libexec/qt5/bin/qcollectiongenerator] \ || [file exists ${prefix}/libexec/qt5-mac/bin/qcollectiongenerator]} { # qcollectiongenerator is installed and provided by a concurrent qt5 port default_variants +qt5 } elseif {[file exists ${prefix}/libexec/qt4/bin/qcollectiongenerator]} { # qcollectiongenerator is installed and provided by a concurrent qt4 port default_variants +qt4 } else { # a qcollectiongenerator version cannot be found in a location indicating who provides it # fall back to using the Qt version most likely to be required by ports # that use ECM. default_variants +qt5 } } # no else here! if {[variant_isset qt4]} { PortGroup qt4 1.0 } elseif {[variant_isset qt5]} { set qt5.prefer_kde 1 PortGroup qt5 1.0 qt5.depends_build_component \ qttools } patchfiles-append patch-doc-building.diff platform darwin { depends_build-append \ port:py-sphinx } configure.args-replace -DBUILD_MAN_DOCS=OFF \ -DBUILD_MAN_DOCS=ON configure.args-replace -DBUILD_QTHELP_DOCS=OFF \ -DBUILD_QTHELP_DOCS=ON pre-destroot { system -W ${build.dir}/docs "${qt_bins_dir}/qcollectiongenerator qthelp/ExtraCMakeModules.qhcp" } } test.run yes livecheck.type regex livecheck.version ${kf5.branch} livecheck.url https://download.kde.org/stable/frameworks/ livecheck.regex (5+(\\.\\d+)+)