1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 08:57:47 +00:00

Ports: Update Qt6 port to 6.4.0

While we're here, make the host path detection more portable.
This commit is contained in:
Andrew Kaster 2022-12-03 09:20:59 -07:00 committed by Linus Groh
parent ad9c24ffc2
commit b7cc7b4e02
9 changed files with 80 additions and 44 deletions

View file

@ -1,31 +1,36 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=qt6-qtbase
version=6.2.3
workdir=qtbase-everywhere-src-${version}
useconfigure=true
files="https://download.qt.io/official_releases/qt/$(cut -d. -f1,2 <<< ${version})/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz qt6-qtbase-${version}.tar.xz 34d6d0072e197241463c417ad72610c3d44e2efd6062868e9a95283103d75df4"
auth_type="sha256"
port='qt6-qtbase'
version='6.4.0'
workdir='qtbase-everywhere-src-${version}'
useconfigure='true'
files="https://download.qt.io/official_releases/qt/$(cut -d. -f1,2 <<< ${version})/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz qt6-qtbase-${version}.tar.xz cb6475a0bd8567c49f7ffbb072a05516ee6671171bed55db75b22b94ead9b37d"
auth_type='sha256'
configopts=(
"-GNinja"
"-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt"
"-DCMAKE_CROSSCOMPILING=ON"
"-DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON"
"-DQT_HOST_PATH=/usr"
"-DQT_FEATURE_cxx20=ON"
"-DQT_FEATURE_ssl=ON"
"-DQT_FEATURE_zstd=ON"
"-DINPUT_opengl=no"
)
depends=("md4c" "zstd" "openssl")
QT_HOST_PATH=/usr
QT_HOST_CMAKE_PATH=${QT_HOST_PATH}/lib64/cmake
QT_HOST_TOOLS="HostInfo CoreTools GuiTools WidgetsTools"
QT_HOST_TOOLS_PATH="${QT_HOST_CMAKE_PATH}/Qt6%s/\n"
depends=(
"double-conversion"
"md4c"
"openssl"
"zstd"
)
QT_DISABLED_FEATURES="sql opengl dbus systemsemaphore sharedmemory dnslookup"
configure() {
QT_HOST_PATH="$(qmake6 -query QT_HOST_PREFIX)"
QT_HOST_CMAKE_PATH="$(qmake6 -query QT_HOST_LIBS)/cmake"
QT_HOST_TOOLS="HostInfo CoreTools GuiTools WidgetsTools"
QT_HOST_TOOLS_PATH="${QT_HOST_CMAKE_PATH}/Qt6%s/\n"
for host_tool in ${QT_HOST_TOOLS}; do
if [[ ! -d $(printf $QT_HOST_TOOLS_PATH $host_tool) ]]; then
echo "You need to have Qt $version installed on the host (path "$(printf $QT_HOST_TOOLS_PATH $host_tool)" is missing)"
@ -36,7 +41,7 @@ configure() {
MERGED_HOST_TOOLS=$(for host_tool in ${QT_HOST_TOOLS}; do echo "-DQt6${host_tool}_DIR=${QT_HOST_CMAKE_PATH}/Qt6${host_tool}/"; done)
MERGED_DISABLED_FEATURES=$(for feature in ${QT_DISABLED_FEATURES}; do echo "-DQT_FEATURE_${feature}=OFF"; done)
run cmake ${configopts[@]} ${MERGED_HOST_TOOLS} ${MERGED_DISABLED_FEATURES}
run cmake ${configopts[@]} "-DQT_HOST_PATH=${QT_HOST_PATH}" ${MERGED_HOST_TOOLS} ${MERGED_DISABLED_FEATURES}
}
build() {