2021-08-12 19:40:25 +02:00
#!/usr/bin/env -S bash ../.port_include.sh
2022-12-03 09:20:59 -07:00
port = 'qt6-qtbase'
version = '6.4.0'
2022-12-12 19:16:10 +01:00
workdir = " qtbase-everywhere-src- ${ version } "
2022-12-03 09:20:59 -07:00
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'
2021-08-12 19:40:25 +02:00
configopts = (
2022-12-12 19:16:10 +01:00
'-GNinja'
2021-08-12 19:40:25 +02:00
" -DCMAKE_TOOLCHAIN_FILE= ${ SERENITY_BUILD_DIR } /CMakeToolchain.txt "
2022-12-12 19:16:10 +01:00
'-DCMAKE_CROSSCOMPILING=ON'
'-DQT_FORCE_BUILD_TOOLS=ON'
'-DQT_FEATURE_cxx20=ON'
'-DQT_FEATURE_ssl=ON'
'-DQT_FEATURE_zstd=ON'
'-DINPUT_opengl=no'
2021-08-12 19:40:25 +02:00
)
2022-12-03 09:20:59 -07:00
depends = (
2022-12-12 19:16:10 +01:00
'double-conversion'
'md4c'
'openssl'
'zstd'
2022-12-03 09:20:59 -07:00
)
2021-08-12 19:40:25 +02:00
2022-12-12 19:16:10 +01:00
QT_DISABLED_FEATURES = 'sql opengl dbus systemsemaphore sharedmemory dnslookup'
2021-08-12 19:40:25 +02:00
configure( ) {
2022-12-03 09:20:59 -07:00
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 "
2021-08-12 19:40:25 +02:00
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)"
exit 1
fi
done
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 )
2022-12-03 09:20:59 -07:00
run cmake ${ configopts [@] } " -DQT_HOST_PATH= ${ QT_HOST_PATH } " ${ MERGED_HOST_TOOLS } ${ MERGED_DISABLED_FEATURES }
2021-08-12 19:40:25 +02:00
}
build( ) {
run ninja
}
install( ) {
run ninja install
2022-12-12 19:16:10 +01:00
echo '================================================================================'
echo '| NOTICE |'
echo '================================================================================'
2021-08-12 19:40:25 +02:00
echo -e " You have just installed a testing build of Qt $version .\n "
2022-12-12 19:16:10 +01:00
echo -e $'GUI applications won\'t work without QSerenityPlatform!'
echo -e $'\tIt\'s packaged as qt6-serenity'
echo 'The following Qt modules are disabled for now:'
echo -e $" \t $QT_DISABLED_FEATURES "
echo 'Work on enabling Qt modules will be happening here:'
echo -e $'\thttps://github.com/SerenityOS/serenity/tree/master/Ports/qt6-qtbase'
echo 'The development of the Qt Serenity platform plugin is happening here. Fixes for things like input handling, window management and theme integration should go here:'
echo -e $'\thttps://github.com/SerenityPorts/QSerenityPlatform'
2021-08-12 19:40:25 +02:00
}