[MacPorts] #66239: qt5*, qt6, phantomjs-qt: fail to parse on non-Darwin
MacPorts
noreply at macports.org
Sat Nov 12 15:04:31 UTC 2022
#66239: qt5*, qt6, phantomjs-qt: fail to parse on non-Darwin
-------------------------+-------------------------------------------------
Reporter: harens | Owner: MarcusCalhoun-Lopez
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: phantomjs-qt, qt6, qt59, qt513,
| qt511, qt55, qt57, qt56, qt58, qt53
-------------------------+-------------------------------------------------
On non-Darwin, various qt ports fail to parse.
{{{#!shell
> uname -a
Linux raspberrypi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022
armv7l GNU/Linux
> sudo port -v sync
...
Adding port aqua/phantomjs-qt
Adding port aqua/phoenix
Error: phantomjs-qt-qtbase: no usable SDK can be found
Failed to parse file aqua/phantomjs-qt/Portfile with subport 'phantomjs-
qt-qtbase': no usable SDK can be found
no key output(103)
while executing
"tsv::unset output $jobnum"
(procedure "handle_completed_jobs" line 41)
invoked from within
"handle_completed_jobs"
(procedure "pindex_queue" line 4)
invoked from within
"$func [file join $category $port]"
(procedure "mporttraverse" line 21)
invoked from within
"mporttraverse pindex_queue $directory"
("try" body line 4)
(file "/opt/local/bin/portindex" line 4)
Adding subport phantomjs-qt-qtwebkit
Adding subport phantomjs-qt-sqlite-plugin
Command failed: /opt/local/bin/portindex
/opt/local/var/macports/sources/github.com/macports/macports-ports
}}}
The issue arises from the following, probably since xcrun is a macOS-only
command:
{{{#!tcl
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
}
}
}}}
To fix this, the above code block just needs to be wrapped in a platform
darwin if statement. The qt5 port already does this and parses fine.
--
Ticket URL: <https://trac.macports.org/ticket/66239>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list