Ticket #48231: Portfile-doxygen.diff

File Portfile-doxygen.diff, 6.4 KB (added by Schamschula (Marius Schamschula), 9 years ago)
  • Portfile

    old new  
    22# $Id: Portfile 133907 2015-03-15 18:30:05Z ryandesign@macports.org $
    33
    44PortSystem              1.0
     5PortGroup               cmake 1.0
    56
    67name                    doxygen
    7 version                 1.8.9.1
     8version                 1.8.10
    89categories              textproc devel
    910maintainers             css openmaintainer
    1011license                 GPL-2
     
    3536distfiles               ${distname}.src${extract.suffix}
    3637
    3738checksums               ${distname}.src${extract.suffix} \
    38                         rmd160  103d45b36129a0a04b809050b7251acf6f9dacde \
    39                         sha256  d4ab6e28d4d45d8956cad17470aade3fbe2356e8f64b92167e738c1887feccec
     39                        rmd160  be064f0e8f00e6e20ed7c128f595e7010be1f23a \
     40                        sha256  cedf78f6d213226464784ecb999b54515c97eab8a2f9b82514292f837cf88b93
    4041
    4142depends_build-append    bin:perl:perl5 \
    4243                        bin:python2.7:python27 \
     
    4445                        port:bison
    4546license_noconflict      perl5 python27
    4647
    47 depends_lib             port:libpng \
    48                         port:libiconv
     48depends_lib             port:libpng
     49
     50patchfiles              patch-src-portable_c.c.diff
    4951
    5052post-extract {
    5153    # Use our flex
     
    7981    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
    8082}
    8183
    82 patchfiles              patch-configure.diff
    83 post-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 
    113 build.type              gnu
    114 
    115 configure.universal_args-delete \
    116                         --disable-dependency-tracking
    117 configure.pre_args      --prefix ${prefix}
    118 configure.args          --make ${build.cmd} \
    119                         --python python2.7
    120 
    121 build.target            all
    122 
    123 destroot.target         install
    12484destroot.args           INSTALL=${prefix} \
    12585                        DOCDIR=${prefix}/share/doc/doxygen \
    12686                        MAN1DIR=share/man/man1
    12787
    128 variant 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
     88variant docs description {Include the doxygen HTML and PDF documentation} {
     89    configure.args-append   -Dbuild_doc=YES \
     90                            -EPSTOPDF=${prefix}/bin/epstopdf
    13791
    138     destroot.target-append  install_docs
    139 }
     92    patchfiles-append       patch-doc-CMakeLists.txt.diff \
     93                            patch-examples-CMakeLists.txt.diff
    14094
    141 variant latex description {Support LaTeX/PDF doxygen output} {
    142     depends_build-append    bin:pdflatex:texlive-latex \
     95    depends_build-append    path:bin/dot:graphviz \
    14396                            bin:gs:ghostscript \
     97                            port:texlive \
    14498                            port:texlive-latex-extra
     99
     100    build.target-append     docs
     101    use_parallel_build      no
    145102}
    146103
    147104variant wizard description {Include the GUI wizard based on Qt4} {
     
    150107    PortGroup qt4 1.0
    151108
    152109    # 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 
    184 platform 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++
     110    configure.args-append   -Dbuild_wizard=YES
    190111}
    191112
    192113livecheck.type          regex