Ticket #46978: Portfile

File Portfile, 2.7 KB (added by RJVB (René Bertin), 9 years ago)
Line 
1# -*- 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
2# $Id: Portfile 129773 2015-02-26 08:18:44Z rjvbertin@gmail.com $
3
4PortSystem          1.0
5PortGroup           cmake   1.0
6cmake.out_of_source yes
7
8name                kde-extra-cmake-modules
9version             5.12.0.20150612
10supported_archs     noarch
11categories          kde devel
12license             GPL-2+
13maintainers         gmail.com:rjvbertin openmaintainer
14description         Extra modules and scripts for CMake.
15long_description    Extra CMake Modules, or ECM, aims to augment CMake with additional \
16                    modules. It serves as both a staging ground for new modules before \
17                    they are moved upstream to CMake and a place for modules that, for \
18                    whatever reason, are not a good fit for CMake itself.
19platforms           darwin
20homepage            http://projects.kde.org/projects/kdesupport/extra-cmake-modules
21
22fetch.type          git
23git.url             git://anongit.kde.org/extra-cmake-modules
24git.branch          cb42a57b1da01b51ce02f86f9a57b5ddbe5196d0
25
26variant qt4 description {Use qt4-mac to build the Qt documentation} {
27    PortGroup               qt4 1.0
28}
29variant qt5 description {Use qt5-mac to build the Qt documentation} {
30    PortGroup               qt5 1.0
31}
32variant docs description {Build documentation} {
33    if {![variant_isset qt4] && ![variant_isset qt5]} {
34        # user didn't request a Qt variant to use for building the documentation
35        if {[file exists ${prefix}/libexec/qt5/bin/qcollectiongenerator]} {
36            # qcollectiongenerator is installed and provided by a concurrent qt5-mac port
37            default_variants    +qt5
38            PortGroup           qt5 1.0
39        } elseif {[file exists ${prefix}/libexec/qt4/bin/qcollectiongenerator]} {
40            # qcollectiongenerator is installed and provided by a concurrent qt4-mac port
41            default_variants    +qt4
42            PortGroup           qt4 1.0
43        } else {
44            # a qcollectiongenerator version cannot be found in a location indicating who provides it
45            # fall back to using the most Qt version most likely to be installed at this time
46            # (and which at this exact time won't need to be built from source)
47            default_variants    +qt4
48            PortGroup           qt4 1.0
49        }
50    }
51    depends_build-append    port:py-sphinx
52    patchfiles-append       patch-doc-building.diff
53    configure.args-append   -DBUILD_HTML_DOCS:BOOL=OFF -DBUILD_QTHELP_DOCS:BOOL=ON
54    pre-destroot {
55        exec sh -c "cd ${build.dir}/docs ; ${qt_bins_dir}/qcollectiongenerator qthelp/ExtraCMakeModules.qhcp"
56    }
57}