Ignore:
Timestamp:
Sep 20, 2012, 7:39:52 PM (7 years ago)
Author:
michaelld@…
Message:

qt4-mac :

  • bump to 4.8.3_0;
  • disable +framework variant; always install as framework, and use symlinks to populate libraries and headers into ${prefix}/lib and ${prefix}/include;
  • correct patches to work with new version;
  • remove old 10.8 patchfile, and replace with the single remaining patch needed for linking corelib;
  • install private headers for some Qt modules to allow other ports to work fully (e.g., qt4-creator-mac).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/aqua/qt4-mac/Portfile

    r97300 r97950  
    1212name                qt4-mac
    1313conflicts           qt3 qt3-mac qt4-mac-devel
    14 version             4.8.2
    15 revision            3
     14version             4.8.3
    1615categories          aqua
    1716platforms           macosx
     
    2827distname            qt-everywhere-opensource-src-${version}
    2928
    30 checksums           sha1    e1e2edef1d63ed677d6534d32800c2e1f7ad0e73 \
    31                     rmd160  6a15077aee1e84076380787127b80c7bb97ebe86
     29checksums           sha1    bc352a283610e0cd2fe0dbedbc45613844090fcb \
     30                    rmd160  fe56e5da874503a79d6f84a1e15460eba5a6feae
    3231
    3332minimum_xcodeversions   {8 2.5}
     
    206205    patch-src_3rdparty_webkit_Source_WebCore_WebCore.pro.diff
    207206
    208 # Temporary patch to get ML working; some of this is already upstream
    209 # https://codereview.qt-project.org/#change,31759
    210 # See also https://trac.macports.org/ticket/35430
     207# (23) Under 10.8 only: Patch to fix corelib linking
     208
    211209platform darwin 12 {
    212     patchfiles-append patch-EXPERIMENTAL-ML-fixes.diff
    213 }
    214 
    215 # (23) fix Framework directory in MacDeployQt tool
     210    patchfiles-append patch-src_corelib_corelib.pro.diff
     211}
     212
     213# (24) fix Framework directory in MacDeployQt tool
    216214
    217215patchfiles-append   \
     
    390388# -openssl-linked ensures that the MacPorts openssl is used.
    391389#
    392 # -no-framework ensures that this port is installed as separate
    393 #     libraries and headers, with guaranteed locations and names.
     390# -framework ensures that this port is installed as frameworks
     391#     (collections of {library, headers, resources}); in
     392#     post-destroot, link headers and libraries from the frameworks
     393#     into non-framework locations as if "-no-framework" were
     394#     specified.  Some dependent projects will not work properly if Qt
     395#     is installed as libraries by default, thus make it so #1.
    394396#
    395397# -no-phonon ensures that Qt does not install the 3rd-parth Phonon
     
    419421    -fast                                                 \
    420422    -optimized-qmake                                      \
    421     -no-framework                                         \
     423    -framework                                            \
    422424    -no-phonon                                            \
    423425    -no-phonon-backend
     
    572574    }
    573575
    574     if {![variant_isset framework]} {
    575 
    576         # if not doing framework install: install qt_menu.nib, used by
    577         # any applications making use of Qt's application class
    578 
    579         xinstall -m 755 -d ${destroot_qt}/lib/Resources
    580         copy ${worksrcpath}/src/gui/mac/qt_menu.nib \
    581             ${destroot_qt}/lib/Resources
    582 
    583     } else {
    584 
    585         # remove -L entries from .prl, and .la files; this is a
    586         # framework install, not a library install
    587 
    588         foreach fixfile [exec find ${destroot_qt} -name "*.prl"] {
    589             reinplace "/QMAKE_PRL_LIBS/s|-L\[^ \]*||g" ${fixfile}
    590         }
    591         foreach fixfile [exec find ${destroot_qt} -name "*.la"] {
    592             reinplace "/dependency_libs/s|-L\[^ \]*||g" ${fixfile}
    593         }
    594 
    595         # remove redundant -F${prefix}/Library/Frameworks entries
    596 
    597         foreach fixfile [exec find ${destroot_qt} -name "*.prl"] {
    598             reinplace "/QMAKE_PRL_LIBS/s|-F\[^ \]*|FREPLACEME|1" \
    599                 ${fixfile}
    600             reinplace "/QMAKE_PRL_LIBS/s|-F\[^ \]*||g" ${fixfile}
    601             reinplace "s|FREPLACEME|-F${prefix}/Library/Frameworks|1" \
    602                 ${fixfile}
    603         }
    604         foreach fixfile [exec find ${destroot_qt} -name "*.la"] {
    605             reinplace "/dependency_libs/s|-F\[^ \]*|FREPLACEME|1" \
    606                 ${fixfile}
    607             reinplace "/dependency_libs/s|-F\[^ \]*||g" ${fixfile}
    608             reinplace "s|FREPLACEME|-F${prefix}/Library/Frameworks|1" \
    609                 ${fixfile}
    610         }
    611 
    612         # move .pc files from ${qt_frameworks_dir}/pkgconfig to
    613         # ${qt_pkg_config_dir}
    614 
    615         file delete -force ${destroot}${qt_pkg_config_dir}
    616         xinstall -m 755 -d ${destroot}${qt_libs_dir}
    617         move ${destroot}${qt_frameworks_dir}/pkgconfig \
    618             ${destroot}${qt_libs_dir}
     576    # remove -L entries from .prl, and .la files; this is a
     577    # framework install, not a library install
     578
     579    foreach fixfile [exec find ${destroot_qt} -name "*.prl"] {
     580        reinplace "/QMAKE_PRL_LIBS/s|-L\[^ \]*||g" ${fixfile}
     581    }
     582    foreach fixfile [exec find ${destroot_qt} -name "*.la"] {
     583        reinplace "/dependency_libs/s|-L\[^ \]*||g" ${fixfile}
     584    }
     585
     586    # remove redundant -F${prefix}/Library/Frameworks entries
     587
     588    foreach fixfile [exec find ${destroot_qt} -name "*.prl"] {
     589        reinplace "/QMAKE_PRL_LIBS/s|-F\[^ \]*|FREPLACEME|1" \
     590            ${fixfile}
     591        reinplace "/QMAKE_PRL_LIBS/s|-F\[^ \]*||g" ${fixfile}
     592        reinplace "s|FREPLACEME|-F${prefix}/Library/Frameworks|1" \
     593            ${fixfile}
     594    }
     595    foreach fixfile [exec find ${destroot_qt} -name "*.la"] {
     596        reinplace "/dependency_libs/s|-F\[^ \]*|FREPLACEME|1" \
     597            ${fixfile}
     598        reinplace "/dependency_libs/s|-F\[^ \]*||g" ${fixfile}
     599        reinplace "s|FREPLACEME|-F${prefix}/Library/Frameworks|1" \
     600            ${fixfile}
     601    }
     602
     603    # move .pc files from ${qt_frameworks_dir}/pkgconfig to
     604    # ${qt_pkg_config_dir}
     605
     606    file delete -force ${destroot}${qt_pkg_config_dir}
     607    xinstall -m 755 -d ${destroot}${qt_libs_dir}
     608    move ${destroot}${qt_frameworks_dir}/pkgconfig \
     609        ${destroot}${qt_libs_dir}
     610
     611    # get Qt's version numbers
     612
     613    set qt_vers [split ${version} "."]
     614    set qt_major [lindex ${qt_vers} 0]
     615    set qt_minor [lindex ${qt_vers} 1]
     616    set qt_patch [lindex ${qt_vers} 2]
     617
     618    # link includes and libraries for each actual installed framework
     619
     620    foreach fixfile [exec find ${destroot}${qt_frameworks_dir} \
     621                         -name "*.framework" | \
     622                         sed -e "s@${destroot}@@g"] {
     623
     624        set tf_full [strsed ${fixfile} {s@\\.framework@@}]
     625        set tf [strsed ${tf_full} {g@.*\/@@}]
    619626
    620627        # link headers into ${qt_includes_dir}, removing directories
    621628        # if they are already there first
    622629
    623         foreach fixfile [exec find ${destroot}${qt_frameworks_dir} \
    624                              -name "*.framework" | \
    625                              sed -e "s@${destroot}@@g"] {
    626             set tf_full [strsed ${fixfile} {s@\\.framework@@}]
    627             set tf [strsed ${tf_full} {g@.*\/@@}]
    628             set inc_file ${destroot}${qt_includes_dir}/${tf}
    629             if {[file exists ${inc_file}]} {
    630                 file delete -force ${inc_file}
    631             }
    632             ln -s ${tf_full}.framework/Headers ${inc_file}
     630        set inc_file ${destroot}${qt_includes_dir}/${tf}
     631        if {[file exists ${inc_file}]} {
     632            file delete -force ${inc_file}
    633633        }
     634        ln -s ${tf_full}.framework/Headers ${inc_file}
     635
     636        # link libraries into ${qt_libs_dir}, all 4 number variants as
     637        # well as the .prl and .la files
     638
     639        set libs_dir ${destroot}${qt_libs_dir}
     640
     641        ln -s ${tf_full}.framework/${tf}.prl ${libs_dir}/lib${tf}.prl
     642        ln -s ${tf_full}.la ${libs_dir}/lib${tf}.la
     643        ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.dylib
     644        ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.${qt_major}.dylib
     645        ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.${qt_major}.${qt_minor}.dylib
     646        ln -s ${tf_full}.framework/${tf} ${libs_dir}/lib${tf}.${qt_major}.${qt_minor}.${qt_patch}.dylib
     647
    634648    }
    635649
    636650    # Install documentation.
     651
    637652    xinstall -m 755 -d ${worksrcpath}/${qt_docs_dir}
    638653    xinstall -m 644 -W ${worksrcpath} \
     
    641656        ${destroot}${qt_docs_dir}
    642657
     658    # Install private headers needed by QtCreator
     659
     660    foreach {src_dir include_dir} \
     661    {corelib QtCore gui QtGui script QtScript declarative QtDeclarative} {
     662        set dest_dir ${destroot}${qt_frameworks_dir}/${include_dir}.framework/Headers/private
     663        xinstall -m 755 -d ${dest_dir}
     664        set files [exec find ${worksrcpath}/src/${src_dir} -type f -name "*_p.h"]
     665        eval xinstall -m 644 [split ${files}] ${dest_dir}
     666    }
     667
    643668    # Move .apps into the applications_dir
     669
    644670    xinstall -m 755 -d ${destroot}${qt_apps_dir}
    645671    foreach app [glob ${destroot}/${qt_bins_dir}/*.app] {
     
    663689}
    664690
    665 variant framework description {Build as Frameworks} {
    666     configure.args-delete -no-framework
    667     configure.args-append -framework
     691variant framework description {Framework Legacy Compatibility Variant} {
     692    ui_error "${name} variant +framework has been disabled because ${name} now installs as both libraries and frameworks.  Please install ${name} without +framework."
     693    return -code error "Variant disabled"
    668694}
    669695
Note: See TracChangeset for help on using the changeset viewer.