[133052] trunk/dports/devel/cmake/Portfile

michaelld at macports.org michaelld at macports.org
Wed Feb 18 18:14:26 PST 2015


Revision: 133052
          https://trac.macports.org/changeset/133052
Author:   michaelld at macports.org
Date:     2015-02-18 18:14:26 -0800 (Wed, 18 Feb 2015)
Log Message:
-----------
cmake: per ticket #46169, add +docs variant and related +python(27,34) for selecting which version of sphyinx to use.

Modified Paths:
--------------
    trunk/dports/devel/cmake/Portfile

Modified: trunk/dports/devel/cmake/Portfile
===================================================================
--- trunk/dports/devel/cmake/Portfile	2015-02-19 02:09:47 UTC (rev 133051)
+++ trunk/dports/devel/cmake/Portfile	2015-02-19 02:14:26 UTC (rev 133052)
@@ -54,7 +54,7 @@
     }
 }
 
-configure.args      --mandir=/share/man --docdir=/share/doc/cmake \
+configure.args      --docdir=share/doc/cmake \
                     --parallel=${build.jobs} \
                     --init=${worksrcpath}/macports.cmake \
                     --system-libs
@@ -124,6 +124,37 @@
     configure.args-append --qt-gui --qt-qmake=${qt_qmake_cmd}
 }
 
+variant docs description {Build documentation: HTML and manpages} {
+    configure.args-append \
+        --mandir=share/man \
+        --sphinx-man \
+        --sphinx-html
+}
+
+if {[variant_isset docs]} {
+
+    variant python27 conflicts python34 description {Build documentation using Sphinx from Python 2.7} {
+        depends_build-append port:py27-sphinx
+        configure.args-append \
+            --sphinx-build=${prefix}/bin/sphinx-build-2.7
+    }
+
+    variant python34 conflicts python27 description {Build documentation using Sphinx from Python 3.4} {
+        depends_build-append port:py34-sphinx
+        configure.args-append \
+            --sphinx-build=${prefix}/bin/sphinx-build-3.4
+    }
+
+    if {![variant_isset python27] && ![variant_isset python34]} {
+        default_variants +python27
+    }
+
+    if {![variant_isset python27] && ![variant_isset python34]} {
+        ui_error "\n\nYou must select either the +python27 or +python34 variant when building docs.\n"
+        return -code error "Invalid variant selection"
+    }
+}
+
 livecheck.type      regex
 livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
 livecheck.url       [lindex $master_sites 0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150218/1f654c2b/attachment-0001.html>


More information about the macports-changes mailing list