Ticket #25769: Portfile.diff

File Portfile.diff, 3.5 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 14 years ago)
  • Portfile

    old new  
    3636depends_build-append    bin:perl:perl5 bin:flex:flex bin:bison:bison bin:ginstall:coreutils
    3737depends_lib             port:libpng path:bin/dot:graphviz port:libiconv
    3838
    39 universal_variant no
     39use_parallel_build  no
     40configure.universal_args-delete --disable-dependency-tracking
    4041
    4142configure.pre_args      --prefix ${prefix}
    4243configure.args          --docdir ${prefix}/share/doc --dot ${prefix}/bin/dot
    4344
    4445post-patch {
    4546        # ensure correct compilers and compiler options are used
    46         reinplace "/^TMAKE_CC\[\[:space:\]\]/s%=.*%= ${configure.cc} ${configure.cppflags}%" ${tmake_conf}
    47         reinplace "/^TMAKE_CXX\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.cppflags}%" ${tmake_conf}
    48         reinplace "/^TMAKE_LINK\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.ldflags}%" ${tmake_conf}
    49         reinplace "/^TMAKE_LINK_SHLIB\[\[:space:\]\]/s%=.*%= ${configure.cxx}%" ${tmake_conf}
     47        reinplace "/^TMAKE_CC\[\[:space:\]\]/s%=.*%= ${configure.cc} ${configure.cppflags} ${arch_flags}%" ${tmake_conf}
     48        reinplace "/^TMAKE_CXX\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.cppflags} ${arch_flags}%" ${tmake_conf}
     49        reinplace "/^TMAKE_LINK\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.ldflags} ${arch_flags}%" ${tmake_conf}
     50        reinplace "/^TMAKE_LINK_SHLIB\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${arch_flags}%" ${tmake_conf}
    5051
    5152        # may not be strictly necessary, but remove trailing '/' from DESTDIR
    5253        reinplace "s|\$(DESTDIR)/|\$(DESTDIR)|g" ${worksrcpath}/Makefile.in
     
    8283        post-patch {
    8384          reinplace "s|/Developer/qt-4.4.3|${prefix}/libexec/qt4-mac|g" ${worksrcpath}/addon/doxywizard/Makefile.doxywizard
    8485    reinplace "s|/Developer/qt/bin/moc|${prefix}/libexec/qt4-mac/bin/moc|g" ${worksrcpath}/addon/doxywizard/Makefile.doxywizard
    85     reinplace "s|-arch ppc -arch i386|-arch ${build_arch}|g" ${worksrcpath}/addon/doxywizard/Makefile.doxywizard
    8686    reinplace "s|/Developer/qt/bin/qmake|${prefix}/libexec/qt4-mac/bin/qmake|g" ${worksrcpath}/addon/doxywizard/Makefile.doxywizard
    8787                # give doxywizard the more mac-like name of DoxyWizard
    8888                reinplace "/^TARGET\[\[:space:\]\]/s%=.*%= DoxyWizard%" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
    89                 reinplace "/^macx-g++\[\[:space:\]\]{/,/}/d" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
    9089                reinplace "s|__APPLICATIONS_DIR__|${applications_dir}|" ${worksrcpath}/addon/doxywizard/Makefile.in
    9190                reinplace "s|\$(INSTALL)|\$(DESTDIR)\$(INSTALL)|g" ${worksrcpath}/addon/doxywizard/Makefile.in
    9291                reinplace "s|QMAKE=qmake|QMAKE=${prefix}/libexec/qt4-mac/bin/qmake|g" ${worksrcpath}/addon/doxywizard/Makefile.in
     92
     93                if { ![variant_isset universal] } {
     94                        reinplace "s|x86 ppc|[string map {i386 x86} ${build_arch}]|g" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
     95                } else {
     96                        reinplace "s|x86 ppc|[string map {i386 x86} ${universal_archs}]|g" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in
     97                }
    9398        }
    9499
    95100        post-destroot {
     
    100105
    101106platform darwin {
    102107        # Specify the platform explicitly to avoid a universal build.
    103         global tmake_conf
     108        global tmake_conf arch_flags
    104109
    105         #if { ![variant_isset universal] } {
    106110                set tmake_conf  ${worksrcpath}/tmake/lib/macosx-c++/tmake.conf
    107111                configure.args-append   --platform macosx-c++
    108         #} else {
    109         #       set tmake_conf  ${worksrcpath}/tmake/lib/macosx-uni-c++/tmake.conf
    110         #       configure.args-append   --platform macosx-uni-c++
    111         #}
     112        if { ![variant_isset universal] } {
     113                set arch_flags ${configure.cc_archflags}
     114        } else {
     115                set arch_flags ${configure.universal_cflags}
     116        }
    112117}