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

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

doxygen: bunp version to 1.7.5.1, commenting out a possibly obsolete Lion patch. I don't have Lion, so please report any issues. refs #30989

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.5 KB
Line 
1# $Id: Portfile 84175 2011-09-20 01:45:23Z css@macports.org $
2
3PortSystem 1.0
4
5name                    doxygen
6version                 1.7.5.1
7categories              textproc devel
8maintainers             css
9description             Documentation system for several programming languages
10long_description \
11        It can generate an on-line documentation browser (in HTML) and/or an \
12        off-line reference manual from a set of documented source files. \
13        There is also support for generating output in RTF (MS-Word), \
14        PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The \
15        documentation is extracted directly from the sources, which makes it \
16        much easier to keep the documentation consistent with the source code. \
17        You can configure doxygen to extract the code structure from \
18        undocumented source files. This is very useful to quickly find your \
19        way in large source distributions. You can also visualize the \
20        relations between the various elements by means of include dependency \
21        graphs, inheritance diagrams, and collaboration diagrams, which are \
22        all generated automatically.
23
24platforms               darwin
25
26homepage                http://www.doxygen.org/
27master_sites            http://ftp.stack.nl/pub/users/dimitri/ \
28                        ftp://ftp.stack.nl/pub/users/dimitri/
29distfiles               ${distname}.src${extract.suffix}
30
31checksums           ${distname}.src${extract.suffix} \
32                    md5     f5355c442c5bc2481dbef7fdea8f0556 \
33                    sha1    15671defd1eefe255aa564b6f3097e30ab07ff55 \
34                    rmd160  cd0552ea3e2e810dfb943700af70bb1cf9e0b6ae
35
36depends_build-append    bin:perl:perl5 bin:flex:flex bin:bison:bison
37depends_lib             port:libpng path:bin/dot:graphviz port:libiconv
38
39#patchfiles     lion.patch
40
41patch.post_args     -p1
42configure.universal_args-delete --disable-dependency-tracking
43
44configure.pre_args      --prefix ${prefix}
45configure.args          --docdir ${prefix}/share/doc --dot ${prefix}/bin/dot
46
47post-patch {
48        # ensure correct compilers and compiler options are used
49        reinplace "/^TMAKE_CC\[\[:space:\]\]/s%=.*%= ${configure.cc} ${configure.cppflags} ${arch_flags}%" ${tmake_conf}
50        reinplace "/^TMAKE_CXX\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.cppflags} ${arch_flags}%" ${tmake_conf}
51        reinplace "/^TMAKE_LINK\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.ldflags} ${arch_flags}%" ${tmake_conf}
52        reinplace "/^TMAKE_LINK_SHLIB\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${arch_flags}%" ${tmake_conf}
53
54        # may not be strictly necessary, but remove trailing '/' from DESTDIR
55        reinplace "s|\$(DESTDIR)/|\$(DESTDIR)|g" ${worksrcpath}/Makefile.in
56
57        # link with doxygen's libmd5, avoiding a libwww port conflict
58        reinplace "s|-lmd5|../lib/libmd5.a|" ${worksrcpath}/src/doxygen.pro.in
59
60        # do not require GNU install; BSD install suffices
61        reinplace "s,-n \"`\$j/\$i --version 2>/dev/null \| grep utils`\",-x \"\$j/\$i\",g" ${worksrcpath}/configure
62}
63
64build.target            all
65
66destroot.target         install
67destroot.args           INSTALL=${prefix} \
68                        DOCDIR=${prefix}/share/doc/doxygen \
69                        MAN1DIR=share/man/man1
70
71variant docs description {Include the doxygen PDF documentation and LaTeX} {
72        build.target-append     pdf
73        use_parallel_build  no
74        destroot.target-append  install_docs
75        depends_build-append    bin:pdflatex:texlive \
76                                bin:gs:ghostscript \
77                                port:texlive-latex-extra
78}
79
80variant wizard description {Include the GUI wizard based on Qt4} {
81    # use the Qt4 PortGroup, which provides a bunch of variables
82    # and defines for how Qt4 was installed
83    PortGroup qt4 1.0
84
85    # tell configure to make the wizard app
86    configure.args-append       --with-doxywizard
87
88        # on Macs, qmake builds .app directories; when installing, copy
89        # this directory to the correct location (via the reinplace below).
90    patchfiles-append       patch-addon_doxywizard_Makefile.in.diff
91
92    post-patch {
93        # allow for universal building, if desired
94        reinplace "/CONFIG/s@x86 ppc@${qt_arch_types}@" \
95            ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
96
97        # give doxywizard the more mac-like name of DoxyWizard
98        reinplace "/^TARGET\[\[:space:\]\]/s%=.*%= DoxyWizard%" \
99            ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
100
101        # fix final install location
102        reinplace "s|__APPLICATIONS_DIR__|${applications_dir}|" \
103            ${worksrcpath}/addon/doxywizard/Makefile.in
104
105        # allow DESTROOT to work
106        reinplace "s|\$(INSTALL)|\$(DESTDIR)\$(INSTALL)|g" \
107            ${worksrcpath}/addon/doxywizard/Makefile.in
108
109        # use the correct QMAKE command; the other should work, but
110        # this one is guaranteed to.
111        reinplace "s|QMAKE=qmake|QMAKE=${qt_qmake_cmd}|g" \
112            ${worksrcpath}/addon/doxywizard/Makefile.in
113    }
114
115        post-destroot {
116                # allow doxywizard to be called from the command line
117                ln -s ${applications_dir}/DoxyWizard.app/Contents/MacOS/DoxyWizard ${destroot}${prefix}/bin/doxywizard
118        }
119}
120
121# This is a patch written by René Zaumseil that adds Tcl support to Doxygen.
122variant tcl description {Add EXPERIMENTAL support for Tcl (http://wiki.tcl.tk/27011)} {
123    patch_sites         sourceforge:kbskit/doxygen\+tcl
124    patchfiles-append   doxygen\+tcl.patch
125    checksums-append    doxygen\+tcl.patch \
126                        sha1    c9276520bb386f63756def5c064c4756975e06a7 \
127                        rmd160  d3ff1de4a6b75d33655ae44dbe11a60c04224419 \
128}
129
130platform darwin {
131        # Specify the platform explicitly to avoid a universal build.
132        global tmake_conf arch_flags
133
134                set tmake_conf  ${worksrcpath}/tmake/lib/macosx-c++/tmake.conf
135                configure.args-append   --platform macosx-c++
136        if { ![variant_isset universal] } {
137                set arch_flags ${configure.cc_archflags}
138        } else {
139                set arch_flags ${configure.universal_cflags}
140        }
141}
Note: See TracBrowser for help on using the repository browser.