Ticket #27343: qt4-mac-Portfile.diff
File qt4-mac-Portfile.diff, 3.7 KB (added by michaelld (Michael Dickens), 14 years ago) |
---|
-
Portfile
74 74 # only; this patch requires that (2) already be in place. 75 75 patchfiles-append patch-mkspecs_common_mac.conf.diff 76 76 77 global TARGET 78 set TARGET "" 79 77 80 post-patch { 78 81 # set ARCHES in configure (per the third patchfile above), for 79 82 # building QMake. join any 2 or more arch entries with the GCC … … 91 94 # set MACOSX_DEPLOYMENT_TARGET version in various places. These 92 95 # were all patched in (2) above, and can be easily changed or 93 96 # overridden by the user in a project-local qmake .pro script. 94 set minor [expr [lindex [split ${os.version} "."] 0] - 4] 95 set MACOSX_DEPLOYMENT_TARGET "10.${minor}" 97 # find a way to specify the TARGET to use 98 set TARGET "" 99 if {[variant_isset universal]} { 100 if {[info exists universal_target]} { 101 set TARGET ${universal_target} 102 ui_msg "Using 'universal_target' to get TARGET: '${TARGET}'" 103 } 104 } 105 if {${TARGET} == ""} { 106 if {[info exists macosx_deployment_target]} { 107 set TARGET ${macosx_deployment_target} 108 ui_msg "Using 'macosx_deployment_target' to get TARGET: '${TARGET}'" 109 } 110 } 111 # hopefully the TARGET exists and is set by now. 112 # last resort: use os.version to get target (bad) 113 if {${TARGET} == ""} { 114 set minor [expr [lindex [split ${os.version} "."] 0] - 4] 115 set TARGET "10.${minor}" 116 ui_msg "Using 'os.version' to get TARGET: '${TARGET}'" 117 } 118 ui_msg "TARGET is '${TARGET}'" 96 119 foreach fixfile {configure mkspecs/common/mac-g++.conf \ 97 120 mkspecs/common/mac.conf qmake/qmake.pri \ 98 121 src/tools/bootstrap/bootstrap.pro } { 99 reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|${ MACOSX_DEPLOYMENT_TARGET}|g" \122 reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|${TARGET}|g" \ 100 123 ${worksrcpath}/${fixfile} 101 124 } 102 125 … … 275 298 276 299 # find a way to specify the SDK to use 277 300 set SDK "" 278 if {[variant_ exists universal] && [variant_isset universal]} {301 if {[variant_isset universal]} { 279 302 if {[info exists universal_sysroot]} { 280 303 set SDK ${universal_sysroot} 281 } 304 ui_msg "Using 'universal_sysroot' for SDK: '${SDK}'" 305 } 282 306 } 283 307 if {${SDK} == ""} { 284 # else use the one for this OS version, if installed 285 set minor [expr [lindex [split ${os.version} "."] 0] - 4] 308 if {[info exists configure.sdkroot]} { 309 set SDK ${configure.sdkroot} 310 ui_msg "Using 'configure.sdkroot' for SDK: '${SDK}'" 311 } 312 } 313 if {${SDK} == ""} { 314 # find a way to specify the SDK to use, based on the TARGET 315 # hopefully the TARGET exists and is set by now. 316 # last resort: use os.version to get target (bad) 317 set minor "" 318 global TARGET 319 if {${TARGET} == ""} { 320 set minor [expr [lindex [split ${os.version} "."] 0] - 4] 321 } else { 322 set minor [lindex [split ${TARGET} "."] 1] 323 } 324 ui_msg "minor is '${minor}'" 286 325 # set SDK version depending on OS version 287 326 set sdk_version "" 288 327 if {${minor} == "4"} { … … 292 331 set sdk_version "10.${minor}" 293 332 } 294 333 set SDK ${developer_dir}/SDKs/MacOSX${sdk_version}.sdk 334 ui_msg "Using 'os.version' for SDK: '${SDK}'" 295 335 } 296 336 if {[file exists ${SDK}]} { 297 337 configure.args-append -sdk ${SDK}