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

Last change on this file since 111793 was 111793, checked in by css@…, 7 years ago

doxygen: bump the revision due to changes in r111790. refs #40559

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