diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2023-09-12 08:33:15 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2023-09-13 12:40:16 -0400 |
commit | 6ba6350cf5f7ef7de0f83b8fb9f6c18caffe63e9 (patch) | |
tree | b6e6a851ee3af700f7b82a7184fd134b8d14ebd7 /dev-qt | |
parent | app-misc/yq: remove unused patch (diff) | |
download | gentoo-6ba6350cf5f7ef7de0f83b8fb9f6c18caffe63e9.tar.gz gentoo-6ba6350cf5f7ef7de0f83b8fb9f6c18caffe63e9.tar.bz2 gentoo-6ba6350cf5f7ef7de0f83b8fb9f6c18caffe63e9.zip |
dev-qt/*: add 6.6.9999
Sraight copies from 6.9999, pending updates as-needed to prepare
for 6.6 which is slowly approaching (6.9999 been 6.7 for some time).
6.5.9999 will be leaving soon given 6.5.3 is the last 6.5 release
for plebians.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-qt')
26 files changed, 1515 insertions, 0 deletions
diff --git a/dev-qt/qt3d/qt3d-6.6.9999.ebuild b/dev-qt/qt3d/qt3d-6.6.9999.ebuild new file mode 100644 index 000000000000..fac726abc29b --- /dev/null +++ b/dev-qt/qt3d/qt3d-6.6.9999.ebuild @@ -0,0 +1,36 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="3D rendering module for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +elif [[ ${QT6_BUILD_TYPE} == live ]]; then + EGIT_SUBMODULES=() # skip qtquick3d-assimp +fi + +IUSE="gles2-only qml vulkan" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[concurrent,gles2-only=,gui,network,opengl,vulkan=] + ~dev-qt/qtshadertools-${PV}:6 + media-libs/assimp:= + qml? ( ~dev-qt/qtdeclarative-${PV}:6 ) +" +DEPEND=" + ${RDEPEND} + vulkan? ( dev-util/vulkan-headers ) +" + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Qml) + -DQT_FEATURE_qt3d_system_assimp=ON + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qt5compat/qt5compat-6.6.9999.ebuild b/dev-qt/qt5compat/qt5compat-6.6.9999.ebuild new file mode 100644 index 000000000000..f7beee148ed0 --- /dev/null +++ b/dev-qt/qt5compat/qt5compat-6.6.9999.ebuild @@ -0,0 +1,37 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Qt module containing the unsupported Qt 5 APIs" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="icu qml" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[gui,icu=,network,xml] + icu? ( dev-libs/icu:= ) + qml? ( + ~dev-qt/qtdeclarative-${PV}:6 + ~dev-qt/qtshadertools-${PV}:6 + ) +" +DEPEND="${RDEPEND}" + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Quick) + ) + + qt6-build_src_configure +} + +src_test() { + # tst_qxmlinputsource sometimes hang without -j1 + qt6-build_src_test -j1 +} diff --git a/dev-qt/qtbase/qtbase-6.6.9999.ebuild b/dev-qt/qtbase/qtbase-6.6.9999.ebuild new file mode 100644 index 000000000000..bf8d33b74e87 --- /dev/null +++ b/dev-qt/qtbase/qtbase-6.6.9999.ebuild @@ -0,0 +1,330 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic qt6-build toolchain-funcs + +DESCRIPTION="Cross-platform application development framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +declare -A QT6_IUSE=( + [global]="+ssl +udev zstd" + [core]="icu" + [modules]="+concurrent +dbus +gui +network +sql +xml" + + [gui]=" + +X accessibility eglfs evdev gles2-only +libinput + opengl tslib vulkan +widgets + " + [network]="brotli gssapi libproxy sctp" + [sql]="mysql oci8 odbc postgres +sqlite" + [widgets]="cups gtk" + + [optfeature]="nls wayland" #810802,864509 +) +IUSE="${QT6_IUSE[*]}" +REQUIRED_USE=" + $( + printf '%s? ( gui ) ' ${QT6_IUSE[gui]//+/} + printf '%s? ( network ) ' ${QT6_IUSE[network]//+/} + printf '%s? ( sql ) ' ${QT6_IUSE[sql]//+/} + printf '%s? ( gui widgets ) ' ${QT6_IUSE[widgets]//+/} + ) + accessibility? ( X dbus ) + eglfs? ( opengl ) + gui? ( || ( X eglfs wayland ) ) + libinput? ( udev ) + sql? ( || ( ${QT6_IUSE[sql]//+/} ) ) + test? ( icu sql? ( sqlite ) ) +" + +# groups: +# - global (configure.cmake) +# - qtcore (src/corelib/configure.cmake) +# - qtgui (src/gui/configure.cmake) +# - qtnetwork (src/network/configure.cmake) +# - qtprintsupport (src/printsupport/configure.cmake) [gui+widgets] +# - qtsql (src/plugins/sqldrivers/configure.cmake) +RDEPEND=" + sys-libs/zlib:= + ssl? ( dev-libs/openssl:= ) + udev? ( virtual/libudev:= ) + zstd? ( app-arch/zstd:= ) + + app-crypt/libb2 + dev-libs/double-conversion:= + dev-libs/glib:2 + dev-libs/libpcre2:=[pcre16,unicode(+)] + icu? ( dev-libs/icu:= ) + + dbus? ( sys-apps/dbus ) + gui? ( + media-libs/fontconfig + media-libs/freetype:2 + media-libs/harfbuzz:= + media-libs/libjpeg-turbo:= + media-libs/libpng:= + x11-libs/libdrm + x11-libs/libxkbcommon[X?] + X? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libxcb:= + x11-libs/xcb-util-cursor + x11-libs/xcb-util-image + x11-libs/xcb-util-keysyms + x11-libs/xcb-util-renderutil + x11-libs/xcb-util-wm + ) + accessibility? ( app-accessibility/at-spi2-core:2 ) + eglfs? ( media-libs/mesa[gbm(+)] ) + evdev? ( sys-libs/mtdev ) + libinput? ( dev-libs/libinput:= ) + opengl? ( media-libs/libglvnd[X?] ) + tslib? ( x11-libs/tslib ) + widgets? ( + cups? ( net-print/cups ) + gtk? ( + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3 + x11-libs/pango + ) + ) + ) + network? ( + brotli? ( app-arch/brotli:= ) + gssapi? ( virtual/krb5 ) + libproxy? ( net-libs/libproxy ) + ) + sql? ( + mysql? ( dev-db/mysql-connector-c:= ) + oci8? ( dev-db/oracle-instantclient:=[sdk] ) + odbc? ( dev-db/unixODBC ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( dev-db/sqlite:3 ) + ) +" +DEPEND=" + ${RDEPEND} + X? ( x11-base/xorg-proto ) + gui? ( + vulkan? ( dev-util/vulkan-headers ) + ) + network? ( + sctp? ( net-misc/lksctp-tools ) + ) + test? ( + elibc_musl? ( sys-libs/timezone-data ) + ) +" +BDEPEND="zstd? ( app-arch/libarchive[zstd] )" #910392 +PDEPEND=" + nls? ( ~dev-qt/qttranslations-${PV}:6 ) + wayland? ( ~dev-qt/qtwayland-${PV}:6 ) +" + +src_prepare() { + qt6-build_src_prepare + + if use test; then + # test itself has -Werror=strict-aliasing issues, drop for simplicity + sed -e '/add_subdirectory(qsharedpointer)/d' \ + -i tests/auto/corelib/tools/CMakeLists.txt || die + fi +} + +src_configure() { + local mycmakeargs=( + -DBUILD_WITH_PCH=OFF + + -DINSTALL_ARCHDATADIR="${QT6_ARCHDATADIR}" + -DINSTALL_BINDIR="${QT6_BINDIR}" + -DINSTALL_DATADIR="${QT6_DATADIR}" + -DINSTALL_DOCDIR="${QT6_DOCDIR}" + -DINSTALL_EXAMPLESDIR="${QT6_EXAMPLESDIR}" + -DINSTALL_INCLUDEDIR="${QT6_HEADERDIR}" + -DINSTALL_LIBDIR="${QT6_LIBDIR}" + -DINSTALL_LIBEXECDIR="${QT6_LIBEXECDIR}" + -DINSTALL_MKSPECSDIR="${QT6_MKSPECSDIR}" + -DINSTALL_PLUGINSDIR="${QT6_PLUGINDIR}" + -DINSTALL_QMLDIR="${QT6_QMLDIR}" + -DINSTALL_SYSCONFDIR="${QT6_SYSCONFDIR}" + -DINSTALL_TRANSLATIONSDIR="${QT6_TRANSLATIONDIR}" + + $(qt_feature ssl openssl) + $(qt_feature ssl openssl_linked) + $(qt_feature udev libudev) + $(qt_feature zstd) + + # qtcore + $(qt_feature icu) + + # tools + -DQT_FEATURE_androiddeployqt=OFF + + # modules + $(qt_feature concurrent) + $(qt_feature dbus) + $(qt_feature gui) + $(qt_feature network) + $(qt_feature sql) + -DQT_FEATURE_testlib=ON # trivial and often needed to build revdeps + $(qt_feature xml) + ) + + use gui && mycmakeargs+=( + $(qt_feature X xcb) + $(qt_feature X system_xcb_xinput) + $(qt_feature X xkbcommon_x11) + $(cmake_use_find_package X X11) # needed for truly no automagic + $(qt_feature accessibility accessibility_atspi_bridge) + $(qt_feature eglfs) + $(qt_feature evdev) + $(qt_feature evdev mtdev) + $(qt_feature gles2-only opengles2) + $(qt_feature libinput) + $(qt_feature opengl) + $(usev !opengl -DINPUT_opengl=no) #913691 + $(qt_feature tslib) + $(qt_feature vulkan) + $(qt_feature widgets) + -DQT_FEATURE_system_textmarkdownreader=OFF # TODO?: package md4c + ) && use widgets && mycmakeargs+=( + $(qt_feature cups) # qtprintsupport is enabled w/ gui+widgets + $(qt_feature gtk gtk3) + ) + + use network && mycmakeargs+=( + $(qt_feature brotli) + $(qt_feature gssapi) + $(qt_feature libproxy) + $(qt_feature sctp) + $(usev test -DQT_SKIP_DOCKER_COMPOSE=ON) + ) + + use sql && mycmakeargs+=( + -DQT_FEATURE_sql_db2=OFF # unpackaged + -DQT_FEATURE_sql_ibase=OFF # unpackaged + $(qt_feature mysql sql_mysql) + $(qt_feature oci8 sql_oci) + $(usev oci8 -DOracle_ROOT="${ESYSROOT}"/usr/$(get_libdir)/oracle/client) + $(qt_feature odbc sql_odbc) + $(qt_feature postgres sql_psql) + $(qt_feature sqlite sql_sqlite) + $(qt_feature sqlite system_sqlite) + -DQT_FEATURE_sql_tds=OFF # currently a no-op in CMakeLists.txt + ) + + if use amd64 || use x86; then + # see bug #913400 for explanations + local cpufeats=( + # list of checked cpu features in configure.cmake + avx avx2 avx512{bw,cd,dq,er,f,ifma,pf,vbmi,vbmi2,vl} + f16c rdrnd rdseed sse2 sse3 sse4_1 sse4_2 ssse3 vaes + ) + # handle odd ones out not matching -m* and macros (keep same order) + local cpuflags=( "${cpufeats[@]}" aes sha ) + local cpufeats+=( aesni shani ) + + local -a intrins + IFS=' ' read -ra intrins < <( + : "$(test-flags-CXX "${cpuflags[@]/#/-m}")" + $(tc-getCXX) -E -P ${_} ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1 + #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) + #include <x86intrin.h> + #endif + $(printf '__%s__ ' "${cpuflags[@]^^}") + EOF + assert + ) + + # do nothing and leave to qtbase if no macros expanded (test failed?) + if [[ \ ${intrins[*]} == *\ [^_\ ]* ]]; then + local -i i + for ((i=0; i<${#cpufeats[@]}; i++)); do + [[ ${intrins[i]} == __* ]] && + mycmakeargs+=( -DQT_FEATURE_${cpufeats[i]}=OFF ) + done + mycmakeargs+=( -DTEST_x86intrin=ON ) + fi + fi + + qt6-build_src_configure +} + +src_test() { + local -x TZ=UTC + local -x LC_TIME=C + + local CMAKE_SKIP_TESTS=( + # broken with out-of-source + if qtbase is not already installed + tst_moc + tst_qmake + # needs x11/opengl, we *could* run these but tend to be flaky + # when opengl rendering is involved (even if software-only) + tst_qopengl{,config,widget,window} + tst_qgraphicsview + tst_qx11info + # fails with network sandbox + tst_qdnslookup + # typical to lack SCTP support on non-generic kernels + tst_qsctpsocket + # these can be flaky depending on the environment/toolchain + tst_qlogging # backtrace log test can easily vary + tst_qrawfont # can be affected by available fonts + tst_qstorageinfo # checks mounted filesystems + # flaky due to using different test framework and fails with USE=-gui + tst_selftests + # known failing when using clang+glibc+stdc++, needs looking into + tst_qthread + # partially failing on x86 chroots and seemingly(?) harmless (dev-qt + # revdeps tests pass), skip globally to avoid keywording flakiness + tst_json + tst_qcolorspace + tst_qdoublevalidator + tst_qglobal + tst_qglyphrun + tst_qvectornd + tst_rcc + # similarly, but on armv7 (bug #914028) + tst_qlineedit + tst_qpainter + # partially broken on llvm-musl, needs looking into but skip to have + # a baseline for regressions (like above, rest of dev-qt is fine) + $(usev elibc_musl ' + tst_qfiledialog2 + tst_qicoimageformat + tst_qimagereader + tst_qimage + ') + # note: for linux, upstream only really runs+maintains tests for amd64 + # https://doc.qt.io/qt-6/supported-platforms.html + ) + + qt6-build_src_test +} + +src_install() { + qt6-build_src_install + + if use test; then + local delete_bins=( # need a better way to handle this + clientserver copier crashingServer desktopsettingsaware_helper + echo fileWriterProcess modal_helper nospace 'one space' + paster qcommandlineparser_test_helper qfileopeneventexternal + socketprocess syslocaleapp tst_qhashseed_helper 'two space s' + write-read-write + ) + local delete=( # sigh + "${D}${QT6_BINDIR}"/test* + "${delete_bins[@]/#/${D}${QT6_BINDIR}/}" + ) + # using -f given not tracking which tests may be skipped or not + rm -rf -- "${delete[@]}" || die + fi +} diff --git a/dev-qt/qtcharts/qtcharts-6.6.9999.ebuild b/dev-qt/qtcharts/qtcharts-6.6.9999.ebuild new file mode 100644 index 000000000000..9f2d54c39e93 --- /dev/null +++ b/dev-qt/qtcharts/qtcharts-6.6.9999.ebuild @@ -0,0 +1,28 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Chart component library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="gles2-only qml" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[gles2-only=,gui,opengl,widgets] + qml? ( ~dev-qt/qtdeclarative-${PV}:6 ) +" +DEPEND="${RDEPEND}" + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Qml) + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtconnectivity/qtconnectivity-6.6.9999.ebuild b/dev-qt/qtconnectivity/qtconnectivity-6.6.9999.ebuild new file mode 100644 index 000000000000..47506d7b4b09 --- /dev/null +++ b/dev-qt/qtconnectivity/qtconnectivity-6.6.9999.ebuild @@ -0,0 +1,72 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Bluetooth and NFC support library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="+bluetooth nfc smartcard" +REQUIRED_USE="|| ( bluetooth nfc )" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[network] + bluetooth? ( + ~dev-qt/qtbase-${PV}:6[dbus] + net-wireless/bluez:= + ) + nfc? ( + smartcard? ( sys-apps/pcsc-lite ) + ) +" +DEPEND="${RDEPEND}" + +CMAKE_SKIP_TESTS=( + # most hardware tests are auto-skipped, but some still misbehave + # if bluez/hardware is available (generally tests here may not be + # very relevant without hardware, lists may need to be extended) + tst_qbluetoothlocaldevice + tst_qbluetoothserver + tst_qbluetoothservicediscoveryagent + tst_qbluetoothserviceinfo + tst_qlowenergycontroller +) + +src_prepare() { + qt6-build_src_prepare + + use bluetooth || + sed -i '/add_subdirectory(bluetooth)/d' src/CMakeLists.txt || die + use nfc || + sed -i '/add_subdirectory(nfc)/d' src/CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( + $(usev nfc $(qt_feature smartcard pcsclite)) + ) + + qt6-build_src_configure +} + +src_install() { + qt6-build_src_install + + # broken (unnecessary) symlink due to add_app() being used over add_tool() + use !bluetooth || rm -- "${ED}"/usr/bin/sdpscanner6 || die + + if use test; then + local delete=( # sigh + "${D}${QT6_BINDIR}"/bluetoothtestdevice + "${D}${QT6_BINDIR}"/bttestui + "${D}${QT6_BINDIR}"/qlecontroller-server + ) + # using -f given not tracking which tests may be skipped or not + rm -f -- "${delete[@]}" || die + fi +} diff --git a/dev-qt/qtdeclarative/qtdeclarative-6.6.9999.ebuild b/dev-qt/qtdeclarative/qtdeclarative-6.6.9999.ebuild new file mode 100644 index 000000000000..90ce21a2e8ec --- /dev/null +++ b/dev-qt/qtdeclarative/qtdeclarative-6.6.9999.ebuild @@ -0,0 +1,32 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Qt Declarative (Quick 2)" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="opengl +sql vulkan +widgets" + +# behaves very badly when qtdeclarative is not already installed, also +# other more minor issues (installs junk, sandbox/offscreen issues) +RESTRICT="test" + +RDEPEND="~dev-qt/qtbase-${PV}:6[network,opengl=,sql?,vulkan=,widgets=]" +DEPEND="${RDEPEND}" +BDEPEND="~dev-qt/qtshadertools-${PV}:6" + +src_configure() { + local mycmakeargs=( + $(qt_feature opengl) + $(qt_feature sql) + $(qt_feature widgets) + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtimageformats/qtimageformats-6.6.9999.ebuild b/dev-qt/qtimageformats/qtimageformats-6.6.9999.ebuild new file mode 100644 index 000000000000..044867e78e37 --- /dev/null +++ b/dev-qt/qtimageformats/qtimageformats-6.6.9999.ebuild @@ -0,0 +1,35 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Additional format plugins for the Qt image I/O system" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="mng" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[gui] + media-libs/libwebp:= + media-libs/tiff:= + mng? ( media-libs/libmng:= ) +" +DEPEND="${RDEPEND}" + +src_configure() { + local mycmakeargs=( + -DQT_FEATURE_jasper=OFF + $(qt_feature mng) + -DQT_FEATURE_tiff=ON + -DQT_FEATURE_webp=ON + -DQT_FEATURE_system_tiff=ON + -DQT_FEATURE_system_webp=ON + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtlocation/qtlocation-6.6.9999.ebuild b/dev-qt/qtlocation/qtlocation-6.6.9999.ebuild new file mode 100644 index 000000000000..1183318657ba --- /dev/null +++ b/dev-qt/qtlocation/qtlocation-6.6.9999.ebuild @@ -0,0 +1,45 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Location (places, maps, navigation) library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[network] + ~dev-qt/qtdeclarative-${PV}:6 + ~dev-qt/qtpositioning-${PV}:6[qml] +" +DEPEND="${RDEPEND}" + +CMAKE_SKIP_TESTS=( + # ignores QML_IMPORT_PATH (unlike other tests) and looks in + # the missing builddir/qml, skip rather than work around + tst_declarative_ui +) + +src_install() { + qt6-build_src_install + + if use test; then + local delete=( # sigh + "${D}${QT6_LIBDIR}"/cmake/Qt6Location/*TestGeoServicePlugin*.cmake + "${D}${QT6_LIBDIR}"/cmake/Qt6Location/*TestGeoServicePlugin*.cmake + "${D}${QT6_LIBDIR}"/cmake/Qt6Location/*UnsupportedPlacesGeoServicePlugin*.cmake + "${D}${QT6_LIBDIR}"/cmake/Qt6Qml/QmlPlugins/*declarative_location_test*.cmake + "${D}${QT6_PLUGINDIR}"/geoservices/libqtgeoservices_geocodingplugin.so + "${D}${QT6_PLUGINDIR}"/geoservices/libqtgeoservices_placesplugin_unsupported.so + "${D}${QT6_PLUGINDIR}"/geoservices/libqtgeoservices_qmltestplugin.so + "${D}${QT6_PLUGINDIR}"/geoservices/libqtgeoservices_routingplugin.so + "${D}${QT6_QMLDIR}"/QtLocation/Test + ) + # using -f given not tracking which tests may be skipped or not + rm -rf -- "${delete[@]}" || die + fi +} diff --git a/dev-qt/qtmultimedia/qtmultimedia-6.6.9999.ebuild b/dev-qt/qtmultimedia/qtmultimedia-6.6.9999.ebuild new file mode 100644 index 000000000000..ae102c2a70ef --- /dev/null +++ b/dev-qt/qtmultimedia/qtmultimedia-6.6.9999.ebuild @@ -0,0 +1,82 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic qt6-build + +DESCRIPTION="Multimedia (audio, video, radio, camera) library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="+X alsa +ffmpeg gstreamer opengl pulseaudio qml v4l vaapi vulkan" +# tst_qmediaplayerbackend hard requires qml, review in case becomes optional +REQUIRED_USE=" + || ( ffmpeg gstreamer ) + vaapi? ( ffmpeg ) + test? ( qml ) +" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[gui,network,opengl=,vulkan=,widgets] + alsa? ( media-libs/alsa-lib ) + ffmpeg? ( + ~dev-qt/qtbase-${PV}:6[X=] + media-video/ffmpeg:=[vaapi?] + X? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXrandr + ) + vaapi? ( media-libs/libglvnd ) + ) + gstreamer? ( + dev-libs/glib:2 + media-libs/gst-plugins-bad:1.0 + media-libs/gst-plugins-base:1.0[X=,opengl?] + media-libs/gstreamer:1.0 + opengl? ( media-libs/libglvnd ) + ) + pulseaudio? ( media-libs/libpulse ) + qml? ( + ~dev-qt/qtdeclarative-${PV}:6 + ~dev-qt/qtquick3d-${PV}:6 + ) +" +DEPEND=" + ${RDEPEND} + X? ( x11-base/xorg-proto ) + v4l? ( sys-kernel/linux-headers ) +" +BDEPEND="~dev-qt/qtshadertools-${PV}:6" + +CMAKE_SKIP_TESTS=( + # tries to use real alsa or pulseaudio and fails in sandbox + tst_qaudiosink + tst_qaudiosource + tst_qmediacapturesession + tst_qmediaplayerbackend + tst_qsoundeffect + # may try to use hardware acceleration for encoding + tst_qscreencapture_integration +) + +src_configure() { + # normally passed by the build system, but needed for 32-on-64 chroots + use x86 && append-cppflags -DPFFFT_SIMD_DISABLE + + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Qml) + $(qt_feature alsa) + $(qt_feature ffmpeg) + $(qt_feature gstreamer) + $(usev gstreamer $(qt_feature opengl gstreamer_gl)) + $(qt_feature pulseaudio) + $(qt_feature v4l linux_v4l) + $(qt_feature vaapi) + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtnetworkauth/qtnetworkauth-6.6.9999.ebuild b/dev-qt/qtnetworkauth/qtnetworkauth-6.6.9999.ebuild new file mode 100644 index 000000000000..c0c8c0b51bf7 --- /dev/null +++ b/dev-qt/qtnetworkauth/qtnetworkauth-6.6.9999.ebuild @@ -0,0 +1,15 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Network authorization library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +RDEPEND="~dev-qt/qtbase-${PV}:6[network]" +DEPEND="${RDEPEND}" diff --git a/dev-qt/qtpositioning/qtpositioning-6.6.9999.ebuild b/dev-qt/qtpositioning/qtpositioning-6.6.9999.ebuild new file mode 100644 index 000000000000..5bc8b82de998 --- /dev/null +++ b/dev-qt/qtpositioning/qtpositioning-6.6.9999.ebuild @@ -0,0 +1,63 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Physical position determination library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="geoclue nmea +qml" + +DEPEND=" + ~dev-qt/qtbase-${PV}:6 + geoclue? ( ~dev-qt/qtbase-${PV}:6[dbus] ) + nmea? ( + ~dev-qt/qtbase-${PV}:6[network] + ~dev-qt/qtserialport-${PV}:6 + ) + qml? ( ~dev-qt/qtdeclarative-${PV}:6 ) +" +RDEPEND=" + ${DEPEND} + geoclue? ( app-misc/geoclue:2.0 ) +" + +src_prepare() { + qt6-build_src_prepare + + # unfortunately cmake_use_find_package would break things with qtbase + use geoclue || + sed -e 's/TARGET Qt::DBus/FALSE/' \ + -i src/plugins/position/CMakeLists.txt || die + use nmea || + sed -e 's/TARGET Qt::Network/FALSE/' \ + -i src/plugins/position/CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Qml) + ) + + qt6-build_src_configure +} + +src_install() { + qt6-build_src_install + + if use test; then + local delete=( # sigh + "${D}${QT6_LIBDIR}"/cmake/Qt6Positioning/*DummyPlugin*.cmake + "${D}${QT6_LIBDIR}"/cmake/Qt6Positioning/*TestPlugin*.cmake + "${D}${QT6_PLUGINDIR}"/position/libqtposition_satellitesourcetest.so + "${D}${QT6_PLUGINDIR}"/position/libqtposition_testplugin{,2}.so + ) + # using -f given not tracking which tests may be skipped or not + rm -f -- "${delete[@]}" || die + fi +} diff --git a/dev-qt/qtquick3d/qtquick3d-6.6.9999.ebuild b/dev-qt/qtquick3d/qtquick3d-6.6.9999.ebuild new file mode 100644 index 000000000000..fb83b01939ee --- /dev/null +++ b/dev-qt/qtquick3d/qtquick3d-6.6.9999.ebuild @@ -0,0 +1,42 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Qt module and API for defining 3D content in Qt QuickTools" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +elif [[ ${QT6_BUILD_TYPE} == live ]]; then + EGIT_SUBMODULES=() # skip qtquick3d-assimp +fi + +IUSE="opengl vulkan" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[concurrent,gui,opengl=,vulkan=,widgets] + ~dev-qt/qtdeclarative-${PV}:6 + ~dev-qt/qtquicktimeline-${PV}:6 + ~dev-qt/qtshadertools-${PV}:6 + media-libs/assimp:= + sys-libs/zlib:= +" +DEPEND=" + ${RDEPEND} + test? ( ~dev-qt/qtbase-${PV}:6[network] ) +" + +CMAKE_SKIP_TESTS=( + # collada support is disabled in system media-libs/assimp (bug #891787) + tst_qquick3dassetimport +) + +src_configure() { + local mycmakeargs=( + -DQT_FEATURE_system_assimp=ON + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtquicktimeline/qtquicktimeline-6.6.9999.ebuild b/dev-qt/qtquicktimeline/qtquicktimeline-6.6.9999.ebuild new file mode 100644 index 000000000000..48f8a5bde6c4 --- /dev/null +++ b/dev-qt/qtquicktimeline/qtquicktimeline-6.6.9999.ebuild @@ -0,0 +1,18 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Qt module for keyframe-based timeline construction" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6 + ~dev-qt/qtdeclarative-${PV}:6 +" +DEPEND="${RDEPEND}" diff --git a/dev-qt/qtscxml/qtscxml-6.6.9999.ebuild b/dev-qt/qtscxml/qtscxml-6.6.9999.ebuild new file mode 100644 index 000000000000..3baf824212bc --- /dev/null +++ b/dev-qt/qtscxml/qtscxml-6.6.9999.ebuild @@ -0,0 +1,34 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="State Chart XML (SCXML) support library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="qml" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[gui] + qml? ( ~dev-qt/qtdeclarative-${PV}:6 ) +" +DEPEND="${RDEPEND}" + +CMAKE_SKIP_TESTS=( + # may fail with pid-sandbox, or at least musl/hardened+gcc (exact + # conditions unknown but passes without pid, considering this flaky) + tst_qstatemachine +) + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Qml) + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtsensors/qtsensors-6.6.9999.ebuild b/dev-qt/qtsensors/qtsensors-6.6.9999.ebuild new file mode 100644 index 000000000000..b70b8eb46e14 --- /dev/null +++ b/dev-qt/qtsensors/qtsensors-6.6.9999.ebuild @@ -0,0 +1,28 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Hardware sensor access library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="qml" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[dbus] + qml? ( ~dev-qt/qtdeclarative-${PV}:6 ) +" +DEPEND="${RDEPEND}" + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Qml) + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtserialport/qtserialport-6.6.9999.ebuild b/dev-qt/qtserialport/qtserialport-6.6.9999.ebuild new file mode 100644 index 000000000000..e88655bfbcdc --- /dev/null +++ b/dev-qt/qtserialport/qtserialport-6.6.9999.ebuild @@ -0,0 +1,18 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Serial port abstraction library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6 + virtual/libudev:= +" +DEPEND="${RDEPEND}" diff --git a/dev-qt/qtshadertools/qtshadertools-6.6.9999.ebuild b/dev-qt/qtshadertools/qtshadertools-6.6.9999.ebuild new file mode 100644 index 000000000000..7655c47db240 --- /dev/null +++ b/dev-qt/qtshadertools/qtshadertools-6.6.9999.ebuild @@ -0,0 +1,17 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Qt APIs and Tools for Graphics Pipelines" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[gui] +" +DEPEND="${RDEPEND}" diff --git a/dev-qt/qtspeech/qtspeech-6.6.9999.ebuild b/dev-qt/qtspeech/qtspeech-6.6.9999.ebuild new file mode 100644 index 000000000000..94803ab4eff3 --- /dev/null +++ b/dev-qt/qtspeech/qtspeech-6.6.9999.ebuild @@ -0,0 +1,48 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Text-to-speech library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="flite +speechd" +# can build with neither, but then it is just mock tts and may be confusing +REQUIRED_USE="|| ( flite speechd )" + +# TODO: tests are known failing with clang and needs looking into, albeit +# it is still usable at runtime save for applications segfaulting on exit +# similarly to QTBUG-90626 (not that this has in-tree revdeps as of writing +# of this). Restricting because also seen this result in hanging. Note that +# qtspeech:6 is still somewhat new (started in 6.4.0), and should review +# status on new major versions. +RESTRICT="test" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6 + ~dev-qt/qtdeclarative-${PV}:6 + flite? ( + app-accessibility/flite + ~dev-qt/qtmultimedia-${PV}:6 + ) + speechd? ( app-accessibility/speech-dispatcher ) +" +DEPEND="${RDEPEND}" + +src_configure() { + local mycmakeargs=( + $(qt_feature flite) + $(qt_feature speechd) + + # flite_alsa was likely to work around old issues in flite, it does + # nothing but add -lasound (no code change, and is unneeded) + -DQT_FEATURE_flite_alsa=OFF + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtsvg/qtsvg-6.6.9999.ebuild b/dev-qt/qtsvg/qtsvg-6.6.9999.ebuild new file mode 100644 index 000000000000..e1b14151f896 --- /dev/null +++ b/dev-qt/qtsvg/qtsvg-6.6.9999.ebuild @@ -0,0 +1,18 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="SVG rendering library for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[gui,widgets] + sys-libs/zlib:= +" +DEPEND="${RDEPEND}" diff --git a/dev-qt/qttools/qttools-6.6.9999.ebuild b/dev-qt/qttools/qttools-6.6.9999.ebuild new file mode 100644 index 000000000000..295a69f8fd39 --- /dev/null +++ b/dev-qt/qttools/qttools-6.6.9999.ebuild @@ -0,0 +1,85 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit llvm optfeature qt6-build + +DESCRIPTION="Qt Tools Collection" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE=" + assistant clang designer distancefieldgenerator gles2-only + +linguist opengl pixeltool qdbus qdoc qml qtattributionsscanner + qtdiag qtplugininfo vulkan +widgets +" +# note that some tools do not *require* widgets but will skip a sub-tool +# if not enabled (e.g. linguist gives lrelease but not the GUI linguist6) +REQUIRED_USE=" + assistant? ( widgets ) + designer? ( qml widgets ) + distancefieldgenerator? ( qml widgets ) + pixeltool? ( widgets ) + qdoc? ( clang ) +" + +# behaves very badly when qttools is not already installed, also +# other more minor issues (clang tests flaky depending on version, +# and 3rdparty/ tries to FetchContent gtest) +RESTRICT="test" + +LLVM_MAX_SLOT=17 +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[network,widgets?] + assistant? ( ~dev-qt/qtbase-${PV}:6[sql,sqlite] ) + clang? ( <sys-devel/clang-$((LLVM_MAX_SLOT+1)):= ) + designer? ( ~dev-qt/qtbase-${PV}:6[xml] ) + qdbus? ( ~dev-qt/qtbase-${PV}:6[dbus,xml] ) + qml? ( ~dev-qt/qtdeclarative-${PV}:6[widgets?] ) + qtdiag? ( ~dev-qt/qtbase-${PV}:6[gles2-only=,vulkan=] ) + widgets? ( ~dev-qt/qtbase-${PV}:6[opengl=] ) +" +DEPEND=" + ${RDEPEND} + qtdiag? ( + vulkan? ( dev-util/vulkan-headers ) + ) +" + +pkg_setup() { + use clang && llvm_pkg_setup +} + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Qml) + $(cmake_use_find_package widgets Qt6Widgets) + $(qt_feature assistant) + $(qt_feature clang clangcpp) + $(qt_feature designer) + $(qt_feature distancefieldgenerator) + $(qt_feature linguist) + $(qt_feature pixeltool) + $(qt_feature qdbus) + $(qt_feature qdoc clang) + $(qt_feature qtattributionsscanner) + $(qt_feature qtdiag) + $(qt_feature qtplugininfo) + + # TODO?: package litehtml, but support for latest releases seem + # to lag behind and bundled may work out better for now + # https://github.com/litehtml/litehtml/issues/266 + $(usev assistant -DCMAKE_DISABLE_FIND_PACKAGE_litehtml=ON) + ) + + qt6-build_src_configure +} + +pkg_postinst() { + use assistant && + optfeature "Qt documentation viewable in assistant" \ + 'dev-qt/qt-docs:6[qch]' #602296 +} diff --git a/dev-qt/qttranslations/qttranslations-6.6.9999.ebuild b/dev-qt/qttranslations/qttranslations-6.6.9999.ebuild new file mode 100644 index 000000000000..2f5770cc8b83 --- /dev/null +++ b/dev-qt/qttranslations/qttranslations-6.6.9999.ebuild @@ -0,0 +1,15 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Translation files for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +DEPEND="~dev-qt/qtbase-${PV}:6" +BDEPEND="~dev-qt/qttools-${PV}:6[linguist]" diff --git a/dev-qt/qtvirtualkeyboard/qtvirtualkeyboard-6.6.9999.ebuild b/dev-qt/qtvirtualkeyboard/qtvirtualkeyboard-6.6.9999.ebuild new file mode 100644 index 000000000000..a040a8b2bcce --- /dev/null +++ b/dev-qt/qtvirtualkeyboard/qtvirtualkeyboard-6.6.9999.ebuild @@ -0,0 +1,47 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Customizable input framework and virtual keyboard for Qt" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="+spell" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[gui] + ~dev-qt/qtdeclarative-${PV}:6 + ~dev-qt/qtsvg-${PV}:6 + spell? ( app-text/hunspell:= ) +" +DEPEND="${RDEPEND}" + +src_configure() { + local mycmakeargs=( + $(qt_feature spell hunspell) + -DINPUT_vkb_handwriting=no # neither cerence nor myscript are packaged + ) + + qt6-build_src_configure +} + +src_test() { + if use spell && has_version app-dicts/myspell-en; then + # 99% pass but minor sub-tests fail with myspell-en, needs looking into + ewarn "Warning: notable tests were skipped due to ${_} being installed" + local CMAKE_SKIP_TESTS=( + tst_inputpanel + tst_inputpanelcontrols2 + ) + else + einfo "tst_inputpanel can take >5mins, not known to actually hang" + fi + + # tst_layoutfilesystem seems to fail randomly without -j1 + qt6-build_src_test -j1 +} diff --git a/dev-qt/qtwayland/qtwayland-6.6.9999.ebuild b/dev-qt/qtwayland/qtwayland-6.6.9999.ebuild new file mode 100644 index 000000000000..517bfcaf25e0 --- /dev/null +++ b/dev-qt/qtwayland/qtwayland-6.6.9999.ebuild @@ -0,0 +1,47 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Wayland platform plugin for Qt" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="compositor qml vulkan" + +RDEPEND=" + dev-libs/wayland + ~dev-qt/qtbase-${PV}:6[gui,opengl,vulkan=] + media-libs/libglvnd + x11-libs/libxkbcommon + compositor? ( + qml? ( ~dev-qt/qtdeclarative-${PV}:6 ) + ) +" +DEPEND=" + ${RDEPEND} + vulkan? ( dev-util/vulkan-headers ) +" +BDEPEND="dev-util/wayland-scanner" + +CMAKE_SKIP_TESTS=( + # segfaults for not-looked-into reasons, but not considered + # an issue given >=seatv5 exists since wayland-1.10 (2016) + tst_seatv4 + # needs a compositor/opengl, skip the extra trouble + tst_surface + tst_xdgdecorationv1 +) + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Quick) + $(qt_feature compositor wayland_server) + ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtwebchannel/qtwebchannel-6.6.9999.ebuild b/dev-qt/qtwebchannel/qtwebchannel-6.6.9999.ebuild new file mode 100644 index 000000000000..6a2b4df1a5b8 --- /dev/null +++ b/dev-qt/qtwebchannel/qtwebchannel-6.6.9999.ebuild @@ -0,0 +1,27 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Qt WebChannel" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="qml" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[concurrent] + qml? ( ~dev-qt/qtdeclarative-${PV}:6 ) +" +DEPEND="${RDEPEND}" + +src_configure() { + has_version dev-qt/qtdeclarative:6 && #913692 + local mycmakeargs=( $(cmake_use_find_package qml Qt6Qml) ) + + qt6-build_src_configure +} diff --git a/dev-qt/qtwebengine/qtwebengine-6.6.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.6.9999.ebuild new file mode 100644 index 000000000000..f4d5c7bf79a9 --- /dev/null +++ b/dev-qt/qtwebengine/qtwebengine-6.6.9999.ebuild @@ -0,0 +1,268 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# py3.12: uses imp and distutils among potentially more issues, refer to +# www-client/chromium for when adding/backporting support may be viable +PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_REQ_USE="xml(+)" +inherit check-reqs flag-o-matic multiprocessing optfeature +inherit prefix python-any-r1 qt6-build toolchain-funcs + +DESCRIPTION="Library for rendering dynamic web content in Qt6 C++ and QML applications" +SRC_URI+=" + https://dev.gentoo.org/~ionen/distfiles/${PN}-6.5-patchset-1.tar.xz +" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE=" + +alsa bindist custom-cflags designer geolocation +jumbo-build kerberos + opengl pdfium pulseaudio qml screencast +system-icu vulkan +widgets +" +REQUIRED_USE=" + designer? ( qml widgets ) +" + +# dlopen: krb5, pciutils, udev +RDEPEND=" + app-arch/snappy:= + dev-libs/expat + dev-libs/libevent:= + dev-libs/libxml2[icu] + dev-libs/libxslt + dev-libs/nspr + dev-libs/nss + ~dev-qt/qtbase-${PV}:6[gui,opengl=,vulkan?,widgets?] + ~dev-qt/qtwebchannel-${PV}:6[qml?] + media-libs/fontconfig + media-libs/freetype + media-libs/harfbuzz:= + media-libs/lcms:2 + media-libs/libjpeg-turbo:= + media-libs/libpng:= + media-libs/libvpx:= + media-libs/libwebp:= + media-libs/openjpeg:2= + media-libs/opus + sys-apps/dbus + sys-apps/pciutils + sys-libs/zlib:=[minizip] + virtual/libudev + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXrandr + x11-libs/libXtst + x11-libs/libxcb:= + x11-libs/libxkbcommon + x11-libs/libxkbfile + alsa? ( media-libs/alsa-lib ) + designer? ( ~dev-qt/qttools-${PV}:6[designer] ) + geolocation? ( ~dev-qt/qtpositioning-${PV}:6 ) + kerberos? ( virtual/krb5 ) + pulseaudio? ( media-libs/libpulse[glib] ) + qml? ( ~dev-qt/qtdeclarative-${PV}:6 ) + screencast? ( + dev-libs/glib:2 + media-libs/mesa[gbm(+)] + media-video/pipewire:= + x11-libs/libdrm + ) + system-icu? ( dev-libs/icu:= ) + widgets? ( ~dev-qt/qtdeclarative-${PV}:6[widgets] ) +" +DEPEND=" + ${RDEPEND} + media-libs/libglvnd + x11-base/xorg-proto + x11-libs/libxshmfence + screencast? ( media-libs/libepoxy[egl(+)] ) + pdfium? ( net-print/cups ) + test? ( + widgets? ( app-text/poppler[cxx(+)] ) + ) +" +BDEPEND=" + $(python_gen_any_dep 'dev-python/html5lib[${PYTHON_USEDEP}]') + dev-util/gperf + net-libs/nodejs[ssl] + sys-devel/bison + sys-devel/flex +" + +PATCHES=( "${WORKDIR}"/patches/${PN} ) +[[ ${PV} == 6.9999 ]] || # keep for 6.x.9999 + PATCHES+=( "${WORKDIR}"/patches/chromium ) + +PATCHES+=( + # add extras as needed here, may merge in set if carries across versions +) + +python_check_deps() { + python_has_version "dev-python/html5lib[${PYTHON_USEDEP}]" +} + +qtwebengine_check-reqs() { + [[ ${MERGE_TYPE} == binary ]] && return + + if is-flagq '-g?(gdb)?([1-9])'; then #307861 + ewarn "Used CFLAGS/CXXFLAGS seem to enable debug info (-g or -ggdb)," + ewarn "which is non-trivial with ${PN}. May experience extended" + ewarn "compilation times and increased disk/memory usage. If run into" + ewarn "issues, please disable before reporting a bug." + fi + + local CHECKREQS_DISK_BUILD=7G + local CHECKREQS_DISK_USR=220M + + if ! has distcc ${FEATURES}; then #830661 + # assume ~2GB per job or 1.5GB if clang, possible with less + # depending on free memory and *FLAGS, but prefer being safe as + # users having OOM issues with qtwebengine been rather common + tc-is-clang && : 15 || : 20 + local CHECKREQS_MEMORY=$(($(makeopts_jobs)*_/10))G + fi + + check-reqs_${EBUILD_PHASE_FUNC} #570534 +} + +pkg_pretend() { + qtwebengine_check-reqs +} + +pkg_setup() { + qtwebengine_check-reqs + python-any-r1_pkg_setup +} + +src_prepare() { + qt6-build_src_prepare + + # for www-plugins/chrome-binary-plugins (widevine) search paths on prefix + hprefixify -w /Gentoo/ src/core/content_client_qt.cpp + + # store chromium versions, only used in postinst for a warning + local chromium + mapfile -t chromium < CHROMIUM_VERSION || die + [[ ${chromium[1]} =~ ^Based.*:[^0-9]+([0-9.]+$) ]] && + QT6_CHROMIUM_VER=${BASH_REMATCH[1]} || die + [[ ${chromium[2]} =~ ^Patched.+:[^0-9]+([0-9.]+$) ]] && + QT6_CHROMIUM_PATCHES_VER=${BASH_REMATCH[1]} || die +} + +src_configure() { + local mycmakeargs=( + $(qt_feature pdfium qtpdf_build) + $(qt_feature qml qtpdf_quick_build) + $(qt_feature widgets qtpdf_widgets_build) + + -DQT_FEATURE_qtwebengine_build=ON + $(qt_feature qml qtwebengine_quick_build) + $(qt_feature widgets qtwebengine_widgets_build) + + $(cmake_use_find_package designer Qt6Designer) + + $(qt_feature alsa webengine_system_alsa) + $(qt_feature !bindist webengine_proprietary_codecs) + $(qt_feature geolocation webengine_geolocation) + $(qt_feature jumbo-build webengine_jumbo_build) + $(qt_feature kerberos webengine_kerberos) + $(qt_feature pulseaudio webengine_system_pulseaudio) + $(qt_feature screencast webengine_webrtc_pipewire) + $(qt_feature system-icu webengine_system_icu) + $(qt_feature vulkan webengine_vulkan) + -DQT_FEATURE_webengine_embedded_build=OFF + -DQT_FEATURE_webengine_extensions=ON + -DQT_FEATURE_webengine_ozone_x11=ON # needed, cannot do optional X yet + -DQT_FEATURE_webengine_pepper_plugins=ON + -DQT_FEATURE_webengine_printing_and_pdf=ON + -DQT_FEATURE_webengine_spellchecker=ON + -DQT_FEATURE_webengine_webchannel=ON + -DQT_FEATURE_webengine_webrtc=ON + + # needs a modified ffmpeg to be usable, and even then it may not + # cooperate with new major ffmpeg versions (bug #831487) + -DQT_FEATURE_webengine_system_ffmpeg=OFF + + # preemptively using bundled to avoid complications, may revisit + # (see discussions in https://github.com/gentoo/gentoo/pull/32281) + -DQT_FEATURE_webengine_system_re2=OFF + + # not necessary to pass these (default), but in case detection fails + $(printf -- '-DQT_FEATURE_webengine_system_%s=ON ' \ + freetype glib harfbuzz lcms2 libevent libjpeg \ + libopenjpeg2 libpci libpng libvpx libwebp libxml \ + minizip opus poppler snappy zlib) + + # TODO: fixup gn cross, or package dev-qt/qtwebengine-gn with =ON + -DINSTALL_GN=OFF + ) + + local mygnargs=( + # prefer no dlopen where possible + link_pulseaudio=true + rtc_link_pipewire=true + ) + + use custom-cflags || strip-flags # fragile + + export NINJA NINJAFLAGS=$(get_NINJAOPTS) + [[ ${NINJA_VERBOSE^^} == OFF ]] || NINJAFLAGS+=" -v" + + local -x EXTRA_GN="${mygnargs[*]} ${EXTRA_GN}" + einfo "Extra Gn args: ${EXTRA_GN}" + + qt6-build_src_configure +} + +src_test() { + if [[ ${EUID} == 0 ]]; then + # almost every tests fail, so skip entirely + ewarn "Skipping tests due to running as root (chromium refuses this configuration)." + return + fi + + local CMAKE_SKIP_TESTS=( + # fails with network sandbox + tst_loadsignals + tst_qquickwebengineview + tst_qwebengineview + # certs verfication seems flaky and gives expiration warnings + tst_qwebengineclientcertificatestore + ) + + # prevent using the system's qtwebengine + # (use glob to avoid unnecessary complications with arch dir) + local resources=( "${BUILD_DIR}/src/core/${CMAKE_BUILD_TYPE}/"* ) + [[ -d ${resources[0]} ]] || die "invalid resources path: ${resources[0]}" + local -x QTWEBENGINEPROCESS_PATH=${BUILD_DIR}${QT6_LIBEXECDIR#"${QT6_PREFIX}"}/QtWebEngineProcess + local -x QTWEBENGINE_LOCALES_PATH=${resources[0]}/qtwebengine_locales + local -x QTWEBENGINE_RESOURCES_PATH=${resources[0]} + + # random failures in several tests without -j1 + qt6-build_src_test -j1 +} + +pkg_postinst() { + # plugin may also be found in $HOME if provided by chrome or firefox + use amd64 && + optfeature "Widevine DRM support (protected media playback)" \ + www-plugins/chrome-binary-plugins + + elog + elog "This version of Qt WebEngine is based on Chromium version ${QT6_CHROMIUM_VER}, with" + elog "additional security fixes up to ${QT6_CHROMIUM_PATCHES_VER}. Extensive as it is, the" + elog "list of backports is impossible to evaluate, but always bound to be behind" + elog "Chromium's release schedule." + elog + elog "In addition, various online services may deny service based on an outdated" + elog "user agent version (and/or other checks). Google is already known to do so." + elog + elog "tl;dr your web browsing experience will be compromised." +} diff --git a/dev-qt/qtwebsockets/qtwebsockets-6.6.9999.ebuild b/dev-qt/qtwebsockets/qtwebsockets-6.6.9999.ebuild new file mode 100644 index 000000000000..bbcaeda665e8 --- /dev/null +++ b/dev-qt/qtwebsockets/qtwebsockets-6.6.9999.ebuild @@ -0,0 +1,28 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit qt6-build + +DESCRIPTION="Implementation of the WebSocket protocol for the Qt6 framework" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE="qml" + +RDEPEND=" + ~dev-qt/qtbase-${PV}:6[network,ssl] + qml? ( ~dev-qt/qtdeclarative-${PV}:6 ) +" +DEPEND="${RDEPEND}" + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package qml Qt6Quick) + ) + + qt6-build_src_configure +} |