Ticket #27343: qt4-mac-Portfile.2.diff
File qt4-mac-Portfile.2.diff, 2.8 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 set TARGET ${macosx_deployment_target} 98 99 # hopefully the TARGET exists and is set by now. if not, last 100 # resort (which is not desirable) is to use the os.version. 101 if {${TARGET} == ""} { 102 set minor [expr [lindex [split ${os.version} "."] 0] - 4] 103 set TARGET "10.${minor}" 104 } 96 105 foreach fixfile {configure mkspecs/common/mac-g++.conf \ 97 106 mkspecs/common/mac.conf qmake/qmake.pri \ 98 107 src/tools/bootstrap/bootstrap.pro } { 99 reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|${ MACOSX_DEPLOYMENT_TARGET}|g" \108 reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|${TARGET}|g" \ 100 109 ${worksrcpath}/${fixfile} 101 110 } 102 111 … … 273 282 configure.args-delete -optimized-qmake 274 283 } 275 284 276 # find a way to specify the SDK to use 277 set SDK "" 278 if {[variant_exists universal] && [variant_isset universal]} { 279 if {[info exists universal_sysroot]} { 280 set SDK ${universal_sysroot} 285 # find a way to specify the SDK to use; Qt will use the 10.4u 286 # by default which won't work on 10.6 since it is not 287 # supported. Allow the user to specify the SDK if desired. 288 set SDK ${configure.sdkroot} 289 if {${SDK} == ""} { 290 # find a way to specify the SDK to use, based on the TARGET 291 # hopefully the TARGET exists and is set by now. 292 # last resort: use os.version to get target (bad) 293 set minor "" 294 global TARGET 295 if {${TARGET} == ""} { 296 set minor [expr [lindex [split ${os.version} "."] 0] - 4] 297 } else { 298 set minor [lindex [split ${TARGET} "."] 1] 281 299 } 282 }283 if {${SDK} == ""} {284 # else use the one for this OS version, if installed285 set minor [expr [lindex [split ${os.version} "."] 0] - 4]286 300 # set SDK version depending on OS version 287 301 set sdk_version "" 288 302 if {${minor} == "4"} {