Revision: 70433 http://trac.macports.org/changeset/70433 Author: michaelld@macports.org Date: 2010-08-09 10:29:03 -0700 (Mon, 09 Aug 2010) Log Message: ----------- Revision bump for changes to take effect. Moved from variants "no_FOO" to "FOO", to bring up to qt4-mac-devel. Implemented better ways to find files for reinplace. Fix issue where .../share/qt4-mac was removed in destroot. Modified Paths: -------------- trunk/dports/aqua/qt4-mac/Portfile Modified: trunk/dports/aqua/qt4-mac/Portfile =================================================================== --- trunk/dports/aqua/qt4-mac/Portfile 2010-08-09 17:28:29 UTC (rev 70432) +++ trunk/dports/aqua/qt4-mac/Portfile 2010-08-09 17:29:03 UTC (rev 70433) @@ -11,7 +11,7 @@ name ${select_name} version 4.6.3 -revision 4 +revision 5 categories aqua platforms macosx maintainers michaelld @@ -101,7 +101,7 @@ configure.args \ -v \ - -debug-and-release \ + -release \ -confirm-license \ -opensource \ -prefix ${qt_dir} \ @@ -114,7 +114,10 @@ -dbus-linked \ -pch \ -fast \ + -nomake demos \ + -nomake examples \ -optimized-qmake \ + -framework \ -arch \"${build_arch}\" # Stop configure script from searching for SQL Drivers @@ -190,19 +193,26 @@ configure.args-append -graphicssystem raster } -variant no_demos description {Do not build demos} { - configure.args-append -nomake demos +variant demos description {Build demos} { + configure.args-delete -nomake demos } -variant no_examples description {Do not build examples} { - configure.args-append -nomake examples +variant examples description {Build examples} { + configure.args-delete -nomake examples } -variant no_debug description {Do not include debugging libraries and pkgconfig files} { - configure.args-delete -debug-and-release - configure.args-append -release +variant debug description \ +{Build both release and debug library} { + configure.args-delete -release + configure.args-append -debug-and-release } +variant no_framework description \ +{Build as libraries, not as framework} { + configure.args-delete -framework + configure.args-append -no-framework +} + variant universal { configure.universal_args-delete --disable-dependency-tracking configure.args-delete -arch \"${build_arch}\" @@ -274,7 +284,8 @@ set destroot_qt ${destroot}${qt_dir} # Fix .pc and .prl files by changing ${worksrcpath}/lib to ${qt_dir}/lib - foreach fixfile [glob -nocomplain -directory ${destroot} ${qt_dir}/lib/pkgconfig/* ${qt_dir}/lib/*.prl ${qt_dir}/lib/*/*.prl ${qt_dir}/share/${dirname}/demos/shared/*.prl] { + foreach fixfile [exec find -E ${destroot_qt} \ + -regex "\[^ \]*\\.\(pc|prl\)"] { reinplace "s|${worksrcpath}/lib|${qt_dir}/lib|g" ${fixfile} } @@ -291,22 +302,22 @@ delete ${destroot_qt}/include/Qt } - # (2) remove from ${qt_dir}/include/FOO, for each FOO in the - # frameworks, and link into the headers provided by the FOO framework - foreach fms [glob -nocomplain -directory ${destroot} \ - ${qt_dir}/lib/*.framework] { - # 0: split the framework abs path using '/' - set tmp [split ${fms} /] - # 1: retrieve the framework name - set tfm [lindex [split [lindex ${tmp} [expr [llength ${tmp}] - 1]] .] 0] - # 2: remove the include directory, if it exists - if {[file exists ${destroot_qt}/include/${tfm}] } { - # if it exists - delete ${destroot_qt}/include/${tfm} + # (2) If using the framework install: remove from + # ${qt_dir}/include/FOO, for each FOO in the frameworks, and link + # into the headers provided by the FOO framework + if {![variant_isset no_framework]} { + foreach tfm [exec find ${destroot}${qt_dir}/lib -name "*.framework" \ + -type d -depth 1 | sed -e "s@\.framework@@g" \ + -e "s@${destroot}${qt_dir}/lib/@@g"] { + # remove the include directory, if it exists + if {[file exists ${destroot_qt}/include/${tfm}] } { + # if it exists + delete ${destroot_qt}/include/${tfm} + } + # link into the framework's Headers + ln -s ${qt_dir}/lib/${tfm}.framework/Headers \ + ${destroot_qt}/include/${tfm} } - # 3: link into the framework's Headers - ln -s ${qt_dir}/lib/${tfm}.framework/Headers \ - ${destroot_qt}/include/${tfm} } # install the select file @@ -318,21 +329,21 @@ # these here instead of in the variants because I don't know which # are executed first (this post-destroot or a variant's) & the # select file needs to be in place first. - if {[variant_isset no_debug]} { + if {![variant_isset debug]} { # remove select entries for debug reinplace "/debug/ c\\\n-\n" \ ${destroot}${prefix}/etc/select/${select_group}/${select_name} } - if {[variant_isset no_demos]} { + if {![variant_isset demos]} { # remove select entries for demos reinplace "/demo/ c\\\n-\n" \ ${destroot}${prefix}/etc/select/${select_group}/${select_name} # special case: if no examples and no demos, - if {[variant_isset no_examples]} { - # remove select entry for share/qt4-mac - reinplace "/share\\/qt4-mac/ c\\\n-\n" \ - ${destroot}${prefix}/etc/select/${select_group}/${select_name} + if {![variant_isset examples]} { + # the directory "share/${name}" will be empty. keep it + # around since other ports might install into it. + destroot.keepdirs ${destroot}${destroot_qt}/share/${name} } } }
participants (1)
-
michaelld@macports.org