source: trunk/dports/textproc/doxygen/Portfile @ 133907

Last change on this file since 133907 was 133907, checked in by ryandesign@…, 5 years ago

doxygen: fix livecheck (#45227)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.0 KB
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 133907 2015-03-15 18:30:05Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6name                    doxygen
7version                 1.8.9.1
8categories              textproc devel
9maintainers             css openmaintainer
10license                 GPL-2
11description             Documentation system for several programming languages
12long_description        It can generate an on-line documentation browser \
13                        (in HTML) and/or an off-line reference manual \
14                        from a set of documented source files. There is \
15                        also support for generating output in RTF \
16                        (MS-Word), PostScript, hyperlinked PDF, \
17                        compressed HTML, and Unix man pages. The \
18                        documentation is extracted directly from the \
19                        sources, which makes it much easier to keep the \
20                        documentation consistent with the source code. \
21                        You can configure doxygen to extract the code \
22                        structure from undocumented source files. This \
23                        is very useful to quickly find your way in large \
24                        source distributions. You can also visualize the \
25                        relations between the various elements by means \
26                        of include dependency graphs, inheritance \
27                        diagrams, and collaboration diagrams, which are \
28                        all generated automatically.
29
30platforms               darwin
31
32homepage                http://www.doxygen.org/
33master_sites            http://ftp.stack.nl/pub/users/dimitri/ \
34                        ftp://ftp.stack.nl/pub/users/dimitri/
35distfiles               ${distname}.src${extract.suffix}
36
37checksums               ${distname}.src${extract.suffix} \
38                        rmd160  103d45b36129a0a04b809050b7251acf6f9dacde \
39                        sha256  d4ab6e28d4d45d8956cad17470aade3fbe2356e8f64b92167e738c1887feccec
40
41depends_build-append    bin:perl:perl5 \
42                        bin:python2.7:python27 \
43                        port:flex \
44                        port:bison
45license_noconflict      perl5 python27
46
47depends_lib             port:libpng \
48                        port:libiconv
49
50post-extract {
51    # Use our flex
52    delete ${worksrcpath}/src/ce_lex.cpp
53    delete ${worksrcpath}/src/code.cpp
54    delete ${worksrcpath}/src/commentcnv.cpp
55    delete ${worksrcpath}/src/commentscan.cpp
56    delete ${worksrcpath}/src/config.cpp
57    delete ${worksrcpath}/src/declinfo.cpp
58    delete ${worksrcpath}/src/defargs.cpp
59    delete ${worksrcpath}/src/doctokenizer.cpp
60    delete ${worksrcpath}/src/fortrancode.cpp
61    delete ${worksrcpath}/src/fortranscanner.cpp
62    delete ${worksrcpath}/src/pre.cpp
63    delete ${worksrcpath}/src/pycode.cpp
64    delete ${worksrcpath}/src/pyscanner.cpp
65    delete ${worksrcpath}/src/scanner.cpp
66    delete ${worksrcpath}/src/tclscanner.cpp
67    delete ${worksrcpath}/src/vhdlcode.cpp
68    delete ${worksrcpath}/src/vhdlscanner.cpp
69
70    # Use our bison
71    delete ${worksrcpath}/src/ce_parse.cpp
72    delete ${worksrcpath}/src/ce_parse.h
73    delete ${worksrcpath}/src/vhdlparser.cpp
74    delete ${worksrcpath}/src/vhdlparser.h
75}
76
77set cxx_stdlibflags {}
78if {[string match *clang* ${configure.cxx}]} {
79    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
80}
81
82patchfiles              patch-configure.diff
83post-patch {
84    reinplace "s/echo -n/printf/g" ${worksrcpath}/configure
85
86    # ensure correct compilers and compiler options are used
87    reinplace "/^TMAKE_CC\[\[:space:\]\]/s%=.*%= ${configure.cc} ${configure.cppflags} [get_canonical_archflags cc]%" ${tmake_conf}
88    reinplace "/^TMAKE_CXX\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.cppflags} ${cxx_stdlibflags} [get_canonical_archflags cxx]%" ${tmake_conf}
89    reinplace "/^TMAKE_LINK\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.ldflags} ${cxx_stdlibflags} [get_canonical_archflags ld]%" ${tmake_conf}
90    reinplace "/^TMAKE_LINK_SHLIB\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${cxx_stdlibflags} [get_canonical_archflags ld]%" ${tmake_conf}
91    reinplace "s|-mmacosx-version-min=10.5||g" ${tmake_conf}
92
93    # make sure LIBICONV_PLUG is undefined (this flag is necessary for the
94    # system-installed libiconv, but breaks linking with the MacPorts installed
95    # one)
96    reinplace "s|#define LIBICONV_PLUG||g" ${worksrcpath}/src/portable_c.c
97
98    # may not be strictly necessary, but remove trailing '/' from DESTDIR
99    reinplace "s|\$(DESTDIR)/|\$(DESTDIR)|g" ${worksrcpath}/Makefile.in
100
101    # link with doxygen's libmd5, avoiding a libwww port conflict
102    reinplace "s|-lmd5|../lib/libmd5.a|" ${worksrcpath}/src/doxygen.pro.in
103
104    # do not require GNU install; BSD install suffices
105    reinplace "s,-n \"`\$j/\$i --version 2>/dev/null \| grep utils`\",-x \"\$j/\$i\",g" ${worksrcpath}/configure
106
107    # remove flag that is not defined for gcc and only suppresses some warnings for clang
108    if {[string match *gcc* ${configure.compiler}]} {
109        reinplace "s|-Wno-invalid-source-encoding||g" ${tmake_conf}
110    }
111}
112
113build.type              gnu
114
115configure.universal_args-delete \
116                        --disable-dependency-tracking
117configure.pre_args      --prefix ${prefix}
118configure.args          --make ${build.cmd} \
119                        --python python2.7
120
121build.target            all
122
123destroot.target         install
124destroot.args           INSTALL=${prefix} \
125                        DOCDIR=${prefix}/share/doc/doxygen \
126                        MAN1DIR=share/man/man1
127
128variant docs description {Include the doxygen PDF documentation and LaTeX} requires {latex} {
129    patchfiles-delete       patch-configure.diff
130
131    configure.args-append   --docdir ${prefix}/share/doc \
132                            --dot ${prefix}/bin/dot
133
134    depends_build-append    path:bin/dot:graphviz
135    build.target-append     pdf
136    use_parallel_build      no
137
138    destroot.target-append  install_docs
139}
140
141variant latex description {Support LaTeX/PDF doxygen output} {
142    depends_build-append    bin:pdflatex:texlive-latex \
143                            bin:gs:ghostscript \
144                            port:texlive-latex-extra
145}
146
147variant wizard description {Include the GUI wizard based on Qt4} {
148    # use the Qt4 PortGroup, which provides a bunch of variables
149    # and defines for how Qt4 was installed
150    PortGroup qt4 1.0
151
152    # tell configure to make the wizard app
153    configure.args-append   --with-doxywizard
154
155    # on Macs, qmake builds .app directories; when installing, copy
156    # this directory to the correct location (via the reinplace below).
157    patchfiles-append       patch-addon_doxywizard_Makefile.in.diff
158
159    post-patch {
160        # allow for universal building, if desired
161        reinplace "/CONFIG/s@x86@${qt_arch_types}@" \
162            ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
163
164        # give doxywizard the more mac-like name of DoxyWizard
165        reinplace "/^TARGET\[\[:space:\]\]/s%=.*%= DoxyWizard%" \
166            ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
167
168        # fix final install location
169        reinplace "s|__APPLICATIONS_DIR__|${applications_dir}|" \
170            ${worksrcpath}/addon/doxywizard/Makefile.in
171
172        # use the correct QMAKE command; the other should work, but
173        # this one is guaranteed to.
174        reinplace "s|QMAKE=qmake|QMAKE=${qt_qmake_cmd}|g" \
175            ${worksrcpath}/addon/doxywizard/Makefile.in
176    }
177
178    post-destroot {
179        # allow doxywizard to be called from the command line
180        ln -s ${applications_dir}/DoxyWizard.app/Contents/MacOS/DoxyWizard ${destroot}${prefix}/bin/doxywizard
181    }
182}
183
184platform darwin {
185    # Specify the platform explicitly to avoid a universal build.
186    global tmake_conf
187
188    set tmake_conf ${worksrcpath}/tmake/lib/macosx-c++/tmake.conf
189    configure.args-append   --platform macosx-c++
190}
191
192livecheck.type          regex
193livecheck.url           http://www.stack.nl/~dimitri/doxygen/download.html
194livecheck.regex         {latest version of doxygen is (\d+(?:\.\d+)*)}
Note: See TracBrowser for help on using the repository browser.