void-packages/srcpkgs/qt6-base/template

255 lines
6.7 KiB
Bash

# Template file for 'qt6-base'
pkgname=qt6-base
version=6.3.0
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_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=b865aae43357f792b3b0a162899d9bf6a1393a55c4e5e4ede5316b157b1a0f99
python_version=3
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt6-base-devel"
# QtSetup fails native builds if this is set
configure_args+=" -DQT_HOST_PATH=/usr
-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
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
test_QFINDTESTDATA run_test_QFINDTESTDATA"
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/libqnetworkmanager.so
}
}
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/qt6/mkspecs
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove "usr/lib/*.prl"
}
}