Ticket #47416: qt4-mac-devel.diff
File qt4-mac-devel.diff, 259.8 KB (added by RJVB (René Bertin), 10 years ago) |
---|
-
aqua/qt4-mac-devel/Portfile
diff --git a/aqua/qt4-mac-devel/Portfile b/aqua/qt4-mac-devel/Portfile index 073952a..ccad104 100644
a b 1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 2 # $Id: Portfile 99527 2012-11-08 14:30:05Z michaelld@macports.org $1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4:nomodify 2 # $Id: Portfile 126922 2014-10-17 18:50:56Z ryandesign@macports.org $ 3 3 4 4 PortSystem 1.0 5 5 6 6 name qt4-mac-devel 7 set ver_nums 4.8.3 8 version ${ver_nums} 9 revision 1 10 categories aqua 11 platforms macosx 12 maintainers michaelld openmaintainer 13 license {LGPL-2.1 GPL-3} 7 version 4.8.7 14 8 15 homepage http://qt-project.org 16 description Qt Tool Kit 17 long_description Qt Tool Kit: A cross-platform framework \ 18 (headers, data, and libraries) for writing \ 19 cross-platform GUI-based applications. 20 21 # disable this port for now 22 23 replaced_by qt4-mac 24 25 livecheck.type none 26 27 pre-configure { 28 ui_error "This port has been temporarily replaced by 'qt4-mac'; it will be updated to 5.0 beta or a release candidate hopefully soon." 29 return -code error 9 if {[catch {source "${portpath}/Portfile.qt487"} err]} { 10 puts stderr "Error reading Portfile.qt487: $err" 11 return 1; 30 12 } 31 13 32 distfiles 14 subport ${name}-transitional { 15 conflicts qt3 qt3-mac qt4-mac qt4-mac-sqlite3-plugin qt4-mac-transitional 16 if {[file exists ${prefix}/Library/Frameworks/QtCore.framework/Versions/5/QtCore]} { 17 conflicts qt5-mac 18 } 19 universal_variant no 20 } -
new file aqua/qt4-mac-devel/Portfile.qt487
diff --git a/aqua/qt4-mac-devel/Portfile.qt487 b/aqua/qt4-mac-devel/Portfile.qt487 new file mode 100644 index 0000000..5d1690a
- + 1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4:nomodified 2 # kate: backspace-indents true; indent-pasted-text true; indent-width 4; keep-extra-spaces true; remove-trailing-spaces modified; replace-tabs true; replace-tabs-save true; syntax Tcl/Tk; tab-indents true; tab-width 4; 3 # $Id: Portfile 126922 2014-10-17 18:50:56Z ryandesign@macports.org $ 4 5 # use the qt4 group; set 'building_qt4' so that the portgroup 6 # does not include certain parts 7 set building_qt4 1 8 9 PortGroup qt4 1.0 10 if {[variant_isset exclusive]} { 11 # qt4-mac-devel is "replaced_by" this port, 12 # so this port cannot conflict with it. 13 #conflicts qt3 qt3-mac qt4-mac-devel 14 conflicts qt3 qt3-mac qt5-mac 15 } 16 17 PortGroup xcodeversion 1.0 18 PortGroup compiler_blacklist_versions 1.0 19 20 set branch [qt_branch] 21 22 categories aqua 23 platforms macosx 24 maintainers michaelld gmail.com:rjvbertin openmaintainer 25 license {LGPL-2.1 GPL-3} 26 27 homepage http://qt.io 28 set snapshot 2015-04-07-6 29 description Qt Tool Kit, snapshot ${snapshot} 30 long_description Qt Tool Kit (snapshot ${snapshot}): A cross-platform framework \ 31 (headers, data, and libraries) for writing \ 32 cross-platform GUI-based applications. \ 33 Installs to ${qt_dir} 34 35 distname qt-everywhere-opensource-src-${version} 36 distfiles qt-everywhere-opensource-src-${version}-${snapshot}${extract.suffix} 37 38 master_sites http://download.qt.io/snapshots/qt/${branch}/${version}/${snapshot} 39 40 checksums rmd160 45800f580ea8e20dee30142b14581133307ad4ad \ 41 sha256 d260ea96436510ee7d45ce65eff93e31d23abdca143a40c37345b70dd5813731 42 43 # Qt4 is large enough to extend "base" behaviour transparently, enabling HFS compression. 44 depends_extract-append port:libarchive 45 extract.post_args "| bsdtar -x -k --hfsCompression" 46 47 # post-extract { 48 # ui_msg "patchfiles:\n${patchfiles}" 49 # } 50 51 minimum_xcodeversions {8 2.5} 52 53 depends_lib-append port:zlib path:bin/dbus-daemon:dbus \ 54 port:openssl port:tiff \ 55 port:libpng port:libmng port:jpeg 56 57 # find a way to specify the OS MINOR version. For OSX 10.X, this 58 # value will be X. The type is this variable is integer, so we can 59 # use "==" and so forth for comparison. 60 61 global MINOR 62 set MINOR "" 63 64 # hopefully the MACOSX_DEPLOYMENT_TARGET exists and is set by now. if 65 # not, last resort (which is not desirable) is to use the os.version. 66 67 if {${macosx_deployment_target} ne ""} { 68 set MINOR [lindex [split ${macosx_deployment_target} "."] 1] 69 } else { 70 set MINOR [expr [lindex [split ${os.version} "."] 0] - 4] 71 } 72 73 if {${subport} eq ${name}} { 74 75 PortGroup select 1.0 76 select.group qt 77 select.file ${filespath}/qt4 78 79 ############################################### 80 # Patches are used to both fix compiling on various OS versions, and 81 # to enhance the functionality of QMake and its build files. Some of 82 # these patches are 2-stage: use a file here, and the replace an 83 # @VARIABLE@ in post-patch. There are LOTS of patches, because Qt is 84 # a large, complicated system. 85 86 # (0) Fix the testing script to properly handle both +universal as 87 # well as the native arch for both CXX and CC compiling; also make 88 # sure it does not create a Mac app bundle. 89 90 patchfiles-append patch-config.tests_unix_compile.test.diff 91 92 # (1) Test for Precompiled-headers support (a) requires a C++ 93 # compiler, but configure calls it, by default, with a C compiler; 94 # thus, enable testing using the C compiler. (b) to work with ccache, 95 # if used. 96 97 patchfiles-append patch-config.tests_unix_precomp.test.diff 98 99 # (2) fix 'configure' script: (a) to allow easy replacement of arch 100 # type(s). (b) to find the correct QMAKE CXX compiler by removing 101 # possibilities that include the character "$". (c) to declare, use, 102 # and set QT_INSTALL_FRAMEWORKS and QMAKE_FRAMEWORKDIR_QT, both here 103 # and in the resulting .qmake.cache files. (d) to allow easy 104 # replacement of MACOSX_DEPLOYMENT_TARGET: build for just the user's 105 # current OS. (e) add hooks for C++11 testing. 106 107 patchfiles-append patch-configure.diff 108 109 # (3) (a) Tweak various scripts to allow easy replacement of 110 # MACOSX_DEPLOYMENT_TARGET: build for just the user's current OS. 111 # (b) Assign initial OBJECTIVE_CXXFLAGS. 112 113 patchfiles-append patch-mkspecs_common_g++-macx.conf.diff 114 115 # (4) (a) Allow easy replacement of MACOSX_DEPLOYMENT_TARGET: build 116 # for just the user's current OS; (b) allow QMake to use 'ccache' via, 117 # e.g., "qmake && make CCACHE=ccache". 118 119 patchfiles-append patch-mkspecs_common_mac.conf.diff 120 121 # (5) Place the -I path for local moc-created headers -before- 122 # all other -I paths. 123 124 patchfiles-append patch-mkspecs_features_moc.prf.diff 125 126 # (6) Remove Qt's LIBDIR and INCDIR from various QMake internal 127 # variables, since they are already included in the user-supplied 128 # LIBS and INCLUDEPATH. 129 130 patchfiles-append patch-mkspecs_features_qt.prf.diff 131 132 # (7) (a) Change placement of Qt's LIBDIR and INCDIR, to always be 133 # after those supplied by the user's QMake (.pro) files. By the time 134 # QMake gets to the patched function, it is creating the Makefile 135 # parts to find Qt's headers and libraries, so moving these paths to 136 # this location should always work. (b) If the library is QtWebKit, 137 # and the build is library (no-framework), universal, and debug, then 138 # the linkage is just -lQtWebKit, not -lQtWebKit_debug because the 139 # debug library for 32-bit system cannot be created (too large). 140 141 patchfiles-append patch-mkspecs_features_qt_functions.prf.diff 142 143 # (8) (a) Change "gcc" and "g++" to @'s for replacement in 144 # post-patch; (b) add hooks for C++11. 145 146 patchfiles-append patch-mkspecs_common_g++-base.conf.diff 147 148 # (9) Add default QMake variables for Objective C++. 149 150 patchfiles-append patch-mkspecs_objective_cxx.diff 151 152 # (10) Add "absolute_library_soname" to the default CONFIG variables, 153 # so that when a DYLIB is created, if "target.path" is set for it then 154 # that path is prepended to its "install_name". 155 156 patchfiles-append patch-mkspecs_macx-g++_qmake.conf.diff 157 158 # (11) Add QT_INSTALL_FRAMEWORKS and related variables to QMake, to 159 # provide a default variable for the location of QMake installed 160 # frameworks. 161 162 patchfiles-append \ 163 patch-qmake_option.h.diff \ 164 patch-qmake_property.cpp.diff \ 165 patch-src_corelib_global_qlibraryinfo.cpp.diff \ 166 patch-src_corelib_global_qlibraryinfo.h.diff 167 168 # (12) In QMake, disable default MKSPECS and FEATURES path 169 # concatinations if the shell environment variable QMAKE_NO_DEFAULTS 170 # is set (to anything); we use this variable in this portfile to make 171 # sure only internal paths (to the build) are searched by QMake. 172 173 patchfiles-append patch-qmake_project.cpp.diff 174 175 # (13) In QMake: (a) enable correct "-framework foo,bar" parsing as 176 # specified by Apple's LD; (b) disable "/Library/Frameworks" as a 177 # default search path; use "PREFIX/Library/Frameworks" and replace 178 # PREFIX in post-patch. Also set "PREFIX/lib" as a default library 179 # search path. 180 181 patchfiles-append patch-qmake_generators_unix_unixmakke.cpp.diff 182 183 # (14) Allow easy replacement of MACOSX_DEPLOYMENT_TARGET: build for 184 # just the user's current OS. 185 186 patchfiles-append \ 187 patch-qmake_qmake.pri.diff \ 188 patch-src_tools_bootstrap_bootstrap.pro.diff 189 190 # (15) fix use of CARBON, found on PPC64; does not hurt others 191 192 patchfiles-append \ 193 patch-src_3rdparty_webkit_Source_WebCore_plugins_PluginView.h.diff \ 194 patch-src_3rdparty_webkit_Source_WebCore_plugins_mac_PluginViewMac.mm.diff 195 196 # (16) fix the corewlan qmake file to use non-standard Developer SDK 197 # location under 10.6 and newer, e.g., for some developers doing both 198 # iOS and OSX. This patch does not change behavior for 10.4 or 10.5. 199 # Also include fix to use the correct SDK. 200 201 patchfiles-append patch-src_plugins_bearer_corewlan_corewlan.pro.diff 202 203 # (17) Use the "target.path" for libdir for core libraries instead of 204 # the standard QT_INSTALL_LIBS; allows us to set for library or 205 # framework elsewhere and have the install still work here. 206 207 patchfiles-append patch-src_qbase.pri.diff 208 209 # (18) (a) Disable explicit disabling of framework or static install; 210 # i.e., install as a framework if that mode is selected, and as 211 # library otherwise. (b) If installing as framework, use the new 212 # QT_INSTALL_FRAMEWORKS directory; otherwise, use the old 213 # QT_INSTALL_LIBS; (c) Get PKGCONFIG dependencies correct, hopefully; 214 # (d) create and install .pc, .la, and .prl library description files, 215 # including basic path replacement into DESTDIR; we couple this with a 216 # post-patch to get the correct install location. 217 218 patchfiles-append \ 219 patch-src_qt_install.pri.diff \ 220 patch-tools_assistant_lib_fulltextsearch_fulltextsearch.pro.diff \ 221 patch-tools_assistant_lib_lib.pro.diff \ 222 patch-tools_designer_src_components_lib_lib.pro.diff \ 223 patch-tools_designer_src_lib_lib.pro.diff \ 224 patch-tools_designer_src_uitools_uitools.pro.diff \ 225 patch-mkspecs_features_uitools.prf.diff 226 227 # (19) fix 'macdeployqt' to look for the correct plugins location by 228 # default. This is paired with a "reinplace" in post-patch 229 230 patchfiles-append \ 231 patch-tools_macdeployqt_macdeployqt_main.cpp.diff 232 233 # (20) Under 10.4 only: patch QMake build files using just "-lQtHelp" 234 # to do "-lQtHelp -lQtCLucene -lQtNetwork -lQtWebKit" instead. For 235 # some reason 10.5+ "knows" that how to do this correctly. 236 237 platform darwin { 238 if {${MINOR} == 4} { 239 patchfiles-append patch-QtHelp_10.4_only.diff 240 } 241 } 242 243 # (21) fix the Mac timer's use of "mach_timebase_info" 244 245 patchfiles-append \ 246 patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff 247 248 # (22) Under 10.8 and 10.9: Patch to fix corelib linking 249 250 platform darwin { 251 if {${MINOR} >= 8} { 252 patchfiles-append patch-src_corelib_corelib.pro.diff 253 } 254 } 255 256 # (23) fix Framework directory in MacDeployQt tool 257 258 patchfiles-append \ 259 patch-tools_macdeployqt_shared_shared.cpp.diff 260 261 # # (24) minimum patches required for 10.10; squashed; temporary until 4.8.7. 262 # patchfiles-append \ 263 # patch-10.10.diff 264 265 # (25) avoid leaving zombies when starting an inexisting executable through QProcess 266 patchfiles-append \ 267 qprocess-nozombies.patch 268 269 # (26) don't build with exceptions, which gives a completely ABI-compatible build 270 patchfiles-append disable-exceptions.patch 271 272 # (27) build the qtconfig tool 273 patchfiles-append patch-tools-build_qtconfig.diff 274 } 275 276 # error out if trying to build on a new OSX version (> 10.10). 277 278 platform darwin { 279 if {${MINOR} > 10} { 280 # This project needs to be updated to build with clang++ against libc++ 281 depends_lib 282 depends_run 283 pre-fetch { 284 ui_error "$name does not currently build on OSX later than 10.10 'Yosemite'." 285 error "unsupported platform" 286 } 287 } 288 } 289 290 ############################################### 291 292 # disable CCACHE for now (ticket #34856) 293 294 configure.ccache no 295 296 ## The main port that installs Qt4: 297 if {${subport} eq "${name}"} { 298 299 # find a way to specify the SDK to use; Qt will use the 10.4u by 300 # default which won't work on 10.6 since it is not supported. Allow 301 # the user to specify the SDK if desired. 302 303 global SDK 304 set SDK ${configure.sdkroot} 305 if {${SDK} eq ""} { 306 # set SDK version depending on OS version 307 set sdk_version "" 308 if {${MINOR} == 4} { 309 # OSX 10.4 requires an additional 'u' 310 set sdk_version "10.4u" 311 } else { 312 set sdk_version "10.${MINOR}" 313 } 314 if {[vercmp ${xcodeversion} 4.3] < 0} { 315 set SDK ${developer_dir}/SDKs/MacOSX${sdk_version}.sdk 316 } else { 317 set SDK ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${sdk_version}.sdk 318 } 319 } 320 321 post-patch { 322 # set ARCHES in configure (per the third patchfile above), for 323 # building QMake. join any 2 or more arch entries with the GCC 324 # arch flag (join does not effect a single entry). first "-arch" 325 # is already in place in the 'configure' script (since there has 326 # to be at least 1 arch). 327 328 set ARCHES "" 329 if {[variant_exists universal] && [variant_isset universal]} { 330 set ARCHES [join ${universal_archs} " -arch "] 331 } else { 332 set ARCHES ${build_arch} 333 } 334 reinplace "s|@ARCHES@|${ARCHES}|g" ${worksrcpath}/configure 335 336 # set MACOSX_DEPLOYMENT_TARGET version in various places. These 337 # were all patched in (2) above, and can be easily changed or 338 # overridden by the user in a project-local qmake .pro script. 339 340 set TARGET "10.${MINOR}" 341 foreach fixfile {configure mkspecs/common/g++-macx.conf \ 342 mkspecs/common/mac.conf qmake/qmake.pri \ 343 src/tools/bootstrap/bootstrap.pro } { 344 reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|${TARGET}|g" \ 345 ${worksrcpath}/${fixfile} 346 } 347 348 # Fix OS version on Bearer CoreWLAN QMake file 349 350 reinplace "s|@MACOSX_VERSION_MINOR@|${MINOR}|g" \ 351 ${worksrcpath}/src/plugins/bearer/corewlan/corewlan.pro 352 353 # Ensure that correct C/C++ compilers are used. 354 355 reinplace "s|@CXX@|${configure.cxx}|" \ 356 ${worksrcpath}/mkspecs/common/g++-base.conf 357 reinplace "s|@CC@|${configure.cc}|" \ 358 ${worksrcpath}/mkspecs/common/g++-base.conf 359 360 # fix the corewlan .pro file to use the correct developer SDK 361 362 reinplace "s,@DEVELOPER_SDK@,${SDK},g" \ 363 ${worksrcpath}/src/plugins/bearer/corewlan/corewlan.pro 364 365 # fix 'macdeployqt' to look for the correct 366 # plugins location by default. 367 368 reinplace "s,@QT_PLUGINS_DIR@,${qt_plugins_dir},g" \ 369 ${worksrcpath}/tools/macdeployqt/macdeployqt/main.cpp 370 371 # fix PREFIX in QMake makefile generator 372 373 reinplace "s,@PREFIX@,${qt_dir},g" \ 374 ${worksrcpath}/qmake/generators/unix/unixmake.cpp 375 376 # if no debug, then do not even build debug code 377 378 if {![variant_isset debug]} { 379 foreach fixfile { src/qbase.pri \ 380 src/3rdparty/webkit/Source/WebKit.pri \ 381 src/imports/qimportbase.pri \ 382 src/plugins/qpluginbase.pri \ 383 tools/designer/src/components/lib/lib.pro \ 384 tools/designer/src/lib/lib.pro \ 385 tools/designer/src/plugins/activeqt/activeqt.pro \ 386 tools/designer/src/plugins/plugins.pri \ 387 tools/designer/src/uitools/uitools.pro \ 388 src/3rdparty/webkit/Source/WebKit/qt/declarative/declarative.pro } { 389 reinplace "/+=/s@debug_and_release@@g" \ 390 ${worksrcpath}/${fixfile} 391 } 392 } 393 394 # copy C++11 files into place, if that variant is set 395 396 if {[variant_isset cxx11]} { 397 copy ${filespath}/c++11.prf ${worksrcpath}/mkspecs/features 398 copy ${filespath}/c++11 ${worksrcpath}/config.tests/mac 399 } 400 401 # copy Objective C / CXX files into place 402 403 copy ${filespath}/objective_cxx.prf \ 404 ${worksrcpath}/mkspecs/features/mac 405 copy ${filespath}/split_sources.prf \ 406 ${worksrcpath}/mkspecs/features/mac 407 408 # copy extra compiler tests into place; these are patched into the 409 # configure script to the area before qmake is built. If any 410 # fail, configure will fail quickly. 411 412 copy ${filespath}/fconstant_cfstrings.test \ 413 ${worksrcpath}/config.tests/mac 414 copy ${filespath}/objc_block \ 415 ${worksrcpath}/config.tests/mac 416 copy ${filespath}/cpath \ 417 ${worksrcpath}/config.tests/mac 418 copy ${filespath}/library_path \ 419 ${worksrcpath}/config.tests/mac 420 } 421 422 # Block various compilers: 423 # 424 # * The build process requires -Xarch, -fconstant-cfstring, and 425 # Objective-C(++) blocks (^), which are not supported with vanilla GCC 426 # as installed by MacPorts but are supported by all versions of CLANG 427 # (both MacPorts' and Apple's). 428 # 429 # * Some older versions of CLANG do not honor the CPATH 430 # environment variables, which is required for compiling 431 # this port when using MacPorts. The versions seem to be: MacPorts 432 # CLANG 2.9 or earlier, and Apple CLANG 318.0.58 or older. 433 # 434 # * Some older versions of CLANG do not honor the LIBRARY_PATH 435 # environment variables, which is required for compiling 436 # this port when using MacPorts. The versions seem to be: MacPorts 437 # CLANG 3.0 or earlier, and Apple CLANG 318.0.61 or older. 438 # 439 # * qt4-creator-mac fails to build with GCC <= 4.0. 440 # 441 # See also: 442 # < http://llvm.org/bugs/show_bug.cgi?id=8971 >, 443 # < https://trac.macports.org/ticket/30271 >, 444 # < https://trac.macports.org/ticket/31076 >, 445 # < https://trac.macports.org/ticket/31638 >, 446 # < https://trac.macports.org/ticket/37868 >, and 447 # < https://trac.macports.org/ticket/40422 >. 448 # 449 # NOTE: qt4-mac augments the standard Qt4 configure script with 450 # pre-qmake-build tests for CPATH, LIBRARY_PATH, -Xarch, 451 # -fconstant-cfstring, Objective-C(++) blocks, and, if requested, 452 # C++11. The script will error out quickly if the compiler does not 453 # seem to provide support for any one of these properties, no matter 454 # this blacklist. 455 # 456 457 compiler.blacklist-append { clang <= 318.0.61 } \ 458 gcc-3.3 *gcc-4.0 macports-gcc* \ 459 macports-clang-2.9 macports-clang-3.0 460 461 # --prefix is not recognized. 462 configure.pre_args-delete --prefix=${prefix} 463 464 # --disable-dependency-tracking is not recognized. 465 configure.universal_args-delete --disable-dependency-tracking 466 467 # clear all arch-oriented flags since somehow they impact how qmake is 468 # created, which in turn messes up LDFLAGS in most created Makefiles. 469 470 configure.ld_archflags 471 configure.cc_archflags 472 configure.cxx_archflags 473 configure.universal_ldflags 474 configure.universal_cflags 475 configure.universal_cxxflags 476 configure.universal_cppflags 477 configure.march 478 configure.mtune 479 480 # Use compiler.cpath and compiler.library_path for all -I and -L 481 # entries, so-as to avoid conflicts with already-installed headers and 482 # libraries (giving preference to internal-to-this-port first). CPATH 483 # is used instead of -I to avoid conflicts with other ports. 484 # 485 # See also: 486 # < https://trac.macports.org/ticket/15219 >, 487 # < https://trac.macports.org/ticket/18723 >, and 488 # < https://trac.macports.org/ticket/25321 >. 489 490 # set the default paths to include those for SQLITE3 and DBUS-1 491 492 set header_path [ list ${prefix}/include/dbus-1.0 \ 493 ${prefix}/lib/dbus-1.0/include \ 494 ${prefix}/include ] 495 496 set library_path [ list ${prefix}/lib ] 497 498 # -dbus-linked prevends qt4 from trying to dynamically load libdbus-1, 499 # which it is not able to find in ${prefix}. 500 # 501 # -openssl-linked ensures that the MacPorts openssl is used. 502 # 503 # -framework ensures that this port is installed as frameworks 504 # (collections of {library, headers, resources}); in 505 # post-destroot, link headers and libraries from the frameworks 506 # into non-framework locations as if "-no-framework" were 507 # specified. Some dependent projects will not work properly if Qt 508 # is installed as libraries by default, thus make it so #1. 509 # 510 # -no-phonon ensures that Qt does not install the 3rd-parth Phonon 511 # port or its backend to QuickTime 7; Phonon is now installed via 512 # the 'phonon' port, which is more up to date than that provided 513 # by Qt. 514 515 configure.args \ 516 -v \ 517 -confirm-license \ 518 -opensource \ 519 -prefix ${qt_dir} \ 520 -bindir ${qt_bins_dir} \ 521 -libdir ${qt_libs_dir} \ 522 -docdir ${qt_docs_dir} \ 523 -headerdir ${qt_includes_dir} \ 524 -plugindir ${qt_plugins_dir} \ 525 -importdir ${qt_imports_dir} \ 526 -datadir ${qt_data_dir} \ 527 -translationdir ${qt_translations_dir} \ 528 -sysconfdir ${qt_sysconf_dir} \ 529 -examplesdir ${qt_examples_dir} \ 530 -demosdir ${qt_demos_dir} \ 531 -openssl-linked \ 532 -dbus-linked \ 533 -fast \ 534 -optimized-qmake \ 535 -no-pch \ 536 -framework \ 537 -no-phonon \ 538 -no-phonon-backend \ 539 -fontconfig -system-freetype 540 541 # Stop configure script from searching for SQL Drivers 542 # not available from MacPorts. 543 544 foreach driver {db2 ibase oci tds} { 545 configure.args-append -no-sql-${driver} 546 } 547 548 # Disable all remaining SQL Drivers. These are available via the 549 # ports qt4-mac-*-plugin. 550 # the sqlite3 plugin ("sqlite") has been re-absorbed into the main port however 551 configure.args-append -system-sqlite 552 depends_lib-append port:sqlite3 553 foreach driver {mysql odbc psql sqlite2} { 554 configure.args-append -no-sql-${driver} 555 } 556 557 configure.args-append -no-exceptions 558 559 pre-configure { 560 561 # use the corrected CPATH and LIBRARY_PATH for build 562 563 compiler.cpath [join ${header_path} :] 564 compiler.library_path [join ${library_path} :] 565 566 # for 10.4 or 10.5 32-bit PPC, build as Carbon only, not Cocoa 567 568 if {${MINOR} == 4} { 569 570 configure.args-append -carbon 571 572 # required linking flags? 573 574 configure.ldflags-append -lcrypto -ldbus-1 -ljpeg -llcms \ 575 -lssl -lz 576 577 } elseif {${MINOR} == 5 && 578 [llength ${qt_arch_types}] == 1 && 579 [lsearch -exact ${qt_arch_types} ppc] == 0} { 580 581 configure.args-append -carbon 582 583 } 584 585 # set the arch type(s) to use, in Qt-speak 586 587 configure.args-append -arch \"${qt_arch_types}\" 588 589 # cannot use pre-compiled headers when compiling with more than 1 590 # arch type (typically +universal) or for X11 591 592 #if {[llength ${qt_arch_types}] != 1 || [variant_isset x11]} 593 594 # check to see if not compiling for the native machine hardware 595 # (e.g., compiling for just i386 but CPU is x86_64); optimization 596 # of QMake does not work in this circumstance. 597 598 if {[lsearch -exact ${qt_arch_types} ${os.arch}] == -1} { 599 600 # not building for native arch: disable optimizing qmake 601 configure.args-delete -optimized-qmake 602 603 } elseif {${MINOR} == 6 && 604 [llength ${qt_arch_types}] == 1 && 605 [lsearch -exact ${qt_arch_types} x86] == 0} { 606 607 # disable qmake optimization on 10.6 32-bit 608 configure.args-delete -optimized-qmake 609 610 } 611 612 # set the SDK, if it was found and exists 613 614 if {[file exists ${SDK}]} { 615 configure.args-append -sdk ${SDK} 616 } 617 618 # set which pkg-config to use 619 620 configure.env-append PKG_CONFIG=${prefix}/bin/pkg-config 621 622 # set which stdlib to use; clang only 623 if {[string match *clang* ${configure.compiler}]} { 624 configure.env-append QMAKE_STDLIB="-stdlib=${configure.cxx_stdlib}" 625 configure.ldflags-append -stdlib=${configure.cxx_stdlib} 626 } 627 } 628 629 post-configure { 630 631 # Remove any '-I' and '-L' string from the *FLAGS for SQLITE, 632 # DBUS, ODBC, and OPENSSL, so that what remains are just non-I/L 633 # flags; these paths are in compiler.cpath and 634 # compiler.library_path. The header and library paths for all the 635 # other variants are not used by 'configure', and are already 636 # included in the compiler.cpath and compiler.library_path 637 # . during the 'build' stage, 'make' will rebuild the Makefiles 638 # that depend on any of these changed files. These patches are 639 # sufficient to make sure local (to this build) paths are searched 640 # first, and then system paths last (via the compiler.X settings). 641 # Ideally, 'qmake' -- either via its mkspecs files or the 642 # project's build files -- would distinguish between "local" and 643 # "system" includes & libraries. 644 645 # SQLITE 646 reinplace "/SQLITE/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 647 ${worksrcpath}/.qmake.cache 648 reinplace "/SQLITE/s@-L${prefix}/\[^ \]*lib\[^ \]*@@g" \ 649 ${worksrcpath}/.qmake.cache 650 # DBUS 651 reinplace "/DBUS/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 652 ${worksrcpath}/.qmake.cache 653 reinplace "/DBUS/s@-L${prefix}/\[^ \]*lib\[^ \]*@@g" \ 654 ${worksrcpath}/.qmake.cache 655 # OPENSSL 656 reinplace "/OPENSSL/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 657 ${worksrcpath}/.qmake.cache 658 reinplace "/OPENSSL/s@-L${prefix}/\[^ \]*lib\[^ \]*@@g" \ 659 ${worksrcpath}/.qmake.cache 660 # ODBC 661 reinplace "/ODBC/s@-I${prefix}/\[^ \]*include\[^ \]*@@g" \ 662 ${worksrcpath}/.qmake.cache 663 reinplace "/ODBC/s@-L${prefix}/\[^ \]*lib\[^ \]*@@g" \ 664 ${worksrcpath}/.qmake.cache 665 } 666 667 pre-build { 668 # use the corrected CPATH and LIBRARY_PATH for build 669 compiler.cpath [join ${header_path} :] 670 compiler.library_path [join ${library_path} :] 671 } 672 673 # do not use DESTDIR directly in the destroot command; Qt uses DISTDIR 674 # internally for other purposes, and instead uses INSTALL_ROOT for the 675 # additional install root prefix. 676 677 destroot.post_args 678 679 pre-destroot { 680 # this isn't really nice if the user has 2nd thoughts and wants to install those html files after all 681 # (and knows how to get port to redo an install without cleaning and rebuilding everything). 682 # Let's hope that happens rarely enough to prefer speeding up the destroot step for the others 683 if {![variant_isset htmldocs]} { 684 if {[file exists ${worksrcpath}/doc/html/images]} { 685 ui_msg "cleaning out ${worksrcpath}/doc/html per your request" 686 delete file ${worksrcpath}/doc/html/images ${worksrcpath}/doc/html/scripts ${worksrcpath}/doc/html/style 687 eval file delete [glob ${worksrcpath}/doc/html/*.html] 688 eval file delete [glob ${worksrcpath}/doc/html/qt.*] 689 } 690 } 691 } 692 693 post-destroot { 694 695 set destroot_qt ${destroot}${qt_dir} 696 697 # Fix .pc and .prl files by changing ${worksrcpath}\${prefix} to 698 # ${qt_dir}\${prefix} ("\" means 'take away'). Cannot use 699 # "find -E" since it is not necessarily portable. 700 701 regsub ${prefix} ${worksrcpath} "" from_dir 702 regsub ${prefix} ${qt_dir} "" to_dir 703 foreach fixfile [exec find ${destroot_qt} -name "*.pc"] { 704 reinplace "s|${from_dir}|${to_dir}|g" ${fixfile} 705 } 706 foreach fixfile [exec find ${destroot_qt} -name "*.prl"] { 707 reinplace "s|${from_dir}|${to_dir}|g" ${fixfile} 708 } 709 710 # fix .pc files 711 712 foreach fixfile [exec find ${destroot_qt} -name "*.pc"] { 713 714 # remove Libs.private; they can mess up linking 715 716 reinplace "/Libs\.private/d" ${fixfile} 717 718 # use ${prefix} correctly 719 720 # RJVB: 721 # don't replace ${prefix} (e.g. /opt/local) with \${prefix} 722 # unless ${qt_dir} == ${prefix} (but I don't see the point at all...) 723 if {${prefix} eq ${qt_dir}} { 724 reinplace "s|${prefix}/|\${prefix}/|g" ${fixfile} 725 } 726 727 # fix libdir 728 729 reinplace "/libdir=/s|Library/Frameworks|lib|" ${fixfile} 730 731 # fix Libs: to use -L instead of -F 732 733 reinplace "/Libs:/s|-F|-L|" ${fixfile} 734 735 # fix Libs: to use -lQt* instead of "-framework Qt*" 736 # depends on whether for release or debug 737 738 set fn [lindex [split ${fixfile} /] end] 739 740 if {[lsearch -regexp ${fn} debug] == 0} { 741 742 # debug; need to add that string to all Qt dependency libraries 743 reinplace "/Libs:/s|-framework Qt\\(\[^ \]*\\)|-lQt\\1_debug|" \ 744 ${fixfile} 745 746 } else { 747 748 # no debug; just replace 749 reinplace "/Libs:/s|-framework Qt|-lQt|" ${fixfile} 750 751 } 752 } 753 754 # move .pc files from ${qt_frameworks_dir}/pkgconfig to 755 # ${qt_pkg_config_dir} 756 757 file delete -force ${destroot}${qt_pkg_config_dir} 758 xinstall -m 755 -d ${destroot}${qt_libs_dir} 759 # move ${destroot}${qt_frameworks_dir}/pkgconfig \ 760 # ${destroot}${qt_libs_dir} 761 # RJVB: ${destroot}${qt_libs_dir} is NOT always equal to ${qt_pkg_config_dir} !! 762 move ${destroot}${qt_frameworks_dir}/pkgconfig \ 763 ${destroot}${qt_pkg_config_dir} 764 if {![variant_isset exclusive]} { 765 # qt_pkg_config_dir==${prefix}/lib/pkgconfig; make a symlink to that place in 766 # ${qt_libs_dir} so that 3rd party .pc files end up where pkg-config can find them ... 767 ln -s ${qt_pkg_config_dir} ${destroot}${qt_libs_dir}/pkgconfig 768 } 769 770 # move .la files from ${qt_frameworks_dir} to ${qt_libs_dir} 771 772 foreach laf [glob ${destroot}/${qt_frameworks_dir}/*.la] { 773 move ${laf} ${destroot}${qt_libs_dir} 774 } 775 776 # remove -L entries from .prl and .la files 777 778 foreach fixfile [exec find ${destroot_qt} -name "*.prl"] { 779 reinplace "/QMAKE_PRL_LIBS/s|-L\[^ \]*||g" ${fixfile} 780 } 781 foreach fixfile [exec find ${destroot_qt} -name "*.la"] { 782 reinplace "/dependency_libs/s|-L\[^ \]*||g" ${fixfile} 783 } 784 785 # remove redundant -F entries from .prl and .la files 786 787 foreach fixfile [exec find ${destroot_qt} -name "*.prl"] { 788 reinplace "/QMAKE_PRL_LIBS/s|-F\[^ \]*|FREPLACEME|1" \ 789 ${fixfile} 790 reinplace "/QMAKE_PRL_LIBS/s|-F\[^ \]*||g" ${fixfile} 791 reinplace "s|FREPLACEME|-F${prefix}/${qt_frameworks_dir_rel}|1" \ 792 ${fixfile} 793 # also remove the QMAKE_PRL_BUILD_DIR lines 794 reinplace "/QMAKE_PRL_BUILD_DIR/d" ${fixfile} 795 } 796 foreach fixfile [exec find ${destroot_qt} -name "*.la"] { 797 reinplace "/dependency_libs/s|-F\[^ \]*|FREPLACEME|1" \ 798 ${fixfile} 799 reinplace "/dependency_libs/s|-F\[^ \]*||g" ${fixfile} 800 reinplace "s|FREPLACEME|-F${prefix}/${qt_frameworks_dir_rel}|1" \ 801 ${fixfile} 802 } 803 804 # get Qt's version numbers 805 806 set qt_vers [split ${version} "."] 807 set qt_major [lindex ${qt_vers} 0] 808 set qt_minor [lindex ${qt_vers} 1] 809 set qt_patch [lindex ${qt_vers} 2] 810 811 # link includes and libraries for each actual installed framework 812 813 # make sure that qt_includes_dir exist; apparently it will not have been created at this point, 814 # despite the -headerdir ${qt_includes_dir} argument to configure. Because of doing a framework build? 815 exec mkdir -p ${destroot}${qt_includes_dir} 816 foreach fixfile [exec find ${destroot}${qt_frameworks_dir} \ 817 -name "*.framework" | \ 818 sed -e "s@${destroot}@@g"] { 819 820 set tf_full [strsed ${fixfile} {s@\\.framework@@}] 821 set tf [strsed ${tf_full} {g@.*\/@@}] 822 823 # special for QtWebKit entries 824 825 set t_minor ${qt_minor} 826 set is_QtWebKit 0 827 if {[string compare ${tf} QtWebKit] == 0} { 828 set t_minor 9 829 set is_QtWebKit 1 830 } 831 832 # link headers into ${qt_includes_dir}, removing directories 833 # if they are already there first 834 835 set inc_file ${destroot}${qt_includes_dir}/${tf} 836 if {[file exists ${inc_file}]} { 837 file delete -force ${inc_file} 838 } 839 ln -s ${tf_full}.framework/Headers ${inc_file} 840 841 # link libraries into ${qt_libs_dir}, all 4 number variants 842 843 set dr_qt_libs_dir ${destroot}${qt_libs_dir} 844 845 ln -s ${tf_full}.framework/${tf} ${dr_qt_libs_dir}/lib${tf}.dylib 846 ln -s ${tf_full}.framework/${tf} ${dr_qt_libs_dir}/lib${tf}.${qt_major}.dylib 847 ln -s ${tf_full}.framework/${tf} ${dr_qt_libs_dir}/lib${tf}.${qt_major}.${t_minor}.dylib 848 ln -s ${tf_full}.framework/${tf} ${dr_qt_libs_dir}/lib${tf}.${qt_major}.${t_minor}.${qt_patch}.dylib 849 850 # copy .prl file, then correct it for library usage 851 852 copy ${destroot}${tf_full}.framework/${tf}.prl ${dr_qt_libs_dir}/lib${tf}.prl 853 854 # fix TARGET in .prl file 855 856 reinplace "/QMAKE_PRL_TARGET/s|Qt\\(\[^ \]*\\)|libQt\\1.${qt_major}.${t_minor}.${qt_patch}.dylib|" ${dr_qt_libs_dir}/lib${tf}.prl 857 858 # fix PRL_LIBS -F -> -L in .prl file 859 860 reinplace "/QMAKE_PRL_LIBS/s|-F${qt_frameworks_dir}|-L${qt_libs_dir}|" ${dr_qt_libs_dir}/lib${tf}.prl 861 862 # fix "-framework Qt*" -> "-lQt*" in .prl file 863 864 reinplace "/QMAKE_PRL_LIBS/s|-framework Qt|-lQt|g" \ 865 ${dr_qt_libs_dir}/lib${tf}.prl 866 867 # fix up .la files to work with ${prefix}/lib entries 868 869 # rename .la file 870 871 move ${dr_qt_libs_dir}/${tf}.la ${dr_qt_libs_dir}/lib${tf}.la 872 873 # fix "name that we can dlopen" in .la file 874 875 reinplace "s|dlname=''|dlname='lib${tf}.${qt_major}.${t_minor}.${qt_patch}.dylib'|" ${dr_qt_libs_dir}/lib${tf}.la 876 877 # fix "names of this library" in .la file 878 879 reinplace "s|library_names='\[^'\]*'|library_names='lib${tf}.${qt_major}.${t_minor}.${qt_patch}.dylib lib${tf}.${qt_major}.${t_minor}.dylib lib${tf}.${qt_major}.dylib lib${tf}.dylib'|" \ 880 ${dr_qt_libs_dir}/lib${tf}.la 881 882 # fix "name of the static archive"; there is none in .la file 883 884 reinplace "s|old_library='\[^'\]*'|old_library=''|" \ 885 ${dr_qt_libs_dir}/lib${tf}.la 886 887 # fix "libraries that this one depends upon" in .la file 888 889 reinplace "/dependency_libs/s|-F${qt_frameworks_dir}|-L${qt_libs_dir}|" ${dr_qt_libs_dir}/lib${tf}.la 890 reinplace "/dependency_libs/s|-framework Qt|-lQt|g" \ 891 ${dr_qt_libs_dir}/lib${tf}.la 892 reinplace "/dependency_libs/s| ${worksrcpath}\[^ \]*||g" \ 893 ${dr_qt_libs_dir}/lib${tf}.la 894 reinplace "/dependency_libs/s| -lwebcore||" \ 895 ${dr_qt_libs_dir}/lib${tf}.la 896 reinplace "/dependency_libs/s| -ljscore||" \ 897 ${dr_qt_libs_dir}/lib${tf}.la 898 899 # fix "directory that this library needs to be installed in" in .la file 900 901 reinplace "/libdir/s|${qt_frameworks_dir}|${qt_libs_dir}|" \ 902 ${dr_qt_libs_dir}/lib${tf}.la 903 904 # deal with debug files 905 906 if {[variant_isset debug]} { 907 908 # but not if QtWebKit and +universal, since that one does 909 # not exist (the 32-bit version of the debug library is 910 # larger than fits into the 32-bit filespace). 911 912 if {[variant_isset debug] && ${is_QtWebKit}} { 913 continue 914 } 915 916 # link libraries into ${qt_libs_dir}, all 4 number variants 917 918 ln -s ${tf_full}.framework/${tf}_debug ${dr_qt_libs_dir}/lib${tf}_debug.dylib 919 ln -s ${tf_full}.framework/${tf}_debug ${dr_qt_libs_dir}/lib${tf}_debug.${qt_major}.dylib 920 ln -s ${tf_full}.framework/${tf}_debug ${dr_qt_libs_dir}/lib${tf}_debug.${qt_major}.${t_minor}.dylib 921 ln -s ${tf_full}.framework/${tf}_debug ${dr_qt_libs_dir}/lib${tf}_debug.${qt_major}.${t_minor}.${qt_patch}.dylib 922 923 # copy .prl file, then correct it for library usage 924 925 copy ${destroot}${tf_full}.framework/${tf}_debug.prl ${dr_qt_libs_dir}/lib${tf}_debug.prl 926 927 # fix TARGET in .prl file 928 929 reinplace "/QMAKE_PRL_TARGET/s|Qt\\(\[^ \]*\\)|libQt\\1.${qt_major}.${t_minor}.${qt_patch}.dylib|" ${dr_qt_libs_dir}/lib${tf}_debug.prl 930 931 # fix PRL_LIBS -F -> -L in .prl file 932 933 reinplace "/QMAKE_PRL_LIBS/s|-F${qt_frameworks_dir}|-L${qt_libs_dir}|" ${dr_qt_libs_dir}/lib${tf}_debug.prl 934 935 # fix "-framework Qt*" -> "-lQt*_debug" in .prl file 936 937 reinplace "/QMAKE_PRL_LIBS/s|-framework Qt\\(\[^ \]*\\)|-lQt\\1_debug|g" ${dr_qt_libs_dir}/lib${tf}_debug.prl 938 939 # fix up .la files to work with ${prefix}/lib entries 940 941 # rename .la file 942 943 move ${dr_qt_libs_dir}/${tf}_debug.la \ 944 ${dr_qt_libs_dir}/lib${tf}_debug.la 945 946 # fix "name that we can dlopen" in .la file 947 948 reinplace "s|dlname=''|dlname='lib${tf}_debug.${qt_major}.${t_minor}.${qt_patch}.dylib'|" ${dr_qt_libs_dir}/lib${tf}_debug.la 949 950 # fix "names of this library" in .la file 951 952 reinplace "s|library_names='\[^'\]*'|library_names='lib${tf}_debug.${qt_major}.${t_minor}.${qt_patch}.dylib lib${tf}_debug.${qt_major}.${t_minor}.dylib lib${tf}_debug.${qt_major}.dylib lib${tf}_debug.dylib'|" \ 953 ${dr_qt_libs_dir}/lib${tf}_debug.la 954 955 # fix "name of the static archive"; there is none in .la file 956 957 reinplace "s|old_library='\[^'\]*'|old_library=''|" \ 958 ${dr_qt_libs_dir}/lib${tf}_debug.la 959 960 # fix "libraries that this one depends upon" in .la file 961 962 reinplace "/dependency_libs/s|-F${qt_frameworks_dir}|-L${qt_libs_dir}|" ${dr_qt_libs_dir}/lib${tf}_debug.la 963 reinplace "/dependency_libs/s|-framework Qt\\(\[^ \]*\\)|-lQt\\1_debug|g" ${dr_qt_libs_dir}/lib${tf}_debug.la 964 reinplace "/dependency_libs/s| ${worksrcpath}\[^ \]*||g" \ 965 ${dr_qt_libs_dir}/lib${tf}_debug.la 966 reinplace "/dependency_libs/s| -lwebcored||" \ 967 ${dr_qt_libs_dir}/lib${tf}_debug.la 968 reinplace "/dependency_libs/s| -ljscored||" \ 969 ${dr_qt_libs_dir}/lib${tf}_debug.la 970 971 # fix "directory that this library needs to be installed in" in .la file 972 973 reinplace "/libdir/s|${qt_frameworks_dir}|${qt_libs_dir}|" \ 974 ${dr_qt_libs_dir}/lib${tf}_debug.la 975 976 } 977 } 978 979 # Install documentation. 980 981 xinstall -m 755 -d ${worksrcpath}/${qt_docs_dir} 982 xinstall -m 644 -W ${worksrcpath} \ 983 INSTALL LGPL_EXCEPTION.txt LICENSE.FDL \ 984 LICENSE.GPL3 LICENSE.LGPL README \ 985 ${destroot}${qt_docs_dir} 986 987 # Install private headers needed by QtCreator 988 989 foreach {src_dir include_dir} \ 990 {corelib QtCore gui QtGui script QtScript declarative QtDeclarative} { 991 set dest_dir ${destroot}${qt_frameworks_dir}/${include_dir}.framework/Headers/private 992 xinstall -m 755 -d ${dest_dir} 993 set files [exec find ${worksrcpath}/src/${src_dir} -type f -name "*_p.h"] 994 eval xinstall -m 644 [split ${files}] ${dest_dir} 995 } 996 997 # Move .apps into the applications_dir, and link each .apps' 998 # executable back into ${qt_bins_dir} 999 1000 set dr_qt_apps_dir ${destroot}${qt_apps_dir} 1001 set dr_qt_bins_dir ${destroot}${qt_bins_dir} 1002 1003 xinstall -m 755 -d ${dr_qt_apps_dir} 1004 foreach app [glob ${dr_qt_bins_dir}/*.app] { 1005 1006 # remove the leading stuff 1007 1008 set app [lindex [split ${app} /] end] 1009 1010 # move the .app 1011 1012 move ${dr_qt_bins_dir}/${app} ${dr_qt_apps_dir} 1013 1014 # link the app's executable back 1015 1016 set texe [strsed ${app} {g@\.app@@}] 1017 ln -s ${qt_apps_dir}/${app}/Contents/MacOS/${texe} \ 1018 ${dr_qt_bins_dir}/[string tolower ${texe}] 1019 1020 } 1021 if {![variant_isset examples]} { 1022 file delete -force ${qt_apps_dir}/examples 1023 } 1024 1025 # move tests to ${qt_data_dir} 1026 1027 xinstall -m 755 -d ${destroot}${qt_data_dir} 1028 move ${destroot_qt}/tests/qt4 ${destroot}${qt_data_dir}/tests 1029 1030 # install ${qt_includes_dir}/Qt if not already and it exists in 1031 # the build, for support of legacy projects 1032 1033 if {![file exists ${destroot}${qt_includes_dir}/Qt] && 1034 [file exists ${worksrcpath}/include/Qt]} { 1035 1036 # copy the Qt headers directory 1037 1038 copy ${worksrcpath}/include/Qt ${destroot}${qt_includes_dir} 1039 1040 } 1041 1042 # link in Resource to ${qt_libs_dir} 1043 1044 ln -s ${qt_frameworks_dir}/QtGui.framework/Resources \ 1045 ${destroot}${qt_libs_dir} 1046 1047 if {![variant_isset exclusive]} { 1048 ln -s ${qt_qmake_cmd} ${destroot}/${prefix}/bin/qmake-qt${qt_major} 1049 ln -s ${qt_moc_cmd} ${destroot}/${prefix}/bin/moc-qt${qt_major} 1050 ln -s ${qt_uic_cmd} ${destroot}/${prefix}/bin/uic-qt${qt_major} 1051 ln -s ${qt_lrelease_cmd} ${destroot}/${prefix}/bin/lrelease-qt${qt_major} 1052 } 1053 if {[variant_isset KDE]} { 1054 # expose KDE4 styles to Qt4: 1055 ln -s ${prefix}/lib/kde4/plugins/styles ${destroot}${qt_plugins_dir}/ 1056 } 1057 if {![variant_isset exceptions ]} { 1058 # building with -no-exceptions will add a section to QtCore/qconfig.h that has to be removed 1059 # given that we did NOT build QtCore WITHOUT exceptions... 1060 exec patch -d ${destroot}${qt_frameworks_dir} -Np0 -i ${filespath}/qconfig-remove-EXCEPTIONS.diff 1061 } 1062 } 1063 1064 variant odbc description {Enable iODBC SQL Driver} { 1065 depends_lib-append port:libiodbc 1066 configure.args-delete -no-sql-odbc 1067 configure.args-append -plugin-sql-odbc 1068 } 1069 1070 variant raster description {Use raster graphics system by default} { 1071 configure.args-append -graphicssystem raster 1072 } 1073 1074 variant demos description {Build demos} {} 1075 1076 if {![variant_isset demos]} { 1077 configure.args-append -nomake demos 1078 } 1079 1080 variant examples description {Build examples} {} 1081 1082 if {![variant_isset examples]} { 1083 configure.args-append -nomake examples 1084 } 1085 1086 variant debug description {Build both release and debug library} {} 1087 1088 if {[variant_isset debug]} { 1089 configure.args-append -debug-and-release -declarative-debug 1090 } else { 1091 configure.args-append -release -no-declarative-debug 1092 } 1093 1094 variant openvg description {Build with *experimental* support for OpenVG} { 1095 1096 depends_lib-append port:mesa 1097 1098 pre-configure { 1099 1100 # set OpenVG arg, for both testing and building 1101 1102 configure.env-append QMAKE_OPENVG_ARG=-lOpenVG 1103 1104 } 1105 } 1106 1107 variant cxx11 description {Add library support for C++11 (EXPERIMENTAL; does not work with libc++)} { 1108 1109 # Block compilers that do not support C++11. This variant seems to 1110 # work with MacPorts' clang 3.0 or newer and Apple clang newer 1111 # than 318.0.58 (but, not that version, which is already blocked). 1112 1113 compiler.blacklist-append \ 1114 apple-gcc-4.2 gcc-4.2 llvm-gcc-4.2 1115 1116 pre-fetch { 1117 1118 # This variant does not work with Clang libc++ 1119 1120 if {[info exists configure.cxx_stdlib] && 1121 ${configure.cxx_stdlib} eq "libc++" && 1122 [string match *clang* ${configure.cxx}]} { 1123 1124 ui_msg "\nERROR: C++11 support for Qt4 is not available when using Clang and libc++.\n" 1125 error "unsupported platform for C++11 support" 1126 1127 } 1128 } 1129 1130 pre-extract { 1131 1132 ui_msg "\nWARNING: You have enabled C++11 support for Qt4, which is EXPERIMENTAL. Qt's libraries and applications (not including QMake) will be compiled using C++11. That said, C++11 will NOT be enabled by default when using QMake. You can enable C++11 by specifying, e.g. \'CONFIG += c++11\', in any QMake build file.\n" 1133 1134 } 1135 1136 # patches for C++11 only 1137 1138 patchfiles-append patch-cxx11.diff 1139 1140 # have configure test for C++11; our hooks 1141 # will error out if C++11 is not found. 1142 1143 configure.args-append -c++11 1144 1145 } 1146 1147 variant htmldocs description {Install HTML documentation (>200Mb)} {} 1148 1149 post-activate { 1150 ui_msg "NOTE: Qt database plugins for mysql55, postgresql91, and sqlite2 are NOT installed by this port\; they are installed by qt4-mac-*-plugin instead." 1151 } 1152 1153 variant KDE description {Include RJVB's patches for use with KDE} { 1154 patchfiles-append qt4-deactivate-menurole-heuristics.patch \ 1155 prevent_addTitleRelated_crash.patch \ 1156 debug-negative-qtimerint.patch \ 1157 silence-qfilesystemwatcher.patch \ 1158 patch-QAction_isEnabled.diff 1159 } 1160 1161 variant exceptions description {build using exceptions internally (useless, but traditional)} { 1162 patchfiles-delete disable-exceptions.patch 1163 configure.args-delete -no-exceptions 1164 } 1165 1166 } 1167 1168 ## The convenience subport that installs the symlinks which allow ports built against qt4-mac +exclusive 1169 ## to keep functioning after installing qt4-mac in the new concurrent mode, without rebuilding them. 1170 ## It can be uninstalled after all Qt4 "client" ports have been rebuilt. 1171 if { ${subport} eq "${name}-transitional" } { 1172 if {[variant_isset exclusive]} { 1173 return -code error "\n\nERROR:\n\ 1174 ${name}-transitional is available only when qt4-mac has been installed without +exclusive\n" 1175 } 1176 fetch { 1177 if {![info exists qt4_is_concurrent]} { 1178 return -code error "\n\nERROR:\n\ 1179 ${name}-transitional is available only when qt4-mac has been installed without +exclusive\n" 1180 } 1181 } 1182 if {[file exists ${prefix}/Library/Frameworks/QtCore.framework/Versions/5/Headers/QtCore]} { 1183 conflicts-append qt5-mac 1184 } 1185 checksum {} 1186 extract {} 1187 patch {} 1188 post-patch {} 1189 configure {} 1190 build {} 1191 destroot { 1192 set qt_vers [split ${version} "."] 1193 set qt_major [lindex ${qt_vers} 0] 1194 set qt_minor [lindex ${qt_vers} 1] 1195 set qt_patch [lindex ${qt_vers} 2] 1196 exec mkdir -p ${destroot}/${prefix}/lib ${destroot}/${prefix}/Library/Frameworks 1197 foreach fixfile [exec find ${qt_frameworks_dir} \ 1198 -name "*.framework"] { 1199 1200 set tf_full [strsed ${fixfile} {s@\\.framework@@}] 1201 set tf [strsed ${tf_full} {g@.*\/@@}] 1202 ln -s ${tf_full}.framework/${tf} ${destroot}/${prefix}/lib/lib${tf}.${qt_major}.dylib 1203 ln -s ${tf_full}.framework/${tf} ${destroot}/${prefix}/lib/lib${tf}.${qt_major}.${qt_minor}.dylib 1204 ln -s ${tf_full}.framework/${tf} ${destroot}/${prefix}/lib/lib${tf}.${qt_major}.${qt_minor}.${qt_patch}.dylib 1205 ln -s ${tf_full}.framework ${destroot}/${prefix}/Library/Frameworks/${tf}.framework 1206 } 1207 } 1208 } 1209 1210 # this code copied from the qt4-mac-sqlite2-plugin Portfile: 1211 subport ${name}-sqlite3-plugin { 1212 set DB sqlite2 1213 1214 description Qt sqlite database plugin for sqlite2 1215 long_description ${description} 1216 conflicts-append qt4-mac-sqlite2-plugin 1217 depends_lib-append port:sqlite2 1218 configure.args-append \ 1219 INCLUDEPATH+=${worksrcpath}/include \ 1220 LIBS+="-L${prefix}/lib -lsqlite" 1221 1222 configure.post_args sqlite2.pro 1223 1224 variant debug description {Build both release and debug plugin} {} 1225 1226 pre-configure { 1227 configure.args-append CONFIG+=\"${qt_arch_types}\" 1228 } 1229 1230 post-patch { 1231 if {![variant_isset debug]} { 1232 reinplace "s@debug_and_release@release@" \ 1233 ${worksrcpath}/src/plugins/qpluginbase.pri 1234 } 1235 } 1236 1237 set DRIVER src/sql/drivers/${DB} 1238 set PLUGIN src/plugins/sqldrivers/${DB} 1239 1240 extract.post_args | tar -xf - \ 1241 ${distname}/${DRIVER} \ 1242 ${distname}/${PLUGIN} \ 1243 ${distname}/src/plugins/sqldrivers/qsqldriverbase.pri \ 1244 ${distname}/src/plugins/qpluginbase.pri \ 1245 ${distname}/src/qt_targets.pri \ 1246 ${distname}/include/QtSql/private \ 1247 ${distname}/src/sql/kernel 1248 1249 configure.dir ${worksrcpath}/${PLUGIN} 1250 configure.env-append \ 1251 QMAKESPEC=${qt_mkspecs_dir}/${qt_qmake_spec} 1252 1253 configure.cmd ${qt_qmake_cmd} 1254 configure.pre_args PREFIX=${prefix} 1255 1256 build.dir ${worksrcpath}/${PLUGIN} 1257 build.target {} 1258 } 1259 1260 livecheck.type regex 1261 livecheck.url http://download.qt.io/official_releases/qt/${branch}/ 1262 livecheck.regex >(\[0-9.\]+)/< -
new file aqua/qt4-mac-devel/files/c++11.prf
diff --git a/aqua/qt4-mac-devel/files/c++11.prf b/aqua/qt4-mac-devel/files/c++11.prf new file mode 100644 index 0000000..a6509d9
- + 1 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_CXX11 2 QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_CXX11 3 QMAKE_LFLAGS += $$QMAKE_LFLAGS_CXX11 -
new file aqua/qt4-mac-devel/files/c++11/c++11.test
diff --git a/aqua/qt4-mac-devel/files/c++11/c++11.test b/aqua/qt4-mac-devel/files/c++11/c++11.test new file mode 100755 index 0000000..fd39829
- + 1 #!/bin/sh 2 3 CXX11_SUPPORT=no 4 COMPILER=$1 5 VERBOSE=$2 6 WORKDIR=$3 7 8 cd $3 9 10 if "$COMPILER" -std=c++11 -c c++11_test.cpp 2>/dev/null 1>&2; then 11 CXX11_SUPPORT=yes 12 fi 13 rm -f c++11_test.o 14 15 if [ "$CXX11_SUPPORT" != "yes" ]; then 16 [ "$VERBOSE" = "yes" ] && echo "C++11 support not detected" 17 exit 0 18 else 19 [ "$VERBOSE" = "yes" ] && echo "C++11 support detected" 20 exit 1 21 fi -
new file aqua/qt4-mac-devel/files/c++11/c++11_test.cpp
diff --git a/aqua/qt4-mac-devel/files/c++11/c++11_test.cpp b/aqua/qt4-mac-devel/files/c++11/c++11_test.cpp new file mode 100644 index 0000000..6f134e6
- + 1 // from Qt 5.0 2 3 #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) 4 #else 5 # error "__cplusplus must be >= 201103L, or __GXX_EXPERIMENTAL_CXX0X__ must be defined" 6 #endif 7 8 constexpr int get_five() {return 5;} 9 10 int some_value[get_five() + 7]; 11 12 int main(int, char **) { return 0; } -
new file aqua/qt4-mac-devel/files/cpath/cpath.test
diff --git a/aqua/qt4-mac-devel/files/cpath/cpath.test b/aqua/qt4-mac-devel/files/cpath/cpath.test new file mode 100755 index 0000000..c6da16d
- + 1 #!/bin/sh 2 3 CPATH_SUPPORT=no 4 COMPILER=$1 5 VERBOSE=$2 6 WORKDIR=$3 7 8 done=no 9 cd $3 10 unset CPATH 11 12 # (1) do the test, without CPATH; should fail 13 if "$COMPILER" -nostdinc -c cpath_test.c 2>/dev/null 1>&2; then 14 echo "Compile seems to work even with CPATH not set; assuming CPATH does not work" 15 done=0 16 else 17 # (2) do the test, with CPATH set; should pass 18 export CPATH=. 19 if "$COMPILER" -nostdinc -c cpath_test.c 2>/dev/null 1>&2; then 20 CPATH_SUPPORT=yes 21 fi 22 fi 23 rm -f cpath_test.o 24 25 # if done above, assume it works and exit 26 [ "$done" != "no" ] && exit $done 27 28 if [ "$CPATH_SUPPORT" != "yes" ]; then 29 [ "$VERBOSE" = "yes" ] && echo "CPATH support not detected" 30 exit 0 31 else 32 [ "$VERBOSE" = "yes" ] && echo "CPATH support detected" 33 exit 1 34 fi -
new file aqua/qt4-mac-devel/files/cpath/cpath_test.c
diff --git a/aqua/qt4-mac-devel/files/cpath/cpath_test.c b/aqua/qt4-mac-devel/files/cpath/cpath_test.c new file mode 100644 index 0000000..421000c
- + 1 #include <cpath_test.h> 2 3 int test_cpath = 1; 4 5 int main (void) { 6 (void) test_cpath; 7 return (0); 8 } -
new file aqua/qt4-mac-devel/files/cpath/cpath_test.h
diff --git a/aqua/qt4-mac-devel/files/cpath/cpath_test.h b/aqua/qt4-mac-devel/files/cpath/cpath_test.h new file mode 100644 index 0000000..9ebc53a
- + 1 extern int test_cpath; -
new file aqua/qt4-mac-devel/files/debug-negative-qtimerint.patch
diff --git a/aqua/qt4-mac-devel/files/debug-negative-qtimerint.patch b/aqua/qt4-mac-devel/files/debug-negative-qtimerint.patch new file mode 100644 index 0000000..d2897dd
- + 1 --- src/corelib/kernel/orig.qobject.cpp 2014-04-10 20:37:11.000000000 +0200 2 +++ src/corelib/kernel/qobject.cpp 2014-12-09 00:43:41.000000000 +0100 3 @@ -1597,12 +1597,83 @@ 4 \sa timerEvent(), killTimer(), QTimer::singleShot() 5 */ 6 7 +#include <unistd.h> 8 +#include <execinfo.h> 9 +#include <cxxabi.h> 10 + 11 +static QString maybeDemangledName(char *name) 12 +{ 13 + const int len = strlen(name); 14 + QByteArray in = QByteArray::fromRawData(name, len); 15 +#ifdef Q_OS_MAC 16 + const int mangledNameStart = in.indexOf(" _"), startOffset = 1; 17 +#elif defined(__FreeBSD__) 18 + const int mangledNameStart = in.indexOf(" <_"), startOffset = 2; 19 +#elif defined(__sun) && defined(__SVR4) 20 + const int mangledNameStart = in.indexOf("'"), startOffset = 0; 21 +#else 22 + const int mangledNameStart = in.indexOf("(_"), startOffset = 1; 23 +#endif 24 + if (mangledNameStart >= 0) { 25 + int mangledNameEnd = in.indexOf('+', mangledNameStart + 2); 26 + // check for and suppress trailing whitespace: 27 + if (mangledNameEnd > 1 && isspace(name[mangledNameEnd-1])) { 28 + mangledNameEnd -= 1; 29 + while (mangledNameEnd > 1 && isspace(name[mangledNameEnd-1])) { 30 + --mangledNameEnd; 31 + } 32 + } 33 + if (mangledNameEnd >= 0) { 34 + int status; 35 + // if we forget about this line and the one that undoes its effect we don't change the 36 + // internal data of the QByteArray::fromRawData() ;) 37 + const char endChar = name[mangledNameEnd]; 38 + name[mangledNameEnd] = 0; 39 + char *demangled = abi::__cxa_demangle(name + mangledNameStart + startOffset, 0, 0, &status); 40 + name[mangledNameEnd] = endChar; 41 + if (demangled) { 42 + QString ret = QString::fromLatin1(name, mangledNameStart + startOffset) + 43 + QString::fromLatin1(demangled) + 44 + QString::fromLatin1(name + mangledNameEnd, len - mangledNameEnd); 45 + free(demangled); 46 + return ret; 47 + } 48 + } 49 + } 50 + return QString::fromLatin1(name); 51 +} 52 + 53 +QString kRealBacktrace(int levels) 54 +{ 55 + QString s; 56 + void* trace[256]; 57 + int n = backtrace(trace, 256); 58 + if (!n) 59 + return s; 60 + char** strings = backtrace_symbols (trace, n); 61 + 62 + if ( levels != -1 ) 63 + n = qMin( n, levels ); 64 + s = QLatin1String("[\n"); 65 + 66 + for (int i = 0; i < n; ++i) 67 + s += QString::number(i) + QLatin1String(": ") + 68 + maybeDemangledName(strings[i]) + QLatin1Char('\n'); 69 + s += QLatin1String("]\n"); 70 + if (strings) 71 + free (strings); 72 + return s; 73 +} 74 + 75 + 76 int QObject::startTimer(int interval) 77 { 78 Q_D(QObject); 79 80 if (interval < 0) { 81 - qWarning("QObject::startTimer: QTimer cannot have a negative interval"); 82 + //qWarning("QObject::startTimer: QTimer cannot have a negative interval"); 83 + qWarning() << "QObject::startTimer: QTimer" << this << "cannot have a negative interval" << interval << "pid=" << getpid() 84 + << kRealBacktrace(-1); 85 return 0; 86 } 87 -
new file aqua/qt4-mac-devel/files/disable-exceptions.patch
diff --git a/aqua/qt4-mac-devel/files/disable-exceptions.patch b/aqua/qt4-mac-devel/files/disable-exceptions.patch new file mode 100644 index 0000000..569d6d4
- + 1 --- orig.configure 2014-12-09 00:30:18.000000000 +0100 2 +++ configure 2014-12-11 21:38:33.000000000 +0100 3 @@ -7881,15 +7881,15 @@ 4 QT_CONFIG="$QT_CONFIG concurrent" 5 fi 6 7 -if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then 8 - echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled." 9 - exit 1 10 -fi 11 -if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then 12 +#if [ "$CFG_XMLPATTERNS" = "yes" -a "$CFG_EXCEPTIONS" = "no" ]; then 13 +# echo "QtXmlPatterns was requested, but it can't be built due to exceptions being disabled." 14 +# exit 1 15 +#fi 16 +#if [ "$CFG_XMLPATTERNS" = "auto" -a "$CFG_EXCEPTIONS" != "no" ]; then 17 CFG_XMLPATTERNS="$canBuildQtXmlPatterns" 18 -elif [ "$CFG_EXCEPTIONS" = "no" ]; then 19 - CFG_XMLPATTERNS="no" 20 -fi 21 +#elif [ "$CFG_EXCEPTIONS" = "no" ]; then 22 +# CFG_XMLPATTERNS="no" 23 +#fi 24 if [ "$CFG_XMLPATTERNS" = "yes" ]; then 25 QT_CONFIG="$QT_CONFIG xmlpatterns" 26 else 27 --- src/xmlpatterns/utils/orig.qpatternistlocale_p.h 2014-04-10 20:37:12.000000000 +0200 28 +++ src/xmlpatterns/utils/qpatternistlocale_p.h 2014-12-11 23:58:30.000000000 +0100 29 @@ -274,7 +274,8 @@ 30 #endif 31 32 #ifdef QT_NO_EXCEPTIONS 33 -#error "Patternist uses exceptions and cannot be built without." 34 +// #error "Patternist uses exceptions and cannot be built without." 35 +#warning "Patternist uses exceptions and will ignore the fact QtCore is built without" 36 #endif 37 38 QT_END_NAMESPACE 39 --- src/xmlpatterns/orig.xmlpatterns.pro 2014-12-16 13:58:27.000000000 +0100 40 +++ src/xmlpatterns/xmlpatterns.pro 2014-12-16 13:59:46.000000000 +0100 41 @@ -2,8 +2,13 @@ 42 QPRO_PWD = $$PWD 43 QT = core \ 44 network 45 +DEFINES -= QT_NO_EXCEPTIONS 46 DEFINES += QT_BUILD_XMLPATTERNS_LIB \ 47 - QT_NO_USING_NAMESPACE 48 + QT_NO_USING_NAMESPACE QT_EXCEPTIONS 49 +QMAKE_CXXFLAGS_EXCEPTIONS_OFF -= -fno-exceptions 50 +QMAKE_CFLAGS -= -fno-exceptions 51 +QMAKE_CXXFLAGS -= -fno-exceptions 52 +QMAKE_LFLAGS -= -fno-exceptions 53 win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x61000000 54 unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore \ 55 QtNetwork 56 --- src/corelib/orig.corelib.pro 2014-12-16 13:46:18.000000000 +0100 57 +++ src/corelib/corelib.pro 2014-12-16 13:47:05.000000000 +0100 58 @@ -1,7 +1,12 @@ 59 TARGET = QtCore 60 QPRO_PWD = $$PWD 61 QT = 62 -DEFINES += QT_BUILD_CORE_LIB QT_NO_USING_NAMESPACE 63 +DEFINES -= QT_NO_EXCEPTIONS 64 +DEFINES += QT_BUILD_CORE_LIB QT_NO_USING_NAMESPACE QT_EXCEPTIONS 65 +QMAKE_CXXFLAGS_EXCEPTIONS_OFF -= -fno-exceptions 66 +QMAKE_CFLAGS -= -fno-exceptions 67 +QMAKE_CXXFLAGS -= -fno-exceptions 68 +QMAKE_LFLAGS -= -fno-exceptions 69 win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x67000000 70 irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused 71 -
new file aqua/qt4-mac-devel/files/disable-exceptions2.patch
diff --git a/aqua/qt4-mac-devel/files/disable-exceptions2.patch b/aqua/qt4-mac-devel/files/disable-exceptions2.patch new file mode 100644 index 0000000..64f23cf
- + 1 --- src/xmlpatterns/orig.xmlpatterns.pro 2014-12-16 13:58:27.000000000 +0100 2 +++ src/xmlpatterns/xmlpatterns.pro 2014-12-16 13:59:46.000000000 +0100 3 @@ -2,8 +2,13 @@ 4 QPRO_PWD = $$PWD 5 QT = core \ 6 network 7 +DEFINES -= QT_NO_EXCEPTIONS 8 DEFINES += QT_BUILD_XMLPATTERNS_LIB \ 9 - QT_NO_USING_NAMESPACE 10 + QT_NO_USING_NAMESPACE QT_EXCEPTIONS 11 +QMAKE_CXXFLAGS_EXCEPTIONS_OFF -= -fno-exceptions 12 +QMAKE_CFLAGS -= -fno-exceptions 13 +QMAKE_CXXFLAGS -= -fno-exceptions 14 +QMAKE_LFLAGS -= -fno-exceptions 15 win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x61000000 16 unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore \ 17 QtNetwork -
new file aqua/qt4-mac-devel/files/fconstant_cfstrings.test
diff --git a/aqua/qt4-mac-devel/files/fconstant_cfstrings.test b/aqua/qt4-mac-devel/files/fconstant_cfstrings.test new file mode 100755 index 0000000..d3ce4dc
- + 1 #!/bin/sh 2 3 FCONSTANT_CFSTRINGS_SUPPORT=no 4 COMPILER=$1 5 VERBOSE=$2 6 WORKDIR=$3 7 8 cd $3 9 touch fconstant_cfstrings.c 10 11 if "$COMPILER" -fconstant-cfstrings -c fconstant_cfstrings.c 2>/dev/null 1>&2; then 12 if "$COMPILER" -fconstant-cfstrings -c fconstant_cfstrings.c 2>&1 | grep "unrecognized" >/dev/null ; then 13 true 14 else 15 FCONSTANT_CFSTRINGS_SUPPORT=yes 16 fi 17 fi 18 rm -f fconstant_cfstrings.c fconstant_cfstrings.o 19 20 if [ "$FCONSTANT_CFSTRINGS_SUPPORT" != "yes" ]; then 21 [ "$VERBOSE" = "yes" ] && echo "compiler flag -fconstant-cfstrings support not detected" 22 exit 0 23 else 24 [ "$VERBOSE" = "yes" ] && echo "compiler flag -fconstant-cfstrings support detected" 25 exit 1 26 fi -
new file aqua/qt4-mac-devel/files/library_path/library_path.test
diff --git a/aqua/qt4-mac-devel/files/library_path/library_path.test b/aqua/qt4-mac-devel/files/library_path/library_path.test new file mode 100755 index 0000000..9c3486a
- + 1 #!/bin/sh 2 3 LIBRARY_PATH_SUPPORT=no 4 COMPILER=$1 5 VERBOSE=$2 6 WORKDIR=$3 7 8 done=no 9 cd $3 10 unset LIBRARY_PATH 11 12 # (1) make the library 13 if "$COMPILER" -dynamiclib -o library_path_lib.dylib library_path_lib.c 2>/dev/null 1>&2; then 14 # (2) do the test, without LIBRARY_PATH; should fail 15 if "$COMPILER" -nostdinc -I. -o library_path_test library_path_test.c -lrary_path_lib 2>/dev/null 1>&2; then 16 echo "Compile seems to work even with LIBRARY_PATH not set; assuming LIBRARY_PATH does not work" 17 done=0 18 else 19 # (3) do the test, with LIBRARY_PATH set; should pass 20 export LIBRARY_PATH=. 21 if "$COMPILER" -nostdinc -I. -o library_path_test library_path_test.c -lrary_path_lib 2>/dev/null 1>&2; then 22 LIBRARY_PATH_SUPPORT=yes 23 fi 24 fi 25 rm -f library_path_test.o library_path_test 26 else 27 echo "Unable to compile library; please fix this issue" 28 done=0 29 fi 30 rm -f library_path_lib.dylib library_path_lib.o 31 32 # if done above, assume it works and exit 33 [ "$done" != "no" ] && exit $done 34 35 if [ "$LIBRARY_PATH_SUPPORT" != "yes" ]; then 36 [ "$VERBOSE" = "yes" ] && echo "LIBRARY_PATH support not detected" 37 exit 0 38 else 39 [ "$VERBOSE" = "yes" ] && echo "LIBRARY_PATH support detected" 40 exit 1 41 fi -
new file aqua/qt4-mac-devel/files/library_path/library_path_lib.c
diff --git a/aqua/qt4-mac-devel/files/library_path/library_path_lib.c b/aqua/qt4-mac-devel/files/library_path/library_path_lib.c new file mode 100644 index 0000000..9a19658
- + 1 int test_cpath; -
new file aqua/qt4-mac-devel/files/library_path/library_path_lib.h
diff --git a/aqua/qt4-mac-devel/files/library_path/library_path_lib.h b/aqua/qt4-mac-devel/files/library_path/library_path_lib.h new file mode 100644 index 0000000..9ebc53a
- + 1 extern int test_cpath; -
new file aqua/qt4-mac-devel/files/library_path/library_path_test.c
diff --git a/aqua/qt4-mac-devel/files/library_path/library_path_test.c b/aqua/qt4-mac-devel/files/library_path/library_path_test.c new file mode 100644 index 0000000..73379c8
- + 1 #include <library_path_lib.h> 2 3 int main (void) { 4 test_cpath = 1; 5 return (0); 6 } -
new file aqua/qt4-mac-devel/files/objc_block/objc_block.test
diff --git a/aqua/qt4-mac-devel/files/objc_block/objc_block.test b/aqua/qt4-mac-devel/files/objc_block/objc_block.test new file mode 100755 index 0000000..e2dcff9
- + 1 #!/bin/sh 2 3 OBJC_BLOCK_SUPPORT=no 4 COMPILER=$1 5 VERBOSE=$2 6 WORKDIR=$3 7 8 cd $3 9 10 if "$COMPILER" -c objc_block_test.m 2>/dev/null 1>&2; then 11 OBJC_BLOCK_SUPPORT=yes 12 fi 13 rm -f objc_block_test.o 14 15 if [ "$OBJC_BLOCK_SUPPORT" != "yes" ]; then 16 [ "$VERBOSE" = "yes" ] && echo "Objective-C block (^) support not detected" 17 exit 0 18 else 19 [ "$VERBOSE" = "yes" ] && echo "Objective-C block (^) support detected" 20 exit 1 21 fi -
new file aqua/qt4-mac-devel/files/objc_block/objc_block_test.m
diff --git a/aqua/qt4-mac-devel/files/objc_block/objc_block_test.m b/aqua/qt4-mac-devel/files/objc_block/objc_block_test.m new file mode 100644 index 0000000..2b0ea34
- + 1 double (^multiplyTwoValues)(double, double) = 2 ^(double firstValue, double secondValue) { 3 return firstValue * secondValue; 4 }; 5 6 int main () { 7 double result = multiplyTwoValues(2,4); 8 (void) result; 9 return (0); 10 } -
new file aqua/qt4-mac-devel/files/objective_cxx.prf
diff --git a/aqua/qt4-mac-devel/files/objective_cxx.prf b/aqua/qt4-mac-devel/files/objective_cxx.prf new file mode 100644 index 0000000..3a89947
- + 1 # Add compiler directives for Objective C++ (.mm) only 2 # 3 # OBJECTIVE_CXX_SOURCES has already been set in "split_sources" 4 5 isEmpty(QMAKE_OBJECTIVE_CXX):QMAKE_OBJECTIVE_CXX = $$QMAKE_CXX 6 7 OBJECTIVE_CXX_OBJECTS_DIR = $$OBJECTS_DIR 8 isEmpty(OBJECTIVE_CXX_OBJECTS_DIR):OBJECTIVE_CXX_OBJECTS_DIR = . 9 isEmpty(QMAKE_EXT_OBJECTIVE_CXX):QMAKE_EXT_OBJECTIVE_CXX = .mm 10 11 objective_cxx.dependency_type = TYPE_C 12 objective_cxx.variables = QMAKE_OBJECTIVE_CXXFLAGS 13 objective_cxx.commands = $$QMAKE_OBJECTIVE_CXX -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CXXFLAGS) $(DEFINES) $(INCPATH) -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} 14 objective_cxx.output = $$OBJECTIVE_CXX_OBJECTS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} 15 objective_cxx.input = OBJECTIVE_CXX_SOURCES 16 objective_cxx.name = Compile ${QMAKE_FILE_IN} 17 silent:objective_cxx.commands = @echo objective-cxx ${QMAKE_FILE_IN} && $$objective_cxx.commands 18 QMAKE_EXTRA_COMPILERS += objective_cxx -
new file aqua/qt4-mac-devel/files/patch-10.10.diff
diff --git a/aqua/qt4-mac-devel/files/patch-10.10.diff b/aqua/qt4-mac-devel/files/patch-10.10.diff new file mode 100644 index 0000000..773f825
- + 1 --- src/corelib/global/qglobal.cpp.orig 2 +++ src/corelib/global/qglobal.cpp 3 @@ -1185,6 +1185,7 @@ bool qSharedBuild() 4 \value MV_10_7 OS X 10.7 5 \value MV_10_8 OS X 10.8 6 \value MV_10_9 OS X 10.9 7 + \value MV_10_10 OS X 10.10 8 \value MV_Unknown An unknown and currently unsupported platform 9 10 \value MV_CHEETAH Apple codename for MV_10_0 11 @@ -1197,6 +1198,7 @@ bool qSharedBuild() 12 \value MV_LION Apple codename for MV_10_7 13 \value MV_MOUNTAINLION Apple codename for MV_10_8 14 \value MV_MAVERICKS Apple codename for MV_10_9 15 + \value MV_YOSEMITE Apple codename for MV_10_10 16 17 \sa WinVersion, SymbianVersion 18 */ 19 @@ -1674,8 +1676,9 @@ static QSysInfo::MacVersion macVersion() 20 { 21 #if !defined(Q_OS_IOS) 22 SInt32 gestalt_version; 23 - if (Gestalt(gestaltSystemVersion, &gestalt_version) == noErr) { 24 - return QSysInfo::MacVersion(((gestalt_version & 0x00F0) >> 4) + 2); 25 + if (Gestalt(gestaltSystemVersionMinor, &gestalt_version) == noErr) { 26 + // add 2 because OS X 10.0 is 0x02 in the enum 27 + return QSysInfo::MacVersion(gestalt_version + 2); 28 } 29 #endif 30 return QSysInfo::MV_Unknown; 31 --- src/corelib/global/qglobal.h.orig 32 +++ src/corelib/global/qglobal.h 33 @@ -304,31 +304,69 @@ namespace QT_NAMESPACE {} 34 #endif 35 36 #ifdef Q_OS_DARWIN 37 -# ifdef MAC_OS_X_VERSION_MIN_REQUIRED 38 -# undef MAC_OS_X_VERSION_MIN_REQUIRED 39 -# endif 40 -# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 41 # include <AvailabilityMacros.h> 42 -# if !defined(MAC_OS_X_VERSION_10_3) 43 -# define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1 44 +# 45 +# // Availability.h was introduced with the OS X 10.6 SDK 46 +# if (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060) || \ 47 + (defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1060) 48 +# include <Availability.h> 49 +# endif 50 +# 51 +# ifdef Q_OS_MACX 52 +# if !defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED < 1040 53 +# undef __MAC_OS_X_VERSION_MIN_REQUIRED 54 +# define __MAC_OS_X_VERSION_MIN_REQUIRED 1040 55 +# endif 56 +# if !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED < 1040 57 +# undef MAC_OS_X_VERSION_MIN_REQUIRED 58 +# define MAC_OS_X_VERSION_MIN_REQUIRED 1040 59 +# endif 60 +# endif 61 +# 62 +# // Numerical checks are preferred to named checks, but to be safe 63 +# // we define the missing version names in case Qt uses them. 64 +# 65 +# if !defined(__MAC_10_4) 66 +# define __MAC_10_4 1040 67 +# endif 68 +# if !defined(__MAC_10_5) 69 +# define __MAC_10_5 1050 70 +# endif 71 +# if !defined(__MAC_10_6) 72 +# define __MAC_10_6 1060 73 +# endif 74 +# if !defined(__MAC_10_7) 75 +# define __MAC_10_7 1070 76 +# endif 77 +# if !defined(__MAC_10_8) 78 +# define __MAC_10_8 1080 79 +# endif 80 +# if !defined(__MAC_10_9) 81 +# define __MAC_10_9 1090 82 +# endif 83 +# if !defined(__MAC_10_10) 84 +# define __MAC_10_10 101000 85 # endif 86 # if !defined(MAC_OS_X_VERSION_10_4) 87 -# define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1 88 +# define MAC_OS_X_VERSION_10_4 1040 89 # endif 90 # if !defined(MAC_OS_X_VERSION_10_5) 91 -# define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1 92 +# define MAC_OS_X_VERSION_10_5 1050 93 # endif 94 # if !defined(MAC_OS_X_VERSION_10_6) 95 -# define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1 96 +# define MAC_OS_X_VERSION_10_6 1060 97 # endif 98 # if !defined(MAC_OS_X_VERSION_10_7) 99 -# define MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 + 1 100 +# define MAC_OS_X_VERSION_10_7 1070 101 # endif 102 # if !defined(MAC_OS_X_VERSION_10_8) 103 -# define MAC_OS_X_VERSION_10_8 MAC_OS_X_VERSION_10_7 + 1 104 +# define MAC_OS_X_VERSION_10_8 1080 105 # endif 106 # if !defined(MAC_OS_X_VERSION_10_9) 107 -# define MAC_OS_X_VERSION_10_9 MAC_OS_X_VERSION_10_8 + 1 108 +# define MAC_OS_X_VERSION_10_9 1090 109 +# endif 110 +# if !defined(MAC_OS_X_VERSION_10_10) 111 +# define MAC_OS_X_VERSION_10_10 101000 112 # endif 113 #endif 114 115 @@ -1630,6 +1668,7 @@ public: 116 MV_10_7 = 0x0009, 117 MV_10_8 = 0x000A, 118 MV_10_9 = 0x000B, 119 + MV_10_10 = 0x000C, 120 121 /* codenames */ 122 MV_CHEETAH = MV_10_0, 123 @@ -1641,7 +1680,8 @@ public: 124 MV_SNOWLEOPARD = MV_10_6, 125 MV_LION = MV_10_7, 126 MV_MOUNTAINLION = MV_10_8, 127 - MV_MAVERICKS = MV_10_9 128 + MV_MAVERICKS = MV_10_9, 129 + MV_YOSEMITE = MV_10_10 130 }; 131 static const MacVersion MacintoshVersion; 132 #endif 133 --- src/gui/dialogs/qcolordialog_mac.mm.orig 134 +++ src/gui/dialogs/qcolordialog_mac.mm 135 @@ -318,7 +318,7 @@ QT_USE_NAMESPACE 136 // It's important that the modal event loop is stopped before 137 // we accept/reject QColorDialog, since QColorDialog has its 138 // own event loop that needs to be stopped last. 139 - [NSApp stopModalWithCode:code]; 140 + [[NSApplication sharedApplication] stopModalWithCode:code]; 141 } else { 142 // Since we are not in a modal event loop, we can safely close 143 // down QColorDialog 144 @@ -350,7 +350,7 @@ QT_USE_NAMESPACE 145 while (!modalEnded) { 146 #ifndef QT_NO_EXCEPTIONS 147 @try { 148 - [NSApp runModalForWindow:mColorPanel]; 149 + [[NSApplication sharedApplication] runModalForWindow:mColorPanel]; 150 modalEnded = true; 151 } @catch (NSException *) { 152 // For some reason, NSColorPanel throws an exception when 153 @@ -358,7 +358,7 @@ QT_USE_NAMESPACE 154 // palette (tab three). 155 } 156 #else 157 - [NSApp runModalForWindow:mColorPanel]; 158 + [[NSApplication sharedApplication] runModalForWindow:mColorPanel]; 159 modalEnded = true; 160 #endif 161 } 162 @@ -469,10 +469,10 @@ void QColorDialogPrivate::mac_nativeDialogModalHelp() 163 // Do a queued meta-call to open the native modal dialog so it opens after the new 164 // event loop has started to execute (in QDialog::exec). Using a timer rather than 165 // a queued meta call is intentional to ensure that the call is only delivered when 166 - // [NSApp run] runs (timers are handeled special in cocoa). If NSApp is not 167 + // [NSApplication run] runs (timers are handeled special in cocoa). If NSApplication is not 168 // running (which is the case if e.g a top-most QEventLoop has been 169 // interrupted, and the second-most event loop has not yet been reactivated (regardless 170 - // if [NSApp run] is still on the stack)), showing a native modal dialog will fail. 171 + // if [NSApplication run] is still on the stack)), showing a native modal dialog will fail. 172 if (delegate){ 173 Q_Q(QColorDialog); 174 QTimer::singleShot(1, q, SLOT(_q_macRunNativeAppModalPanel())); 175 --- src/gui/dialogs/qfiledialog_mac.mm.orig 176 +++ src/gui/dialogs/qfiledialog_mac.mm 177 @@ -229,7 +229,7 @@ QT_USE_NAMESPACE 178 if ([mSavePanel respondsToSelector:@selector(close)]) 179 [mSavePanel close]; 180 if ([mSavePanel isSheet]) 181 - [NSApp endSheet: mSavePanel]; 182 + [[NSApplication sharedApplication] endSheet: mSavePanel]; 183 } 184 185 - (void)showModelessPanel 186 @@ -1162,10 +1162,10 @@ void QFileDialogPrivate::mac_nativeDialogModalHelp() 187 // Do a queued meta-call to open the native modal dialog so it opens after the new 188 // event loop has started to execute (in QDialog::exec). Using a timer rather than 189 // a queued meta call is intentional to ensure that the call is only delivered when 190 - // [NSApp run] runs (timers are handeled special in cocoa). If NSApp is not 191 + // [NSApplication run] runs (timers are handeled special in cocoa). If NSApplication is not 192 // running (which is the case if e.g a top-most QEventLoop has been 193 // interrupted, and the second-most event loop has not yet been reactivated (regardless 194 - // if [NSApp run] is still on the stack)), showing a native modal dialog will fail. 195 + // if [NSApplication run] is still on the stack)), showing a native modal dialog will fail. 196 if (nativeDialogInUse){ 197 Q_Q(QFileDialog); 198 QTimer::singleShot(1, q, SLOT(_q_macRunNativeAppModalPanel())); 199 --- src/gui/dialogs/qfontdialog_mac.mm.orig 200 +++ src/gui/dialogs/qfontdialog_mac.mm 201 @@ -230,7 +230,7 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) 202 mAppModal = true; 203 NSWindow *ourPanel = [mStolenContentView window]; 204 [ourPanel setReleasedWhenClosed:NO]; 205 - [NSApp runModalForWindow:ourPanel]; 206 + [[NSApplication sharedApplication] runModalForWindow:ourPanel]; 207 QAbstractEventDispatcher::instance()->interrupt(); 208 209 if (mReturnCode == NSOKButton) 210 @@ -256,7 +256,7 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) 211 212 mAppModal = false; 213 NSWindow *ourPanel = [mStolenContentView window]; 214 - [NSApp beginSheet:ourPanel 215 + [[NSApplication sharedApplication] beginSheet:ourPanel 216 modalForWindow:window 217 modalDelegate:0 218 didEndSelector:0 219 @@ -456,7 +456,7 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) 220 221 if (mAppModal) { 222 mReturnCode = code; 223 - [NSApp stopModalWithCode:code]; 224 + [[NSApplication sharedApplication] stopModalWithCode:code]; 225 } else { 226 if (code == NSOKButton) 227 mPriv->fontDialog()->accept(); 228 @@ -636,10 +636,10 @@ void QFontDialogPrivate::mac_nativeDialogModalHelp() 229 // Do a queued meta-call to open the native modal dialog so it opens after the new 230 // event loop has started to execute (in QDialog::exec). Using a timer rather than 231 // a queued meta call is intentional to ensure that the call is only delivered when 232 - // [NSApp run] runs (timers are handeled special in cocoa). If NSApp is not 233 + // [NSApplication run] runs (timers are handeled special in cocoa). If NSApplication is not 234 // running (which is the case if e.g a top-most QEventLoop has been 235 // interrupted, and the second-most event loop has not yet been reactivated (regardless 236 - // if [NSApp run] is still on the stack)), showing a native modal dialog will fail. 237 + // if [NSApplication run] is still on the stack)), showing a native modal dialog will fail. 238 if (nativeDialogInUse) { 239 Q_Q(QFontDialog); 240 QTimer::singleShot(1, q, SLOT(_q_macRunNativeAppModalPanel())); 241 --- src/gui/kernel/qapplication_mac.mm.orig 242 +++ src/gui/kernel/qapplication_mac.mm 243 @@ -468,7 +468,7 @@ void qt_mac_set_app_icon(const QPixmap &pixmap) 244 image = static_cast<NSImage *>(qt_mac_create_nsimage(pixmap)); 245 } 246 247 - [NSApp setApplicationIconImage:image]; 248 + [[NSApplication sharedApplication] setApplicationIconImage:image]; 249 [image release]; 250 #endif 251 } 252 @@ -750,7 +750,7 @@ void qt_event_request_showsheet(QWidget *w) 253 Q_ASSERT(qt_mac_is_macsheet(w)); 254 #ifdef QT_MAC_USE_COCOA 255 w->repaint(); 256 - [NSApp beginSheet:qt_mac_window_for(w) modalForWindow:qt_mac_window_for(w->parentWidget()) 257 + [[NSApplication sharedApplication] beginSheet:qt_mac_window_for(w) modalForWindow:qt_mac_window_for(w->parentWidget()) 258 modalDelegate:nil didEndSelector:nil contextInfo:0]; 259 #else 260 qt_mac_event_remove(request_showsheet_pending); 261 @@ -992,7 +992,7 @@ Q_GUI_EXPORT void qt_mac_set_dock_menu(QMenu *menu) 262 { 263 qt_mac_dock_menu = menu; 264 #ifdef QT_MAC_USE_COCOA 265 - [NSApp setDockMenu:menu->macMenu()]; 266 + [[NSApplication sharedApplication] setDockMenu:menu->macMenu()]; 267 #else 268 SetApplicationDockTileMenu(menu->macMenu()); 269 #endif 270 @@ -1011,7 +1011,7 @@ void qt_mac_event_release(QWidget *w) 271 #ifndef QT_MAC_USE_COCOA 272 SetApplicationDockTileMenu(0); 273 #else 274 - [NSApp setDockMenu:0]; 275 + [[NSApplication sharedApplication] setDockMenu:0]; 276 #endif 277 } 278 } 279 @@ -1463,7 +1463,7 @@ QWidget *QApplication::topLevelAt(const QPoint &p) 280 NSWindowList(windowCount, windowList.data()); 281 int firstQtWindowFound = -1; 282 for (int i = 0; i < windowCount; ++i) { 283 - NSWindow *window = [NSApp windowWithWindowNumber:windowList[i]]; 284 + NSWindow *window = [[NSApplication sharedApplication] windowWithWindowNumber:windowList[i]]; 285 if (window) { 286 QWidget *candidateWindow = [window QT_MANGLE_NAMESPACE(qt_qwidget)]; 287 if (candidateWindow && firstQtWindowFound == -1) 288 @@ -3071,7 +3071,7 @@ bool QApplicationPrivate::canQuit() 289 #else 290 Q_Q(QApplication); 291 #ifdef QT_MAC_USE_COCOA 292 - [[NSApp mainMenu] cancelTracking]; 293 + [[[NSApplication sharedApplication] mainMenu] cancelTracking]; 294 #else 295 HiliteMenu(0); 296 #endif 297 @@ -3146,7 +3146,7 @@ void onApplicationChangedActivation( bool activated ) 298 } 299 300 if (!app->activeWindow()) { 301 - OSWindowRef wp = [NSApp keyWindow]; 302 + OSWindowRef wp = [[NSApplication sharedApplication] keyWindow]; 303 if (QWidget *tmp_w = qt_mac_find_window(wp)) 304 app->setActiveWindow(tmp_w); 305 } 306 --- src/gui/kernel/qcocoaapplication_mac.mm.orig 307 +++ src/gui/kernel/qcocoaapplication_mac.mm 308 @@ -147,7 +147,7 @@ QT_USE_NAMESPACE 309 if ([event type] == NSApplicationDefined) { 310 switch ([event subtype]) { 311 case QtCocoaEventSubTypePostMessage: 312 - [NSApp QT_MANGLE_NAMESPACE(qt_sendPostedMessage):event]; 313 + [[NSApplication sharedApplication] QT_MANGLE_NAMESPACE(qt_sendPostedMessage):event]; 314 return true; 315 default: 316 break; 317 @@ -174,7 +174,7 @@ QT_USE_NAMESPACE 318 // be called instead of sendEvent if redirection occurs. 319 // 'self' will then be an instance of NSApplication 320 // (and not QNSApplication) 321 - if (![NSApp QT_MANGLE_NAMESPACE(qt_filterEvent):event]) 322 + if (![[NSApplication sharedApplication] QT_MANGLE_NAMESPACE(qt_filterEvent):event]) 323 [self QT_MANGLE_NAMESPACE(qt_sendEvent_original):event]; 324 } 325 326 @@ -182,7 +182,7 @@ QT_USE_NAMESPACE 327 { 328 // This method will be called if 329 // no redirection occurs 330 - if (![NSApp QT_MANGLE_NAMESPACE(qt_filterEvent):event]) 331 + if (![[NSApplication sharedApplication] QT_MANGLE_NAMESPACE(qt_filterEvent):event]) 332 [super sendEvent:event]; 333 } 334 335 @@ -194,7 +194,7 @@ QT_USE_NAMESPACE 336 // visible on screen. Note: If Qt is used as a plugin, Qt will not use a 337 // native menu bar. Hence, we will also not need to do any redirection etc. as 338 // we do with sendEvent. 339 - [[NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender]; 340 + [[[NSApplication sharedApplication] QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender]; 341 } 342 343 @end 344 @@ -203,7 +203,7 @@ QT_BEGIN_NAMESPACE 345 346 void qt_redirectNSApplicationSendEvent() 347 { 348 - if ([NSApp isMemberOfClass:[QT_MANGLE_NAMESPACE(QNSApplication) class]]) { 349 + if ([[NSApplication sharedApplication] isMemberOfClass:[QT_MANGLE_NAMESPACE(QNSApplication) class]]) { 350 // No need to change implementation since Qt 351 // already controls a subclass of NSApplication 352 return; 353 --- src/gui/kernel/qcocoaapplicationdelegate_mac.mm.orig 354 +++ src/gui/kernel/qcocoaapplicationdelegate_mac.mm 355 @@ -122,7 +122,7 @@ static void cleanupCocoaApplicationDelegate() 356 [dockMenu release]; 357 [qtMenuLoader release]; 358 if (reflectionDelegate) { 359 - [NSApp setDelegate:reflectionDelegate]; 360 + [[NSApplication sharedApplication] setDelegate:reflectionDelegate]; 361 [reflectionDelegate release]; 362 } 363 [super dealloc]; 364 @@ -183,7 +183,7 @@ static void cleanupCocoaApplicationDelegate() 365 return [[qtMenuLoader retain] autorelease]; 366 } 367 368 -// This function will only be called when NSApp is actually running. Before 369 +// This function will only be called when NSApplication is actually running. Before 370 // that, the kAEQuitApplication Apple event will be sent to 371 // QApplicationPrivate::globalAppleEventProcessor in qapplication_mac.mm 372 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender 373 @@ -249,7 +249,7 @@ static void cleanupCocoaApplicationDelegate() 374 && [reflectionDelegate respondsToSelector: 375 @selector(applicationShouldTerminateAfterLastWindowClosed:)]) 376 return [reflectionDelegate applicationShouldTerminateAfterLastWindowClosed:sender]; 377 - return NO; // Someday qApp->quitOnLastWindowClosed(); when QApp and NSApp work closer together. 378 + return NO; // Someday qApp->quitOnLastWindowClosed(); when qApp and NSApplication work closer together. 379 } 380 381 382 @@ -289,13 +289,26 @@ static void cleanupCocoaApplicationDelegate() 383 qt_button_down = 0; 384 } 385 386 +- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag 387 +{ 388 + Q_UNUSED(theApplication); 389 + Q_UNUSED(flag); 390 + // The reflection delegate gets precedence 391 + if (reflectionDelegate 392 + && [reflectionDelegate respondsToSelector:@selector(applicationShouldHandleReopen:hasVisibleWindows:)]) 393 + return [reflectionDelegate applicationShouldHandleReopen:theApplication hasVisibleWindows:flag]; 394 + 395 + onApplicationChangedActivation(true); 396 + return NO; 397 +} 398 + 399 - (void)applicationDidChangeScreenParameters:(NSNotification *)notification 400 { 401 Q_UNUSED(notification); 402 QDesktopWidgetImplementation::instance()->onResize(); 403 } 404 405 -- (void)setReflectionDelegate:(NSObject <NSApplicationDelegate> *)oldDelegate 406 +- (void)setReflectionDelegate:(id <NSApplicationDelegate>)oldDelegate 407 { 408 [oldDelegate retain]; 409 [reflectionDelegate release]; 410 @@ -342,12 +355,12 @@ static void cleanupCocoaApplicationDelegate() 411 { 412 Q_UNUSED(event); 413 Q_UNUSED(replyEvent); 414 - [NSApp terminate:self]; 415 + [[NSApplication sharedApplication] terminate:self]; 416 } 417 418 - (void)qtDispatcherToQAction:(id)sender 419 { 420 - [[NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender]; 421 + [[[NSApplication sharedApplication] QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender]; 422 } 423 424 @end 425 --- src/gui/kernel/qcocoaapplicationdelegate_mac_p.h.orig 426 +++ src/gui/kernel/qcocoaapplicationdelegate_mac_p.h 427 @@ -113,7 +113,7 @@ QT_FORWARD_DECLARE_CLASS(QApplicationPrivate); 428 QApplicationPrivate *qtPrivate; 429 NSMenu *dockMenu; 430 QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *qtMenuLoader; 431 - NSObject <NSApplicationDelegate> *reflectionDelegate; 432 + id <NSApplicationDelegate> reflectionDelegate; 433 bool inLaunch; 434 } 435 + (QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate)*)sharedDelegate; 436 @@ -122,7 +122,7 @@ QT_FORWARD_DECLARE_CLASS(QApplicationPrivate); 437 - (QApplicationPrivate *)qAppPrivate; 438 - (void)setMenuLoader:(QT_MANGLE_NAMESPACE(QCocoaMenuLoader)*)menuLoader; 439 - (QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *)menuLoader; 440 -- (void)setReflectionDelegate:(NSObject <NSApplicationDelegate> *)oldDelegate; 441 +- (void)setReflectionDelegate:(id <NSApplicationDelegate>)oldDelegate; 442 - (void)getUrl:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent; 443 @end 444 #endif 445 --- src/gui/kernel/qcocoamenuloader_mac.mm.orig 446 +++ src/gui/kernel/qcocoamenuloader_mac.mm 447 @@ -92,8 +92,8 @@ QT_USE_NAMESPACE 448 // 'Quit' item. When changing menu bar (e.g when switching between 449 // windows with different menu bars), we never recreate this menu, but 450 // instead pull it out the current menu bar and place into the new one: 451 - NSMenu *mainMenu = [NSApp mainMenu]; 452 - if ([NSApp mainMenu] == menu) 453 + NSMenu *mainMenu = [[NSApplication sharedApplication] mainMenu]; 454 + if ([[NSApplication sharedApplication] mainMenu] == menu) 455 return; // nothing to do (menu is the current menu bar)! 456 457 #ifndef QT_NAMESPACE 458 @@ -201,27 +201,27 @@ QT_USE_NAMESPACE 459 460 - (void)terminate:(id)sender 461 { 462 - [NSApp terminate:sender]; 463 + [[NSApplication sharedApplication] terminate:sender]; 464 } 465 466 - (void)orderFrontStandardAboutPanel:(id)sender 467 { 468 - [NSApp orderFrontStandardAboutPanel:sender]; 469 + [[NSApplication sharedApplication] orderFrontStandardAboutPanel:sender]; 470 } 471 472 - (void)hideOtherApplications:(id)sender 473 { 474 - [NSApp hideOtherApplications:sender]; 475 + [[NSApplication sharedApplication] hideOtherApplications:sender]; 476 } 477 478 - (void)unhideAllApplications:(id)sender 479 { 480 - [NSApp unhideAllApplications:sender]; 481 + [[NSApplication sharedApplication] unhideAllApplications:sender]; 482 } 483 484 - (void)hide:(id)sender 485 { 486 - [NSApp hide:sender]; 487 + [[NSApplication sharedApplication] hide:sender]; 488 } 489 490 - (void)qtUpdateMenubar 491 @@ -258,7 +258,7 @@ QT_USE_NAMESPACE 492 493 - (void)orderFrontCharacterPalette:(id)sender 494 { 495 - [NSApp orderFrontCharacterPalette:sender]; 496 + [[NSApplication sharedApplication] orderFrontCharacterPalette:sender]; 497 } 498 499 - (BOOL)validateMenuItem:(NSMenuItem*)menuItem 500 @@ -266,7 +266,7 @@ QT_USE_NAMESPACE 501 if ([menuItem action] == @selector(hide:) 502 || [menuItem action] == @selector(hideOtherApplications:) 503 || [menuItem action] == @selector(unhideAllApplications:)) { 504 - return [NSApp validateMenuItem:menuItem]; 505 + return [[NSApplication sharedApplication] validateMenuItem:menuItem]; 506 } else { 507 return [menuItem isEnabled]; 508 } 509 --- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h.orig 510 +++ src/gui/kernel/qcocoasharedwindowmethods_mac_p.h 511 @@ -143,7 +143,7 @@ QT_END_NAMESPACE 512 { 513 // This function is called from the quit item in the menubar when this window 514 // is in the first responder chain (see also qtDispatcherToQAction above) 515 - [NSApp terminate:sender]; 516 + [[NSApplication sharedApplication] terminate:sender]; 517 } 518 519 - (void)setLevel:(NSInteger)windowLevel 520 @@ -364,7 +364,7 @@ QT_END_NAMESPACE 521 522 if ([sender draggingSource] != nil) { 523 // modifier flags might have changed, update it here since we don't send any input events. 524 - QApplicationPrivate::modifier_buttons = qt_cocoaModifiers2QtModifiers([[NSApp currentEvent] modifierFlags]); 525 + QApplicationPrivate::modifier_buttons = qt_cocoaModifiers2QtModifiers([[[NSApplication sharedApplication] currentEvent] modifierFlags]); 526 modifiers = QApplication::keyboardModifiers(); 527 } else { 528 // when the source is from another application the above technique will not work. 529 @@ -456,7 +456,7 @@ QT_END_NAMESPACE 530 531 // Update modifiers: 532 if ([sender draggingSource] != nil) { 533 - QApplicationPrivate::modifier_buttons = qt_cocoaModifiers2QtModifiers([[NSApp currentEvent] modifierFlags]); 534 + QApplicationPrivate::modifier_buttons = qt_cocoaModifiers2QtModifiers([[[NSApplication sharedApplication] currentEvent] modifierFlags]); 535 modifiers = QApplication::keyboardModifiers(); 536 } else { 537 modifiers = qt_cocoaDragOperation2QtModifiers(nsActions); 538 --- src/gui/kernel/qeventdispatcher_mac.mm.orig 539 +++ src/gui/kernel/qeventdispatcher_mac.mm 540 @@ -461,7 +461,7 @@ static bool qt_mac_send_event(QEventLoop::ProcessEventsFlags, OSEventRef event, 541 if (pt) 542 [pt sendEvent:event]; 543 else 544 - [NSApp sendEvent:event]; 545 + [[NSApplication sharedApplication] sendEvent:event]; 546 return true; 547 #endif 548 } 549 @@ -521,12 +521,12 @@ static inline void qt_mac_waitForMoreEvents() 550 // (and free up cpu time) until at least one event occur. 551 // This implementation is a bit on the edge, but seems to 552 // work fine: 553 - NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask 554 + NSEvent* event = [[NSApplication sharedApplication] nextEventMatchingMask:NSAnyEventMask 555 untilDate:[NSDate distantFuture] 556 inMode:NSDefaultRunLoopMode 557 dequeue:YES]; 558 if (event) 559 - [NSApp postEvent:event atStart:YES]; 560 + [[NSApplication sharedApplication] postEvent:event atStart:YES]; 561 #endif 562 } 563 564 @@ -537,12 +537,12 @@ static inline void qt_mac_waitForMoreModalSessionEvents() 565 // (and free up cpu time) until at least one event occur. 566 // This implementation is a bit on the edge, but seems to 567 // work fine: 568 - NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask 569 + NSEvent* event = [[NSApplication sharedApplication] nextEventMatchingMask:NSAnyEventMask 570 untilDate:[NSDate distantFuture] 571 inMode:NSModalPanelRunLoopMode 572 dequeue:YES]; 573 if (event) 574 - [NSApp postEvent:event atStart:YES]; 575 + [[NSApplication sharedApplication] postEvent:event atStart:YES]; 576 } 577 #endif 578 579 @@ -588,23 +588,23 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) 580 // done from the application itself. And if processEvents is called 581 // manually (rather than from a QEventLoop), we cannot enter a tight 582 // loop and block this call, but instead we need to return after one flush. 583 - // Finally, if we are to exclude user input events, we cannot call [NSApp run] 584 + // Finally, if we are to exclude user input events, we cannot call [NSApplication run] 585 // as we then loose control over which events gets dispatched: 586 - const bool canExec_3rdParty = d->nsAppRunCalledByQt || ![NSApp isRunning]; 587 + const bool canExec_3rdParty = d->nsAppRunCalledByQt || ![[NSApplication sharedApplication] isRunning]; 588 const bool canExec_Qt = !excludeUserEvents && 589 (flags & QEventLoop::DialogExec || flags & QEventLoop::EventLoopExec) ; 590 591 if (canExec_Qt && canExec_3rdParty) { 592 // We can use exec-mode, meaning that we can stay in a tight loop until 593 // interrupted. This is mostly an optimization, but it allow us to use 594 - // [NSApp run], which is the normal code path for cocoa applications. 595 + // [NSApplication run], which is the normal code path for cocoa applications. 596 if (NSModalSession session = d->currentModalSession()) { 597 QBoolBlocker execGuard(d->currentExecIsNSAppRun, false); 598 - while ([NSApp runModalSession:session] == NSRunContinuesResponse && !d->interrupt) 599 + while ([[NSApplication sharedApplication] runModalSession:session] == NSRunContinuesResponse && !d->interrupt) 600 qt_mac_waitForMoreModalSessionEvents(); 601 602 if (!d->interrupt && session == d->currentModalSessionCached) { 603 - // Someone called [NSApp stopModal:] from outside the event 604 + // Someone called [[NSApplication sharedApplication] stopModal:] from outside the event 605 // dispatcher (e.g to stop a native dialog). But that call wrongly stopped 606 // 'session' as well. As a result, we need to restart all internal sessions: 607 d->temporarilyStopAllModalSessions(); 608 @@ -612,7 +612,7 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) 609 } else { 610 d->nsAppRunCalledByQt = true; 611 QBoolBlocker execGuard(d->currentExecIsNSAppRun, true); 612 - [NSApp run]; 613 + [[NSApplication sharedApplication] run]; 614 } 615 retVal = true; 616 } else { 617 @@ -626,9 +626,9 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) 618 // to use cocoa's native way of running modal sessions: 619 if (flags & QEventLoop::WaitForMoreEvents) 620 qt_mac_waitForMoreModalSessionEvents(); 621 - NSInteger status = [NSApp runModalSession:session]; 622 + NSInteger status = [[NSApplication sharedApplication] runModalSession:session]; 623 if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) { 624 - // INVARIANT: Someone called [NSApp stopModal:] from outside the event 625 + // INVARIANT: Someone called [NSApplication stopModal:] from outside the event 626 // dispatcher (e.g to stop a native dialog). But that call wrongly stopped 627 // 'session' as well. As a result, we need to restart all internal sessions: 628 d->temporarilyStopAllModalSessions(); 629 @@ -637,8 +637,8 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) 630 } else do { 631 // Dispatch all non-user events (but que non-user events up for later). In 632 // this case, we need more control over which events gets dispatched, and 633 - // cannot use [NSApp runModalSession:session]: 634 - event = [NSApp nextEventMatchingMask:NSAnyEventMask 635 + // cannot use [NSApplication runModalSession:session]: 636 + event = [[NSApplication sharedApplication] nextEventMatchingMask:NSAnyEventMask 637 untilDate:nil 638 inMode:NSModalPanelRunLoopMode 639 dequeue: YES]; 640 @@ -655,7 +655,7 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) 641 } while (!d->interrupt && event != nil); 642 } else do { 643 // INVARIANT: No modal window is executing. 644 - event = [NSApp nextEventMatchingMask:NSAnyEventMask 645 + event = [[NSApplication sharedApplication] nextEventMatchingMask:NSAnyEventMask 646 untilDate:nil 647 inMode:NSDefaultRunLoopMode 648 dequeue: YES]; 649 @@ -798,12 +798,12 @@ void QEventDispatcherMacPrivate::ensureNSAppInitialized() 650 // we let Cocoa finish the initialization it seems to need. We'll only 651 // apply this trick at most once for any application, and we avoid doing it 652 // for the common case where main just starts QApplication::exec. 653 - if (nsAppRunCalledByQt || [NSApp isRunning]) 654 + if (nsAppRunCalledByQt || [[NSApplication sharedApplication] isRunning]) 655 return; 656 nsAppRunCalledByQt = true; 657 QBoolBlocker block1(interrupt, true); 658 QBoolBlocker block2(currentExecIsNSAppRun, true); 659 - [NSApp run]; 660 + [[NSApplication sharedApplication] run]; 661 } 662 663 void QEventDispatcherMacPrivate::temporarilyStopAllModalSessions() 664 @@ -812,8 +812,8 @@ void QEventDispatcherMacPrivate::temporarilyStopAllModalSessions() 665 // such, make them pending again. The next call to 666 // currentModalSession will recreate them again. The 667 // reason to stop all session like this is that otherwise 668 - // a call [NSApp stop] would not stop NSApp, but rather 669 - // the current modal session. So if we need to stop NSApp 670 + // a call [NSApplication stop] would not stop NSApplication, but rather 671 + // the current modal session. So if we need to stop NSApplication 672 // we need to stop all the modal session first. To avoid changing 673 // the stacking order of the windows while doing so, we put 674 // up a block that is used in QCocoaWindow and QCocoaPanel: 675 @@ -821,7 +821,7 @@ void QEventDispatcherMacPrivate::temporarilyStopAllModalSessions() 676 for (int i=0; i<stackSize; ++i) { 677 QCocoaModalSessionInfo &info = cocoaModalSessionStack[i]; 678 if (info.session) { 679 - [NSApp endModalSession:info.session]; 680 + [[NSApplication sharedApplication] endModalSession:info.session]; 681 info.session = 0; 682 } 683 } 684 @@ -856,7 +856,7 @@ NSModalSession QEventDispatcherMacPrivate::currentModalSession() 685 info.nswindow = window; 686 [(NSWindow*) info.nswindow retain]; 687 int levelBeforeEnterModal = [window level]; 688 - info.session = [NSApp beginModalSessionForWindow:window]; 689 + info.session = [[NSApplication sharedApplication] beginModalSessionForWindow:window]; 690 // Make sure we don't stack the window lower that it was before 691 // entering modal, in case it e.g. had the stays-on-top flag set: 692 if (levelBeforeEnterModal > [window level]) 693 @@ -926,7 +926,7 @@ void QEventDispatcherMacPrivate::cleanupModalSessions() 694 cocoaModalSessionStack.remove(i); 695 currentModalSessionCached = 0; 696 if (info.session) { 697 - [NSApp endModalSession:info.session]; 698 + [[NSApplication sharedApplication] endModalSession:info.session]; 699 [(NSWindow *)info.nswindow release]; 700 } 701 } 702 @@ -1057,7 +1057,7 @@ inline static void processPostedEvents(QEventDispatcherMacPrivate *const d, cons 703 // pending cocoa events first). 704 if (d->currentModalSessionCached) 705 d->temporarilyStopAllModalSessions(); 706 - [NSApp stop:NSApp]; 707 + [[NSApplication sharedApplication] stop:[NSApplication sharedApplication]]; 708 d->cancelWaitForMoreEvents(); 709 } 710 #endif 711 @@ -1093,7 +1093,8 @@ void QEventDispatcherMacPrivate::cancelWaitForMoreEvents() 712 // In case the event dispatcher is waiting for more 713 // events somewhere, we post a dummy event to wake it up: 714 QMacCocoaAutoReleasePool pool; 715 - [NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint 716 + [[NSApplication sharedApplication] postEvent:[NSEvent otherEventWithType:NSApplicationDefined 717 + location:NSZeroPoint 718 modifierFlags:0 timestamp:0. windowNumber:0 context:0 719 subtype:QtCocoaEventSubTypeWakeup data1:0 data2:0] atStart:NO]; 720 } 721 @@ -1110,7 +1111,7 @@ void QEventDispatcherMac::interrupt() 722 #else 723 // We do nothing more here than setting d->interrupt = true, and 724 // poke the event loop if it is sleeping. Actually stopping 725 - // NSApp, or the current modal session, is done inside the send 726 + // NSApplication, or the current modal session, is done inside the send 727 // posted events callback. We do this to ensure that all current pending 728 // cocoa events gets delivered before we stop. Otherwise, if we now stop 729 // the last event loop recursion, cocoa will just drop pending posted 730 @@ -1165,7 +1166,7 @@ QtMacInterruptDispatcherHelp::QtMacInterruptDispatcherHelp() : cancelled(false) 731 // The whole point of this class is that we enable a way to interrupt 732 // the event dispatcher when returning back to a lower recursion level 733 // than where interruptLater was called. This is needed to detect if 734 - // [NSApp run] should still be running at the recursion level it is at. 735 + // [NSApplication run] should still be running at the recursion level it is at. 736 // Since the interrupt is canceled if processEvents is called before 737 // this object gets deleted, we also avoid interrupting unnecessary. 738 deleteLater(); 739 --- src/gui/kernel/qt_cocoa_helpers_mac.mm.orig 740 +++ src/gui/kernel/qt_cocoa_helpers_mac.mm 741 @@ -1697,7 +1697,7 @@ void qt_cocoaPostMessage(id target, SEL selector, int argCount, id arg1, id arg2 742 NSEvent *e = [NSEvent otherEventWithType:NSApplicationDefined 743 location:NSZeroPoint modifierFlags:0 timestamp:0 windowNumber:0 744 context:nil subtype:QtCocoaEventSubTypePostMessage data1:lower data2:upper]; 745 - [NSApp postEvent:e atStart:NO]; 746 + [[NSApplication sharedApplication] postEvent:e atStart:NO]; 747 } 748 749 void qt_cocoaPostMessageAfterEventLoopExit(id target, SEL selector, int argCount, id arg1, id arg2) 750 @@ -1727,7 +1727,7 @@ void qt_mac_post_retranslateAppMenu() 751 { 752 #ifdef QT_MAC_USE_COCOA 753 QMacCocoaAutoReleasePool pool; 754 - qt_cocoaPostMessage([NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)], @selector(qtTranslateApplicationMenu)); 755 + qt_cocoaPostMessage([[NSApplication sharedApplication] QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)], @selector(qtTranslateApplicationMenu)); 756 #endif 757 } 758 759 --- src/gui/kernel/qt_mac_p.h.orig 760 +++ src/gui/kernel/qt_mac_p.h 761 @@ -75,6 +75,62 @@ 762 763 #include <Carbon/Carbon.h> 764 765 +#if !defined(QT_MAC_USE_COCOA) && defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 766 + // Some deprecated functions have been removed from the the 10.7 SDK, but the symbols are 767 + // still exported by the 32-bit QD.framework (a subframework of ApplicationServices). 768 + extern "C" { 769 + // from QuickdrawAPI.h 770 + // https://developer.apple.com/legacy/library/documentation/Carbon/reference/QuickDraw_Ref/QuickDraw_Ref.pdf 771 + void CopyBits(const BitMap *srcBits, const BitMap *dstBits, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle maskRgn); 772 + void CopyRgn(RgnHandle srcRgn, RgnHandle dstRgn); 773 + void DisposeRgn(RgnHandle rgn); 774 + GDHandle GetMainDevice(void); 775 + const BitMap *GetPortBitMapForCopyBits(CGrafPtr port); 776 + Rect *GetRegionBounds(RgnHandle region, Rect *bounds); 777 + RgnHandle NewRgn(void); 778 + OSStatus QDRegionToRects(RgnHandle rgn, QDRegionParseDirection dir, RegionToRectsUPP proc, void *userData); 779 + void SetEmptyRgn(RgnHandle rgn); 780 + void SetRect(Rect* r, short left, short top, short right, short bottom); 781 + void SetRectRgn(RgnHandle rgn, short left, short top, short right, short bottom); 782 + void UnionRgn(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn); 783 + enum { 784 + kQDRegionToRectsMsgInit = 1, 785 + kQDRegionToRectsMsgParse = 2, 786 + kQDRegionToRectsMsgTerminate = 3 787 + }; 788 + enum { 789 + kQDParseRegionFromTop = (1 << 0), 790 + kQDParseRegionFromBottom = (1 << 1), 791 + kQDParseRegionFromLeft = (1 << 2), 792 + kQDParseRegionFromRight = (1 << 3), 793 + kQDParseRegionFromTopLeft = kQDParseRegionFromTop | kQDParseRegionFromLeft, 794 + kQDParseRegionFromBottomRight = kQDParseRegionFromBottom | kQDParseRegionFromRight 795 + }; 796 + 797 + // from Fonts.h 798 + // https://developer.apple.com/legacy/library/documentation/Carbon/reference/Font_Manager/fm_reference.pdf 799 + OSStatus FMCreateFontIterator(const FMFilter *iFilter, void *iRefCon, OptionBits iOptions, FMFontIterator *ioIterator); 800 + OSStatus FMDisposeFontIterator(FMFontIterator *ioIterator); 801 + ATSFontFamilyRef FMGetATSFontFamilyRefFromFont(FMFontFamily iFamily); 802 + ATSFontFamilyRef FMGetATSFontFamilyRefFromFontFamily(FMFontFamily iFamily); 803 + ATSFontRef FMGetATSFontRefFromFont(FMFont iFont); 804 + OSStatus FMGetFontFamilyInstanceFromFont(FMFont iFont, FMFontFamily *oFontFamily, FMFontStyle *oStyle); 805 + FMFontFamily FMGetFontFamilyFromATSFontFamilyRef(ATSFontFamilyRef iFamily); 806 + FMFont FMGetFontFromATSFontRef(ATSFontRef iFont); 807 + OSStatus FMGetFontFromFontFamilyInstance(FMFontFamily iFontFamily, FMFontStyle iStyle, FMFont *oFont, FMFontStyle *oIntrinsicStyle); 808 + OSStatus FMGetNextFont(FMFontIterator *ioIterator, FMFont *oFont); 809 + enum { 810 + kFMUseGlobalScopeOption = 0x00000001 811 + }; 812 + enum { 813 + commandMark = 17, 814 + checkMark = 18, 815 + diamondMark = 19, 816 + appleMark = 20 817 + }; 818 + } 819 +#endif 820 + 821 QT_BEGIN_NAMESPACE 822 class QWidget; 823 class QDragMoveEvent; 824 --- src/gui/kernel/qwidget_mac.mm.orig 825 +++ src/gui/kernel/qwidget_mac.mm 826 @@ -220,7 +220,7 @@ static QSize qt_mac_desktopSize() 827 static NSDrawer *qt_mac_drawer_for(const QWidget *widget) 828 { 829 NSView *widgetView = reinterpret_cast<NSView *>(widget->window()->effectiveWinId()); 830 - NSArray *windows = [NSApp windows]; 831 + NSArray *windows = [[NSApplication sharedApplication] windows]; 832 for (NSWindow *window in windows) { 833 NSArray *drawers = [window drawers]; 834 for (NSDrawer *drawer in drawers) { 835 @@ -254,7 +254,7 @@ static void qt_mac_destructWindow(OSWindowRef window) 836 { 837 #ifdef QT_MAC_USE_COCOA 838 if ([window isVisible] && [window isSheet]){ 839 - [NSApp endSheet:window]; 840 + [[NSApplication sharedApplication] endSheet:window]; 841 [window orderOut:window]; 842 } 843 844 @@ -2439,7 +2439,7 @@ void QWidgetPrivate::recreateMacWindow() 845 } 846 if ([oldWindow isVisible]){ 847 if ([oldWindow isSheet]) 848 - [NSApp endSheet:oldWindow]; 849 + [[NSApplication sharedApplication] endSheet:oldWindow]; 850 [oldWindow orderOut:oldWindow]; 851 show_sys(); 852 } 853 @@ -3554,7 +3554,7 @@ void QWidgetPrivate::show_sys() 854 } 855 856 #ifdef QT_MAC_USE_COCOA 857 - if ([NSApp isActive] && !qt_button_down && !QWidget::mouseGrabber()){ 858 + if ([[NSApplication sharedApplication] isActive] && !qt_button_down && !QWidget::mouseGrabber()){ 859 // Update enter/leave immidiatly, don't wait for a move event. But only 860 // if no grab exists (even if the grab points to this widget, it seems, ref X11) 861 QPoint qlocal, qglobal; 862 @@ -3605,7 +3605,7 @@ void QWidgetPrivate::hide_sys() 863 else 864 HideSheetWindow(window); 865 #else 866 - [NSApp endSheet:window]; 867 + [[NSApplication sharedApplication] endSheet:window]; 868 [window orderOut:window]; 869 #endif 870 } else if(qt_mac_is_macdrawer(q)) { 871 @@ -3716,7 +3716,7 @@ void QWidgetPrivate::hide_sys() 872 } 873 874 #ifdef QT_MAC_USE_COCOA 875 - if ([NSApp isActive] && !qt_button_down && !QWidget::mouseGrabber()){ 876 + if ([[NSApplication sharedApplication] isActive] && !qt_button_down && !QWidget::mouseGrabber()){ 877 // Update enter/leave immidiatly, don't wait for a move event. But only 878 // if no grab exists (even if the grab points to this widget, it seems, ref X11) 879 QPoint qlocal, qglobal; 880 --- src/gui/styles/qmacstyle_mac.mm.orig 881 +++ src/gui/styles/qmacstyle_mac.mm 882 @@ -780,7 +780,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg 883 if (!GetThemeMenuBarHeight(&size)) 884 ret = QSize(-1, size); 885 #else 886 - ret = QSize(-1, [[NSApp mainMenu] menuBarHeight]); 887 + ret = QSize(-1, [[[NSApplication sharedApplication] mainMenu] menuBarHeight]); 888 // In the qt_mac_set_native_menubar(false) case, 889 // we come it here with a zero-height main menu, 890 // preventing the in-window menu from displaying. 891 @@ -3024,16 +3024,14 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai 892 fdi.version = qt_mac_hitheme_version; 893 fdi.state = tds; 894 SInt32 frame_size; 895 - if (pe == PE_FrameLineEdit) { 896 - fdi.kind = kHIThemeFrameTextFieldSquare; 897 - GetThemeMetric(kThemeMetricEditTextFrameOutset, &frame_size); 898 - if ((frame->state & State_ReadOnly) || !(frame->state & State_Enabled)) 899 - fdi.state = kThemeStateInactive; 900 - } else { 901 - baseColor = QColor(150, 150, 150); //hardcoded since no query function --Sam 902 - fdi.kind = kHIThemeFrameListBox; 903 - GetThemeMetric(kThemeMetricListBoxFrameOutset, &frame_size); 904 - } 905 + fdi.kind = kHIThemeFrameTextFieldSquare; 906 + GetThemeMetric(kThemeMetricEditTextFrameOutset, &frame_size); 907 + if ((frame->state & State_ReadOnly) || !(frame->state & State_Enabled)) 908 + fdi.state = kThemeStateInactive; 909 + else if (fdi.state == kThemeStatePressed) 910 + // This pressed state doesn't make sense for a line edit frame. 911 + // And Yosemite agrees with us. Otherwise it starts showing yellow pixels. 912 + fdi.state = kThemeStateActive; 913 fdi.isFocused = (frame->state & State_HasFocus); 914 int lw = frame->lineWidth; 915 if (lw <= 0) 916 --- src/gui/util/qsystemtrayicon_mac.mm.orig 917 +++ src/gui/util/qsystemtrayicon_mac.mm 918 @@ -536,7 +536,7 @@ private: 919 #ifndef QT_MAC_USE_COCOA 920 const short scale = GetMBarHeight(); 921 #else 922 - const short scale = [[NSApp mainMenu] menuBarHeight]; 923 + const short scale = [[[NSApplication sharedApplication] mainMenu] menuBarHeight]; 924 #endif 925 NSImage *nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(icon.pixmap(QSize(scale, scale)))); 926 [item setImage: nsimage]; 927 --- src/gui/widgets/qcocoamenu_mac.mm.orig 928 +++ src/gui/widgets/qcocoamenu_mac.mm 929 @@ -202,7 +202,7 @@ QT_USE_NAMESPACE 930 static SEL selForOFCP = NSSelectorFromString(@"orderFrontCharacterPalette:"); 931 if (index == -1 && selForOFCP == actionSelector) { 932 // Check if the 'orderFrontCharacterPalette' SEL exists for QCocoaMenuLoader object 933 - QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = [NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)]; 934 + QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = [[NSApplication sharedApplication] QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)]; 935 return [super indexOfItemWithTarget:loader andAction:actionSelector]; 936 } 937 return index; 938 --- src/gui/widgets/qmenu_mac.mm.orig 939 +++ src/gui/widgets/qmenu_mac.mm 940 @@ -179,7 +179,7 @@ static void cancelAllMenuTracking() 941 { 942 #ifdef QT_MAC_USE_COCOA 943 QMacCocoaAutoReleasePool pool; 944 - NSMenu *mainMenu = [NSApp mainMenu]; 945 + NSMenu *mainMenu = [[NSApplication sharedApplication] mainMenu]; 946 [mainMenu cancelTracking]; 947 for (NSMenuItem *item in [mainMenu itemArray]) { 948 if ([item submenu]) { 949 @@ -633,7 +633,7 @@ static inline void syncMenuBarItemsVisiblity(const QMenuBarPrivate::QMacMenuBarP 950 951 static inline QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *getMenuLoader() 952 { 953 - return [NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)]; 954 + return [[NSApplication sharedApplication] QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)]; 955 } 956 957 static NSMenuItem *createNSMenuItem(const QString &title) 958 @@ -2033,7 +2033,7 @@ void qt_mac_clear_menubar() 959 QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = getMenuLoader(); 960 NSMenu *menu = [loader menu]; 961 [loader ensureAppMenuInMenu:menu]; 962 - [NSApp setMainMenu:menu]; 963 + [[NSApplication sharedApplication] setMainMenu:menu]; 964 const bool modal = qt_mac_should_disable_menu(0); 965 if (qt_mac_current_menubar.qmenubar || modal != qt_mac_current_menubar.modal) 966 qt_mac_set_modal_state(menu, modal); 967 @@ -2100,7 +2100,7 @@ bool QMenuBarPrivate::macUpdateMenuBarImmediatly() 968 #else 969 QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = getMenuLoader(); 970 [loader ensureAppMenuInMenu:menu]; 971 - [NSApp setMainMenu:menu]; 972 + [[NSApplication sharedApplication] setMainMenu:menu]; 973 syncMenuBarItemsVisiblity(mb->d_func()->mac_menubar); 974 975 if (OSMenuRef tmpMerge = QMenuPrivate::mergeMenuHash.value(menu)) { 976 @@ -2140,7 +2140,7 @@ bool QMenuBarPrivate::macUpdateMenuBarImmediatly() 977 #else 978 QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = getMenuLoader(); 979 [loader ensureAppMenuInMenu:menu]; 980 - [NSApp setMainMenu:menu]; 981 + [[NSApplication sharedApplication] setMainMenu:menu]; 982 syncMenuBarItemsVisiblity(qt_mac_current_menubar.qmenubar->d_func()->mac_menubar); 983 #endif 984 qt_mac_set_modal_state(menu, modal); -
deleted file qua/qt4-mac-devel/files/patch-PluginView-no-carbon.diff
diff --git a/aqua/qt4-mac-devel/files/patch-PluginView-no-carbon.diff b/aqua/qt4-mac-devel/files/patch-PluginView-no-carbon.diff deleted file mode 100644 index 687bdbc..0000000
+ - 1 --- src/3rdparty/webkit/WebCore/plugins/PluginView.h.orig 2011-04-02 12:26:20.000000000 -04002 +++ src/3rdparty/webkit/WebCore/plugins/PluginView.h 2011-04-02 12:26:42.000000000 -04003 @@ -360,7 +360,9 @@4 5 Point m_lastMousePos;6 void setNPWindowIfNeeded();7 +#ifndef NP_NO_CARBON8 void nullEventTimerFired(Timer<PluginView>*);9 +#endif10 Point globalMousePosForPlugin() const;11 Point mousePosForPlugin(MouseEvent* event = 0) const;12 #endif13 --- src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.mm.orig 2011-04-02 12:26:06.000000000 -040014 +++ src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.mm 2011-04-02 12:30:07.000000000 -040015 @@ -233,7 +233,9 @@16 setNPWindowIfNeeded();17 18 // TODO: Implement null timer throttling depending on plugin activation19 +#ifndef NP_NO_CARBON20 m_nullEventTimer.set(new Timer<PluginView>(this, &PluginView::nullEventTimerFired));21 +#endif22 m_nullEventTimer->startRepeating(0.02);23 24 m_lastMousePos.h = m_lastMousePos.v = 0; -
new file aqua/qt4-mac-devel/files/patch-QAction_isEnabled.diff
diff --git a/aqua/qt4-mac-devel/files/patch-QAction_isEnabled.diff b/aqua/qt4-mac-devel/files/patch-QAction_isEnabled.diff new file mode 100644 index 0000000..6a3b353
- + 1 --- src/gui/kernel/orig.qaction.cpp 2015-01-06 02:45:31.000000000 +0100 2 +++ src/gui/kernel/qaction.cpp 2015-01-06 02:32:22.000000000 +0100 3 @@ -1127,7 +1127,7 @@ 4 bool QAction::isEnabled() const 5 { 6 Q_D(const QAction); 7 - return d->enabled; 8 + return d ? d->enabled : false; 9 } 10 11 /*! -
aqua/qt4-mac-devel/files/patch-QtHelp_10.4_only.diff
diff --git a/aqua/qt4-mac-devel/files/patch-QtHelp_10.4_only.diff b/aqua/qt4-mac-devel/files/patch-QtHelp_10.4_only.diff index 62b6bef..0725e11 100644
a b 1 1 --- tools/assistant/tools/assistant/assistant.pro.orig 2011-01-10 09:05:05.000000000 -0500 2 2 +++ tools/assistant/tools/assistant/assistant.pro 2011-01-10 09:05:55.000000000 -0500 3 @@ -1 16,3 +116,30 @@3 @@ -120,3 +120,30 @@ 4 4 DEFINES += USE_STATIC_SQLITE_PLUGIN 5 5 } 6 6 } … … 33 33 + 34 34 --- tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro.orig 2011-01-10 09:05:05.000000000 -0500 35 35 +++ tools/assistant/tools/qcollectiongenerator/qcollectiongenerator.pro 2011-01-10 09:05:55.000000000 -0500 36 @@ -1 5,3 +15,27 @@36 @@ -19,3 +19,27 @@ 37 37 ../shared/collectionconfiguration.cpp 38 38 HEADERS += ../shared/helpgenerator.h \ 39 39 ../shared/collectionconfiguration.h … … 63 63 +LIBS_PRIVATE += -l$$qcwebkit 64 64 --- tools/assistant/tools/qhelpconverter/qhelpconverter.pro.orig 2011-01-10 09:05:05.000000000 -0500 65 65 +++ tools/assistant/tools/qhelpconverter/qhelpconverter.pro 2011-01-10 09:05:55.000000000 -0500 66 @@ -4 5,3 +45,27 @@66 @@ -49,3 +49,27 @@ 67 67 outputpage.ui 68 68 69 69 RESOURCES += qhelpconverter.qrc … … 93 93 +LIBS_PRIVATE += -l$$qcwebkit 94 94 --- tools/assistant/tools/qhelpgenerator/qhelpgenerator.pro.orig 2011-01-10 09:05:05.000000000 -0500 95 95 +++ tools/assistant/tools/qhelpgenerator/qhelpgenerator.pro 2011-01-10 09:05:55.000000000 -0500 96 @@ -1 2,3 +12,27 @@96 @@ -17,3 +17,27 @@ 97 97 main.cpp 98 98 99 99 HEADERS += ../shared/helpgenerator.h -
aqua/qt4-mac-devel/files/patch-config.tests_unix_compile.test.diff
diff --git a/aqua/qt4-mac-devel/files/patch-config.tests_unix_compile.test.diff b/aqua/qt4-mac-devel/files/patch-config.tests_unix_compile.test.diff index 6592163..cce49b1 100644
a b 1 --- config.tests/unix/compile.test.orig 2010-11-01 10:05:07.000000000 -0400 2 +++ config.tests/unix/compile.test 2010-11-01 10:05:41.000000000 -0400 3 @@ -68,7 +68,7 @@ 4 # Make sure output from possible previous tests is gone 1 --- config.tests/unix/compile.test.orig 2013-07-06 14:39:26.000000000 -0400 2 +++ config.tests/unix/compile.test 2013-07-06 14:39:44.000000000 -0400 3 @@ -73,7 +73,7 @@ 5 4 rm -f "$EXE" "${EXE}.exe" 6 5 7 -"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" 8 +"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release app_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CFLAGS*=$CXXFLAGS" "QMAKE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" 6 echo "QT_BUILD_TREE = $OUTDIR" > "$OUTDIR/$TEST/.qmake.cache" 7 -"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" 8 +"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release app_bundle" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CFLAGS*=$CXXFLAGS" "QMAKE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_OBJECTIVE_CFLAGS*=$CXXFLAGS" "QMAKE_OBJECTIVE_CFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_OBJECTIVE_CXXFLAGS*=$CXXFLAGS" "QMAKE_OBJECTIVE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" 9 9 10 10 if [ "$VERBOSE" = "yes" ]; then 11 11 $MAKE -
new file aqua/qt4-mac-devel/files/patch-config.tests_unix_precomp.test.diff
diff --git a/aqua/qt4-mac-devel/files/patch-config.tests_unix_precomp.test.diff b/aqua/qt4-mac-devel/files/patch-config.tests_unix_precomp.test.diff new file mode 100644 index 0000000..d4ec6b0
- + 1 --- config.tests/unix/precomp.test.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ config.tests/unix/precomp.test 2012-04-17 14:38:16.000000000 -0400 3 @@ -4,7 +4,7 @@ 4 COMPILER=$1 5 VERBOSE=$2 6 7 -case "$COMPILER" in 8 +case $COMPILER in 9 icpc) 10 cat >header.h <<EOF 11 #define HEADER_H 12 @@ -27,8 +27,8 @@ 13 rm -f header.pchi header.o source.o 14 ;; 15 16 -*g++*|c++|*qcc*) 17 - case `"$COMPILER" -dumpversion 2>/dev/null` in 18 +*g++*|c++|*qcc*|*gcc*|cc) 19 + case `$COMPILER -dumpversion 2>/dev/null` in 20 3.*) 21 ;; 22 *) -
deleted file qua/qt4-mac-devel/files/patch-configure-arch.diff
diff --git a/aqua/qt4-mac-devel/files/patch-configure-arch.diff b/aqua/qt4-mac-devel/files/patch-configure-arch.diff deleted file mode 100644 index 4c12b4a..0000000
+ - 1 --- configure_orig 2010-10-13 21:13:01.000000000 -04002 +++ configure 2010-10-13 21:15:36.000000000 -04003 @@ -4893,20 +4893,11 @@4 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"5 EXTRA_OBJS="qsettings_mac.o qcore_mac.o"6 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""7 - if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_648 - X86_CFLAGS="-arch i386"9 - X86_LFLAGS="-arch i386"10 - EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"11 - EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"12 - EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"13 - fi14 - if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc6415 - PPC_CFLAGS="-arch ppc"16 - PPC_LFLAGS="-arch ppc"17 - EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"18 - EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS"19 - EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS"20 - fi21 + ARCH_CFLAGS="-arch @ARCHES@"22 + ARCH_LFLAGS="-arch @ARCHES@"23 + EXTRA_CFLAGS="$ARCH_CFLAGS $EXTRA_CFLAGS"24 + EXTRA_CXXFLAGS="$ARCH_CFLAGS $EXTRA_CXXFLAGS"25 + EXTRA_LFLAGS="$EXTRA_LFLAGS $ARCH_LFLAGS"26 if [ '!' -z "$CFG_SDK" ]; then27 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"28 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile" -
new file aqua/qt4-mac-devel/files/patch-configure.diff
diff --git a/aqua/qt4-mac-devel/files/patch-configure.diff b/aqua/qt4-mac-devel/files/patch-configure.diff new file mode 100644 index 0000000..3f85343
- + 1 --- configure.orig 2014-04-25 09:50:32.000000000 -0400 2 +++ configure 2014-04-25 10:04:24.000000000 -0400 3 @@ -924,12 +924,14 @@ 4 CFG_ICU=auto 5 CFG_SYSTEM_PROXIES=no 6 CFG_SLOG2=auto 7 +CFG_CXX11=no 8 9 # initalize variables used for installation 10 QT_INSTALL_PREFIX= 11 QT_INSTALL_DOCS= 12 QT_INSTALL_HEADERS= 13 QT_INSTALL_LIBS= 14 +QT_INSTALL_FRAMEWORKS= 15 QT_INSTALL_BINS= 16 QT_INSTALL_PLUGINS= 17 QT_INSTALL_IMPORTS= 18 @@ -1143,7 +1145,7 @@ 19 VAL=no 20 ;; 21 #Qt style yes options 22 - -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu) 23 + -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu|-c++11) 24 VAR=`echo $1 | sed "s,^-\(.*\),\1,"` 25 VAL=yes 26 ;; 27 @@ -1398,6 +1400,9 @@ 28 libdir) 29 QT_INSTALL_LIBS="$VAL" 30 ;; 31 + frameworkdir) 32 + QT_INSTALL_FRAMEWORKS="$VAL" 33 + ;; 34 qtnamespace) 35 QT_NAMESPACE="$VAL" 36 ;; 37 @@ -2515,6 +2520,13 @@ 38 UNKNOWN_OPT=yes 39 fi 40 ;; 41 + c++11) 42 + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then 43 + CFG_CXX11="$VAL" 44 + else 45 + UNKNOWN_OPT=yes 46 + fi 47 + ;; 48 system-proxies) 49 if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then 50 CFG_SYSTEM_PROXIES="$VAL" 51 @@ -3456,6 +3468,53 @@ 52 CFG_MAC_XARCH=no 53 fi 54 55 +# detect required support for CPATH 56 +if "$mactests/cpath/cpath.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests/cpath" ; then 57 + echo >&2 "error: The compiler ($TEST_COMPILER) does not seem to support the CPATH environment variable, which is required to compile qt4-mac using MacPorts when compiling on Mac OS X." 58 + exit 1 59 +fi 60 + 61 +# detect required support for LIBRARY_PATH 62 +if "$mactests/library_path/library_path.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests/library_path" ; then 63 + echo >&2 "error: The compiler ($TEST_COMPILER) does not seem to support the LIBRARY_PATH environment variable, which is required to compile qt4-mac using MacPorts when compiling on Mac OS X." 64 + exit 1 65 +fi 66 + 67 +# detect required support for -fconstant-cfstrings 68 +if "$mactests/fconstant_cfstrings.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then 69 + echo >&2 "error: The compiler ($TEST_COMPILER) does not seem to support the -fconstant-cfstrings flag, which is used extensively by the Qt build system when compiling on Mac OS X." 70 + exit 1 71 +fi 72 + 73 +# detect required support for Objective-C blocks (^) on the mac, 74 +# but only on 10.6 ("uname -r" == 10.X) and newer 75 +case "$UNAME_SYSTEM:$UNAME_RELEASE" in 76 + Darwin:[0-9].*) 77 + ;; 78 + Darwin*) 79 + if "$mactests/objc_block/objc_block.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests/objc_block" ; then 80 + echo >&2 "error: The compiler ($TEST_COMPILER) does not seem to support the Objective-C blocks (^), which are used by Qt when compiling on Mac OS X 10.6 and newer." 81 + exit 1 82 + fi 83 + ;; 84 + *) 85 + ;; 86 +esac 87 + 88 +# Detect C++11 support, only if requested 89 +if [ "$CFG_CXX11" = "yes" ]; then 90 + if "$mactests/c++11/c++11.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests/c++11" ; then 91 + echo >&2 "error: C++11 support was requested, but the compiler ($TEST_COMPILER) does not seem to support C++11." 92 + exit 1 93 + fi 94 +fi 95 + 96 +# detect required support for -Xarch 97 +if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then 98 + echo >&2 "error: The compiler ($TEST_COMPILER) does not seem to support the -Xarch flag, which is used extensively by the Qt build system when compiling on Mac OS X." 99 + exit 1 100 +fi 101 + 102 #auto-detect DWARF2 on the mac 103 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then 104 if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" $MAC_CONFIG_TEST_COMMANDLINE; then 105 @@ -3465,15 +3524,6 @@ 106 fi 107 fi 108 109 -# auto-detect support for -Xarch on the mac 110 -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then 111 - if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then 112 - CFG_MAC_XARCH=no 113 - else 114 - CFG_MAC_XARCH=yes 115 - fi 116 -fi 117 - 118 # don't autodetect support for separate debug info on objcopy when 119 # cross-compiling as lots of toolchains seems to have problems with this 120 if [ "$QT_CROSS_COMPILE" = "yes" ] && [ "$CFG_SEPARATE_DEBUG_INFO" = "auto" ]; then 121 @@ -3700,6 +3750,19 @@ 122 fi 123 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"` 124 125 + #frameworks 126 + if [ -z "$QT_INSTALL_FRAMEWORKS" ]; then #default 127 + if [ "$CFG_PREFIX_INSTALL" = "no" ]; then 128 + if [ "$PLATFORM_MAC" = "yes" ]; then 129 + if [ "$CFG_FRAMEWORK" = "yes" ]; then 130 + QT_INSTALL_FRAMEWORKS="/Libraries/Frameworks" 131 + fi 132 + fi 133 + fi 134 + [ -z "$QT_INSTALL_FRAMEWORKS" ] && QT_INSTALL_FRAMEWORKS="$QT_INSTALL_PREFIX/Library/Frameworks" #fallback 135 + fi 136 + QT_INSTALL_FRAMEWORKS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_FRAMEWORKS"` 137 + 138 #bins 139 if [ -z "$QT_INSTALL_BINS" ]; then #default 140 if [ "$CFG_PREFIX_INSTALL" = "no" ]; then 141 @@ -4768,6 +4831,7 @@ 142 DOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_INSTALL_DOCS"` 143 HEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_INSTALL_HEADERS"` 144 LIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_INSTALL_LIBS"` 145 +FRAMEWORKS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_frameworkspath=$QT_INSTALL_FRAMEWORKS"` 146 BINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_INSTALL_BINS"` 147 PLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_INSTALL_PLUGINS"` 148 IMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_INSTALL_IMPORTS"` 149 @@ -4793,6 +4857,7 @@ 150 HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"` 151 HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"` 152 HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"` 153 + HOSTFRAMEWORKS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_frameworkspath=$QT_HOST_PREFIX/Library/Frameworks"` 154 HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"` 155 HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"` 156 HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"` 157 @@ -4810,6 +4875,7 @@ 158 static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR"; 159 static const char qt_configure_headers_path_str [256 + 12] = "$HOSTHEADERS_PATH_STR"; 160 static const char qt_configure_libraries_path_str [256 + 12] = "$HOSTLIBRARIES_PATH_STR"; 161 +static const char qt_configure_frameworks_path_str [256 + 12] = "$HOSTFRAMEWORKS_PATH_STR"; 162 static const char qt_configure_binaries_path_str [256 + 12] = "$HOSTBINARIES_PATH_STR"; 163 static const char qt_configure_plugins_path_str [256 + 12] = "$HOSTPLUGINS_PATH_STR"; 164 static const char qt_configure_imports_path_str [256 + 12] = "$HOSTIMPORTS_PATH_STR"; 165 @@ -4828,6 +4894,7 @@ 166 static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR"; 167 static const char qt_configure_headers_path_str [256 + 12] = "$HEADERS_PATH_STR"; 168 static const char qt_configure_libraries_path_str [256 + 12] = "$LIBRARIES_PATH_STR"; 169 +static const char qt_configure_frameworks_path_str [256 + 18] = "$FRAMEWORKS_PATH_STR"; 170 static const char qt_configure_binaries_path_str [256 + 12] = "$BINARIES_PATH_STR"; 171 static const char qt_configure_plugins_path_str [256 + 12] = "$PLUGINS_PATH_STR"; 172 static const char qt_configure_imports_path_str [256 + 12] = "$IMPORTS_PATH_STR"; 173 @@ -4853,6 +4920,7 @@ 174 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12; 175 #define QT_CONFIGURE_HEADERS_PATH qt_configure_headers_path_str + 12; 176 #define QT_CONFIGURE_LIBRARIES_PATH qt_configure_libraries_path_str + 12; 177 +#define QT_CONFIGURE_FRAMEWORKS_PATH qt_configure_frameworks_path_str + 18; 178 #define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12; 179 #define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12; 180 #define QT_CONFIGURE_IMPORTS_PATH qt_configure_imports_path_str + 12; 181 @@ -4965,7 +5033,7 @@ 182 EXTRA_OBJS= 183 EXTRA_SRCS= 184 EXTRA_CFLAGS="\$(QMAKE_CFLAGS)" 185 - EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS)" 186 + EXTRA_CXXFLAGS="$QMAKE_STDLIB \$(QMAKE_CXXFLAGS)" 187 EXTRA_LFLAGS="\$(QMAKE_LFLAGS)" 188 189 if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then 190 @@ -5009,8 +5077,8 @@ 191 # Avoid overriding the default configuration settings when building with clang/libc++ 192 ;; 193 *) 194 - # For all other configurations require a minimum of 10.5 195 - echo "export MACOSX_DEPLOYMENT_TARGET = 10.5" >> "$mkfile" 196 + # For all other configurations require a minimum of @MACOSX_DEPLOYMENT_TARGET@ 197 + echo "export MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@" >> "$mkfile" 198 ;; 199 esac 200 201 @@ -5021,20 +5089,11 @@ 202 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)" 203 EXTRA_OBJS="qsettings_mac.o qcore_mac.o" 204 EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\"" 205 - if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64 206 - X86_CFLAGS="-arch i386" 207 - X86_LFLAGS="-arch i386" 208 - EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS" 209 - EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS" 210 - EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS" 211 - fi 212 - if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64 213 - PPC_CFLAGS="-arch ppc" 214 - PPC_LFLAGS="-arch ppc" 215 - EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS" 216 - EXTRA_CXXFLAGS="$PPC_CFLAGS $EXTRA_CXXFLAGS" 217 - EXTRA_LFLAGS="$EXTRA_LFLAGS $PPC_LFLAGS" 218 - fi 219 + ARCH_CFLAGS="-arch @ARCHES@" 220 + ARCH_LFLAGS="-arch @ARCHES@" 221 + EXTRA_CFLAGS="$ARCH_CFLAGS $EXTRA_CFLAGS" 222 + EXTRA_CXXFLAGS="$ARCH_CFLAGS $EXTRA_CXXFLAGS" 223 + EXTRA_LFLAGS="$EXTRA_LFLAGS $ARCH_LFLAGS" 224 if [ '!' -z "$CFG_SDK" ]; then 225 echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile" 226 echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile" 227 @@ -6997,7 +7056,7 @@ 228 229 # detect OpenVG support 230 if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then 231 - if compileTest "unix/openvg" "OpenVG"; then 232 + if compileTest "unix/openvg" "OpenVG" $QMAKE_OPENVG_ARG; then 233 if [ "$CFG_OPENVG" = "auto" ]; then 234 CFG_OPENVG=yes 235 fi 236 @@ -7028,7 +7087,7 @@ 237 CFG_OPENVG=no 238 fi 239 fi 240 - if [ "$CFG_OPENVG" = "yes" ] && compileTest "unix/shivavg" "ShivaVG" $CONFIG_ARG; then 241 + if [ "$CFG_OPENVG" = "yes" ] && compileTest "unix/shivavg" "ShivaVG" $QMAKE_OPENVG_ARG; then 242 CFG_OPENVG_SHIVA=yes 243 fi 244 fi 245 @@ -7219,19 +7278,7 @@ 246 247 # set the global Mac deployment target. This is overridden on an arch-by-arch basis 248 # in some cases, see code further down 249 -case "$PLATFORM,$CFG_MAC_COCOA" in 250 -*macx-clang-libc++,yes) 251 - # Avoid overriding the default configuration setting when building with clang/libc++ 252 - ;; 253 -macx*,yes) 254 - # Cocoa 255 - QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5 256 - ;; 257 -macx*,no) 258 - # gcc, Carbon 259 - QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4 260 - ;; 261 -esac 262 +QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET @MACOSX_DEPLOYMENT_TARGET@ 263 264 # disable Qt 3 support on VxWorks, Symbian and INTEGRITY 265 case "$XPLATFORM" in 266 @@ -7510,6 +7557,10 @@ 267 QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GUI" 268 fi 269 270 +if [ "$CFG_CXX11" = "yes" ]; then 271 + QT_CONFIG="$QT_CONFIG c++11" 272 + QMAKE_CONFIG="$QMAKE_CONFIG c++11" 273 +fi 274 275 if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then 276 #On Mac we implicitly link against libz, so we 277 @@ -7981,28 +8032,32 @@ 278 ;; 279 *) 280 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then 281 - QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" 282 - QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" 283 - QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4" 284 - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4" 285 + QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 286 + QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 287 + QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 288 + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 289 + QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 290 fi 291 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then 292 - QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" 293 - QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" 294 - QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4" 295 - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4" 296 + QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 297 + QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 298 + QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 299 + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 300 + QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 301 fi 302 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then 303 - QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" 304 - QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" 305 - QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5" 306 - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5" 307 + QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 308 + QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 309 + QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 310 + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 311 + QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 312 fi 313 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then 314 - QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" 315 - QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" 316 - QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5" 317 - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5" 318 + QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 319 + QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 320 + QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 321 + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 322 + QMakeVar add QMAKE_OBJECTIVE_CXXFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@" 323 fi 324 ;; 325 esac 326 @@ -8762,6 +8817,7 @@ 327 QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc 328 QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp 329 QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include 330 +QMAKE_FRAMEWORKDIR_QT = \$\$QT_BUILD_TREE/Library/Frameworks 331 QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib 332 333 EOF 334 @@ -8800,6 +8856,11 @@ 335 echo "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" >> "$CACHEFILE.tmp" 336 fi 337 338 +#dump in the OPENVG_LIBS info 339 +if [ "$CFG_OPENVG" = "yes" ]; then 340 + echo "QMAKE_LIBS_OPENVG = $QMAKE_OPENVG_ARG" >> "$CACHEFILE.tmp" 341 +fi 342 + 343 #dump in the OPENSSL_LIBS info 344 if [ '!' -z "$OPENSSL_LIBS" ]; then 345 echo "OPENSSL_LIBS = $OPENSSL_LIBS" >> "$CACHEFILE.tmp" 346 @@ -8959,6 +9020,7 @@ 347 else 348 echo "Debug .................. $CFG_DEBUG" 349 fi 350 +echo "C++11 support .......... $CFG_CXX11" 351 echo "Qt 3 compatibility ..... $CFG_QT3SUPPORT" 352 [ "$CFG_DBUS" = "no" ] && echo "QtDBus module .......... no" 353 [ "$CFG_DBUS" = "yes" ] && echo "QtDBus module .......... yes (run-time)" -
new file aqua/qt4-mac-devel/files/patch-cxx11.diff
diff --git a/aqua/qt4-mac-devel/files/patch-cxx11.diff b/aqua/qt4-mac-devel/files/patch-cxx11.diff new file mode 100644 index 0000000..8cbe2e1
- + 1 --- src/gui/kernel/qcursor_mac.mm.orig 2013-01-22 16:04:44.000000000 -0500 2 +++ src/gui/kernel/qcursor_mac.mm 2013-01-22 16:05:57.000000000 -0500 3 @@ -367,7 +367,7 @@ 4 type = QCursorData::TYPE_ImageCursor; 5 curs.cp.my_cursor = true; 6 QPixmap bmCopy = QPixmap::fromImage(finalCursor); 7 - NSPoint hotSpot = { hx, hy }; 8 + NSPoint hotSpot = { (CGFloat) hx, (CGFloat) hy }; 9 nsimage = static_cast<NSImage*>(qt_mac_create_nsimage(bmCopy)); 10 curs.cp.nscursor = [[NSCursor alloc] initWithImage:nsimage hotSpot: hotSpot]; 11 [nsimage release]; 12 @@ -377,7 +377,7 @@ 13 { 14 type = QCursorData::TYPE_ImageCursor; 15 curs.cp.my_cursor = true; 16 - NSPoint hotSpot = { hx, hy }; 17 + NSPoint hotSpot = { (CGFloat) hx, (CGFloat) hy }; 18 NSImage *nsimage; 19 nsimage = static_cast<NSImage *>(qt_mac_create_nsimage(pixmap)); 20 curs.cp.nscursor = [[NSCursor alloc] initWithImage:nsimage hotSpot: hotSpot]; 21 --- src/gui/kernel/qcocoaview_mac.mm.orig 2013-01-22 16:04:44.000000000 -0500 22 +++ src/gui/kernel/qcocoaview_mac.mm 2013-01-22 16:05:57.000000000 -0500 23 @@ -1352,7 +1352,7 @@ 24 // Save supported actions: 25 [theView setSupportedActions: qt_mac_mapDropActions(dragPrivate()->possible_actions)]; 26 QPoint pointInView = [theView qt_qwidget]->mapFromGlobal(dndParams->globalPoint); 27 - NSPoint imageLoc = {pointInView.x() - hotspot.x(), pointInView.y() + pix.height() - hotspot.y()}; 28 + NSPoint imageLoc = {(CGFloat)(pointInView.x() - hotspot.x()), (CGFloat)(pointInView.y() + pix.height() - hotspot.y())}; 29 NSSize mouseOffset = {0.0, 0.0}; 30 NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSDragPboard]; 31 dragPrivate()->executed_action = Qt::ActionMask; 32 --- src/gui/kernel/qt_cocoa_helpers_mac.mm.orig 2013-01-22 16:04:44.000000000 -0500 33 +++ src/gui/kernel/qt_cocoa_helpers_mac.mm 2013-01-22 16:05:57.000000000 -0500 34 @@ -459,17 +459,17 @@ 35 { 36 NSEvent *proximityEvent = static_cast<NSEvent *>(tabletEvent); 37 // simply construct a Carbon proximity record and handle it all in one spot. 38 - TabletProximityRec carbonProximityRec = { [proximityEvent vendorID], 39 - [proximityEvent tabletID], 40 - [proximityEvent pointingDeviceID], 41 - [proximityEvent deviceID], 42 - [proximityEvent systemTabletID], 43 - [proximityEvent vendorPointingDeviceType], 44 - [proximityEvent pointingDeviceSerialNumber], 45 + TabletProximityRec carbonProximityRec = {(UInt16) [proximityEvent vendorID], 46 + (UInt16) [proximityEvent tabletID], 47 + (UInt16) [proximityEvent pointingDeviceID], 48 + (UInt16) [proximityEvent deviceID], 49 + (UInt16) [proximityEvent systemTabletID], 50 + (UInt16) [proximityEvent vendorPointingDeviceType], 51 + (UInt32) [proximityEvent pointingDeviceSerialNumber], 52 [proximityEvent uniqueID], 53 - [proximityEvent capabilityMask], 54 - [proximityEvent pointingDeviceType], 55 - [proximityEvent isEnteringProximity] }; 56 + (UInt32) [proximityEvent capabilityMask], 57 + (UInt8) [proximityEvent pointingDeviceType], 58 + (UInt8) [proximityEvent isEnteringProximity] }; 59 qt_dispatchTabletProximityEvent(carbonProximityRec); 60 } 61 #endif // QT_MAC_USE_COCOA 62 --- src/gui/accessible/qaccessible_mac.mm.orig 2013-01-22 16:04:44.000000000 -0500 63 +++ src/gui/accessible/qaccessible_mac.mm 2013-01-22 16:05:57.000000000 -0500 64 @@ -266,129 +266,129 @@ 65 int qt; 66 QAXRoleType mac; 67 bool settable; 68 -} text_bindings[][10] = { 69 +} text_bindings[][3] = { 70 { { QAccessible::MenuItem, QAXMenuItemRole, false }, 71 - { -1, 0, false } 72 + { -1, 0, false }, { -1, 0, false } 73 }, 74 { { QAccessible::MenuBar, QAXMenuBarRole, false }, 75 - { -1, 0, false } 76 + { -1, 0, false }, { -1, 0, false } 77 }, 78 { { QAccessible::ScrollBar, QAXScrollBarRole, false }, 79 - { -1, 0, false } 80 + { -1, 0, false }, { -1, 0, false } 81 }, 82 { { QAccessible::Grip, QAXGrowAreaRole, false }, 83 - { -1, 0, false } 84 + { -1, 0, false }, { -1, 0, false } 85 }, 86 { { QAccessible::Window, QAXWindowRole, false }, 87 - { -1, 0, false } 88 + { -1, 0, false }, { -1, 0, false } 89 }, 90 { { QAccessible::Dialog, QAXWindowRole, false }, 91 - { -1, 0, false } 92 + { -1, 0, false }, { -1, 0, false } 93 }, 94 { { QAccessible::AlertMessage, QAXWindowRole, false }, 95 - { -1, 0, false } 96 + { -1, 0, false }, { -1, 0, false } 97 }, 98 { { QAccessible::ToolTip, QAXWindowRole, false }, 99 - { -1, 0, false } 100 + { -1, 0, false }, { -1, 0, false } 101 }, 102 { { QAccessible::HelpBalloon, QAXWindowRole, false }, 103 - { -1, 0, false } 104 + { -1, 0, false }, { -1, 0, false } 105 }, 106 { { QAccessible::PopupMenu, QAXMenuRole, false }, 107 - { -1, 0, false } 108 + { -1, 0, false }, { -1, 0, false } 109 }, 110 { { QAccessible::Application, QAXApplicationRole, false }, 111 - { -1, 0, false } 112 + { -1, 0, false }, { -1, 0, false } 113 }, 114 { { QAccessible::Pane, QAXGroupRole, false }, 115 - { -1, 0, false } 116 + { -1, 0, false }, { -1, 0, false } 117 }, 118 { { QAccessible::Grouping, QAXGroupRole, false }, 119 - { -1, 0, false } 120 + { -1, 0, false }, { -1, 0, false } 121 }, 122 { { QAccessible::Separator, QAXSplitterRole, false }, 123 - { -1, 0, false } 124 + { -1, 0, false }, { -1, 0, false } 125 }, 126 { { QAccessible::ToolBar, QAXToolbarRole, false }, 127 - { -1, 0, false } 128 + { -1, 0, false }, { -1, 0, false } 129 }, 130 { { QAccessible::PageTab, QAXRadioButtonRole, false }, 131 - { -1, 0, false } 132 + { -1, 0, false }, { -1, 0, false } 133 }, 134 { { QAccessible::ButtonMenu, QAXMenuButtonRole, false }, 135 - { -1, 0, false } 136 + { -1, 0, false }, { -1, 0, false } 137 }, 138 { { QAccessible::ButtonDropDown, QAXPopUpButtonRole, false }, 139 - { -1, 0, false } 140 + { -1, 0, false }, { -1, 0, false } 141 }, 142 { { QAccessible::SpinBox, QAXIncrementorRole, false }, 143 - { -1, 0, false } 144 + { -1, 0, false }, { -1, 0, false } 145 }, 146 { { QAccessible::Slider, QAXSliderRole, false }, 147 - { -1, 0, false } 148 + { -1, 0, false }, { -1, 0, false } 149 }, 150 { { QAccessible::ProgressBar, QAXProgressIndicatorRole, false }, 151 - { -1, 0, false } 152 + { -1, 0, false }, { -1, 0, false } 153 }, 154 { { QAccessible::ComboBox, QAXPopUpButtonRole, false }, 155 - { -1, 0, false } 156 + { -1, 0, false }, { -1, 0, false } 157 }, 158 { { QAccessible::RadioButton, QAXRadioButtonRole, false }, 159 - { -1, 0, false } 160 + { -1, 0, false }, { -1, 0, false } 161 }, 162 { { QAccessible::CheckBox, QAXCheckBoxRole, false }, 163 - { -1, 0, false } 164 + { -1, 0, false }, { -1, 0, false } 165 }, 166 { { QAccessible::StaticText, QAXStaticTextRole, false }, 167 { QAccessible::Name, QAXValueAttribute, false }, 168 { -1, 0, false } 169 }, 170 { { QAccessible::Table, QAXTableRole, false }, 171 - { -1, 0, false } 172 + { -1, 0, false }, { -1, 0, false } 173 }, 174 { { QAccessible::StatusBar, QAXStaticTextRole, false }, 175 - { -1, 0, false } 176 + { -1, 0, false }, { -1, 0, false } 177 }, 178 { { QAccessible::Column, QAXColumnRole, false }, 179 - { -1, 0, false } 180 + { -1, 0, false }, { -1, 0, false } 181 }, 182 { { QAccessible::ColumnHeader, QAXColumnRole, false }, 183 - { -1, 0, false } 184 + { -1, 0, false }, { -1, 0, false } 185 }, 186 { { QAccessible::Row, QAXRowRole, false }, 187 - { -1, 0, false } 188 + { -1, 0, false }, { -1, 0, false } 189 }, 190 { { QAccessible::RowHeader, QAXRowRole, false }, 191 - { -1, 0, false } 192 + { -1, 0, false }, { -1, 0, false } 193 }, 194 { { QAccessible::Cell, QAXTextFieldRole, false }, 195 - { -1, 0, false } 196 + { -1, 0, false }, { -1, 0, false } 197 }, 198 { { QAccessible::PushButton, QAXButtonRole, false }, 199 - { -1, 0, false } 200 + { -1, 0, false }, { -1, 0, false } 201 }, 202 { { QAccessible::EditableText, QAXTextFieldRole, true }, 203 - { -1, 0, false } 204 + { -1, 0, false }, { -1, 0, false } 205 }, 206 { { QAccessible::Link, QAXTextFieldRole, false }, 207 - { -1, 0, false } 208 + { -1, 0, false }, { -1, 0, false } 209 }, 210 { { QAccessible::Indicator, QAXValueIndicatorRole, false }, 211 - { -1, 0, false } 212 + { -1, 0, false }, { -1, 0, false } 213 }, 214 { { QAccessible::Splitter, QAXSplitGroupRole, false }, 215 - { -1, 0, false } 216 + { -1, 0, false }, { -1, 0, false } 217 }, 218 { { QAccessible::List, QAXListRole, false }, 219 - { -1, 0, false } 220 + { -1, 0, false }, { -1, 0, false } 221 }, 222 { { QAccessible::ListItem, QAXStaticTextRole, false }, 223 - { -1, 0, false } 224 + { -1, 0, false }, { -1, 0, false } 225 }, 226 { { QAccessible::Cell, QAXStaticTextRole, false }, 227 - { -1, 0, false } 228 + { -1, 0, false }, { -1, 0, false } 229 }, 230 - { { -1, 0, false } } 231 + { { -1, 0, false }, { -1, 0, false }, { -1, 0, false } } 232 }; 233 234 class QAInterface; 235 --- src/gui/styles/qmacstyle_mac.mm.orig 2013-01-22 19:50:08.000000000 -0500 236 +++ src/gui/styles/qmacstyle_mac.mm 2013-01-22 19:55:50.000000000 -0500 237 @@ -3468,8 +3468,8 @@ 238 tti.version = qt_mac_hitheme_version; 239 tti.state = tds; 240 QColor textColor = btn->palette.buttonText().color(); 241 - CGFloat colorComp[] = { textColor.redF(), textColor.greenF(), 242 - textColor.blueF(), textColor.alphaF() }; 243 + CGFloat colorComp[] = { CGFloat(textColor.redF()), CGFloat(textColor.greenF()), 244 + CGFloat(textColor.blueF()), CGFloat(textColor.alphaF()) }; 245 CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace()); 246 CGContextSetFillColor(cg, colorComp); 247 tti.fontID = themeId; 248 @@ -3701,8 +3701,8 @@ 249 tti.version = qt_mac_hitheme_version; 250 tti.state = tds; 251 QColor textColor = myTab.palette.windowText().color(); 252 - CGFloat colorComp[] = { textColor.redF(), textColor.greenF(), 253 - textColor.blueF(), textColor.alphaF() }; 254 + CGFloat colorComp[] = { CGFloat(textColor.redF()), CGFloat(textColor.greenF()), 255 + CGFloat(textColor.blueF()), CGFloat(textColor.alphaF()) }; 256 CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace()); 257 CGContextSetFillColor(cg, colorComp); 258 switch (d->aquaSizeConstrain(opt, w)) { 259 @@ -3882,8 +3882,8 @@ 260 CGContextSetShouldAntialias(cg, true); 261 CGContextSetShouldSmoothFonts(cg, true); 262 QColor textColor = p->pen().color(); 263 - CGFloat colorComp[] = { textColor.redF(), textColor.greenF(), 264 - textColor.blueF(), textColor.alphaF() }; 265 + CGFloat colorComp[] = { CGFloat(textColor.redF()), CGFloat(textColor.greenF()), 266 + CGFloat(textColor.blueF()), CGFloat(textColor.alphaF()) }; 267 CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace()); 268 CGContextSetFillColor(cg, colorComp); 269 HIThemeTextInfo tti; 270 @@ -5018,8 +5018,8 @@ 271 tti.version = qt_mac_hitheme_version; 272 tti.state = tds; 273 QColor textColor = groupBox->palette.windowText().color(); 274 - CGFloat colorComp[] = { textColor.redF(), textColor.greenF(), 275 - textColor.blueF(), textColor.alphaF() }; 276 + CGFloat colorComp[] = { CGFloat(textColor.redF()), CGFloat(textColor.greenF()), 277 + CGFloat(textColor.blueF()), CGFloat(textColor.alphaF()) }; 278 CGContextSetFillColorSpace(cg, QCoreGraphicsPaintEngine::macGenericColorSpace()); 279 CGContextSetFillColor(cg, colorComp); 280 tti.fontID = checkable ? kThemeSystemFont : kThemeSmallSystemFont; 281 --- src/gui/text/qtextdocument_p.cpp.orig 2013-01-22 16:04:44.000000000 -0500 282 +++ src/gui/text/qtextdocument_p.cpp 2013-01-22 16:05:57.000000000 -0500 283 @@ -63,7 +63,15 @@ 284 // The VxWorks DIAB compiler crashes when initializing the anonymouse union with { a7 } 285 #if !defined(Q_CC_DIAB) 286 # define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8) \ 287 - QTextUndoCommand c = { a1, a2, 0, 0, quint8(a3), a4, quint32(a5), quint32(a6), { int(a7) }, quint32(a8) } 288 + QTextUndoCommand c; \ 289 + c.command = a1; \ 290 + c.block_part = a2; \ 291 + c.operation = a3; \ 292 + c.format = a4; \ 293 + c.strPos = a5; \ 294 + c.pos = a6; \ 295 + c.length = a7; \ 296 + c.revision = a8; 297 #else 298 # define QT_INIT_TEXTUNDOCOMMAND(c, a1, a2, a3, a4, a5, a6, a7, a8) \ 299 QTextUndoCommand c = { a1, a2, 0, 0, a3, a4, a5, a6 }; c.blockFormat = a7; c.revision = a8 300 --- src/gui/widgets/qdialogbuttonbox.cpp.orig 2013-01-22 16:04:44.000000000 -0500 301 +++ src/gui/widgets/qdialogbuttonbox.cpp 2013-01-22 16:05:57.000000000 -0500 302 @@ -212,7 +212,7 @@ 303 return QDialogButtonBox::InvalidRole; 304 } 305 306 -static const uint layouts[2][5][14] = 307 +static const UInt32 layouts[2][5][14] = 308 { 309 // Qt::Horizontal 310 { 311 @@ -407,7 +407,7 @@ 312 tmpPolicy = 4; // Mac modeless 313 } 314 315 - const uint *currentLayout = layouts[orientation == Qt::Vertical][tmpPolicy]; 316 + const UInt32 *currentLayout = layouts[orientation == Qt::Vertical][tmpPolicy]; 317 318 if (center) 319 buttonLayout->addStretch(); 320 @@ -415,7 +415,7 @@ 321 QList<QAbstractButton *> acceptRoleList = buttonLists[AcceptRole]; 322 323 while (*currentLayout != EOL) { 324 - int role = (*currentLayout & ~Reverse); 325 + UInt32 role = (*currentLayout & ~Reverse); 326 bool reverse = (*currentLayout & Reverse); 327 328 switch (role) { 329 --- src/qt3support/other/q3dragobject.cpp.orig 2013-01-22 16:04:44.000000000 -0500 330 +++ src/qt3support/other/q3dragobject.cpp 2013-01-22 16:05:57.000000000 -0500 331 @@ -1495,9 +1495,9 @@ 332 333 void Q3ColorDrag::setColor(const QColor &col) 334 { 335 - short r = (col.red() << 8) | col.red(); 336 - short g = (col.green() << 8) | col.green(); 337 - short b = (col.blue() << 8) | col.blue(); 338 + ushort r = (col.red() << 8) | col.red(); 339 + ushort g = (col.green() << 8) | col.green(); 340 + ushort b = (col.blue() << 8) | col.blue(); 341 342 // make sure we transmit data in network order 343 r = htons(r); 344 --- src/openvg/qpaintengine_vg.cpp.orig 2013-01-22 16:04:44.000000000 -0500 345 +++ src/openvg/qpaintengine_vg.cpp 2013-01-22 16:05:57.000000000 -0500 346 @@ -971,23 +971,23 @@ 347 yRadius = qMin(yRadius, rect.height() / 2); 348 349 VGfloat pts[] = { 350 - x1 + xRadius, y1, // MoveTo 351 - x2 - xRadius, y1, // LineTo 352 - x2 - (1 - KAPPA) * xRadius, y1, // CurveTo 353 - x2, y1 + (1 - KAPPA) * yRadius, 354 - x2, y1 + yRadius, 355 - x2, y2 - yRadius, // LineTo 356 - x2, y2 - (1 - KAPPA) * yRadius, // CurveTo 357 - x2 - (1 - KAPPA) * xRadius, y2, 358 - x2 - xRadius, y2, 359 - x1 + xRadius, y2, // LineTo 360 - x1 + (1 - KAPPA) * xRadius, y2, // CurveTo 361 - x1, y2 - (1 - KAPPA) * yRadius, 362 - x1, y2 - yRadius, 363 - x1, y1 + yRadius, // LineTo 364 - x1, y1 + (1 - KAPPA) * yRadius, // CurveTo 365 - x1 + (1 - KAPPA) * xRadius, y1, 366 - x1 + xRadius, y1 367 + VGfloat(x1 + xRadius), VGfloat(y1), // MoveTo 368 + VGfloat(x2 - xRadius), VGfloat(y1), // LineTo 369 + VGfloat(x2 - (1 - KAPPA) * xRadius), VGfloat(y1), // CurveTo 370 + VGfloat(x2), VGfloat(y1 + (1 - KAPPA) * yRadius), 371 + VGfloat(x2), VGfloat(y1 + yRadius), 372 + VGfloat(x2), VGfloat(y2 - yRadius), // LineTo 373 + VGfloat(x2), VGfloat(y2 - (1 - KAPPA) * yRadius), // CurveTo 374 + VGfloat(x2 - (1 - KAPPA) * xRadius), VGfloat(y2), 375 + VGfloat(x2 - xRadius), VGfloat(y2), 376 + VGfloat(x1 + xRadius), VGfloat(y2), // LineTo 377 + VGfloat(x1 + (1 - KAPPA) * xRadius), VGfloat(y2), // CurveTo 378 + VGfloat(x1), VGfloat(y2 - (1 - KAPPA) * yRadius), 379 + VGfloat(x1), VGfloat(y2 - yRadius), 380 + VGfloat(x1), VGfloat(y1 + yRadius), // LineTo 381 + VGfloat(x1), VGfloat(y1 + (1 - KAPPA) * yRadius), // CurveTo 382 + VGfloat(x1 + (1 - KAPPA) * xRadius), VGfloat(y1), 383 + VGfloat(x1 + xRadius), VGfloat(y1) 384 }; 385 386 #if !defined(QVG_NO_MODIFY_PATH) 387 @@ -3207,7 +3207,7 @@ 388 1.0f, 0.0f, 0.0f, 0.0f, 389 0.0f, 1.0f, 0.0f, 0.0f, 390 0.0f, 0.0f, 1.0f, 0.0f, 391 - 0.0f, 0.0f, 0.0f, d->opacity, 392 + 0.0f, 0.0f, 0.0f, VGfloat(d->opacity), 393 0.0f, 0.0f, 0.0f, 0.0f 394 }; 395 VGImage tileWithOpacity = VG_INVALID_HANDLE; 396 --- src/openvg/qpixmapdata_vg.cpp.orig 2013-01-22 16:04:44.000000000 -0500 397 +++ src/openvg/qpixmapdata_vg.cpp 2013-01-22 16:05:57.000000000 -0500 398 @@ -421,7 +421,7 @@ 399 1.0f, 0.0f, 0.0f, 0.0f, 400 0.0f, 1.0f, 0.0f, 0.0f, 401 0.0f, 0.0f, 1.0f, 0.0f, 402 - 0.0f, 0.0f, 0.0f, opacity, 403 + 0.0f, 0.0f, 0.0f, VGfloat(opacity), 404 0.0f, 0.0f, 0.0f, 0.0f 405 }; 406 vgColorMatrix(vgImageOpacity, vgImage, matrix); 407 --- src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h.orig 2013-01-22 16:04:44.000000000 -0500 408 +++ src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h 2013-01-22 16:05:57.000000000 -0500 409 @@ -176,7 +176,7 @@ 410 // Node::emitCode assumes that dst, if provided, is either a local or a referenced temporary. 411 ASSERT(!dst || dst == ignoredResult() || !dst->isTemporary() || dst->refCount()); 412 if (!m_codeBlock->numberOfLineInfos() || m_codeBlock->lastLineInfo().lineNumber != n->lineNo()) { 413 - LineInfo info = { instructions().size(), n->lineNo() }; 414 + LineInfo info = { uint32_t(instructions().size()), int32_t(n->lineNo()) }; 415 m_codeBlock->addLineInfo(info); 416 } 417 if (m_emitNodeDepth >= s_maxEmitNodeDepth) 418 @@ -195,7 +195,7 @@ 419 void emitNodeInConditionContext(ExpressionNode* n, Label* trueTarget, Label* falseTarget, bool fallThroughMeansTrue) 420 { 421 if (!m_codeBlock->numberOfLineInfos() || m_codeBlock->lastLineInfo().lineNumber != n->lineNo()) { 422 - LineInfo info = { instructions().size(), n->lineNo() }; 423 + LineInfo info = { uint32_t(instructions().size()), int32_t(n->lineNo()) }; 424 m_codeBlock->addLineInfo(info); 425 } 426 if (m_emitNodeDepth >= s_maxEmitNodeDepth) 427 --- src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp.orig 2013-01-22 16:04:44.000000000 -0500 428 +++ src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp 2013-01-22 16:05:57.000000000 -0500 429 @@ -1835,7 +1835,7 @@ 430 RegisterID* BytecodeGenerator::emitCatch(RegisterID* targetRegister, Label* start, Label* end) 431 { 432 #if ENABLE(JIT) 433 - HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth, CodeLocationLabel() }; 434 + HandlerInfo info = { uint32_t(start->bind(0, 0)), uint32_t(end->bind(0, 0)), uint32_t(instructions().size()), uint32_t(m_dynamicScopeDepth + m_baseScopeDepth), CodeLocationLabel() }; 435 #else 436 HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth }; 437 #endif 438 @@ -1889,7 +1889,7 @@ 439 440 void BytecodeGenerator::beginSwitch(RegisterID* scrutineeRegister, SwitchInfo::SwitchType type) 441 { 442 - SwitchInfo info = { instructions().size(), type }; 443 + SwitchInfo info = { uint32_t(instructions().size()), type }; 444 switch (type) { 445 case SwitchInfo::SwitchImmediate: 446 emitOpcode(op_switch_imm); 447 --- src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp.orig 2013-01-22 16:04:44.000000000 -0500 448 +++ src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp 2013-01-22 16:05:57.000000000 -0500 449 @@ -195,7 +195,7 @@ 450 UString::Rep::empty().hash(); 451 return &UString::Rep::empty(); 452 } 453 - UCharBuffer buf = {s, length}; 454 + UCharBuffer buf = {s, (unsigned int) length}; 455 pair<HashSet<UString::Rep*>::iterator, bool> addResult = globalData->identifierTable->add<UCharBuffer, UCharBufferTranslator>(buf); 456 457 // If the string is newly-translated, then we need to adopt it. 458 --- src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp.orig 2014-05-01 10:03:45.000000000 -0400 459 +++ src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp 2014-05-01 10:06:59.000000000 -0400 460 @@ -320,7 +320,7 @@ 461 default: 462 static const char hexDigits[] = "0123456789abcdef"; 463 UChar ch = data[i]; 464 - UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] }; 465 + UChar hex[] = { '\\', 'u', (UChar) hexDigits[(ch >> 12) & 0xF], (UChar) hexDigits[(ch >> 8) & 0xF], (UChar) hexDigits[(ch >> 4) & 0xF], (UChar) hexDigits[ch & 0xF] }; 466 builder.append(hex, sizeof(hex) / sizeof(UChar)); 467 break; 468 } 469 --- src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h.orig 2014-04-10 14:37:11.000000000 -0400 470 +++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h 2014-05-01 10:22:02.000000000 -0400 471 @@ -31,16 +31,22 @@ 472 // nullptr_t type and nullptr object. They are defined in the same namespaces they 473 // would be in compiler and library that had the support. 474 475 -#ifndef __has_feature 476 - #define __has_feature(feature) 0 477 -#endif 478 +#if (__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X__) 479 + 480 +#include <cstddef> 481 482 -#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL)) || defined(_LIBCPP_VERSION) 483 +// libstdc++ supports nullptr_t starting with gcc 4.6. 484 +#if defined(__GLIBCXX__) && __GLIBCXX__ < 20110325 485 +namespace std { 486 +typedef decltype(nullptr) nullptr_t; 487 +} 488 +#endif 489 490 #define HAVE_NULLPTR 1 491 492 #else 493 494 +#warning "reverting to non NULLPTR" 495 namespace std { 496 class nullptr_t { }; 497 } 498 --- src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.cpp.orig 2013-01-22 16:04:44.000000000 -0500 499 +++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.cpp 2013-01-22 16:05:57.000000000 -0500 500 @@ -301,7 +301,7 @@ 501 if (!length) 502 return StringImpl::empty(); 503 504 - UCharBuffer buffer = { s, length }; 505 + UCharBuffer buffer = { s, (unsigned int) length }; 506 return addToStringTable<UCharBuffer, UCharBufferTranslator>(buffer); 507 } 508 509 --- src/3rdparty/webkit/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp.orig 2013-01-22 16:04:44.000000000 -0500 510 +++ src/3rdparty/webkit/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp 2013-01-22 16:05:57.000000000 -0500 511 @@ -2058,7 +2058,7 @@ 512 { 513 m_usesExceptions = true; 514 #if ENABLE(JIT) 515 - HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth, CodeLocationLabel() }; 516 + HandlerInfo info = { uint32_t(start->bind(0, 0)), uint32_t(end->bind(0, 0)), uint32_t(instructions().size()), uint32_t(m_dynamicScopeDepth + m_baseScopeDepth), CodeLocationLabel() }; 517 #else 518 HandlerInfo info = { start->bind(0, 0), end->bind(0, 0), instructions().size(), m_dynamicScopeDepth + m_baseScopeDepth }; 519 #endif 520 @@ -2107,7 +2107,7 @@ 521 522 void BytecodeGenerator::beginSwitch(RegisterID* scrutineeRegister, SwitchInfo::SwitchType type) 523 { 524 - SwitchInfo info = { instructions().size(), type }; 525 + SwitchInfo info = { uint32_t(instructions().size()), type }; 526 switch (type) { 527 case SwitchInfo::SwitchImmediate: 528 emitOpcode(op_switch_imm); 529 --- src/3rdparty/webkit/Source/JavaScriptCore/runtime/Identifier.cpp.orig 2013-01-22 16:04:44.000000000 -0500 530 +++ src/3rdparty/webkit/Source/JavaScriptCore/runtime/Identifier.cpp 2013-01-22 16:05:57.000000000 -0500 531 @@ -222,7 +222,7 @@ 532 } 533 if (!length) 534 return StringImpl::empty(); 535 - UCharBuffer buf = {s, length}; 536 + UCharBuffer buf = {s, (unsigned int) length}; 537 pair<HashSet<StringImpl*>::iterator, bool> addResult = globalData->identifierTable->add<UCharBuffer, IdentifierUCharBufferTranslator>(buf); 538 539 // If the string is newly-translated, then we need to adopt it. 540 --- src/3rdparty/webkit/Source/JavaScriptCore/runtime/StringPrototype.cpp.orig 2013-01-22 16:04:44.000000000 -0500 541 +++ src/3rdparty/webkit/Source/JavaScriptCore/runtime/StringPrototype.cpp 2013-01-22 16:05:57.000000000 -0500 542 @@ -463,7 +463,7 @@ 543 } 544 545 size_t matchEnd = matchPos + matchLen; 546 - int ovector[2] = { matchPos, matchEnd }; 547 + int ovector[2] = { int (matchPos), int (matchEnd) }; 548 return JSValue::encode(jsString(exec, source.substringSharingImpl(0, matchPos), substituteBackreferences(replacementString, source, ovector, 0), source.substringSharingImpl(matchEnd))); 549 } 550 551 --- src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp.orig 2014-05-01 10:33:20.000000000 -0400 552 +++ src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp 2014-05-01 10:34:03.000000000 -0400 553 @@ -335,7 +335,7 @@ 554 default: 555 static const char hexDigits[] = "0123456789abcdef"; 556 UChar ch = data[i]; 557 - UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] }; 558 + UChar hex[] = { '\\', 'u', (UChar) hexDigits[(ch >> 12) & 0xF], (UChar) hexDigits[(ch >> 8) & 0xF], (UChar) hexDigits[(ch >> 4) & 0xF], (UChar) hexDigits[ch & 0xF] }; 559 builder.append(hex, WTF_ARRAY_LENGTH(hex)); 560 break; 561 } 562 --- src/3rdparty/webkit/Source/WebCore/dom/DocumentMarkerController.cpp.orig 2013-01-22 16:04:44.000000000 -0500 563 +++ src/3rdparty/webkit/Source/WebCore/dom/DocumentMarkerController.cpp 2013-01-22 16:05:57.000000000 -0500 564 @@ -59,7 +59,7 @@ 565 for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance()) { 566 RefPtr<Range> textPiece = markedText.range(); 567 int exception = 0; 568 - DocumentMarker marker = {type, textPiece->startOffset(exception), textPiece->endOffset(exception), description, false}; 569 + DocumentMarker marker = {type, (unsigned int) textPiece->startOffset(exception), (unsigned int) textPiece->endOffset(exception), description, false}; 570 addMarker(textPiece->startContainer(exception), marker); 571 } 572 } 573 --- src/3rdparty/webkit/Source/WebCore/dom/Element.cpp.orig 2014-05-01 10:46:05.000000000 -0400 574 +++ src/3rdparty/webkit/Source/WebCore/dom/Element.cpp 2014-05-01 10:52:18.000000000 -0400 575 @@ -1080,7 +1080,7 @@ 576 { 577 // Ref currentStyle in case it would otherwise be deleted when setRenderStyle() is called. 578 RefPtr<RenderStyle> currentStyle(renderStyle()); 579 - bool hasParentStyle = parentNodeForRenderingAndStyle() ? parentNodeForRenderingAndStyle()->renderStyle() : false; 580 + bool hasParentStyle = parentNodeForRenderingAndStyle() ? (parentNodeForRenderingAndStyle()->renderStyle() != NULL) : false; 581 bool hasDirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByDirectAdjacentRules(); 582 bool hasIndirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByForwardPositionalRules(); 583 584 --- src/plugins/accessible/widgets/itemviews.cpp.orig 2014-05-01 12:08:45.000000000 -0400 585 +++ src/plugins/accessible/widgets/itemviews.cpp 2014-05-01 12:28:22.000000000 -0400 586 @@ -393,7 +393,7 @@ 587 QModelIndex index = view()->model()->index(0, column, view()->rootIndex()); 588 if (!index.isValid() || view()->selectionMode() & QAbstractItemView::NoSelection) 589 return false; 590 - view()->selectionModel()->select(index, QItemSelectionModel::Columns & QItemSelectionModel::Deselect); 591 + view()->selectionModel()->select(index, QItemSelectionModel::SelectionFlags(QItemSelectionModel::Columns & QItemSelectionModel::Deselect)); 592 return true; 593 } 594 595 --- tools/designer/src/lib/shared/previewmanager.cpp.orig 2014-05-01 12:33:00.000000000 -0400 596 +++ tools/designer/src/lib/shared/previewmanager.cpp 2014-05-01 12:33:16.000000000 -0400 597 @@ -817,7 +817,7 @@ 598 { 599 typedef PreviewManagerPrivate::PreviewDataList PreviewDataList; 600 if (d->m_previews.empty()) 601 - return false; 602 + return 0; 603 604 // find matching window 605 const PreviewDataList::const_iterator cend = d->m_previews.constEnd(); 606 --- src/scripttools/debugging/qscriptdebuggerconsole.cpp.orig 2014-05-01 13:47:57.000000000 -0400 607 +++ src/scripttools/debugging/qscriptdebuggerconsole.cpp 2014-05-01 13:48:11.000000000 -0400 608 @@ -489,7 +489,7 @@ 609 d->input += QLatin1Char('\n'); 610 QScriptSyntaxCheckResult check = QScriptEngine::checkSyntax(d->input); 611 if (check.state() == QScriptSyntaxCheckResult::Intermediate) 612 - return false; 613 + return 0; 614 d->input.chop(1); // remove the last \n 615 cmd = QString(); 616 cmd.append(d->commandPrefix); -
deleted file qua/qt4-mac-devel/files/patch-macosx-deployment-target.diff
diff --git a/aqua/qt4-mac-devel/files/patch-macosx-deployment-target.diff b/aqua/qt4-mac-devel/files/patch-macosx-deployment-target.diff deleted file mode 100644 index e4f22ef..0000000
+ - 1 --- configure_orig 2010-10-13 09:42:43.000000000 -04002 +++ configure 2010-10-12 09:44:40.000000000 -04003 @@ -4885,7 +4885,7 @@4 done5 fi6 if [ "$BUILD_ON_MAC" = "yes" ]; then7 - echo "export MACOSX_DEPLOYMENT_TARGET = 10.5" >> "$mkfile"8 + echo "export MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@" >> "$mkfile"9 echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"10 echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"11 EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"12 @@ -6965,16 +6965,7 @@13 14 # set the global Mac deployment target. This is overridden on an arch-by-arch basis15 # in some cases, see code further down16 -case "$PLATFORM,$CFG_MAC_COCOA" in17 - macx*,yes)18 - # Cocoa19 - QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.520 - ;;21 - macx*,no)22 - # gcc, Carbon23 - QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.424 - ;;25 -esac26 +QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET @MACOSX_DEPLOYMENT_TARGET@27 28 # disable Qt 3 support on VxWorks and Symbian29 case "$XPLATFORM" in30 @@ -7696,28 +7678,28 @@31 # env. variable.32 if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then33 if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then34 - QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"35 - QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"36 - QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"37 - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=10.4"38 + QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"39 + QMakeVar add QMAKE_CXXFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"40 + QMakeVar add QMAKE_LFLAGS "-Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"41 + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86 "-arch i386 -Xarch_i386 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"42 fi43 if echo "$CFG_MAC_ARCHS" | grep '\<ppc\>' > /dev/null 2>&1; then44 - QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"45 - QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"46 - QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=10.4"47 - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=10.4"48 + QMakeVar add QMAKE_CFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"49 + QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"50 + QMakeVar add QMAKE_LFLAGS "-Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"51 + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC "-arch ppc -Xarch_ppc -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"52 fi53 if echo "$CFG_MAC_ARCHS" | grep '\<x86_64\>' > /dev/null 2>&1; then54 - QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"55 - QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"56 - QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=10.5"57 - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5"58 + QMakeVar add QMAKE_CFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"59 + QMakeVar add QMAKE_CXXFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"60 + QMakeVar add QMAKE_LFLAGS "-Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"61 + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_X86_64 "-arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"62 fi63 if echo "$CFG_MAC_ARCHS" | grep '\<ppc64\>' > /dev/null 2>&1; then64 - QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"65 - QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"66 - QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=10.5"67 - QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5"68 + QMakeVar add QMAKE_CFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"69 + QMakeVar add QMAKE_CXXFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"70 + QMakeVar add QMAKE_LFLAGS "-Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"71 + QMakeVar add QMAKE_OBJECTIVE_CFLAGS_PPC_64 "-arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@"72 fi73 fi74 75 --- mkspecs/common/g++-macx.conf_orig 2010-10-13 09:42:49.000000000 -040076 +++ mkspecs/common/g++-macx.conf 2010-10-12 09:39:33.000000000 -040077 @@ -16,8 +16,8 @@78 79 QMAKE_LFLAGS_STATIC_LIB += -all_load80 81 -QMAKE_CFLAGS_X86_64 += -Xarch_x86_64 -mmacosx-version-min=10.582 -QMAKE_CFLAGS_PPC_64 += -Xarch_ppc64 -mmacosx-version-min=10.583 +QMAKE_CFLAGS_X86_64 += -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@84 +QMAKE_CFLAGS_PPC_64 += -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@85 86 QMAKE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_6487 QMAKE_CXXFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_6488 --- mkspecs/common/mac.conf_orig 2010-10-13 09:42:49.000000000 -040089 +++ mkspecs/common/mac.conf 2010-10-12 09:38:52.000000000 -040090 @@ -38,7 +38,7 @@91 QMAKE_DEL_DIR = rmdir92 QMAKE_CHK_DIR_EXISTS = test -d93 QMAKE_MKDIR = mkdir -p94 -QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 # overridden to 10.5 for Cocoa on the compiler command line95 +QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@96 97 98 include(unix.conf)99 --- qmake/qmake.pri_orig 2010-10-13 09:42:50.000000000 -0400100 +++ qmake/qmake.pri 2010-10-13 10:04:18.000000000 -0400101 @@ -134,7 +134,7 @@102 mac {103 SOURCES += qfilesystemengine_mac.cpp104 SOURCES += qcore_mac.cpp qsettings_mac.cpp105 - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported)106 + QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@107 LIBS += -framework ApplicationServices108 }109 } else:win32 {110 --- src/tools/bootstrap/bootstrap.pro_orig 2010-10-13 09:42:57.000000000 -0400111 +++ src/tools/bootstrap/bootstrap.pro 2010-10-13 10:04:19.000000000 -0400112 @@ -104,7 +104,7 @@113 else:win32:SOURCES += ../../corelib/tools/qlocale_win.cpp114 115 macx: {116 - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported)117 + QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@118 SOURCES += ../../corelib/io/qfilesystemengine_mac.cpp119 SOURCES += ../../corelib/kernel/qcore_mac.cpp120 LIBS += -framework CoreServices -
deleted file qua/qt4-mac-devel/files/patch-mkspecs-features-moc.prf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs-features-moc.prf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs-features-moc.prf.diff deleted file mode 100644 index 8726d88..0000000
+ - 1 --- mkspecs/features/moc.prf 2010-09-10 05:04:49.000000000 -04002 +++ /opt/local/share/qt4/mkspecs/features/moc.prf 2010-10-30 21:39:56.000000000 -04003 @@ -83,8 +83,13 @@4 #make sure we can include these files5 moc_dir_short = $$MOC_DIR6 contains(QMAKE_HOST.os,Windows):moc_dir_short ~= s,^.:,/,7 -contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH += $$MOC_DIR8 -else:INCLUDEPATH += $$OUT_PWD/$$MOC_DIR9 +10 +# order the local moc path -before- the others, since its headers11 +# should -always be found locally so we want that path first.12 +contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH = $$MOC_DIR $$INCLUDEPATH13 +else:INCLUDEPATH = $$OUT_PWD/$$MOC_DIR $$INCLUDEPATH14 +15 +# message(MOC_DIR is $$MOC_DIR)16 17 # Backwards compatibility: Make shadow builds with default MOC_DIR work18 # if the user did not add the source dir explicitly. -
deleted file qua/qt4-mac-devel/files/patch-mkspecs-features-qt.prf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs-features-qt.prf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs-features-qt.prf.diff deleted file mode 100644 index 947e0f9..0000000
+ - 1 --- mkspecs/features/qt.prf.orig 2010-09-10 05:04:49.000000000 -04002 +++ mkspecs/features/qt.prf 2010-11-02 14:28:24.000000000 -04003 @@ -131,7 +131,15 @@4 #specific module settings5 !isEmpty(QT_BUILD_TREE):QMAKE_LIBDIR = $$QT_BUILD_TREE/lib $$QMAKE_LIBDIR #as above, prepending prevents us from picking up "stale" libs6 QMAKE_LIBDIR += $$QMAKE_LIBDIR_QT7 +8 for(QTLIB, $$list($$lower($$unique(QT)))) {9 +10 +# message('LIBS' qt before $$QTLIB is '$${LIBS}')11 +# message('INCLUDEPATH' qt before $$QTLIB is '$${INCLUDEPATH}')12 +# message('QMAKE_LFLAGS' qt before $$QTLIB is '$${QMAKE_LFLAGS}')13 +# message('QMAKE_CFLAGS' qt before $$QTLIB is '$${QMAKE_CFLAGS}')14 +# message('QMAKE_CXXFLAGS' qt before $$QTLIB is '$${QMAKE_CXXFLAGS}')15 +16 unset(qlib_style)17 !qt_debug:!qt_release {18 CONFIG(debug, debug|release):qlib_style = debug19 @@ -191,8 +199,43 @@20 qtAddLibrary($$qlib)21 }22 }23 +# message('LIBS' qt after $$QTLIB is '$${LIBS}')24 +# message('INCLUDEPATH' qt after $$QTLIB is '$${INCLUDEPATH}')25 +# message('QMAKE_LFLAGS' qt after $$QTLIB is '$${QMAKE_LFLAGS}')26 +# message('QMAKE_CFLAGS' qt after $$QTLIB is '$${QMAKE_CFLAGS}')27 +# message('QMAKE_CXXFLAGS' qt after $$QTLIB is '$${QMAKE_CXXFLAGS}')28 +}29 +30 +# remove Qt's libdir from various flags; it is already part of LIBS,31 +# and should be used only to find Qt's libraries. Qt puts LIBDIR32 +# before all other paths, so it is critical that this variable not33 +# contain anything questionable.34 +QMAKE_LIBDIR -= $$QMAKE_LIBDIR_QT35 +QMAKE_LFLAGS -= -L$$QMAKE_LIBDIR_QT36 +!isEqual($$QMAKE_LIBDIR_QT, $$[QT_INSTALL_PREFIX]/lib) {37 + QMAKE_LFLAGS -= -L$$[QT_INSTALL_PREFIX]/lib38 +}39 +40 +# remove Qt's incdir from various flags; it is already part of41 +# INCLUDEPATH. C*FLAGS come before the INCPATH build from42 +# INCLUDEPATH, so they should never have this -I in it (or, reall, any43 +# other -I but instead just remove the the obvious choices)44 +QMAKE_CFLAGS -= -I$$QMAKE_INCDIR_QT45 +QMAKE_CXXFLAGS -= -I$$QMAKE_INCDIR_QT46 +QMAKE_OBJECTIVE_CFLAGS -= -I$$QMAKE_INCDIR_QT47 +QMAKE_OBJECTIVE_CXXFLAGS -= -I$$QMAKE_INCDIR_QT48 +!isEqual($$QMAKE_INCDIR_QT, $$[QT_INSTALL_PREFIX]/include) {49 + QMAKE_CFLAGS -= -I$$[QT_INSTALL_PREFIX]/include50 + QMAKE_CXXFLAGS -= -I$$[QT_INSTALL_PREFIX]/include51 + QMAKE_OBJECTIVE_CFLAGS -= -I$$[QT_INSTALL_PREFIX]/include52 + QMAKE_OBJECTIVE_CXXFLAGS -= -I$$[QT_INSTALL_PREFIX]/include53 }54 55 +#message(QMAKE_CFLAGS at end is $${QMAKE_CFLAGS})56 +#message(QMAKE_CXXFLAGS at end is $${QMAKE_CXXFLAGS})57 +#message(QMAKE_OBJECTIVE_CFLAGS at end is $${QMAKE_OBJECTIVE_CFLAGS})58 +#message(QMAKE_OBJECTIVE_CXXFLAGS at end is $${QMAKE_OBJECTIVE_CXXFLAGS})59 +60 qt_compat {61 !qt_compat_no_warning:QTDIR_build:warning(***USE of COMPAT inside of QTDIR!**) #just for us62 INCLUDEPATH *= $$QMAKE_INCDIR_QT/Qt -
deleted file qua/qt4-mac-devel/files/patch-mkspecs-features-qt_functions.prf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs-features-qt_functions.prf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs-features-qt_functions.prf.diff deleted file mode 100644 index 1228a31..0000000
+ - 1 --- mkspecs/features/qt_functions.prf.orig 2010-09-10 05:04:49.000000000 -04002 +++ mkspecs/features/qt_functions.prf 2010-11-02 14:23:13.000000000 -04003 @@ -16,8 +16,18 @@4 }5 6 defineTest(qtAddLibrary) {7 +# message('LIBS' before $$1 is '$${LIBS}')8 +# message('INCLUDEPATH' before $$1 is '$${INCLUDEPATH}')9 +# message('QMAKE_LFLAGS' before $$1 is '$${QMAKE_LFLAGS}')10 +11 + # reorder the includes path: user, this library, Qt headers12 + INCLUDEPATH -= $$QMAKE_INCDIR_QT13 INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$114 - INCLUDEPATH = $$QMAKE_INCDIR_QT/$$1 $$INCLUDEPATH15 + INCLUDEPATH += $$QMAKE_INCDIR_QT/$$1 $$QMAKE_INCDIR_QT16 +17 + # first time through, append the path for Qt's installed libraries:18 + # -after- all of the other necessary libraries and paths19 + !contains(LIBS,-L$$QMAKE_LIBDIR_QT):LIBS = $$LIBS -L$$QMAKE_LIBDIR_QT20 21 LIB_NAME = $$122 unset(LINKAGE)23 @@ -85,6 +95,9 @@24 QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX}25 }26 LIBS += $$LINKAGE27 +# message('LIBS' after $$1 is now '$${LIBS}')28 +# message('INCLUDEPATH' after $$1 is now '$${INCLUDEPATH}')29 +# message('QMAKE_LFLAGS' after $$1 is now '$${QMAKE_LFLAGS}')30 export(LIBS)31 export(INCLUDEPATH)32 export(QMAKE_FRAMEWORKPATH) -
deleted file qua/qt4-mac-devel/files/patch-mkspecs-macx-g++-qmake.prf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs-macx-g++-qmake.prf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs-macx-g++-qmake.prf.diff deleted file mode 100644 index 3fe8ff6..0000000
+ - 1 --- mkspecs/macx-g++/qmake.conf.orig 2010-10-31 13:46:05.000000000 -04002 +++ mkspecs/macx-g++/qmake.conf 2010-10-31 13:46:08.000000000 -04003 @@ -9,7 +9,7 @@4 MAKEFILE_GENERATOR = UNIX5 TARGET_PLATFORM = macx6 TEMPLATE = app7 -CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl8 +CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl absolute_library_soname9 QT += core gui10 QMAKE_INCREMENTAL_STYLE = sublib11 -
aqua/qt4-mac-devel/files/patch-mkspecs_common_g++-base.conf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_common_g++-base.conf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_common_g++-base.conf.diff index b604f08..fb1748b 100644
a b 1 --- mkspecs/common/g++-base.conf.orig 201 1-08-09 01:57:28.000000000 -04002 +++ mkspecs/common/g++-base.conf 201 1-08-09 01:57:34.000000000 -04001 --- mkspecs/common/g++-base.conf.orig 2013-01-22 16:04:48.000000000 -0500 2 +++ mkspecs/common/g++-base.conf 2013-01-23 20:54:44.000000000 -0500 3 3 @@ -8,14 +8,14 @@ 4 4 # you can use the manual test in tests/manual/mkspecs. 5 5 # 6 6 7 7 -QMAKE_CC = gcc 8 +QMAKE_CC = @C ONFIGURE_CC@8 +QMAKE_CC = @CC@ 9 9 10 10 QMAKE_LINK_C = $$QMAKE_CC 11 11 QMAKE_LINK_C_SHLIB = $$QMAKE_CC … … 13 13 QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g 14 14 15 15 -QMAKE_CXX = g++ 16 +QMAKE_CXX = @C ONFIGURE_CXX@16 +QMAKE_CXX = @CXX@ 17 17 18 18 QMAKE_LINK = $$QMAKE_CXX 19 19 QMAKE_LINK_SHLIB = $$QMAKE_CXX 20 @@ -28,3 +28,6 @@ 21 QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE} 22 QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} 23 QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE 24 + 25 +QMAKE_CXXFLAGS_CXX11 = -std=c++11 26 +QMAKE_LFLAGS_CXX11 = -
new file aqua/qt4-mac-devel/files/patch-mkspecs_common_g++-macx.conf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_common_g++-macx.conf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_common_g++-macx.conf.diff new file mode 100644 index 0000000..fd5dd31
- + 1 --- mkspecs/common/g++-macx.conf.orig 2013-01-22 16:04:48.000000000 -0500 2 +++ mkspecs/common/g++-macx.conf 2013-01-23 20:55:09.000000000 -0500 3 @@ -16,16 +16,20 @@ 4 5 QMAKE_LFLAGS_STATIC_LIB += -all_load 6 7 -QMAKE_CFLAGS_X86_64 += -Xarch_x86_64 -mmacosx-version-min=10.5 8 -QMAKE_CFLAGS_PPC_64 += -Xarch_ppc64 -mmacosx-version-min=10.5 9 +QMAKE_CFLAGS_X86_64 += -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@ 10 +QMAKE_CFLAGS_PPC_64 += -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@ 11 12 QMAKE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 13 QMAKE_CXXFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 14 QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 15 QMAKE_OBJECTIVE_CFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 16 +QMAKE_OBJECTIVE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 17 +QMAKE_OBJECTIVE_CXXFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 18 QMAKE_LFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 19 QMAKE_LFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 20 21 +QMAKE_OBJECTIVE_CXXFLAGS_CXX11 = $$QMAKE_CXXFLAGS_CXX11 22 + 23 QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} 24 QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE 25 QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -
aqua/qt4-mac-devel/files/patch-mkspecs_common_mac.conf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_common_mac.conf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_common_mac.conf.diff index fa7bdf3..bb53f11 100644
a b 1 --- mkspecs/common/mac.conf.orig 2010-11-02 10:44:30.000000000 -0400 2 +++ mkspecs/common/mac.conf 2010-11-02 10:48:37.000000000 -0400 3 @@ -40,5 +40,9 @@ 1 --- mkspecs/common/mac.conf.orig 2012-08-14 15:49:12.000000000 -0400 2 +++ mkspecs/common/mac.conf 2012-08-14 15:49:25.000000000 -0400 3 @@ -9,6 +9,7 @@ 4 QMAKE_LIBDIR = 5 QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] 6 QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] 7 +QMAKE_FRAMEWORKDIR_QT = $$[QT_INSTALL_FRAMEWORKS] 8 QMAKE_INCDIR_OPENGL = /System/Library/Frameworks/OpenGL.framework/Headers \ 9 /System/Library/Frameworks/AGL.framework/Headers/ 10 11 @@ -38,7 +39,11 @@ 12 QMAKE_DEL_DIR = rmdir 13 QMAKE_CHK_DIR_EXISTS = test -d 4 14 QMAKE_MKDIR = mkdir -p 5 QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@ 15 -QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 # overridden to 10.5 for Cocoa on the compiler command line 16 +QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@ 6 17 7 18 +# allow CC and CXX to use CCACHE; 8 19 +# use "make CCACHE=ccache" when building -
aqua/qt4-mac-devel/files/patch-mkspecs_darwin-g++_qmake.conf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_darwin-g++_qmake.conf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_darwin-g++_qmake.conf.diff index 9d4bc0a..d8828a5 100644
a b 50 50 QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} 51 51 52 52 QMAKE_CXX = c++ 53 @@ -43,7 +48, 25@@53 @@ -43,7 +48,48 @@ 54 54 QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB 55 55 QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC 56 56 QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden … … 74 74 +QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE 75 75 + 76 76 +QMAKE_PCH_OUTPUT_EXT = .gch 77 + 78 +QMAKE_LINK = $$QMAKE_CXX 79 +QMAKE_LINK_SHLIB = $$QMAKE_CXX 80 +QMAKE_LINK_C = $$QMAKE_CC 81 +QMAKE_LINK_C_SHLIB = $$QMAKE_CC 82 +QMAKE_LFLAGS += -headerpad_max_install_names 83 +QMAKE_LFLAGS_RELEASE += 84 +QMAKE_LFLAGS_DEBUG += 85 +QMAKE_LFLAGS_APP += 86 +QMAKE_LFLAGS_SHLIB += -dynamiclib -single_module 87 +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB 88 +QMAKE_LFLAGS_THREAD += 89 +QMAKE_LFLAGS_INCREMENTAL+= -undefined suppress -flat_namespace 90 +QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} 91 +QMAKE_LFLAGS_PPC_64 += -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@ 92 +QMAKE_LFLAGS_X86_64 += -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=@MACOSX_DEPLOYMENT_TARGET@ 93 +QMAKE_LFLAGS_PPC += -arch ppc 94 +QMAKE_LFLAGS_X86 += -arch i386 95 +QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE} 96 +QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE} 97 +# -all_load requred to make Objective-C categories work in static builds. 98 +QMAKE_LFLAGS_STATIC_LIB += -all_load 99 +QMAKE_LFLAGS_RPATH += 77 100 78 101 QMAKE_INCDIR = 79 102 QMAKE_LIBDIR = 80 @@ -76,7 +99,6 @@ 103 @@ -54,29 +100,11 @@ 104 QMAKE_INCDIR_OPENGL = /usr/X11R6/include 105 QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib 106 107 -QMAKE_LINK = c++ 108 -QMAKE_LINK_SHLIB = c++ 109 -QMAKE_LFLAGS += -headerpad_max_install_names 110 -QMAKE_LFLAGS = 111 -QMAKE_LFLAGS_RELEASE = 112 -QMAKE_LFLAGS_DEBUG = 113 -QMAKE_LFLAGS_APP = -prebind 114 -QMAKE_LFLAGS_SHLIB = -prebind -dynamiclib -single_module 115 -QMAKE_LFLAGS_PLUGIN = -prebind -bundle 116 -QMAKE_LFLAGS_THREAD = 117 -QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} 118 - 119 -QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE} 120 -QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE} 121 - 122 -QMAKE_LFLAGS_RPATH = 123 - 124 QMAKE_LIBS_DYNLOAD = 125 QMAKE_LIBS_X11 = -lXext -lX11 -lm 81 126 QMAKE_LIBS_X11SM = -lSM -lICE 82 QMAKE_LIBS_OPENGL = -lGL 127 QMAKE_LIBS_OPENGL = -lGLU -lGL 83 128 QMAKE_LIBS_OPENGL_QT = -lGL 84 129 -QMAKE_LIBS_THREAD = 85 130 86 131 QMAKE_MOC = $$[QT_INSTALL_BINS]/moc 87 132 QMAKE_UIC = $$[QT_INSTALL_BINS]/uic 88 @@ -88,19 +11 0,19 @@133 @@ -88,19 +116,19 @@ 89 134 QMAKE_TAR = tar -cf 90 135 QMAKE_GZIP = gzip -9f 91 136 -
new file aqua/qt4-mac-devel/files/patch-mkspecs_features_moc.prf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_features_moc.prf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_features_moc.prf.diff new file mode 100644 index 0000000..69620a3
- + 1 --- mkspecs/features/moc.prf.orig 2012-04-24 08:27:50.000000000 -0400 2 +++ mkspecs/features/moc.prf 2012-04-24 08:27:55.000000000 -0400 3 @@ -83,8 +83,13 @@ 4 #make sure we can include these files 5 moc_dir_short = $$MOC_DIR 6 contains(QMAKE_HOST.os,Windows):moc_dir_short ~= s,^.:,/, 7 -contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH += $$MOC_DIR 8 -else:INCLUDEPATH += $$OUT_PWD/$$MOC_DIR 9 + 10 +# order the local moc path -before- the others, since its headers 11 +# should -always be found locally so we want that path first. 12 +contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH = $$MOC_DIR $$INCLUDEPATH 13 +else:INCLUDEPATH = $$OUT_PWD/$$MOC_DIR $$INCLUDEPATH 14 + 15 +# message(MOC_DIR is $$MOC_DIR) 16 17 # Backwards compatibility: Make shadow builds with default MOC_DIR work 18 # if the user did not add the source dir explicitly. -
new file aqua/qt4-mac-devel/files/patch-mkspecs_features_qt.prf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_features_qt.prf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_features_qt.prf.diff new file mode 100644 index 0000000..eee91d7
- + 1 --- mkspecs/features/qt.prf.orig 2013-07-06 14:28:19.000000000 -0400 2 +++ mkspecs/features/qt.prf 2013-07-06 14:28:33.000000000 -0400 3 @@ -145,7 +145,15 @@ 4 #specific module settings 5 !isEmpty(QT_BUILD_TREE):QMAKE_LIBDIR = $$QT_BUILD_TREE/lib $$QMAKE_LIBDIR #as above, prepending prevents us from picking up "stale" libs 6 QMAKE_LIBDIR += $$QMAKE_LIBDIR_QT 7 + 8 for(QTLIB, $$list($$lower($$unique(QT)))) { 9 + 10 +# message(qt: 'LIBS' qt before $$QTLIB is '$${LIBS}') 11 +# message(qt: 'INCLUDEPATH' qt before $$QTLIB is '$${INCLUDEPATH}') 12 +# message(qt: 'QMAKE_LFLAGS' qt before $$QTLIB is '$${QMAKE_LFLAGS}') 13 +# message(qt: 'QMAKE_CFLAGS' qt before $$QTLIB is '$${QMAKE_CFLAGS}') 14 +# message(qt: 'QMAKE_CXXFLAGS' qt before $$QTLIB is '$${QMAKE_CXXFLAGS}') 15 + 16 unset(qlib_style) 17 !qt_debug:!qt_release { 18 CONFIG(debug, debug|release):qlib_style = debug 19 @@ -206,8 +214,43 @@ 20 qtAddLibrary($$qlib) 21 } 22 } 23 +# message(qt: 'LIBS' qt after $$QTLIB is '$${LIBS}') 24 +# message(qt: 'INCLUDEPATH' qt after $$QTLIB is '$${INCLUDEPATH}') 25 +# message(qt: 'QMAKE_LFLAGS' qt after $$QTLIB is '$${QMAKE_LFLAGS}') 26 +# message(qt: 'QMAKE_CFLAGS' qt after $$QTLIB is '$${QMAKE_CFLAGS}') 27 +# message(qt: 'QMAKE_CXXFLAGS' qt after $$QTLIB is '$${QMAKE_CXXFLAGS}') 28 +} 29 + 30 +# remove Qt's libdir from various flags; it is already part of LIBS, 31 +# and should be used only to find Qt's libraries. Qt puts LIBDIR 32 +# before all other paths, so it is critical that this variable not 33 +# contain anything questionable. 34 +QMAKE_LIBDIR -= $$QMAKE_LIBDIR_QT 35 +QMAKE_LFLAGS -= -L$$QMAKE_LIBDIR_QT 36 +!isEqual($$QMAKE_LIBDIR_QT, $$[QT_INSTALL_PREFIX]/lib) { 37 + QMAKE_LFLAGS -= -L$$[QT_INSTALL_PREFIX]/lib 38 +} 39 + 40 +# remove Qt's incdir from various flags; it is already part of 41 +# INCLUDEPATH. C*FLAGS come before the INCPATH build from 42 +# INCLUDEPATH, so they should never have this -I in it (or, reall, any 43 +# other -I but instead just remove the the obvious choices) 44 +QMAKE_CFLAGS -= -I$$QMAKE_INCDIR_QT 45 +QMAKE_CXXFLAGS -= -I$$QMAKE_INCDIR_QT 46 +QMAKE_OBJECTIVE_CFLAGS -= -I$$QMAKE_INCDIR_QT 47 +QMAKE_OBJECTIVE_CXXFLAGS -= -I$$QMAKE_INCDIR_QT 48 +!isEqual($$QMAKE_INCDIR_QT, $$[QT_INSTALL_PREFIX]/include) { 49 + QMAKE_CFLAGS -= -I$$[QT_INSTALL_PREFIX]/include 50 + QMAKE_CXXFLAGS -= -I$$[QT_INSTALL_PREFIX]/include 51 + QMAKE_OBJECTIVE_CFLAGS -= -I$$[QT_INSTALL_PREFIX]/include 52 + QMAKE_OBJECTIVE_CXXFLAGS -= -I$$[QT_INSTALL_PREFIX]/include 53 } 54 55 +#message(qt: QMAKE_CFLAGS at end is $${QMAKE_CFLAGS}) 56 +#message(qt: QMAKE_CXXFLAGS at end is $${QMAKE_CXXFLAGS}) 57 +#message(qt: QMAKE_OBJECTIVE_CFLAGS at end is $${QMAKE_OBJECTIVE_CFLAGS}) 58 +#message(qt: QMAKE_OBJECTIVE_CXXFLAGS at end is $${QMAKE_OBJECTIVE_CXXFLAGS}) 59 + 60 qt_compat { 61 !qt_compat_no_warning:QTDIR_build:warning(***USE of COMPAT inside of QTDIR!**) #just for us 62 INCLUDEPATH *= $$QMAKE_INCDIR_QT/Qt -
new file aqua/qt4-mac-devel/files/patch-mkspecs_features_qt_functions.prf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_features_qt_functions.prf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_features_qt_functions.prf.diff new file mode 100644 index 0000000..0185498
- + 1 --- mkspecs/features/qt_functions.prf.orig 2013-02-11 08:39:31.000000000 -0500 2 +++ mkspecs/features/qt_functions.prf 2013-02-12 10:57:03.000000000 -0500 3 @@ -16,35 +16,108 @@ 4 } 5 6 defineTest(qtAddLibrary) { 7 +# message(qtAddLibrary: 'LIBS' before $$1 is '$${LIBS}') 8 +# message(qtAddLibrary: 'INCLUDEPATH' before $$1 is '$${INCLUDEPATH}') 9 +# message(qtAddLibrary: 'QMAKE_LFLAGS' before $$1 is '$${QMAKE_LFLAGS}') 10 + 11 + # reorder the includes path: user, this library, Qt headers 12 + INCLUDEPATH -= $$QMAKE_INCDIR_QT 13 INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$1 14 - INCLUDEPATH = $$QMAKE_INCDIR_QT/$$1 $$INCLUDEPATH 15 + INCLUDEPATH += $$QMAKE_INCDIR_QT/$$1 $$QMAKE_INCDIR_QT 16 + 17 + # first time through, append the path for Qt's installed libraries: 18 + # -after- all of the other necessary libraries and paths 19 + 20 + mac:!static:contains(QT_CONFIG, qt_framework) { 21 + isEmpty(QMAKE_FRAMEWORKDIR_QT) { 22 + !contains(LIBS,-F$$[QT_INSTALL_PREFIX]/Library/Frameworks) { 23 + LIBS = $$LIBS -F$$[QT_INSTALL_PREFIX]/Library/Frameworks 24 + } 25 + } else { 26 + !contains(LIBS,-F$$QMAKE_FRAMEWORKDIR_QT) { 27 + LIBS = $$LIBS -F$$QMAKE_FRAMEWORKDIR_QT 28 + } 29 + } 30 + isEmpty(QMAKE_LIBDIR_QT) { 31 + !contains(LIBS,-F$$[QT_INSTALL_PREFIX]/lib) { 32 + LIBS = $$LIBS -F$$[QT_INSTALL_PREFIX]/lib 33 + } 34 + } else { 35 + !contains(LIBS,-F$$QMAKE_LIBDIR_QT) { 36 + LIBS = $$LIBS -F$$QMAKE_LIBDIR_QT 37 + } 38 + } 39 + } 40 + isEmpty(QMAKE_LIBDIR_QT) { 41 + !contains(LIBS,-L$$[QT_INSTALL_PREFIX]/lib) { 42 + LIBS = $$LIBS -L$$[QT_INSTALL_PREFIX]/lib 43 + } 44 + } else { 45 + !contains(LIBS,-L$$QMAKE_LIBDIR_QT) { 46 + LIBS = $$LIBS -L$$QMAKE_LIBDIR_QT 47 + } 48 + } 49 50 LIB_NAME = $$1 51 unset(LINKAGE) 52 - mac { 53 - CONFIG(qt_framework, qt_framework|qt_no_framework) { #forced 54 - QMAKE_FRAMEWORKPATH *= $${QMAKE_LIBDIR_QT} 55 - FRAMEWORK_INCLUDE = $$QMAKE_LIBDIR_QT/$${LIB_NAME}.framework/Headers 56 - !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) { 57 - INCLUDEPATH -= $$FRAMEWORK_INCLUDE 58 - INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH 59 - } 60 - LINKAGE = -framework $${LIB_NAME}$${QT_LIBINFIX} 61 - } else:!qt_no_framework { #detection 62 - for(frmwrk_dir, $$list($$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH) /Library/Frameworks)) { 63 - exists($${frmwrk_dir}/$${LIB_NAME}.framework) { 64 - QMAKE_FRAMEWORKPATH *= $${frmwrk_dir} 65 + 66 + # see if the framework, and exists in the current known paths 67 + 68 + # add LIBS entries QMAKE_FRAMEWORKPATH, as appropriate 69 + 70 + all_frmwrks = $$find(LIBS, -F.*) $$find(QMAKE_LFLAGS, -F.*) 71 +# message(qtAddLibrary: all frameworks is $$all_frmwrks) 72 + 73 + for(frmwrk_dir, all_frmwrks) { 74 + 75 +# message(qtAddLibrary: this frmwrk_dir is $$frmwrk_dir) 76 + tfp = $$frmwrk_dir 77 + tfp ~= s,-F,, 78 + QMAKE_FRAMEWORKPATH *= $$tfp 79 +# message(qtAddLibrary: this frmwrk_path is $$tfp) 80 + 81 + } 82 + 83 + mac:!qt_no_framework { 84 + for(frmwrk_dir, $$list($$QMAKE_FRAMEWORKPATH $$QMAKE_FRAMEWORKDIR_QT $$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH))) { 85 + 86 +# message(qtAddLibrary: looking for framework $$LIB_NAME in directory $$frmwrk_dir) 87 + exists($${frmwrk_dir}/$${LIB_NAME}.framework) { 88 + 89 + message(qtAddLibrary: found framework $$LIB_NAME in directory $$frmwrk_dir) 90 FRAMEWORK_INCLUDE = $$frmwrk_dir/$${LIB_NAME}.framework/Headers 91 !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) { 92 INCLUDEPATH -= $$FRAMEWORK_INCLUDE 93 INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH 94 } 95 LINKAGE = -framework $${LIB_NAME} 96 + 97 +# Apple's ld has provided "-framework name,option" since at least 98 +# 10.4, allowing linking with a framework's option name if it exists 99 +# -- but defaulting to the basic name if it exists (and if neither 100 +# exists, then generating an error). All GCC, LLVM, CLANG, and Apple 101 +# compilers available in Xcode or MacPorts back to 10.4 seem to parse 102 +# this feature correctly when compiling, as well as pass it through to 103 +# Apple's ld. Apple used to provide debug kernel frameworks and 104 +# libraries that could be used by setting the shell environment variable: 105 +# DYLD_IMAGE_SUFFIX=_debug 106 +# but Apple hasn't done so since 10.6, and does not look to be doing 107 +# so any time soon. Hence, the below use of the optional framework 108 +# name is really the best way to link to and use debug frameworks. For 109 +# QtWebKit, which has no debug version, only the main library will 110 +# ever be found and used. 111 + 112 + if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { 113 + LINKAGE = $${LINKAGE},_debug 114 + } 115 break() 116 + 117 } 118 - } 119 - } 120 + } 121 } 122 + 123 + # special for symbian 124 + 125 symbian { 126 isEqual(LIB_NAME, QtCore) { 127 #workaround for dependency from f32file.h on e32svr.h which has moved location in symbian3 128 @@ -70,10 +143,56 @@ 129 export(TARGET.EPOCHEAPSIZE) 130 export(TARGET.CAPABILITY) 131 } 132 + 133 isEmpty(LINKAGE) { 134 + 135 + # not a framework or symbian 136 + # see if the library exists in the current known paths 137 + 138 + # add LIBS entries QMAKE_LIBPATH, as appropriate 139 + 140 + all_libs = $$find(LIBS, -L.*) $$find(QMAKE_LFLAGS, -L.*) 141 +# message(qtAddLibrary: all library paths is $$all_libs) 142 + 143 + for(lib_dir, all_libs) { 144 + 145 +# message(qtAddLibrary: this lib_dir is $$lib_dir) 146 + tlp = $$lib_dir 147 + tlp ~= s,-L,, 148 + QMAKE_LIBPATH *= $$tlp 149 +# message(qtAddLibrary: this lib_path is $$tlp) 150 + 151 + } 152 + 153 + for(lib_dir, $$list($$QMAKE_LIBPATH $$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR)) { 154 + 155 +# message(qtAddLibrary: looking for library $${LIB_NAME}$${QT_LIBINFIX} in directory $$lib_dir) 156 + exists($${lib_dir}/lib$${LIB_NAME}$${QT_LIBINFIX}.*) { 157 + 158 + message(qtAddLibrary: found library $${LIB_NAME}$${QT_LIBINFIX} in directory $$lib_dir) 159 + LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX} 160 + break() 161 + 162 + } 163 + } 164 + } 165 + 166 + isEmpty(LINKAGE) { 167 + 168 + message(WARNING: Could not find library or framework $$LIB_NAME in the current known search directories; assuming a default library.) 169 + 170 if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { 171 win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d 172 - mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug 173 + # special for mac: cannot build QtWebKit as debug, 174 + # no-framework, and universal. If things got here, 175 + # then this is no-framwork; just take care of the rest. 176 + mac { 177 + contains(QT_CONFIG, x86):contains(QT_CONFIG, x86_64):isEqual(LIB_NAME, QtWebKit) { 178 + LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX} 179 + } else { 180 + LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug 181 + } 182 + } 183 } 184 isEmpty(LINKAGE):LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX} 185 } 186 @@ -83,9 +202,13 @@ 187 QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX} 188 } 189 LIBS += $$LINKAGE 190 +# message(qtAddLibrary: 'LIBS' after $$1 is now '$${LIBS}') 191 +# message(qtAddLibrary: 'INCLUDEPATH' after $$1 is now '$${INCLUDEPATH}') 192 +# message(qtAddLibrary: 'QMAKE_LFLAGS' after $$1 is now '$${QMAKE_LFLAGS}') 193 export(LIBS) 194 export(INCLUDEPATH) 195 export(QMAKE_FRAMEWORKPATH) 196 + export(QMAKE_LIBPATH) 197 export(QMAKE_LFLAGS) 198 return(true) 199 } 200 @@ -119,4 +242,3 @@ 201 202 return(true) 203 } 204 - -
new file aqua/qt4-mac-devel/files/patch-mkspecs_features_uitools.prf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_features_uitools.prf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_features_uitools.prf.diff new file mode 100644 index 0000000..05f8a70
- + 1 --- mkspecs/features/uitools.prf.orig 2012-04-26 11:40:22.000000000 -0400 2 +++ mkspecs/features/uitools.prf 2012-04-26 11:42:42.000000000 -0400 3 @@ -2,13 +2,21 @@ 4 qt:load(qt) 5 6 # Include the correct version of the UiLoader library 7 -symbian: QTUITOOLS_LINKAGE = -lQtUiTools.lib 8 -else: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX} 9 10 -CONFIG(debug, debug|release) { 11 - mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug 12 - win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d 13 +#mac frameworks, for both debug and release 14 +mac:!static:contains(QT_CONFIG, qt_framework) { 15 + QTUITOOLS_LINKAGE = -framework QtUiTools 16 +} else { 17 + 18 + symbian: QTUITOOLS_LINKAGE = -lQtUiTools.lib 19 + else: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX} 20 + 21 + CONFIG(debug, debug|release) { 22 + mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug 23 + win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d 24 + } 25 } 26 + 27 LIBS += $$QTUITOOLS_LINKAGE 28 29 INCLUDEPATH = $$QMAKE_INCDIR_QT/QtUiTools $$INCLUDEPATH -
new file aqua/qt4-mac-devel/files/patch-mkspecs_macx-g++_qmake.conf.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_macx-g++_qmake.conf.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_macx-g++_qmake.conf.diff new file mode 100644 index 0000000..3bc4275
- + 1 --- mkspecs/macx-g++/qmake.conf.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ mkspecs/macx-g++/qmake.conf 2012-04-17 14:38:16.000000000 -0400 3 @@ -9,7 +9,7 @@ 4 MAKEFILE_GENERATOR = UNIX 5 TARGET_PLATFORM = macx 6 TEMPLATE = app 7 -CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl 8 +CONFIG += qt warn_on release app_bundle incremental global_init_link_order lib_version_first plugin_no_soname link_prl absolute_library_soname 9 QT += core gui 10 QMAKE_INCREMENTAL_STYLE = sublib 11 -
new file aqua/qt4-mac-devel/files/patch-mkspecs_objective_cxx.diff
diff --git a/aqua/qt4-mac-devel/files/patch-mkspecs_objective_cxx.diff b/aqua/qt4-mac-devel/files/patch-mkspecs_objective_cxx.diff new file mode 100644 index 0000000..3f27a78
- + 1 --- mkspecs/common/gcc-base-macx.conf.orig 2013-01-24 08:20:57.000000000 -0500 2 +++ mkspecs/common/gcc-base-macx.conf 2013-01-24 08:25:21.000000000 -0500 3 @@ -29,12 +29,23 @@ 4 QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF 5 QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG 6 QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE 7 -QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS 8 +QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS 9 QMAKE_OBJECTIVE_CFLAGS_X86 = $$QMAKE_CFLAGS_X86 10 QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 11 QMAKE_OBJECTIVE_CFLAGS_PPC = $$QMAKE_CFLAGS_PPC 12 QMAKE_OBJECTIVE_CFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 13 14 +QMAKE_OBJECTIVE_CXXFLAGS = $$QMAKE_CXXFLAGS 15 +QMAKE_OBJECTIVE_CXXFLAGS_WARN_ON = $$QMAKE_CXXFLAGS_WARN_ON 16 +QMAKE_OBJECTIVE_CXXFLAGS_WARN_OFF = $$QMAKE_CXXFLAGS_WARN_OFF 17 +QMAKE_OBJECTIVE_CXXFLAGS_DEBUG = $$QMAKE_CXXFLAGS_DEBUG 18 +QMAKE_OBJECTIVE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE 19 +QMAKE_OBJECTIVE_CXXFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS 20 +QMAKE_OBJECTIVE_CXXFLAGS_X86 = $$QMAKE_CXXFLAGS_X86 21 +QMAKE_OBJECTIVE_CXXFLAGS_X86_64 = $$QMAKE_CXXFLAGS_X86_64 22 +QMAKE_OBJECTIVE_CXXFLAGS_PPC = $$QMAKE_CXXFLAGS_PPC 23 +QMAKE_OBJECTIVE_CXXFLAGS_PPC_64 = $$QMAKE_CXXFLAGS_PPC_64 24 + 25 QMAKE_LFLAGS_X86 += $$QMAKE_CFLAGS_X86 26 QMAKE_LFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64 27 QMAKE_LFLAGS_PPC += $$QMAKE_CFLAGS_PPC 28 --- mkspecs/features/debug.prf.orig 2013-01-24 08:20:57.000000000 -0500 29 +++ mkspecs/features/debug.prf 2013-01-24 08:25:21.000000000 -0500 30 @@ -3,6 +3,7 @@ 31 QMAKE_CFLAGS += $$QMAKE_CFLAGS_DEBUG 32 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG 33 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_DEBUG 34 +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_DEBUG 35 QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG 36 QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG 37 !debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(debug, release) 38 --- mkspecs/features/mac/default_post.prf.orig 2013-01-24 08:20:57.000000000 -0500 39 +++ mkspecs/features/mac/default_post.prf 2013-01-24 08:25:21.000000000 -0500 40 @@ -1,5 +1,5 @@ 41 load(default_post) 42 -!no_objective_c:CONFIG += objective_c 43 +!no_objective_c:CONFIG += split_sources objective_c objective_cxx 44 45 # Pick a suitable default architecture for qmake-based applications. 46 # If the Qt package contains one of x86 and x86_64, pick that one. If it 47 --- mkspecs/features/mac/objective_c.prf.orig 2013-01-24 08:20:57.000000000 -0500 48 +++ mkspecs/features/mac/objective_c.prf 2013-01-24 09:48:39.000000000 -0500 49 @@ -1,23 +1,18 @@ 50 - 51 -for(source, SOURCES) { 52 - contains(source,.*\\.mm?$) { 53 - warning(Objective-C source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES) 54 - SOURCES -= $$source 55 - OBJECTIVE_SOURCES += $$source 56 - } 57 -} 58 +# Add compiler directives for Objective C (.m) only 59 +# 60 +# OBJECTIVE_C_SOURCES has already been set in "split_sources" 61 62 isEmpty(QMAKE_OBJECTIVE_CC):QMAKE_OBJECTIVE_CC = $$QMAKE_CC 63 64 OBJECTIVE_C_OBJECTS_DIR = $$OBJECTS_DIR 65 isEmpty(OBJECTIVE_C_OBJECTS_DIR):OBJECTIVE_C_OBJECTS_DIR = . 66 -isEmpty(QMAKE_EXT_OBJECTIVE_C):QMAKE_EXT_OBJECTIVE_C = .mm .m 67 +isEmpty(QMAKE_EXT_OBJECTIVE_C):QMAKE_EXT_OBJECTIVE_C = .m 68 69 objective_c.dependency_type = TYPE_C 70 objective_c.variables = QMAKE_OBJECTIVE_CFLAGS 71 -objective_c.commands = $$QMAKE_OBJECTIVE_CC -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} 72 +objective_c.commands = $$QMAKE_OBJECTIVE_CC -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} 73 objective_c.output = $$OBJECTIVE_C_OBJECTS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} 74 -objective_c.input = OBJECTIVE_SOURCES 75 +objective_c.input = OBJECTIVE_C_SOURCES 76 objective_c.name = Compile ${QMAKE_FILE_IN} 77 silent:objective_c.commands = @echo objective-c ${QMAKE_FILE_IN} && $$objective_c.commands 78 QMAKE_EXTRA_COMPILERS += objective_c 79 --- mkspecs/features/mac/ppc.prf.orig 2013-01-24 08:20:57.000000000 -0500 80 +++ mkspecs/features/mac/ppc.prf 2013-01-24 08:25:21.000000000 -0500 81 @@ -2,6 +2,7 @@ 82 } else { 83 QMAKE_CFLAGS += $$QMAKE_CFLAGS_PPC 84 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_PPC 85 + QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_PPC 86 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_PPC 87 QMAKE_LFLAGS += $$QMAKE_LFLAGS_PPC 88 } 89 --- mkspecs/features/mac/ppc64.prf.orig 2013-01-24 08:20:57.000000000 -0500 90 +++ mkspecs/features/mac/ppc64.prf 2013-01-24 08:25:21.000000000 -0500 91 @@ -2,6 +2,7 @@ 92 } else { 93 QMAKE_CFLAGS += $$QMAKE_CFLAGS_PPC_64 94 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_PPC_64 95 + QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_PPC_64 96 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_PPC_64 97 QMAKE_LFLAGS += $$QMAKE_LFLAGS_PPC_64 98 } 99 --- mkspecs/features/mac/sdk.prf.orig 2013-01-24 08:20:57.000000000 -0500 100 +++ mkspecs/features/mac/sdk.prf 2013-01-24 08:25:21.000000000 -0500 101 @@ -2,6 +2,7 @@ 102 !macx-xcode:!macx-pbuilder { 103 QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK 104 QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_MAC_SDK 105 + QMAKE_OBJECTIVE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK 106 QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK 107 QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK 108 } 109 --- mkspecs/features/mac/x86.prf.orig 2013-01-24 08:20:57.000000000 -0500 110 +++ mkspecs/features/mac/x86.prf 2013-01-24 08:25:21.000000000 -0500 111 @@ -2,6 +2,7 @@ 112 } else { 113 QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86 114 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86 115 + QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_X86 116 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86 117 QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86 118 } 119 --- mkspecs/features/mac/x86_64.prf.orig 2013-01-24 08:20:57.000000000 -0500 120 +++ mkspecs/features/mac/x86_64.prf 2013-01-24 08:25:21.000000000 -0500 121 @@ -2,6 +2,7 @@ 122 } else { 123 QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86_64 124 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86_64 125 + QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_X86_64 126 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86_64 127 QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86_64 128 } 129 --- mkspecs/features/release.prf.orig 2013-01-24 08:20:57.000000000 -0500 130 +++ mkspecs/features/release.prf 2013-01-24 08:25:21.000000000 -0500 131 @@ -2,6 +2,7 @@ 132 QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE 133 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE 134 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_RELEASE 135 +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_RELEASE 136 QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE 137 QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE 138 -!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(release, debug) 139 \ No newline at end of file 140 +!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(release, debug) 141 --- mkspecs/features/unix/hide_symbols.prf.orig 2013-01-24 08:20:57.000000000 -0500 142 +++ mkspecs/features/unix/hide_symbols.prf 2013-01-24 08:25:21.000000000 -0500 143 @@ -1,4 +1,5 @@ 144 QMAKE_CFLAGS += $$QMAKE_CFLAGS_HIDESYMS 145 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_HIDESYMS 146 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_HIDESYMS 147 +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_HIDESYMS 148 QMAKE_LFLAGS += $$QMAKE_LFLAGS_HIDESYMS 149 --- mkspecs/features/warn_off.prf.orig 2013-01-24 08:20:57.000000000 -0500 150 +++ mkspecs/features/warn_off.prf 2013-01-24 08:25:21.000000000 -0500 151 @@ -1,4 +1,5 @@ 152 CONFIG -= warn_on 153 QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_OFF 154 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_OFF 155 -QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_OFF 156 \ No newline at end of file 157 +QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_OFF 158 +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_WARN_OFF 159 --- mkspecs/features/warn_on.prf.orig 2013-01-24 08:20:57.000000000 -0500 160 +++ mkspecs/features/warn_on.prf 2013-01-24 08:25:21.000000000 -0500 161 @@ -2,4 +2,4 @@ 162 QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_ON 163 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_ON 164 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_ON 165 - 166 +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_WARN_ON -
deleted file qua/qt4-mac-devel/files/patch-precomp.test.diff
diff --git a/aqua/qt4-mac-devel/files/patch-precomp.test.diff b/aqua/qt4-mac-devel/files/patch-precomp.test.diff deleted file mode 100644 index a390829..0000000
+ - 1 --- config.tests/unix/precomp.test.orig 2009-02-25 16:09:14.000000000 -05002 +++ config.tests/unix/precomp.test 2009-03-10 16:49:45.000000000 -04003 @@ -27,7 +27,7 @@4 rm -f header.pchi header.o source.o5 ;;6 7 -*g++*|c++)8 +*g++*|c++|*gcc*|cc)9 case `"$COMPILER" -dumpversion 2>/dev/null` in10 3.*)11 ;; -
new file aqua/qt4-mac-devel/files/patch-qmake_generators_unix_unixmakke.cpp.diff
diff --git a/aqua/qt4-mac-devel/files/patch-qmake_generators_unix_unixmakke.cpp.diff b/aqua/qt4-mac-devel/files/patch-qmake_generators_unix_unixmakke.cpp.diff new file mode 100644 index 0000000..1a93310
- + 1 --- qmake/generators/unix/unixmake.cpp.orig 2013-02-24 21:46:23.000000000 -0500 2 +++ qmake/generators/unix/unixmake.cpp 2013-02-25 11:40:24.000000000 -0500 3 @@ -472,8 +472,9 @@ 4 UnixMakefileGenerator::findLibraries() 5 { 6 QList<QMakeLocalFileName> libdirs, frameworkdirs; 7 + frameworkdirs.append(QMakeLocalFileName("@PREFIX@/Library/Frameworks")); 8 frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks")); 9 - frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks")); 10 + libdirs.append(QMakeLocalFileName("@PREFIX@/lib")); 11 const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", QString() }; 12 for(int i = 0; !lflags[i].isNull(); i++) { 13 QStringList &l = project->values(lflags[i]); 14 @@ -583,7 +584,9 @@ 15 UnixMakefileGenerator::processPrlFiles() 16 { 17 QList<QMakeLocalFileName> libdirs, frameworkdirs; 18 + frameworkdirs.append(QMakeLocalFileName("@PREFIX@/Library/Frameworks")); 19 frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks")); 20 + libdirs.append(QMakeLocalFileName("@PREFIX@/lib")); 21 const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", QString() }; 22 for(int i = 0; !lflags[i].isNull(); i++) { 23 QStringList &l = project->values(lflags[i]); 24 @@ -627,13 +630,78 @@ 25 else 26 opt = l.at(++lit); 27 opt = opt.trimmed(); 28 - const QList<QMakeLocalFileName> dirs = frameworkdirs + libdirs; 29 - for(int dep_i = 0; dep_i < dirs.size(); ++dep_i) { 30 + 31 + // See if this framework is specified as 32 + // "foo,bar", which to Apple's LD means to look 33 + // for "foo" with the addition "bar" first in all 34 + // paths, then if not found do the same for just 35 + // "foo". Tricky looking for "," but not "\," 36 + 37 +#if 0 38 + warn_msg(WarnLogic, "out before: '%s'\n", opt.toLatin1().constData()); 39 +#endif 40 + int num_cs = 0; 41 + int loc_1 = -1; 42 + int loc = opt.indexOf(","); 43 + bool found = false; 44 + while (!found && (loc != -1)) { 45 + found = (loc == 0); 46 + if (!found) { 47 + found = (opt[loc-1] != '\\'); 48 + } 49 + if (found) { 50 + if (loc_1 == -1) { 51 + loc_1 = loc; 52 + } 53 + ++num_cs; 54 + } else { 55 + loc = opt.indexOf(",", loc); 56 + } 57 + } 58 +#if 0 59 + warn_msg(WarnLogic, "found == %s, loc == %d\n", 60 + (found ? "true" : "false"), loc); 61 +#endif 62 + if (found) { 63 + // split into name and extension 64 + if (num_cs > 1) { 65 + warn_msg(WarnLogic, "When parsing -framework '%s', found more than one ',' in the name. Assuming the first ',' is used to delineate between the framework name and the optional extension.\n", opt.toLatin1().constData()); 66 + } 67 + QString ext = opt.mid(loc_1+1); 68 + opt = opt.left(loc_1); 69 + found = false; 70 + const QList<QMakeLocalFileName> dirs = frameworkdirs + libdirs; 71 + for(int dep_i = 0; dep_i < dirs.size(); ++dep_i) { 72 + QString prl = dirs[dep_i].local() + "/" + opt + ".framework/" + opt + ext + Option::prl_ext; 73 +#if 0 74 + warn_msg(WarnLogic, "Looking for PRL '%s'\n", prl.toLatin1().constData()); 75 +#endif 76 + if(processPrlFile(prl)) { 77 +#if 0 78 + warn_msg(WarnLogic, "Found PRL for framework '%s' with optional extension '%s': '%s'\n", opt.toLatin1().constData(), ext.toLatin1().constData(), prl.toLatin1().constData()); 79 +#endif 80 + found = true; 81 + break; 82 + } 83 + } 84 + } 85 + // if not found yet, try the primary name 86 + if (!found) { 87 + const QList<QMakeLocalFileName> dirs = frameworkdirs + libdirs; 88 + for(int dep_i = 0; dep_i < dirs.size(); ++dep_i) { 89 QString prl = dirs[dep_i].local() + "/" + opt + ".framework/" + opt + Option::prl_ext; 90 - if(processPrlFile(prl)) 91 - break; 92 - } 93 - } 94 +#if 0 95 + warn_msg(WarnLogic, "Looking for PRL '%s'\n", prl.toLatin1().constData()); 96 +#endif 97 + if(processPrlFile(prl)) { 98 +#if 0 99 + warn_msg(WarnLogic, "Found PRL for framework '%s': '%s'\n", opt.toLatin1().constData(), prl.toLatin1().constData()); 100 +#endif 101 + break; 102 + } 103 + } 104 + } 105 + } 106 } else if(!opt.isNull()) { 107 QString lib = opt; 108 processPrlFile(lib); -
new file aqua/qt4-mac-devel/files/patch-qmake_option.h.diff
diff --git a/aqua/qt4-mac-devel/files/patch-qmake_option.h.diff b/aqua/qt4-mac-devel/files/patch-qmake_option.h.diff new file mode 100644 index 0000000..b8e49f8
- + 1 --- qmake/option.h.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ qmake/option.h 2012-04-20 23:03:15.000000000 -0400 3 @@ -214,6 +214,7 @@ 4 DocumentationPath, 5 HeadersPath, 6 LibrariesPath, 7 + FrameworksPath, 8 BinariesPath, 9 PluginsPath, 10 DataPath, -
new file aqua/qt4-mac-devel/files/patch-qmake_project.cpp.diff
diff --git a/aqua/qt4-mac-devel/files/patch-qmake_project.cpp.diff b/aqua/qt4-mac-devel/files/patch-qmake_project.cpp.diff new file mode 100644 index 0000000..5f8a4e6
- + 1 --- qmake/project.cpp.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ qmake/project.cpp 2012-04-17 14:38:16.000000000 -0400 3 @@ -596,14 +596,17 @@ 4 } 5 } 6 } 7 - for(QStringList::Iterator concat_it = concat.begin(); 8 - concat_it != concat.end(); ++concat_it) 9 + QByteArray qmake_no_defaults = qgetenv("QMAKE_NO_DEFAULTS"); 10 + if (qmake_no_defaults.isNull()) { 11 + for(QStringList::Iterator concat_it = concat.begin(); 12 + concat_it != concat.end(); ++concat_it) 13 feature_roots << (QLibraryInfo::location(QLibraryInfo::PrefixPath) + 14 mkspecs_concat + (*concat_it)); 15 - for(QStringList::Iterator concat_it = concat.begin(); 16 - concat_it != concat.end(); ++concat_it) 17 + for(QStringList::Iterator concat_it = concat.begin(); 18 + concat_it != concat.end(); ++concat_it) 19 feature_roots << (QLibraryInfo::location(QLibraryInfo::DataPath) + 20 mkspecs_concat + (*concat_it)); 21 + } 22 return feature_roots; 23 } 24 25 @@ -617,8 +620,10 @@ 26 for(QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it) 27 ret << ((*it) + concat); 28 } 29 - ret << QLibraryInfo::location(QLibraryInfo::DataPath) + concat; 30 - 31 + QByteArray qmake_no_defaults = qgetenv("QMAKE_NO_DEFAULTS"); 32 + if (qmake_no_defaults.isNull()) { 33 + ret << QLibraryInfo::location(QLibraryInfo::DataPath) + concat; 34 + } 35 return ret; 36 } 37 -
new file aqua/qt4-mac-devel/files/patch-qmake_property.cpp.diff
diff --git a/aqua/qt4-mac-devel/files/patch-qmake_property.cpp.diff b/aqua/qt4-mac-devel/files/patch-qmake_property.cpp.diff new file mode 100644 index 0000000..e8e87eb
- + 1 --- qmake/property.cpp.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ qmake/property.cpp 2012-04-20 22:56:47.000000000 -0400 3 @@ -91,6 +91,8 @@ 4 return QLibraryInfo::location(QLibraryInfo::HeadersPath); 5 else if(v == "QT_INSTALL_LIBS") 6 return QLibraryInfo::location(QLibraryInfo::LibrariesPath); 7 + else if(v == "QT_INSTALL_FRAMEWORKS") 8 + return QLibraryInfo::location(QLibraryInfo::FrameworksPath); 9 else if(v == "QT_INSTALL_BINS") 10 return QLibraryInfo::location(QLibraryInfo::BinariesPath); 11 else if(v == "QT_INSTALL_PLUGINS") 12 @@ -198,6 +200,7 @@ 13 specialProps.append("QT_INSTALL_DOCS"); 14 specialProps.append("QT_INSTALL_HEADERS"); 15 specialProps.append("QT_INSTALL_LIBS"); 16 + specialProps.append("QT_INSTALL_FRAMEWORKS"); 17 specialProps.append("QT_INSTALL_BINS"); 18 specialProps.append("QT_INSTALL_PLUGINS"); 19 specialProps.append("QT_INSTALL_IMPORTS"); -
new file aqua/qt4-mac-devel/files/patch-qmake_qmake.pri.diff
diff --git a/aqua/qt4-mac-devel/files/patch-qmake_qmake.pri.diff b/aqua/qt4-mac-devel/files/patch-qmake_qmake.pri.diff new file mode 100644 index 0000000..b868b90
- + 1 --- qmake/qmake.pri.orig 2014-04-10 14:37:13.000000000 -0400 2 +++ qmake/qmake.pri 2014-05-01 08:39:42.000000000 -0400 3 @@ -135,7 +135,7 @@ 4 SOURCES += qfilesystemengine_unix.cpp qfilesystemiterator_unix.cpp qfsfileengine_unix.cpp 5 mac { 6 SOURCES += qcore_mac.cpp qsettings_mac.cpp 7 - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported) 8 + QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@ 9 LIBS += -framework ApplicationServices 10 } 11 } else:win32 { -
deleted file qua/qt4-mac-devel/files/patch-src-plugins-bearer-corewlan-corewlan.pro.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src-plugins-bearer-corewlan-corewlan.pro.diff b/aqua/qt4-mac-devel/files/patch-src-plugins-bearer-corewlan-corewlan.pro.diff deleted file mode 100644 index 15b59ca..0000000
+ - 1 --- src/plugins/bearer/corewlan/corewlan.pro.orig 2011-10-03 23:44:31.000000000 -04002 +++ src/plugins/bearer/corewlan/corewlan.pro 2011-10-13 20:46:49.000000000 -04003 @@ -5,7 +5,7 @@4 LIBS += -framework Foundation -framework SystemConfiguration5 6 contains(QT_CONFIG, corewlan) {7 - isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10\.[67]\.sdk") {8 + isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "@DEVELOPER_DIR@/SDKs/MacOSX10.@MACOSX_VERSION_MINOR@.sdk") {9 LIBS += -framework CoreWLAN -framework Security10 }11 } -
new file aqua/qt4-mac-devel/files/patch-src_3rdparty_webkit_Source_WebCore_plugins_PluginView.h.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_3rdparty_webkit_Source_WebCore_plugins_PluginView.h.diff b/aqua/qt4-mac-devel/files/patch-src_3rdparty_webkit_Source_WebCore_plugins_PluginView.h.diff new file mode 100644 index 0000000..138f429
- + 1 --- src/3rdparty/webkit/Source/WebCore/plugins/PluginView.h.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ src/3rdparty/webkit/Source/WebCore/plugins/PluginView.h 2012-04-23 14:51:28.000000000 -0400 3 @@ -411,7 +411,9 @@ 4 5 Point m_lastMousePos; 6 void setNPWindowIfNeeded(); 7 +#ifndef NP_NO_CARBON 8 void nullEventTimerFired(Timer<PluginView>*); 9 +#endif 10 Point globalMousePosForPlugin() const; 11 Point mousePosForPlugin(MouseEvent* event = 0) const; 12 #endif -
new file aqua/qt4-mac-devel/files/patch-src_3rdparty_webkit_Source_WebCore_plugins_mac_PluginViewMac.mm.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_3rdparty_webkit_Source_WebCore_plugins_mac_PluginViewMac.mm.diff b/aqua/qt4-mac-devel/files/patch-src_3rdparty_webkit_Source_WebCore_plugins_mac_PluginViewMac.mm.diff new file mode 100644 index 0000000..d7df5f2
- + 1 --- src/3rdparty/webkit/Source/WebCore/plugins/mac/PluginViewMac.mm.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ src/3rdparty/webkit/Source/WebCore/plugins/mac/PluginViewMac.mm 2012-04-23 14:51:28.000000000 -0400 3 @@ -233,8 +233,10 @@ 4 setNPWindowIfNeeded(); 5 6 // TODO: Implement null timer throttling depending on plugin activation 7 +#ifndef NP_NO_CARBON 8 m_nullEventTimer = adoptPtr(new Timer<PluginView>(this, &PluginView::nullEventTimerFired)); 9 m_nullEventTimer->startRepeating(0.02); 10 +#endif 11 12 m_lastMousePos.h = m_lastMousePos.v = 0; 13 -
new file aqua/qt4-mac-devel/files/patch-src_corelib_corelib.pro.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_corelib_corelib.pro.diff b/aqua/qt4-mac-devel/files/patch-src_corelib_corelib.pro.diff new file mode 100644 index 0000000..b9c3025
- + 1 --- src/corelib/corelib.pro.orig 2012-09-17 15:22:14.000000000 -0400 2 +++ src/corelib/corelib.pro 2012-09-17 15:22:22.000000000 -0400 3 @@ -25,7 +25,7 @@ 4 LIBS_PRIVATE += -framework CoreServices -framework Security 5 } 6 } else:mac|darwin { 7 - LIBS_PRIVATE += -framework CoreFoundation -framework Security 8 + LIBS_PRIVATE += -framework CoreFoundation -framework Security -framework Foundation 9 } 10 mac:lib_bundle:DEFINES += QT_NO_DEBUG_PLUGIN_CHECK 11 win32:DEFINES-=QT_NO_CAST_TO_ASCII -
new file aqua/qt4-mac-devel/files/patch-src_corelib_global_qlibraryinfo.cpp.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_corelib_global_qlibraryinfo.cpp.diff b/aqua/qt4-mac-devel/files/patch-src_corelib_global_qlibraryinfo.cpp.diff new file mode 100644 index 0000000..0e34fee
- + 1 --- src/corelib/global/qlibraryinfo.cpp.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ src/corelib/global/qlibraryinfo.cpp 2012-04-20 22:59:34.000000000 -0400 3 @@ -262,6 +262,11 @@ 4 path = QT_CONFIGURE_LIBRARIES_PATH; 5 break; 6 #endif 7 +#ifdef QT_CONFIGURE_FRAMEWORKS_PATH 8 + case FrameworksPath: 9 + path = QT_CONFIGURE_FRAMEWORKS_PATH; 10 + break; 11 +#endif 12 #ifdef QT_CONFIGURE_BINARIES_PATH 13 case BinariesPath: 14 path = QT_CONFIGURE_BINARIES_PATH; 15 @@ -327,6 +332,10 @@ 16 key = QLatin1String("Libraries"); 17 defaultValue = QLatin1String("lib"); 18 break; 19 + case FrameworksPath: 20 + key = QLatin1String("Frameworks"); 21 + defaultValue = QLatin1String("Library/Frameworks"); 22 + break; 23 case BinariesPath: 24 key = QLatin1String("Binaries"); 25 defaultValue = QLatin1String("bin"); -
new file aqua/qt4-mac-devel/files/patch-src_corelib_global_qlibraryinfo.h.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_corelib_global_qlibraryinfo.h.diff b/aqua/qt4-mac-devel/files/patch-src_corelib_global_qlibraryinfo.h.diff new file mode 100644 index 0000000..d600213
- + 1 --- src/corelib/global/qlibraryinfo.h.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ src/corelib/global/qlibraryinfo.h 2012-04-20 22:56:57.000000000 -0400 3 @@ -70,6 +70,7 @@ 4 DocumentationPath, 5 HeadersPath, 6 LibrariesPath, 7 + FrameworksPath, 8 BinariesPath, 9 PluginsPath, 10 DataPath, -
new file aqua/qt4-mac-devel/files/patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff b/aqua/qt4-mac-devel/files/patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff new file mode 100644 index 0000000..5946e86
- + 1 --- src/corelib/tools/qelapsedtimer_mac.cpp.orig 2011-09-12 08:49:29.000000000 +0200 2 +++ src/corelib/tools/qelapsedtimer_mac.cpp 2012-02-02 21:30:46.000000000 +0100 3 @@ -62,7 +62,7 @@ 4 { 5 if (info.denom == 0) 6 mach_timebase_info(&info); 7 - qint64 nsecs = cpuTime * info.numer / info.denom; 8 + qint64 nsecs = (qint64)(((double) cpuTime) * ((double) info.numer) / ((double) info.denom)); 9 return nsecs; 10 } 11 -
new file aqua/qt4-mac-devel/files/patch-src_plugins_bearer_corewlan_corewlan.pro.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_plugins_bearer_corewlan_corewlan.pro.diff b/aqua/qt4-mac-devel/files/patch-src_plugins_bearer_corewlan_corewlan.pro.diff new file mode 100644 index 0000000..a22ae53
- + 1 --- src/plugins/bearer/corewlan/corewlan.pro.orig 2012-03-14 10:01:12.000000000 -0400 2 +++ src/plugins/bearer/corewlan/corewlan.pro 2012-04-24 09:23:47.000000000 -0400 3 @@ -7,7 +7,7 @@ LIBS += -framework Foundation -framework SystemConfiguration 4 contains(QT_CONFIG, corewlan) { 5 LIBS += -framework CoreWLAN 6 7 - isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, ".*OSX10\.[6789]\.sdk/?$") { 8 + isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "@DEVELOPER_SDK@/?$") { 9 LIBS += -framework Security 10 } 11 } -
new file aqua/qt4-mac-devel/files/patch-src_qbase.pri.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_qbase.pri.diff b/aqua/qt4-mac-devel/files/patch-src_qbase.pri.diff new file mode 100644 index 0000000..d065ce6
- + 1 --- src/qbase.pri.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ src/qbase.pri 2012-04-18 22:49:14.000000000 -0400 3 @@ -137,14 +137,14 @@ 4 5 unix|win32-g++*:!symbian { 6 CONFIG += create_pc 7 - QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS] 8 + QMAKE_PKGCONFIG_LIBDIR = $$target.path 9 QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET 10 QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS] 11 QMAKE_PKGCONFIG_DESTDIR = pkgconfig 12 include_replace.match = $$QMAKE_INCDIR_QT 13 include_replace.replace = $$[QT_INSTALL_HEADERS] 14 lib_replace.match = $$QMAKE_LIBDIR_QT 15 - lib_replace.replace = $$[QT_INSTALL_LIBS] 16 + lib_replace.replace = $$target.path 17 prefix_replace.match = $$QT_BUILD_TREE 18 prefix_replace.replace = $$[QT_INSTALL_PREFIX] 19 QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace 20 @@ -152,8 +152,8 @@ 21 22 unix:!symbian { 23 CONFIG += create_libtool explicitlib 24 - QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS] 25 - QMAKE_PRL_LIBDIR = $$[QT_INSTALL_LIBS] 26 + QMAKE_LIBTOOL_LIBDIR = $$target.path 27 + QMAKE_PRL_LIBDIR = $$target.path 28 QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace 29 QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace 30 } -
new file aqua/qt4-mac-devel/files/patch-src_qt_install.pri.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_qt_install.pri.diff b/aqua/qt4-mac-devel/files/patch-src_qt_install.pri.diff new file mode 100644 index 0000000..55815ba
- + 1 --- src/qt_install.pri.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ src/qt_install.pri 2012-04-20 23:50:49.000000000 -0400 3 @@ -3,7 +3,12 @@ 4 dlltarget.path=$$[QT_INSTALL_BINS] 5 INSTALLS += dlltarget 6 } 7 -target.path=$$[QT_INSTALL_LIBS] 8 +# install mac frameworks differently than libraries 9 +mac:!static:contains(QT_CONFIG, qt_framework) { 10 + target.path=$$[QT_INSTALL_FRAMEWORKS] 11 +} else { 12 + target.path=$$[QT_INSTALL_LIBS] 13 +} 14 INSTALLS += target 15 16 #headers -
new file aqua/qt4-mac-devel/files/patch-src_tools_bootstrap_bootstrap.pro.diff
diff --git a/aqua/qt4-mac-devel/files/patch-src_tools_bootstrap_bootstrap.pro.diff b/aqua/qt4-mac-devel/files/patch-src_tools_bootstrap_bootstrap.pro.diff new file mode 100644 index 0000000..e757047
- + 1 --- src/tools/bootstrap/bootstrap.pro.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ src/tools/bootstrap/bootstrap.pro 2012-04-17 14:38:16.000000000 -0400 3 @@ -103,7 +103,7 @@ 4 else:win32:SOURCES += ../../corelib/tools/qlocale_win.cpp 5 6 macx: { 7 - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported) 8 + QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@ 9 SOURCES += ../../corelib/kernel/qcore_mac.cpp 10 LIBS += -framework CoreServices 11 } -
new file aqua/qt4-mac-devel/files/patch-tools-build_qtconfig.diff
diff --git a/aqua/qt4-mac-devel/files/patch-tools-build_qtconfig.diff b/aqua/qt4-mac-devel/files/patch-tools-build_qtconfig.diff new file mode 100644 index 0000000..56cadc1
- + 1 --- tools/orig.tools.pro 2014-04-10 20:37:12.000000000 +0200 2 +++ tools/tools.pro 2015-03-21 21:58:01.000000000 +0100 3 @@ -20,7 +20,7 @@ 4 SUBDIRS += designer 5 } 6 } 7 - unix:!symbian:!mac:!embedded:!qpa:SUBDIRS += qtconfig 8 + unix:!symbian:!embedded:!qpa:SUBDIRS += qtconfig 9 win32:!wince*:SUBDIRS += activeqt 10 } 11 contains(QT_CONFIG, declarative) { 12 @@ -33,6 +33,7 @@ 13 14 mac { 15 SUBDIRS += macdeployqt 16 + SUBDIRS += qconfig 17 } 18 19 embedded:SUBDIRS += kmap2qmap -
new file aqua/qt4-mac-devel/files/patch-tools_assistant_lib_fulltextsearch_fulltextsearch.pro.diff
diff --git a/aqua/qt4-mac-devel/files/patch-tools_assistant_lib_fulltextsearch_fulltextsearch.pro.diff b/aqua/qt4-mac-devel/files/patch-tools_assistant_lib_fulltextsearch_fulltextsearch.pro.diff new file mode 100644 index 0000000..b8057c5
- + 1 --- tools/assistant/lib/fulltextsearch/fulltextsearch.pro.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ tools/assistant/lib/fulltextsearch/fulltextsearch.pro 2012-04-23 12:29:24.000000000 -0400 3 @@ -6,9 +6,9 @@ 4 mac:!static:contains(QT_CONFIG, qt_framework) { 5 CONFIG(debug, debug|release) { 6 !build_pass:CONFIG += build_all 7 - } 8 + } 9 } 10 -QT_CONFIG -= qt_framework 11 +# QT_CONFIG -= qt_framework 12 QT -= gui 13 TEMPLATE = lib 14 TARGET = QtCLucene -
new file aqua/qt4-mac-devel/files/patch-tools_assistant_lib_lib.pro.diff
diff --git a/aqua/qt4-mac-devel/files/patch-tools_assistant_lib_lib.pro.diff b/aqua/qt4-mac-devel/files/patch-tools_assistant_lib_lib.pro.diff new file mode 100644 index 0000000..9e62ef8
- + 1 --- tools/assistant/lib/lib.pro.orig 2012-03-14 10:01:12.000000000 -0400 2 +++ tools/assistant/lib/lib.pro 2012-04-25 12:32:49.000000000 -0400 3 @@ -12,16 +12,15 @@ 4 application \ 5 framework. 6 DEFINES -= QT_ASCII_CAST_WARNINGS 7 -qclucene = QtCLucene$${QT_LIBINFIX} 8 -if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { 9 - mac:qclucene = $${qclucene}_debug 10 - win32:qclucene = $${qclucene}d 11 -} 12 -linux-lsb-g++:LIBS_PRIVATE += --lsb-shared-libs=$$qclucene 13 + 14 +qtAddLibrary(QtCLucene) 15 + 16 unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES += QtNetwork \ 17 QtSql \ 18 - QtXml 19 -LIBS_PRIVATE += -l$$qclucene 20 + QtGui \ 21 + QtCore \ 22 + QtCLucene 23 + 24 RESOURCES += helpsystem.qrc 25 SOURCES += qhelpenginecore.cpp \ 26 qhelpengine.cpp \ -
new file aqua/qt4-mac-devel/files/patch-tools_designer_src_components_lib_lib.pro.diff
diff --git a/aqua/qt4-mac-devel/files/patch-tools_designer_src_components_lib_lib.pro.diff b/aqua/qt4-mac-devel/files/patch-tools_designer_src_components_lib_lib.pro.diff new file mode 100644 index 0000000..e814560
- + 1 --- tools/designer/src/components/lib/lib.pro.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ tools/designer/src/components/lib/lib.pro 2012-04-22 14:42:03.000000000 -0400 3 @@ -64,12 +64,38 @@ 4 include(../../sharedcomponents.pri) 5 include(../component.pri) 6 7 -unix|win32-g++* { 8 - QMAKE_PKGCONFIG_REQUIRES = QtCore QtDesigner QtGui QtXml 9 +# install mac frameworks differently than libraries 10 +mac:!static:contains(QT_CONFIG, qt_framework) { 11 + target.path=$$[QT_INSTALL_FRAMEWORKS] 12 +} else { 13 + target.path=$$[QT_INSTALL_LIBS] 14 +} 15 + 16 +unix|win32-g++*:!symbian { 17 + CONFIG += create_pc 18 + QMAKE_PKGCONFIG_LIBDIR = $$target.path 19 + QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET 20 + QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS] 21 + QMAKE_PKGCONFIG_DESTDIR = pkgconfig 22 + QMAKE_PKGCONFIG_REQUIRES += QtCore QtDesigner QtXml 23 contains(QT_CONFIG, script): QMAKE_PKGCONFIG_REQUIRES += QtScript 24 + include_replace.match = $$QMAKE_INCDIR_QT 25 + include_replace.replace = $$[QT_INSTALL_HEADERS] 26 + lib_replace.match = $$QMAKE_LIBDIR_QT 27 + lib_replace.replace = $$target.path 28 + prefix_replace.match = $$QT_BUILD_TREE 29 + prefix_replace.replace = $$[QT_INSTALL_PREFIX] 30 + QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace 31 +} 32 + 33 +unix:!symbian { 34 + CONFIG += create_libtool explicitlib 35 + QMAKE_LIBTOOL_LIBDIR = $$target.path 36 + QMAKE_PRL_LIBDIR = $$target.path 37 + QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace 38 + QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace 39 } 40 41 -target.path=$$[QT_INSTALL_LIBS] 42 INSTALLS += target 43 win32 { 44 dlltarget.path=$$[QT_INSTALL_BINS] -
new file aqua/qt4-mac-devel/files/patch-tools_designer_src_lib_lib.pro.diff
diff --git a/aqua/qt4-mac-devel/files/patch-tools_designer_src_lib_lib.pro.diff b/aqua/qt4-mac-devel/files/patch-tools_designer_src_lib_lib.pro.diff new file mode 100644 index 0000000..dbdf210
- + 1 --- tools/designer/src/lib/lib.pro.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ tools/designer/src/lib/lib.pro 2012-04-22 14:41:19.000000000 -0400 3 @@ -13,8 +13,6 @@ 4 VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} 5 } 6 7 -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES += QtXml 8 - 9 include(../../../../src/qt_targets.pri) 10 QMAKE_TARGET_PRODUCT = Designer 11 QMAKE_TARGET_DESCRIPTION = Graphical user interface designer. 12 @@ -63,13 +61,42 @@ 13 include(../sharedcomponents.pri) 14 include(../components/component.pri) 15 16 -target.path=$$[QT_INSTALL_LIBS] 17 +# install mac frameworks differently than libraries 18 +mac:!static:contains(QT_CONFIG, qt_framework) { 19 + target.path=$$[QT_INSTALL_FRAMEWORKS] 20 +} else { 21 + target.path=$$[QT_INSTALL_LIBS] 22 +} 23 INSTALLS += target 24 win32 { 25 dlltarget.path=$$[QT_INSTALL_BINS] 26 INSTALLS += dlltarget 27 } 28 29 +unix|win32-g++*:!symbian { 30 + CONFIG += create_pc 31 + QMAKE_PKGCONFIG_LIBDIR = $$target.path 32 + QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET 33 + QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS] 34 + QMAKE_PKGCONFIG_DESTDIR = pkgconfig 35 + QMAKE_PKGCONFIG_REQUIRES += QtCore QtGui QtXml 36 + contains(QT_CONFIG, script): QMAKE_PKGCONFIG_REQUIRES += QtScript 37 + include_replace.match = $$QMAKE_INCDIR_QT 38 + include_replace.replace = $$[QT_INSTALL_HEADERS] 39 + lib_replace.match = $$QMAKE_LIBDIR_QT 40 + lib_replace.replace = $$target.path 41 + prefix_replace.match = $$QT_BUILD_TREE 42 + prefix_replace.replace = $$[QT_INSTALL_PREFIX] 43 + QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace 44 +} 45 + 46 +unix:!symbian { 47 + CONFIG += create_libtool explicitlib 48 + QMAKE_LIBTOOL_LIBDIR = $$target.path 49 + QMAKE_PRL_LIBDIR = $$target.path 50 + QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace 51 + QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace 52 +} 53 54 qt_install_headers { 55 designer_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES -
new file aqua/qt4-mac-devel/files/patch-tools_designer_src_uitools_uitools.pro.diff
diff --git a/aqua/qt4-mac-devel/files/patch-tools_designer_src_uitools_uitools.pro.diff b/aqua/qt4-mac-devel/files/patch-tools_designer_src_uitools_uitools.pro.diff new file mode 100644 index 0000000..debcf74
- + 1 --- tools/designer/src/uitools/uitools.pro.orig 2012-03-14 10:01:12.000000000 -0400 2 +++ tools/designer/src/uitools/uitools.pro 2012-04-25 14:57:29.000000000 -0400 3 @@ -1,7 +1,7 @@ 4 TEMPLATE = lib 5 TARGET = QtUiTools 6 QT += xml 7 -CONFIG += qt staticlib 8 +CONFIG += qt qt_install_headers 9 DESTDIR = ../../../../lib 10 DLLDESTDIR = ../../../../bin 11 12 @@ -28,20 +28,68 @@ 13 SOURCES += quiloader.cpp 14 15 include($$QT_BUILD_TREE/include/QtUiTools/headers.pri, "", true) 16 -quitools_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES 17 -quitools_headers.path = $$[QT_INSTALL_HEADERS]/QtUiTools 18 -INSTALLS += quitools_headers 19 20 -target.path=$$[QT_INSTALL_LIBS] 21 +#mac frameworks 22 +mac:!static:contains(QT_CONFIG, qt_framework) { 23 + #QMAKE_FRAMEWORK_VERSION = 4.0 24 + CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework 25 + CONFIG(debug, debug|release) { 26 + !build_pass:CONFIG += debug_and_release build_all 27 + } else { #release 28 + !debug_and_release|build_pass { 29 + CONFIG -= qt_install_headers #no need to install these as well 30 + FRAMEWORK_HEADERS.version = Versions 31 + FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES 32 + FRAMEWORK_HEADERS.path = Headers 33 + } 34 + QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS 35 + } 36 +} 37 + 38 +mac { 39 + CONFIG += explicitlib 40 + macx-g++ { 41 + QMAKE_CFLAGS += -fconstant-cfstrings 42 + QMAKE_CXXFLAGS += -fconstant-cfstrings 43 + } 44 +} 45 + 46 +# install mac frameworks differently than libraries 47 +mac:!static:contains(QT_CONFIG, qt_framework) { 48 + target.path=$$[QT_INSTALL_FRAMEWORKS] 49 +} else { 50 + target.path=$$[QT_INSTALL_LIBS] 51 +} 52 INSTALLS += target 53 54 -unix|win32-g++* { 55 - CONFIG += create_pc 56 - QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS] 57 +unix|win32-g++*:!symbian { 58 + CONFIG += create_pc 59 + QMAKE_PKGCONFIG_LIBDIR = $$target.path 60 QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET 61 QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS] 62 QMAKE_PKGCONFIG_DESTDIR = pkgconfig 63 - QMAKE_PKGCONFIG_REQUIRES += QtXml 64 + QMAKE_PKGCONFIG_REQUIRES += QtXml QtCore QtGui 65 + include_replace.match = $$QMAKE_INCDIR_QT 66 + include_replace.replace = $$[QT_INSTALL_HEADERS] 67 + lib_replace.match = $$QMAKE_LIBDIR_QT 68 + lib_replace.replace = $$target.path 69 + prefix_replace.match = $$QT_BUILD_TREE 70 + prefix_replace.replace = $$[QT_INSTALL_PREFIX] 71 + QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace 72 +} 73 + 74 +unix:!symbian { 75 + CONFIG += create_libtool explicitlib 76 + QMAKE_LIBTOOL_LIBDIR = $$target.path 77 + QMAKE_PRL_LIBDIR = $$target.path 78 + QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace 79 + QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace 80 +} 81 + 82 +qt_install_headers { 83 + quitools_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES 84 + quitools_headers.path = $$[QT_INSTALL_HEADERS]/QtUiTools 85 + INSTALLS += quitools_headers 86 } 87 88 TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end -
new file aqua/qt4-mac-devel/files/patch-tools_macdeployqt_macdeployqt_main.cpp.diff
diff --git a/aqua/qt4-mac-devel/files/patch-tools_macdeployqt_macdeployqt_main.cpp.diff b/aqua/qt4-mac-devel/files/patch-tools_macdeployqt_macdeployqt_main.cpp.diff new file mode 100644 index 0000000..7350ee8
- + 1 --- tools/macdeployqt/macdeployqt/main.cpp.orig 2012-04-23 14:49:04.000000000 -0400 2 +++ tools/macdeployqt/macdeployqt/main.cpp 2012-04-17 14:38:16.000000000 -0400 3 @@ -127,7 +127,7 @@ 4 5 if (plugins) { 6 if (deploymentInfo.qtPath.isEmpty()) 7 - deploymentInfo.pluginPath = "/Developer/Applications/Qt/plugins"; // Assume binary package. 8 + deploymentInfo.pluginPath = "@QT_PLUGINS_DIR@"; // Assume binary package. 9 else 10 deploymentInfo.pluginPath = deploymentInfo.qtPath + "/plugins"; 11 -
new file aqua/qt4-mac-devel/files/patch-tools_macdeployqt_shared_shared.cpp.diff
diff --git a/aqua/qt4-mac-devel/files/patch-tools_macdeployqt_shared_shared.cpp.diff b/aqua/qt4-mac-devel/files/patch-tools_macdeployqt_shared_shared.cpp.diff new file mode 100644 index 0000000..6aa620b
- + 1 --- tools/macdeployqt/shared/shared.cpp.orig 2012-08-12 19:01:35.000000000 -0400 2 +++ tools/macdeployqt/shared/shared.cpp 2012-08-12 19:01:55.000000000 -0400 3 @@ -141,7 +141,7 @@ 4 state = DylibName; 5 continue; 6 } else if (part < parts.count() && parts.at(part).endsWith(".framework")) { 7 - info.installName += "/" + (qtPath + "lib/").simplified(); 8 + info.installName += "/" + (qtPath + "Frameworks/").simplified(); 9 info.frameworkDirectory = info.installName; 10 state = FrameworkName; 11 continue; -
new file aqua/qt4-mac-devel/files/prevent_addTitleRelated_crash.patch
diff --git a/aqua/qt4-mac-devel/files/prevent_addTitleRelated_crash.patch b/aqua/qt4-mac-devel/files/prevent_addTitleRelated_crash.patch new file mode 100644 index 0000000..168eb3d
- + 1 --- src/gui/kernel/orig.qwidget_mac.mm 2014-10-03 15:06:54.000000000 +0200 2 +++ src/gui/kernel/qwidget_mac.mm 2014-10-03 15:08:07.000000000 +0200 3 @@ -4619,7 +4619,7 @@ 4 5 setWSGeometry(false, oldRect); 6 7 - if (isResize && QApplicationPrivate::graphicsSystem()) 8 + if (isResize && q->parentWidget() && QApplicationPrivate::graphicsSystem()) 9 invalidateBuffer_resizeHelper(oldp, olds); 10 } 11 -
new file aqua/qt4-mac-devel/files/qconfig-remove-EXCEPTIONS.diff
diff --git a/aqua/qt4-mac-devel/files/qconfig-remove-EXCEPTIONS.diff b/aqua/qt4-mac-devel/files/qconfig-remove-EXCEPTIONS.diff new file mode 100644 index 0000000..03cce47
- + 1 --- QtCore.framework/Headers/orig.qconfig.h 2014-12-16 21:48:09.000000000 +0100 2 +++ QtCore.framework/Headers/qconfig.h 2015-01-01 11:36:10.000000000 +0100 3 @@ -74,12 +74,6 @@ 4 # define QT_NO_EGL 5 #endif 6 7 -#if defined(QT_NO_EXCEPTIONS) && defined(QT_EXCEPTIONS) 8 -# undef QT_NO_EXCEPTIONS 9 -#elif !defined(QT_NO_EXCEPTIONS) && !defined(QT_EXCEPTIONS) 10 -# define QT_NO_EXCEPTIONS 11 -#endif 12 - 13 #if defined(QT_NO_FREETYPE) && defined(QT_FREETYPE) 14 # undef QT_NO_FREETYPE 15 #elif !defined(QT_NO_FREETYPE) && !defined(QT_FREETYPE) -
new file aqua/qt4-mac-devel/files/qprocess-nozombies.patch
diff --git a/aqua/qt4-mac-devel/files/qprocess-nozombies.patch b/aqua/qt4-mac-devel/files/qprocess-nozombies.patch new file mode 100644 index 0000000..b91a21f
- + 1 --- src/corelib/io/orig.qprocess_unix.cpp 2014-04-10 20:37:11.000000000 +0200 2 +++ src/corelib/io/qprocess_unix.cpp 2014-12-11 17:03:26.000000000 +0100 3 @@ -1296,17 +1296,18 @@ 4 processManager()->remove(q); 5 } 6 7 +//https://codereview.qt-project.org/#/c/61294/ 8 bool QProcessPrivate::waitForDeadChild() 9 { 10 Q_Q(QProcess); 11 12 // read a byte from the death pipe 13 char c; 14 - qt_safe_read(deathPipe[0], &c, 1); 15 + qint64 readcount = qt_safe_read(deathPipe[0], &c, 1); 16 17 // check if our process is dead 18 int exitStatus; 19 - if (qt_safe_waitpid(pid_t(pid), &exitStatus, WNOHANG) > 0) { 20 + if (qt_safe_waitpid(pid_t(pid), &exitStatus, readcount > 0 ? WNOHANG : 0) > 0) { 21 processManager()->remove(q); 22 crashed = !WIFEXITED(exitStatus); 23 exitCode = WEXITSTATUS(exitStatus); -
new file aqua/qt4-mac-devel/files/qt4
diff --git a/aqua/qt4-mac-devel/files/qt4 b/aqua/qt4-mac-devel/files/qt4 new file mode 100644 index 0000000..29dc48f
- + 1 libexec/qt4/bin/qmake 2 libexec/qt4/bin/moc 3 libexec/qt4/bin/uic 4 libexec/qt4/bin/lrelease 5 libexec/qt4/bin/lupdate 6 libexec/qt4/bin/macdeployqt 7 libexec/qt4/bin/qhelpconverter 8 libexec/qt4/bin/qhelpgenerator 9 libexec/qt4/bin/xmlpatterns 10 libexec/qt4/bin/xmlpatternsvalidator -
new file aqua/qt4-mac-devel/files/qt4-correct-systraymenu-iconhandling.patch
diff --git a/aqua/qt4-mac-devel/files/qt4-correct-systraymenu-iconhandling.patch b/aqua/qt4-mac-devel/files/qt4-correct-systraymenu-iconhandling.patch new file mode 100644 index 0000000..7996304
- + 1 --- src/gui/util/orig.qsystemtrayicon_mac.mm 2014-04-10 20:37:12.000000000 +0200 2 +++ src/gui/util/qsystemtrayicon_mac.mm 2014-09-15 19:48:07.000000000 +0200 3 @@ -341,7 +341,7 @@ 4 -(void)mousePressed:(NSEvent *)mouseEvent button:(Qt::MouseButton)mouseButton 5 { 6 down = YES; 7 - int clickCount = [mouseEvent clickCount]; 8 + int clickCount = [mouseEvent clickCount]; 9 [self setNeedsDisplay:YES]; 10 11 #ifndef QT_MAC_USE_COCOA 12 @@ -532,7 +532,8 @@ 13 [item setState:action->isChecked() ? NSOnState : NSOffState]; 14 [item setToolTip:(NSString*)QCFString::toCFStringRef(action->toolTip())]; 15 const QIcon icon = action->icon(); 16 - if(!icon.isNull()) { 17 + // RJVB 20140915: don't forget to check against isIconVisibleInMenu()! 18 + if(!icon.isNull() && action->isIconVisibleInMenu()) { 19 #ifndef QT_MAC_USE_COCOA 20 const short scale = GetMBarHeight(); 21 #else -
new file aqua/qt4-mac-devel/files/qt4-deactivate-menurole-heuristics.patch
diff --git a/aqua/qt4-mac-devel/files/qt4-deactivate-menurole-heuristics.patch b/aqua/qt4-mac-devel/files/qt4-deactivate-menurole-heuristics.patch new file mode 100644 index 0000000..81cc723
- + 1 --- src/gui/widgets/orig.qmenu_mac.mm 2014-04-10 20:37:12.000000000 +0200 2 +++ src/gui/widgets/qmenu_mac.mm 2014-09-16 16:25:00.000000000 +0200 3 @@ -638,7 +638,7 @@ 4 5 static NSMenuItem *createNSMenuItem(const QString &title) 6 { 7 - NSMenuItem *item = [[NSMenuItem alloc] 8 + NSMenuItem *item = [[NSMenuItem alloc] 9 initWithTitle:qt_mac_QStringToNSString(title) 10 action:@selector(qtDispatcherToQAction:) keyEquivalent:@""]; 11 [item setTarget:nil]; 12 @@ -852,32 +852,7 @@ 13 #endif 14 break; 15 case QAction::TextHeuristicRole: { 16 - QString aboutString = QMenuBar::tr("About").toLower(); 17 - if (t.startsWith(aboutString) || t.endsWith(aboutString)) { 18 - if (t.indexOf(QRegExp(QString::fromLatin1("qt$"), Qt::CaseInsensitive)) == -1) { 19 -#ifndef QT_MAC_USE_COCOA 20 - ret = kHICommandAbout; 21 -#else 22 - ret = [loader aboutMenuItem]; 23 -#endif 24 - } else { 25 -#ifndef QT_MAC_USE_COCOA 26 - ret = kHICommandAboutQt; 27 -#else 28 - ret = [loader aboutQtMenuItem]; 29 -#endif 30 - } 31 - } else if (t.startsWith(QMenuBar::tr("Config").toLower()) 32 - || t.startsWith(QMenuBar::tr("Preference").toLower()) 33 - || t.startsWith(QMenuBar::tr("Options").toLower()) 34 - || t.startsWith(QMenuBar::tr("Setting").toLower()) 35 - || t.startsWith(QMenuBar::tr("Setup").toLower())) { 36 -#ifndef QT_MAC_USE_COCOA 37 - ret = kHICommandPreferences; 38 -#else 39 - ret = [loader preferencesMenuItem]; 40 -#endif 41 - } else if (t.startsWith(QMenuBar::tr("Quit").toLower()) 42 + if (t.startsWith(QMenuBar::tr("Quit").toLower()) 43 || t.startsWith(QMenuBar::tr("Exit").toLower())) { 44 #ifndef QT_MAC_USE_COCOA 45 ret = kHICommandQuit; -
new file aqua/qt4-mac-devel/files/qt4-prevent-mousevent-for-deleted-object.diff
diff --git a/aqua/qt4-mac-devel/files/qt4-prevent-mousevent-for-deleted-object.diff b/aqua/qt4-mac-devel/files/qt4-prevent-mousevent-for-deleted-object.diff new file mode 100644 index 0000000..25205b4
- + 1 --- src/gui/kernel/orig.qt_cocoa_helpers_mac.mm 2015-01-17 15:43:32.000000000 +0100 2 +++ src/gui/kernel/qt_cocoa_helpers_mac.mm 2015-02-10 19:19:43.000000000 +0100 3 @@ -91,6 +91,8 @@ 4 #include <private/qwidget_p.h> 5 #include <private/qcocoawindow_mac_p.h> 6 7 +#include <string.h> 8 + 9 QT_BEGIN_NAMESPACE 10 11 #ifdef QT_MAC_USE_COCOA 12 @@ -1280,8 +1282,19 @@ 13 // released. We therefore need to re-check if should send (delayed) enter leave events: 14 // qt_button_down has now become NULL since the call at the top of the function. Also, since 15 // the relase might have closed a window, we dont give the nativeWidget hint 16 - qt_mac_getTargetForMouseEvent(0, QEvent::None, localPoint, globalPoint, nativeWidget, &widgetUnderMouse); 17 - qt_mac_checkEnterLeaveForNativeWidgets(widgetUnderMouse); 18 + //qt_mac_getTargetForMouseEvent(0, QEvent::None, localPoint, globalPoint, nativeWidget, &widgetUnderMouse); 19 + //RJVB: 20 +// ProcessSerialNumber current, front; 21 +// GetCurrentProcess(¤t); 22 +// GetFrontProcess(&front); 23 + qt_mac_getTargetForMouseEvent(0, QEvent::None, localPoint, globalPoint, NULL, &widgetUnderMouse); 24 + if ( [[NSApplication sharedApplication] isActive] /*memcmp(¤t, &front, sizeof(ProcessSerialNumber)) == 0*/) { 25 + qt_mac_checkEnterLeaveForNativeWidgets(widgetUnderMouse); 26 + } 27 + else if (widgetUnderMouse) { 28 + qDebug() << "Background application does not deliver mouse button release event to" << widgetUnderMouse 29 + << "at" << globalPoint; 30 + } 31 } 32 33 previousButton = button; -
new file aqua/qt4-mac-devel/files/series
diff --git a/aqua/qt4-mac-devel/files/series b/aqua/qt4-mac-devel/files/series new file mode 100644 index 0000000..4b58d44
- + 1 patch-config.tests_unix_compile.test.diff 2 patch-config.tests_unix_precomp.test.diff 3 patch-configure.diff 4 patch-mkspecs_common_g++-macx.conf.diff 5 patch-mkspecs_common_mac.conf.diff 6 patch-mkspecs_features_moc.prf.diff 7 patch-mkspecs_features_qt.prf.diff 8 patch-mkspecs_features_qt_functions.prf.diff 9 patch-mkspecs_common_g++-base.conf.diff 10 patch-mkspecs_objective_cxx.diff 11 patch-mkspecs_macx-g++_qmake.conf.diff 12 patch-qmake_option.h.diff 13 patch-qmake_property.cpp.diff 14 patch-src_corelib_global_qlibraryinfo.cpp.diff 15 patch-src_corelib_global_qlibraryinfo.h.diff 16 patch-qmake_project.cpp.diff 17 patch-qmake_generators_unix_unixmakke.cpp.diff 18 patch-qmake_qmake.pri.diff 19 patch-src_tools_bootstrap_bootstrap.pro.diff 20 patch-src_3rdparty_webkit_Source_WebCore_plugins_PluginView.h.diff 21 patch-src_3rdparty_webkit_Source_WebCore_plugins_mac_PluginViewMac.mm.diff 22 patch-src_plugins_bearer_corewlan_corewlan.pro.diff 23 patch-src_qbase.pri.diff 24 patch-src_qt_install.pri.diff 25 patch-tools_assistant_lib_fulltextsearch_fulltextsearch.pro.diff 26 patch-tools_assistant_lib_lib.pro.diff 27 patch-tools_designer_src_components_lib_lib.pro.diff 28 patch-tools_designer_src_lib_lib.pro.diff 29 patch-tools_designer_src_uitools_uitools.pro.diff 30 patch-mkspecs_features_uitools.prf.diff 31 patch-tools_macdeployqt_macdeployqt_main.cpp.diff 32 patch-src_corelib_tools_qelapsedtimer-mac.cpp.diff 33 patch-src_corelib_corelib.pro.diff 34 patch-tools_macdeployqt_shared_shared.cpp.diff 35 qprocess-nozombies.patch 36 disable-exceptions.patch 37 patch-tools-build_qtconfig.diff 38 qt4-correct-systraymenu-iconhandling.patch 39 qt4-deactivate-menurole-heuristics.patch 40 prevent_addTitleRelated_crash.patch 41 debug-negative-qtimerint.patch 42 silence-qfilesystemwatcher.patch 43 patch-QAction_isEnabled.diff -
new file aqua/qt4-mac-devel/files/silence-qfilesystemwatcher.patch
diff --git a/aqua/qt4-mac-devel/files/silence-qfilesystemwatcher.patch b/aqua/qt4-mac-devel/files/silence-qfilesystemwatcher.patch new file mode 100644 index 0000000..171ff8d
- + 1 --- src/corelib/io/orig.qfilesystemwatcher.cpp 2014-04-10 20:37:11.000000000 +0200 2 +++ src/corelib/io/qfilesystemwatcher.cpp 2014-12-11 13:33:27.000000000 +0100 3 @@ -544,9 +544,9 @@ 4 if(engine) 5 p = engine->addPaths(p, &d->files, &d->directories); 6 7 - if (!p.isEmpty()) 8 - qWarning("QFileSystemWatcher: failed to add paths: %s", 9 - qPrintable(p.join(QLatin1String(", ")))); 10 +// if (!p.isEmpty()) 11 +// qWarning("QFileSystemWatcher: failed to add paths: %s", 12 +// qPrintable(p.join(QLatin1String(", ")))); 13 } 14 15 /*! -
new file aqua/qt4-mac-devel/files/split_sources.prf
diff --git a/aqua/qt4-mac-devel/files/split_sources.prf b/aqua/qt4-mac-devel/files/split_sources.prf new file mode 100644 index 0000000..7851cf6
- + 1 # move Obective C and C++ files from SOURCES to OBJECTIVE_SOURCES 2 3 for(source, SOURCES) { 4 contains(source,.*\\.m$) { 5 warning(Objective-C source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES) 6 SOURCES -= $$source 7 OBJECTIVE_SOURCES += $$source 8 } else { 9 contains(source,.*\\.mm$) { 10 warning(Objective-C++ source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES) 11 SOURCES -= $$source 12 OBJECTIVE_SOURCES += $$source 13 } 14 } 15 } 16 17 # move C and C++ files from OBJECTIVE_SOURCES to SOURCES 18 19 for(source, OBJECTIVE_SOURCES) { 20 contains(source,.*\\.c$) { 21 warning(C source \'$$source\' found in SOURCES but should be in SOURCES) 22 OBJECTIVE_SOURCES -= $$source 23 SOURCES += $$source 24 } else { 25 contains(source,.*\\.cc$) { 26 warning(C++ source \'$$source\' found in SOURCES but should be in SOURCES) 27 OBJECTIVE_SOURCES -= $$source 28 SOURCES += $$source 29 } else { 30 contains(source,.*\\.cpp$) { 31 warning(C++ source \'$$source\' found in SOURCES but should be in SOURCES) 32 OBJECTIVE_SOURCES -= $$source 33 SOURCES += $$source 34 } 35 } 36 } 37 } 38 39 # split Objective C and C++ sources into their own variables 40 41 for(source, OBJECTIVE_SOURCES) { 42 contains(source,.*\\.mm$) { 43 OBJECTIVE_CXX_SOURCES += $$source 44 } else { 45 contains(source,.*\\.m$) { 46 OBJECTIVE_C_SOURCES += $$source 47 } else { 48 warning(Source \'$$source\' was found in OBJECTIVE_SOURCES but its file extension is not a typical objective C (\'.m\') or C++ (\'.mm\') extension; assuming Objective C.) 49 OBJECTIVE_C_SOURCES += $$source 50 } 51 } 52 }