Ticket #66549: Portfile.patch

File Portfile.patch, 3.3 KB (added by jmroot (Joshua Root), 21 months ago)
  • aqua/qt5/Portfile

    diff --git a/aqua/qt5/Portfile b/aqua/qt5/Portfile
    index b4ddd8b184c..e966883d1bc 100644
    a b foreach {module module_info} [array get modules] { 
    11561156                }
    11571157            }
    11581158
     1159            patchfiles-append configure.patch
     1160
    11591161            post-patch {
    11601162                # respect configure.cxx_stdlib
    11611163                reinplace \
    foreach {module module_info} [array get modules] { 
    11711173                reinplace \
    11721174                    "s|__MACPORTS_OPTFLAGS__|${configure.optflags}|g" \
    11731175                    ${worksrcpath}/mkspecs/common/gcc-base.conf
    1174             }
    1175 
    1176             if { ${os.platform} eq "darwin" } {
    1177                 # qt calls xcrun to find the SDK to use, so make sure this call will succeed
    1178 
    1179                 ui_debug "qt5 Portfile: the initial SDK value is: macosx${configure.sdk_version}"
    1180                 # first try for a system-specific SDK
    1181                 if {[string first . ${configure.sdk_version}] == -1 && ${configure.sdkroot} ne ""} {
    1182                     # xcrun doesn't like major version only (e.g. macosx11), try to find a full version
    1183                     set sdks [lsort -command vercmp -decreasing [glob -nocomplain [file rootname ${configure.sdkroot}]*.sdk]]
    1184                     configure.sdk_version [string map {MacOSX ""} [file rootname [file tail [lindex $sdks 0]]]]
    1185                     ui_debug "using possibly more specific SDK version: ${configure.sdk_version}"
    1186                 }
    1187                 ui_debug "qt5 Portfile: testing for system-specific SDK:"
    1188                 if {[catch {exec -ignorestderr env DEVELOPER_DIR=${configure.developer_dir} /usr/bin/xcrun --sdk macosx${configure.sdk_version} --find ld  > /dev/null 2>@1}]} {
    1189 
    1190                     ui_debug "qt5 Portfile: system-specific SDK was not found, looking for generic SDK."
    1191                     # if no specific sdk found, check for a generic macosx sdk
    1192                     if {[catch {exec -ignorestderr env DEVELOPER_DIR=${configure.developer_dir} /usr/bin/xcrun --sdk macosx --find ld > /dev/null 2>@1}]} {
    1193                         pre-fetch {
    1194                             ui_error "${subport}: no usable SDK can be found"
    1195                             return -code error "no usable SDK can be found"
    1196                         }
    1197                     } else {
    1198                         ui_debug "${subport}: using generic macosx SDK as macosx${configure.sdk_version} was not found"
    1199                         configure.sdk_version
    1200                     }
    1201                 } else {
    1202                     ui_debug "qt5 Portfile: system-specific SDK was found."
    1203                 }
    1204                 ui_debug "qt5 Portfile: the final SDK value is: macosx${configure.sdk_version}"
    1205             }
    12061176
    1207             # respect configure.sdk_version
    1208             post-patch {
     1177                # respect configure.sdk_version
    12091178                reinplace \
    12101179                    "s|__MACPORTS_MAC_SDK__|macosx${configure.sdk_version}|g" \
    12111180                    ${worksrcpath}/mkspecs/common/macx.conf
     1181
     1182                # respect configure.sysroot
     1183                reinplace \
     1184                    "s|__MACPORTS_SYSROOT__|${configure.sysroot}|g" \
     1185                    ${worksrcpath}/configure
    12121186            }
    12131187
    12141188            # respect configure.universal_archs or build_arch