Commits

Marcus Calhoun-Lopez authored and David B. Evans committed c50f10be877
gtk-doc: add variants for different python versions
No tags

gnome/gtk-doc/Portfile

Modified
1 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 2
3 3 PortSystem 1.0
4 4
5 5 name gtk-doc
6 6 version 1.29
7 +revision 1
7 8 categories gnome devel
8 9 license GPL-2+
9 10 installs_libs no
10 11 platforms darwin freebsd linux
11 12 supported_archs noarch
12 13 installs_libs no
13 14 maintainers {devans @dbevans} openmaintainer
14 15 description GTK+/GNOME API documentation generator
15 16
16 17 long_description GTK-Doc generates API documentation from comments added to C code. \
30 31 # currently 5.26 (#55208)
31 32
32 33 set pbranch 5.26
33 34
34 35 depends_build port:pkgconfig \
35 36 path:lib/pkgconfig/glib-2.0.pc:glib2
36 37
37 38 depends_lib port:libxml2 \
38 39 port:libxslt \
39 40 port:perl${pbranch} \
40 - port:python36 \
41 - port:py36-anytree \
42 - port:py36-lxml \
43 - port:py36-pygments \
44 41 port:docbook-xml \
45 42 port:docbook-xsl-nons \
46 43 port:itstool \
47 44 port:source-highlight
48 45
49 -depends_test port:py36-mock
50 -
51 46 variant pdf description {Build with PDF output support} {
52 47 depends_lib-append \
53 48 port:dblatex
54 49 }
55 50
56 51 if {![variant_isset pdf]} {
57 52 patchfiles-append \
58 53 disable-pdf.patch
59 54 }
60 55
61 56 configure.perl ${prefix}/bin/perl${pbranch}
62 -configure.python ${prefix}/bin/python3.6
63 57 configure.env-append XSLTPROC=${prefix}/bin/xsltproc
64 58 configure.args --with-xml-catalog=${prefix}/etc/xml/catalog \
65 59 --with-highlight=source-highlight \
66 60 --disable-silent-rules
67 61
62 +variant python36 conflicts python37 description {Build using Python 3.6} {
63 + depends_lib-append \
64 + port:python36 \
65 + port:py36-anytree \
66 + port:py36-lxml \
67 + port:py36-pygments
68 +
69 + depends_test port:py36-mock
70 +
71 + configure.python ${prefix}/bin/python3.6
72 +}
73 +
74 +variant python37 conflicts python36 description {Build using Python 3.7} {
75 + depends_lib-append \
76 + port:python37 \
77 + port:py37-anytree \
78 + port:py37-lxml \
79 + port:py37-pygments
80 +
81 + depends_test port:py37-mock
82 +
83 + configure.python ${prefix}/bin/python3.7
84 +}
85 +
86 +if {![variant_isset python37]} {
87 + default_variants +python36
88 +}
89 +
90 +if {![variant_isset python36] && ![variant_isset python37]} {
91 + ui_error "You must select one of the python variants"
92 + return -code error "No python variant selected."
93 +}
94 +
68 95 post-configure {
69 96 reinplace "s|^#!.*|#!${configure.perl} -w|" \
70 97 ${worksrcpath}/tools/docpercentages.pl
71 98 }
72 99
73 100 # some tests are known to fail in gtk-doc 1.29
74 101 # see https://gitlab.gnome.org/GNOME/gtk-doc/blob/7db567e83fe5d2d0659560c6dfb25ee27b338140/NEWS
75 102 test.run yes
76 103 test.dir ${worksrcpath}/tests
77 104 test.target check

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut