void-packages/srcpkgs/qt6-base/template

267 lines
7.1 KiB
Bash

# Template file for 'qt6-base'
pkgname=qt6-base
version=6.3.1
revision=1
wrksrc="qtbase-everywhere-src-${version}"
build_style=cmake
configure_args="-DINSTALL_DATADIR=share/qt6
-DINSTALL_ARCHDATADIR=lib/qt6
-DINSTALL_BINDIR=lib/qt6/bin
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs
-DINSTALL_INCLUDEDIR=include/qt6
-DINSTALL_EXAMPLESDIR=lib/qt6/examples
-DINSTALL_TESTSDIR=lib/qt6/tests
-DINSTALL_SYSCONFDIR=/etc/xdg
-DQT_FEATURE_openssl_linked=ON
-DQT_FEATURE_system_sqlite=ON
-DBUILD_WITH_PCH=OFF"
hostmakedepends="perl pkg-config xmlstarlet"
makedepends="zlib-devel libzstd-devel dbus-devel
double-conversion-devel glib-devel libxcb-devel
xcb-util-image-devel xcb-util-keysyms-devel
xcb-util-renderutil-devel xcb-util-wm-devel
MesaLib-devel pcre2-devel icu-devel mtdev-devel harfbuzz-devel
libpng-devel tslib-devel libinput-devel gtk+3-devel
libmariadbclient-devel postgresql-libs-devel libatomic-devel
unixodbc-devel cups-devel libproxy-devel brotli-devel
sqlite-devel Vulkan-Headers mit-krb5-devel vulkan-loader libb2-devel
libXevie-devel libXcursor-devel"
short_desc="Cross-platform application and UI framework (QT6)"
maintainer="John <me@johnnynator.dev>"
license="GPL-3.0-only WITH Qt-GPL-exception-1.0, LGPL-3.0-only, GPL-2.0-or-later"
homepage="https://www.qt.io"
distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtbase-everywhere-src-${version}.tar.xz"
checksum=0a64421d9c2469c2c48490a032ab91d547017c9cc171f3f8070bc31888f24e03
python_version=3
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt6-base-devel"
# QtSetup fails native builds if this is set
configure_args+="-DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=true"
fi
# It is currently expected that quite a few patches do fail
if [ "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DQT_BUILD_TESTS=ON"
fi
do_check() {
cd build
export QT_QPA_PLATFORM=offscreen
local failing_tests="tst_selftests tst_qmake tst_moc
tst_rcc tst_qfile tst_qstandardpaths
tst_qtemporarydir tst_qtemporaryfile tst_qdir
tst_qpluginloader tst_qlibrary tst_qtextstream
tst_qdate tst_qdatetime tst_qtimezone
test_umbrella_config test_wrap_cpp_and_resources
test_dependent_modules test_needsquoting_dirname
test_add_resource_options test_wrap_cpp_options
test_platform_defs_include test_qtmainwin_library
test_dbus_module test_multiple_find_package
test_add_resources_delayed_file test_QTBUG-63422
test_add_binary_resources_delayed_file
test_private_includes test_private_targets
test_testlib_definitions test_json_plugin_includes
test_testlib_no_link_gui test_testlib_no_link_widgets
module_includes test_concurrent_module test_opengl_lib
test_interface test_interface_link_libraries
test_moc_macro_target test_add_big_resource
test_versionless_targets test_add_resources_binary_generated
test_plugin_flavor_static test_plugin_flavor_shared
test_plugin_flavor_derived_from_qt_type
tst_qaddpreroutine tst_qfont tst_qfontdatabase
tst_qfontmetrics tst_qglyphrun tst_qrawfont
tst_qtextdocumentlayout tst_qopenglconfig
tst_qopengl tst_qdnslookup tst_qfiledialog
tst_qgraphicsview tst_qapplication tst_qfontcombobox
tst_qlineedit tst_qmenubar tst_qopenglwidget
tst_qx11info tst_qcomplextext
test_QFINDTESTDATA run_test_QFINDTESTDATA"
# Unknown platform linux-g++ :/
failing_tests+=" mockplugins test_import_plugins
test_static_resources test_generating_cpp_exports"
failing_tests+=" tst_qstorageinfo"
# broken with -O, passed with -O0, probably broken floating point code.
failing_tests+=" tst_qvectornd"
local ctest_exclude="("
for failure in $failing_tests; do
ctest_exclude+="$failure|"
done
ctest_exclude="${ctest_exclude%|})"
ctest -E "$ctest_exclude"
}
qt6-gui_package() {
short_desc+=" - Gui"
pkg_install() {
vmove "usr/lib/libQt6Gui.so.*"
vmove "usr/lib/libQt6XcbQpa.so.*"
vmove "usr/lib/libQt6EglFSDeviceIntegration.so.*"
vmove "usr/lib/libQt6EglFsKmsGbmSupport.so.*"
vmove "usr/lib/libQt6EglFsKmsSupport.so.*"
vmove "usr/lib/libQt6OpenGL.so.*"
vmove usr/lib/qt6/plugins/generic
vmove usr/lib/qt6/plugins/platforms
vmove usr/lib/qt6/plugins/xcbglintegrations
vmove usr/lib/qt6/plugins/imageformats
vmove usr/lib/qt6/plugins/egldeviceintegrations
vmove usr/lib/qt6/plugins/platforminputcontexts
vmove usr/lib/qt6/plugins/platformthemes
}
}
qt6-opengl-widgets_package() {
short_desc+=" - OpenGL Widgets"
pkg_install() {
vmove "usr/lib/libQt6OpenGLWidgets.so.*"
}
}
qt6-dbus_package() {
short_desc+=" - DBus"
pkg_install() {
vmove "usr/lib/libQt6DBus.so.*"
}
}
qt6-core_package() {
short_desc+=" - Core"
pkg_install() {
vmove "usr/lib/libQt6Core.so.*"
}
}
qt6-printsupport_package() {
short_desc+=" - Print Support"
pkg_install() {
vmove "usr/lib/libQt6PrintSupport.so.*"
vmove usr/lib/qt6/plugins/printsupport
}
}
qt6-concurrent_package() {
short_desc+=" - Concurrency"
pkg_install() {
vmove "usr/lib/libQt6Concurrent.so.*"
}
}
qt6-widgets_package() {
short_desc+=" - Widgets"
pkg_install() {
vmove "usr/lib/libQt6Widgets.so.*"
}
}
qt6-network_package() {
short_desc+=" - Network"
pkg_install() {
vmove "usr/lib/libQt6Network.so.*"
}
}
qt6-sql_package() {
short_desc+=" - Sql"
pkg_install() {
vmove "usr/lib/libQt6Sql.so.*"
}
}
qt6-test_package() {
short_desc+=" - Test"
pkg_install() {
vmove "usr/lib/libQt6Test.so*"
}
}
qt6-xml_package() {
short_desc+=" - Xml"
pkg_install() {
vmove "usr/lib/libQt6Xml.so.*"
}
}
qt6-base-doc_package() {
short_desc+=" - Documentation"
pkg_install() {
vmove usr/share/qt6/doc
}
}
qt6-plugin-odbc_package() {
short_desc+=" - ODBC plugin"
pkg_install() {
vmove usr/lib/qt6/plugins/sqldrivers/libqsqlodbc.so
}
}
qt6-plugin-pgsql_package() {
short_desc+=" - PostgreSQL plugin"
pkg_install() {
vmove usr/lib/qt6/plugins/sqldrivers/libqsqlpsql.so
}
}
qt6-plugin-mysql_package() {
short_desc+=" - MySQL plugin"
pkg_install() {
vmove usr/lib/qt6/plugins/sqldrivers/libqsqlmysql.so
}
}
qt6-plugin-sqlite_package() {
short_desc+=" - SQLite plugin"
pkg_install() {
vmove usr/lib/qt6/plugins/sqldrivers/libqsqlite.so
}
}
qt6-plugin-tls-openssl_package() {
short_desc+=" - TLS plugin"
pkg_install() {
vmove usr/lib/qt6/plugins/tls/libqopensslbackend.so
}
}
qt6-plugin-tls-qcertonly_package() {
short_desc+=" - TLS plugin"
pkg_install() {
vmove usr/lib/qt6/plugins/tls/libqcertonlybackend.so
}
}
qt6-plugin-networkinformation_package() {
short_desc+=" - Networkinformation plugin"
pkg_install() {
vmove usr/lib/qt6/plugins/networkinformation/
}
}
qt6-base-devel_package() {
short_desc+=" - Development files"
depends="qt6-base>=${version}_${revision}
qt6-gui>=${version}_${revision}
qt6-core>=${version}_${revision}
qt6-widgets>=${version}_${revision}
qt6-opengl-widgets>=${version}_${revision}
qt6-printsupport>=${version}_${revision}
qt6-concurrent>=${version}_${revision}
qt6-sql>=${version}_${revision}
qt6-test>=${version}_${revision}
qt6-network>=${version}_${revision}
qt6-xml>=${version}_${revision}
${makedepends}"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove usr/lib/metatypes
vmove usr/lib/pkgconfig
vmove usr/lib/qt6/mkspecs
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove "usr/lib/*.prl"
vmove usr/share/qt6/modules
}
}