Revision: 70197 http://trac.macports.org/changeset/70197 Author: jmr@macports.org Date: 2010-08-01 11:57:04 -0700 (Sun, 01 Aug 2010) Log Message: ----------- doxygen: add universal and build_arch support (#25769) Modified Paths: -------------- trunk/dports/textproc/doxygen/Portfile Modified: trunk/dports/textproc/doxygen/Portfile =================================================================== --- trunk/dports/textproc/doxygen/Portfile 2010-08-01 18:36:20 UTC (rev 70196) +++ trunk/dports/textproc/doxygen/Portfile 2010-08-01 18:57:04 UTC (rev 70197) @@ -35,17 +35,17 @@ depends_build-append bin:perl:perl5 bin:flex:flex bin:bison:bison bin:ginstall:coreutils depends_lib port:libpng path:bin/dot:graphviz port:libiconv -universal_variant no +configure.universal_args-delete --disable-dependency-tracking configure.pre_args --prefix ${prefix} configure.args --docdir ${prefix}/share/doc --dot ${prefix}/bin/dot post-patch { # ensure correct compilers and compiler options are used - reinplace "/^TMAKE_CC\[\[:space:\]\]/s%=.*%= ${configure.cc} ${configure.cppflags}%" ${tmake_conf} - reinplace "/^TMAKE_CXX\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.cppflags}%" ${tmake_conf} - reinplace "/^TMAKE_LINK\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.ldflags}%" ${tmake_conf} - reinplace "/^TMAKE_LINK_SHLIB\[\[:space:\]\]/s%=.*%= ${configure.cxx}%" ${tmake_conf} + reinplace "/^TMAKE_CC\[\[:space:\]\]/s%=.*%= ${configure.cc} ${configure.cppflags} ${arch_flags}%" ${tmake_conf} + reinplace "/^TMAKE_CXX\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.cppflags} ${arch_flags}%" ${tmake_conf} + reinplace "/^TMAKE_LINK\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${configure.ldflags} ${arch_flags}%" ${tmake_conf} + reinplace "/^TMAKE_LINK_SHLIB\[\[:space:\]\]/s%=.*%= ${configure.cxx} ${arch_flags}%" ${tmake_conf} # may not be strictly necessary, but remove trailing '/' from DESTDIR reinplace "s|\$(DESTDIR)/|\$(DESTDIR)|g" ${worksrcpath}/Makefile.in @@ -83,14 +83,18 @@ post-patch { reinplace "s|/Developer/qt-4.4.3|${prefix}/libexec/qt4-mac|g" ${worksrcpath}/addon/doxywizard/Makefile.doxywizard reinplace "s|/Developer/qt/bin/moc|${prefix}/libexec/qt4-mac/bin/moc|g" ${worksrcpath}/addon/doxywizard/Makefile.doxywizard - reinplace "s|-arch ppc -arch i386|-arch ${build_arch}|g" ${worksrcpath}/addon/doxywizard/Makefile.doxywizard reinplace "s|/Developer/qt/bin/qmake|${prefix}/libexec/qt4-mac/bin/qmake|g" ${worksrcpath}/addon/doxywizard/Makefile.doxywizard # give doxywizard the more mac-like name of DoxyWizard reinplace "/^TARGET\[\[:space:\]\]/s%=.*%= DoxyWizard%" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in - reinplace "/^macx-g++\[\[:space:\]\]{/,/}/d" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in reinplace "s|__APPLICATIONS_DIR__|${applications_dir}|" ${worksrcpath}/addon/doxywizard/Makefile.in reinplace "s|\$(INSTALL)|\$(DESTDIR)\$(INSTALL)|g" ${worksrcpath}/addon/doxywizard/Makefile.in reinplace "s|QMAKE=qmake|QMAKE=${prefix}/libexec/qt4-mac/bin/qmake|g" ${worksrcpath}/addon/doxywizard/Makefile.in + + if { ![variant_isset universal] } { + reinplace "s|x86 ppc|[string map {i386 x86} ${build_arch}]|g" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in + } else { + reinplace "s|x86 ppc|[string map {i386 x86} ${universal_archs}]|g" ${worksrcpath}/addon/doxywizard/doxywizard.pro.in + } } post-destroot { @@ -101,13 +105,13 @@ platform darwin { # Specify the platform explicitly to avoid a universal build. - global tmake_conf + global tmake_conf arch_flags - #if { ![variant_isset universal] } { set tmake_conf ${worksrcpath}/tmake/lib/macosx-c++/tmake.conf configure.args-append --platform macosx-c++ - #} else { - # set tmake_conf ${worksrcpath}/tmake/lib/macosx-uni-c++/tmake.conf - # configure.args-append --platform macosx-uni-c++ - #} + if { ![variant_isset universal] } { + set arch_flags ${configure.cc_archflags} + } else { + set arch_flags ${configure.universal_cflags} + } }