Ticket #20448: doxygen-Portfile.diff

File doxygen-Portfile.diff, 5.3 KB (added by ccorn@…, 15 years ago)

Changes to the Portfile

  • Portfile

     
    99maintainers             css
    1010description             Documentation system for several programming languages
    1111long_description \
    12         It can generate an on-line documentation browser (in HTML) and/or an \
    13         off-line reference manual from a set of documented source files. \
     12        Doxygen can generate an on-line documentation browser (in HTML) and/or \
     13        an off-line reference manual from a set of documented source files. \
    1414        There is also support for generating output in RTF (MS-Word), \
    1515        PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The \
    1616        documentation is extracted directly from the sources, which makes it \
     
    3232                        sha1 6211b850bdaa2198e35546e4299a27774c957ece \
    3333                        rmd160 51d79c0f8846f47e9aa8c37cd0eb9db630491885
    3434
    35 depends_build-append    bin:perl:perl5 bin:flex:flex bin:bison:bison bin:ginstall:coreutils
     35depends_build-append    bin:perl:perl5 bin:flex:flex bin:bison:bison
    3636depends_lib             port:libpng path:bin/dot:graphviz port:libiconv
    3737
    3838universal_variant no
    3939
    4040configure.pre_args      --prefix ${prefix}
    41 configure.args          --docdir ${prefix}/share/doc --dot ${prefix}/bin/dot
     41configure.args          --docdir ${prefix}/share/doc --dot ${prefix}/bin/dot \
     42                        --install /usr/bin/install
    4243
    4344post-patch {
    4445        # ensure correct compilers and compiler options are used
    45         reinplace "/^TMAKE_CC\[\[:space:\]\]/s%=.*%= ${configure.cc} ${configure.cppflags}%" ${tmake_conf}
    46         reinplace "/^TMAKE_CXX\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.cppflags}%" ${tmake_conf}
    47         reinplace "/^TMAKE_LINK\[\[:space:\]\]/s%=.*%= ${configure.cxx}%" ${tmake_conf}
    48         reinplace "/^TMAKE_LINK_SHLIB\[\[:space:\]\]/s%=.*%= ${configure.cxx}%" ${tmake_conf}
    49 
     46        if {${os.platform} eq "darwin"} {
     47          # Specify the platform explicitly to avoid a universal build.
     48          if { ![variant_isset universal] } {
     49            set tmake_platform macosx-c++
     50          } else {
     51            set tmake_platform macosx-uni-c++
     52          }
     53          configure.args-append --platform ${tmake_platform}
     54          set tmake_conf ${worksrcpath}/tmake/lib/${tmake_platform}/tmake.conf
     55          reinplace "/^TMAKE_CC\[\[:space:\]\]/s%=.*%= ${configure.cc} ${configure.cppflags}%" ${tmake_conf}
     56          reinplace "/^TMAKE_CXX\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.cppflags}%" ${tmake_conf}
     57          reinplace "/^TMAKE_LINK\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.ldflags}%" ${tmake_conf}
     58          reinplace "/^TMAKE_LINK_SHLIB\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.ldflags}%" ${tmake_conf}
     59          # give doxywizard the more mac-like name of DoxyWizard
     60          reinplace "/^TARGET\[\[:space:\]\]/s%=.*%= DoxyWizard%" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
     61          # Set installation path for apps
     62          reinplace "s|__APPLICATIONS_DIR__|${applications_dir}|" ${worksrcpath}/addon/doxywizard/Makefile.in
     63        }
    5064        # may not be strictly necessary, but remove trailing '/' from DESTDIR
    5165        reinplace "s|\$(DESTDIR)/|\$(DESTDIR)|g" ${worksrcpath}/Makefile.in
     66        # Use DESTDIR in doxywizard's Makefile
     67        reinplace "s|\$(INSTALL)|\$(DESTDIR)\$(INSTALL)|g" ${worksrcpath}/addon/doxywizard/Makefile.in
    5268}
    5369
    5470build.target            all
     
    5874                        DOCDIR=${prefix}/share/doc/doxygen \
    5975                        MAN1DIR=share/man/man1
    6076
     77post-destroot {
     78        if {[variant_isset wizard]} {
     79                # allow doxywizard to be called from the command line
     80                ln -s ${applications_dir}/DoxyWizard.app/Contents/MacOS/DoxyWizard ${destroot}${prefix}/bin/doxywizard
     81        }
     82}
     83
    6184variant docs description {Include the doxygen PDF documentation and LaTeX} {
    6285        build.target-append     pdf
    6386        destroot.target-append  install_docs
     
    6891variant wizard description {Include the GUI wizard based on Qt} {
    6992        configure.env-append    QTDIR=${prefix}/libexec/qt4-mac
    7093        build.env-append        QTDIR=${prefix}/libexec/qt4-mac
     94        # qt4-mac seems to add -lpng without -L${prefix}/lib
     95        build.env-append        LIBRARY_PATH=${prefix}/lib
    7196        depends_lib-append      port:qt4-mac
    7297        configure.args-append   --with-doxywizard
    73 
    74         # on Macs, qmake builds .app directories
    75         patchfiles-append       patch-Makfile.in.diff
    76 
    77         post-patch {
    78                 # give doxywizard the more mac-like name of DoxyWizard
    79                 reinplace "/^TARGET\[\[:space:\]\]/s%=.*%= DoxyWizard%" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
    80 
    81                 reinplace "s|__APPLICATIONS_DIR__|${applications_dir}|" ${worksrcpath}/addon/doxywizard/Makefile.in
    82                 reinplace "s|\$(INSTALL)|\$(DESTDIR)\$(INSTALL)|g" ${worksrcpath}/addon/doxywizard/Makefile.in
     98        # Avoid multi-architecture builds unless explicitly requested
     99        if {![variant_isset universal]} {
     100          patchfiles-append     patch-addon-doxywizard-doxywizard.pro.in
    83101        }
    84 
    85         post-destroot {
    86                 # allow doxywizard to be called from the command line
    87                 ln -s ${applications_dir}/DoxyWizard.app/Contents/MacOS/DoxyWizard ${destroot}${prefix}/bin/doxywizard
    88         }
    89102}
    90103
    91104platform darwin {
    92         # Specify the platform explicitly to avoid a universal build.
    93         global tmake_conf
    94 
    95         if { ![variant_isset universal] } {
    96                 set tmake_conf  ${worksrcpath}/tmake/lib/macosx-c++/tmake.conf
    97                 configure.args-append   --platform macosx-c++
    98         } else {
    99                 set tmake_conf  ${worksrcpath}/tmake/lib/macosx-uni-c++/tmake.conf
    100                 configure.args-append   --platform macosx-uni-c++
    101         }
     105        # on Macs, qmake builds .app directories; add install command
     106        patchfiles-append       patch-Makfile.in.diff
    102107}
    103108
    104109platform darwin 10 {