Revision: 72809 http://trac.macports.org/changeset/72809 Author: michaelld@macports.org Date: 2010-10-27 13:24:41 -0700 (Wed, 27 Oct 2010) Log Message: ----------- qscintilla: +universal now -really- works, for both the library and plugin. When using QMake's "CONFIG +=", have to translate between MacPorts' arch type "i386" -> Qt type "x86"; the other types are the same, so there's probably a better way to do this ... but it works. Modified Paths: -------------- trunk/dports/devel/qscintilla/Portfile Modified: trunk/dports/devel/qscintilla/Portfile =================================================================== --- trunk/dports/devel/qscintilla/Portfile 2010-10-27 20:10:09 UTC (rev 72808) +++ trunk/dports/devel/qscintilla/Portfile 2010-10-27 20:24:41 UTC (rev 72809) @@ -6,7 +6,7 @@ name qscintilla version 2.4.5 -revision 2 +revision 3 categories devel maintainers adfernandes openmaintainer description QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor control. @@ -42,12 +42,26 @@ universal_variant yes post-patch { - # allow for universal building, if desired - if { [variant_isset universal] } { - reinplace "s@CONFIG += qt @CONFIG += qt ${universal_archs} @" ${worksrcpath}/Qt4/qscintilla.pro + if {[variant_exists universal] && [variant_isset universal]} { + # set universal arch types, depending on what the user has specified + array set macports_to_qt_build_arch { + ppc ppc + i386 x86 + ppc64 ppc64 + x86_64 x86_64 + } + set arch_types "" + foreach arch ${universal_archs} { + lappend arch_types $macports_to_qt_build_arch($arch) + } + set ARCHES [join ${arch_types} " "] + reinplace "s@CONFIG += @CONFIG += ${ARCHES} @" \ + ${worksrcpath}/Qt4/qscintilla.pro + reinplace "s@CONFIG += @CONFIG += ${ARCHES} @" \ + ${worksrcpath}/designer-Qt4/designer.pro } - + # fix up 'Platform.h's, to avoid a conflict with the port 'tidy's # 'platform.h'. reinplace "/INCLUDEPATH/s@ \\. @ . .. @" \ @@ -55,7 +69,6 @@ foreach fixfile [exec grep -lr \"Platform\.h\" ${worksrcpath}] { reinplace "s@\"Platform\.h\"@\"include/Platform\.h\"@g" ${fixfile} } - } configure.cmd "cd ${worksrcpath}/Qt4; ${qt_qmake_cmd} qscintilla.pro; \