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

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

textproc/doxygen:

fix path in wixard variant
closes #40559
maintainer timeout

  • 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 111790 2013-10-01 20:39:46Z g5pw@macports.org $
3
4PortSystem              1.0
5
6name                    doxygen
7version                 1.8.5
8categories              textproc devel
9maintainers             css
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  b826c120543a424a938759fc9efa71b855318008 \
39                        sha256  243a8b67db12ad68d6ea5b51c6f60dc2cc3a34fa47abf1b5b4499196c3d7cc25
40
41depends_build-append    bin:perl:perl5 \
42                        port:flex \
43                        port:bison
44license_noconflict      perl5
45
46depends_lib             port:libpng \
47                        port:libiconv
48
49post-extract {
50    # Use our flex
51    delete ${worksrcpath}/src/ce_lex.cpp
52    delete ${worksrcpath}/src/code.cpp
53    delete ${worksrcpath}/src/commentcnv.cpp
54    delete ${worksrcpath}/src/commentscan.cpp
55    delete ${worksrcpath}/src/config.cpp
56    delete ${worksrcpath}/src/declinfo.cpp
57    delete ${worksrcpath}/src/defargs.cpp
58    delete ${worksrcpath}/src/doctokenizer.cpp
59    delete ${worksrcpath}/src/fortrancode.cpp
60    delete ${worksrcpath}/src/fortranscanner.cpp
61    delete ${worksrcpath}/src/pre.cpp
62    delete ${worksrcpath}/src/pycode.cpp
63    delete ${worksrcpath}/src/pyscanner.cpp
64    delete ${worksrcpath}/src/scanner.cpp
65    delete ${worksrcpath}/src/tclscanner.cpp
66    delete ${worksrcpath}/src/vhdlcode.cpp
67    delete ${worksrcpath}/src/vhdlscanner.cpp
68
69    # Use our bison
70    delete ${worksrcpath}/src/ce_parse.cpp
71    delete ${worksrcpath}/src/ce_parse.h
72    delete ${worksrcpath}/src/vhdlparser.cpp
73    delete ${worksrcpath}/src/vhdlparser.h
74}
75
76patchfiles              patch-configure.diff
77post-patch {
78    reinplace "s/echo -n/printf/g" ${worksrcpath}/configure
79
80    # ensure correct compilers and compiler options are used
81    reinplace "/^TMAKE_CC\[\[:space:\]\]/s%=.*%= ${configure.cc} ${configure.cppflags} [get_canonical_archflags cc]%" ${tmake_conf}
82    reinplace "/^TMAKE_CXX\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.cppflags} [get_canonical_archflags cxx]%" ${tmake_conf}
83    reinplace "/^TMAKE_LINK\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.ldflags} [get_canonical_archflags ld]%" ${tmake_conf}
84    reinplace "/^TMAKE_LINK_SHLIB\[\[:space:\]\]/s%=.*%= ${configure.cxx} [get_canonical_archflags ld]%" ${tmake_conf}
85
86    # may not be strictly necessary, but remove trailing '/' from DESTDIR
87    reinplace "s|\$(DESTDIR)/|\$(DESTDIR)|g" ${worksrcpath}/Makefile.in
88
89    # link with doxygen's libmd5, avoiding a libwww port conflict
90    reinplace "s|-lmd5|../lib/libmd5.a|" ${worksrcpath}/src/doxygen.pro.in
91
92    # do not require GNU install; BSD install suffices
93    reinplace "s,-n \"`\$j/\$i --version 2>/dev/null \| grep utils`\",-x \"\$j/\$i\",g" ${worksrcpath}/configure
94
95    # remove flag that is not defined for gcc and only suppresses some warnings for clang
96    if {[string match *gcc* ${configure.compiler}]} {
97        reinplace "s|-Wno-invalid-source-encoding||g" ${tmake_conf}
98    }
99}
100
101build.type              gnu
102
103configure.universal_args-delete \
104                        --disable-dependency-tracking
105configure.pre_args      --prefix ${prefix}
106configure.args          --make ${build.cmd}
107
108build.target            all
109
110destroot.target         install
111destroot.args           INSTALL=${prefix} \
112                        DOCDIR=${prefix}/share/doc/doxygen \
113                        MAN1DIR=share/man/man1
114
115variant docs description {Include the doxygen PDF documentation and LaTeX} requires {latex} {
116    patchfiles-delete       patch-configure.diff
117    patchfiles-append       patch-doc-Makefile.in.diff
118
119    configure.args-append   --docdir ${prefix}/share/doc \
120                            --dot ${prefix}/bin/dot
121
122    depends_build-append    path:bin/dot:graphviz \
123                            bin:python2.7:python27
124    build.target-append     pdf
125    use_parallel_build      no
126
127    destroot.target-append  install_docs
128}
129
130variant latex description {Support LaTeX/PDF doxygen output} {
131    depends_build-append    bin:pdflatex:texlive \
132                            bin:gs:ghostscript \
133                            port:texlive-latex-extra
134}
135
136variant wizard description {Include the GUI wizard based on Qt4} {
137    # use the Qt4 PortGroup, which provides a bunch of variables
138    # and defines for how Qt4 was installed
139    PortGroup qt4 1.0
140
141    # tell configure to make the wizard app
142    configure.args-append   --with-doxywizard
143
144    # on Macs, qmake builds .app directories; when installing, copy
145    # this directory to the correct location (via the reinplace below).
146    patchfiles-append       patch-addon_doxywizard_Makefile.in.diff
147
148    post-patch {
149        # allow for universal building, if desired
150        reinplace "/CONFIG/s@x86@${qt_arch_types}@" \
151            ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
152
153        # give doxywizard the more mac-like name of DoxyWizard
154        reinplace "/^TARGET\[\[:space:\]\]/s%=.*%= DoxyWizard%" \
155            ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
156
157        # fix final install location
158        reinplace "s|__APPLICATIONS_DIR__|${applications_dir}|" \
159            ${worksrcpath}/addon/doxywizard/Makefile.in
160
161        # use the correct QMAKE command; the other should work, but
162        # this one is guaranteed to.
163        reinplace "s|QMAKE=qmake|QMAKE=${qt_qmake_cmd}|g" \
164            ${worksrcpath}/addon/doxywizard/Makefile.in
165    }
166
167    post-destroot {
168        # allow doxywizard to be called from the command line
169        ln -s ${applications_dir}/DoxyWizard.app/Contents/MacOS/DoxyWizard ${destroot}${prefix}/bin/doxywizard
170    }
171}
172
173platform darwin {
174    # Specify the platform explicitly to avoid a universal build.
175    global tmake_conf
176
177    set tmake_conf ${worksrcpath}/tmake/lib/macosx-c++/tmake.conf
178    configure.args-append   --platform macosx-c++
179}
Note: See TracBrowser for help on using the repository browser.