Skip to content

Commit

Permalink
qt5-N: move xcrun test to post-patch block
Browse files Browse the repository at this point in the history
otherwise it errors out when being parsed by a linux system.
see: https://trac.macports.org/ticket/66171

if this works properly as I think it will, I'll move this
everywhere else it is needed too.
  • Loading branch information
kencu committed Nov 7, 2022
1 parent 2de4e50 commit 85666b3
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions aqua/qt5/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -1177,15 +1177,17 @@ foreach {module module_info} [array get modules] {
#
# avoid --show-sdk-path since it is not available on all platforms
# see https://github.com/macports/macports-ports/commit/9887e90d69f4265f9056cddc45e41551d7400235#commitcomment-49824261
if {[catch {exec -ignorestderr /usr/bin/xcrun --sdk macosx${configure.sdk_version} --find ld > /dev/null 2>@1}]} {

# if no specific sdk can be found, check for a generic macosx sdk
if {[catch {exec -ignorestderr /usr/bin/xcrun --sdk macosx --find ld > /dev/null 2>@1}]} {
ui_error "${subport}: no usable SDK can be found"
return -code error "no usable SDK can be found"
} else {
ui_debug "${subport}: using generic macosx SDK as macosx${configure.sdk_version} does not exist"
configure.sdk_version
post-patch {
if {[catch {exec -ignorestderr /usr/bin/xcrun --sdk macosx${configure.sdk_version} --find ld > /dev/null 2>@1}]} {

# if no specific sdk can be found, check for a generic macosx sdk
if {[catch {exec -ignorestderr /usr/bin/xcrun --sdk macosx --find ld > /dev/null 2>@1}]} {
ui_error "${subport}: no usable SDK can be found"
return -code error "no usable SDK can be found"
} else {
ui_debug "${subport}: using generic macosx SDK as macosx${configure.sdk_version} does not exist"
configure.sdk_version
}
}
}

Expand Down

0 comments on commit 85666b3

Please sign in to comment.