From 3a77d78ca92715b58ddac074baa5b25c4baf9a9b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 9 Sep 2023 22:34:14 +0100 Subject: gentoo auto-resync : 09:09:2023 - 22:34:14 --- dev-qt/qt-docs/qt-docs-6.5.2_p202307080352.ebuild | 145 +++++++++++++++------- 1 file changed, 101 insertions(+), 44 deletions(-) (limited to 'dev-qt/qt-docs/qt-docs-6.5.2_p202307080352.ebuild') diff --git a/dev-qt/qt-docs/qt-docs-6.5.2_p202307080352.ebuild b/dev-qt/qt-docs/qt-docs-6.5.2_p202307080352.ebuild index 452f7ba31477..98ace3ec6876 100644 --- a/dev-qt/qt-docs/qt-docs-6.5.2_p202307080352.ebuild +++ b/dev-qt/qt-docs/qt-docs-6.5.2_p202307080352.ebuild @@ -3,97 +3,125 @@ EAPI=8 -DESCRIPTION="Qt6 documentation, for use with Qt Creator and other tools" +inherit unpacker + +DESCRIPTION="Qt6 documentation and examples for Qt Creator and other tools" HOMEPAGE="https://doc.qt.io/" LICENSE="FDL-1.3" SLOT="6" KEYWORDS="~amd64" -IUSE="+html +qch" -REQUIRED_USE="|| ( html qch )" +IUSE="+examples +html +qch" +REQUIRED_USE="|| ( examples html qch )" + +BDEPEND=" + examples? ( + app-arch/p7zip + media-libs/libpng + ) +" qt6_docs_generate_metadata() { local qtver=${PV%%_p*} local prefix=${qtver}-0-${PV##*_p} - local suffix=-documentation.tar.xz - local baseuri="https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_${qtver//.}_src_doc_examples/qt.qt6.${qtver//.}.doc" + local doc_suffix=-documentation.tar.xz + local exa_suffix=-examples-${qtver}.7z + local baseuri=https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_${qtver//.}_src_doc_examples/qt.qt6.${qtver//.} SRC_URI= - S=${WORKDIR}/Docs/Qt-${qtver} + S=${WORKDIR} - # format: [+-%][/][=" ..."] - # '+' = enable, '-' = disable, '%' = always (no IUSE) - # '-' is suggested for most things not packaged, rest should be enabled - # (subdir's name is used as default module if nothing is specified) + # Bumping involves diff'ing the unversioned *_src_doc_examples/*/ files + # list from old version to the new for -documentation and -examples + # files, then adding/removing entries if anything changed. + # + # Format: [+-%][[!|:]][=" ..."] + # - [+-%]: enable(+), disable(-), or no IUSE(%) + # (should disable if associated package is not in tree) + # - /: qt.qt6.*.examples./*--examples* + # - ^: qt.qt6.*.examples/*--examples.7z + # - : qt.qt6.*.doc./*--documentation* + # (if is unspecified, defaults to ) + # - [!:]: only has examples(!) or documentation(:) + # Note: sub-300 bytes examples archives are empty, can be skipped local map=( # map with (non-split) Qt6 packages rather than per-module - %base=" - qmake qtconcurrent qtcore qtdbus qtgui qtnetwork - qtopengl qtplatformintegration qtprintsupport qtsql - qttestlib qtwidgets qtxml" - %misc="qtcmake" - %doc="qtdoc" + %base^qtbase=" + qmake qtcmake qtconcurrent qtcore qtdbus + qtgui qtnetwork qtopengl qtplatformintegration + qtprintsupport qtsql qttestlib qtwidgets qtxml + " +3d/qt3d -activeqt/qtactiveqt="activeqt" +charts/qtcharts - +connectivity/qtbluetooth - +connectivity/qtnfc + +connectivity/qtbluetooth: + +connectivity/qtconnectivity! + +connectivity/qtnfc: -datavis/qtdatavis3d - +declarative=" + +declarative^qtdeclarative=" qtlabsplatform qtqml qtqmlcore qtqmlmodels qtqmltest qtqmlworkerscript qtqmlxmllistmodel qtquick qtquickcontrols qtquickdialogs " + %doc^qtdoc -grpc/qtgrpc="qtprotobuf" -httpserver/qthttpserver - +imageformats/qtimageformats -# -languageserver/qtlanguageserver # no docs + +imageformats/qtimageformats: # empty examples +# -languageserver/qtlanguageserver # docs and examples are empty +location/qtlocation - -lottie/qtlottie="qtlottieanimation" + -lottie/qtlottie:="qtlottieanimation" # empty examples +multimedia/qtmultimedia +networkauth/qtnetworkauth +positioning/qtpositioning +qt5compat/qt5compat="qtcore5compat qtgraphicaleffects5compat" -# +qt5="qt5" # already installed by qtbase / conflicts +# +qt5="qt5" # already installed by qtbase (conflicts) -quick3dphysics/qtquick3dphysics +quick3d/qtquick3d -# -quickeffectmaker/qtquickeffectmaker # no docs +# -quickeffectmaker/qtquickeffectmaker! # missing examples-manifest? -remoteobjects/qtremoteobjects +scxml/qtscxml +sensors/qtsensors -serialbus/qtserialbus +serialport/qtserialport - +shadertools/qtshadertools + +shadertools/qtshadertools: # empty examples +speech/qtspeech="qttexttospeech" - +svg="qtsvg" - +timeline/qtquicktimeline - +tools=" + +svg^qtsvg + +timeline/qtquicktimeline: + +tools^qttools=" qdoc qtassistant qtdesigner qtdistancefieldgenerator qthelp qtlinguist qtuitools " +virtualkeyboard/qtvirtualkeyboard - +wayland="qtwaylandcompositor" + +wayland^qtwayland="qtwaylandcompositor" +webchannel/qtwebchannel - +webengine/qtpdf + +webengine/qtpdf: +webengine/qtwebengine +websockets/qtwebsockets -webview/qtwebview ) - local docs op use sub uris + local entry operator use subdir package exception modules uris local -A iuse - for docs in "${map[@]}"; do - [[ ${docs} =~ ^([%+-])([^/=]+)/?([^=]+)?=?(.+)? ]] # || die in global - op=${BASH_REMATCH[1]} + for entry in "${map[@]}"; do + [[ ${entry} =~ ^([%+-])([^/^!:=]+)([/^])?([^!:=]+)?([!:])?=?(.+)? ]] # || die + operator=${BASH_REMATCH[1]#-} use=${BASH_REMATCH[2]} - sub=${BASH_REMATCH[3]} - printf -v uris \ - "${baseuri}${sub:+.${sub}}/${prefix}%s${suffix} " \ - ${BASH_REMATCH[4]:-${sub}} + subdir=${BASH_REMATCH[3]} + package=${BASH_REMATCH[4]} + exception=${BASH_REMATCH[5]} + modules=${BASH_REMATCH[6]:-${package}} + + [[ ${subdir} == / ]] && subdir=.${package} || subdir= + + [[ ${exception} == ! ]] || + printf -v uris "${baseuri}.doc${subdir}/${prefix}%s${doc_suffix} " \ + ${modules} + [[ ${exception} == : ]] || + uris+=" examples? ( ${baseuri}.examples${subdir}/${prefix}${package}${exa_suffix} )" - if [[ ${op} == % ]]; then + if [[ ${operator} == % ]]; then SRC_URI+=" ${uris}" else - iuse[${op#-}${use}]= # avoid duplicates + iuse[${operator}${use}]= # avoid duplicates SRC_URI+=" ${use}? ( ${uris} )" fi done @@ -101,9 +129,38 @@ qt6_docs_generate_metadata() { } qt6_docs_generate_metadata +src_prepare() { + default + + if use examples; then + # fix broken png from qtdoc-examples (bug #679146) + pngfix -q --suffix=.fixed \ + Examples/*/demos/tweetsearch/content/resources/anonymous.png + (( ${?} < 16 )) || die + mv "${_}"{.fixed,} || die + fi +} + src_install() { - # QT6_DOCDIR from qt6-build.eclass - insinto /usr/share/qt6-doc - use html && doins -r */ - use qch && doins -r *.qch + insinto /usr/share/qt6-doc # QT6_DOCDIR + use qch && doins -r Docs/*/*.qch + + if use html; then + doins -r Docs/*/*/ + + # needed not to let Qt Creator believe that these examples exist + use examples || + find "${ED}" -type f -name examples-manifest.xml -delete || die + elif use examples; then + # still need docs tarballs even with USE="-html -qch" + for dir in Docs/*/*/; do + if [[ -e ${dir}/examples-manifest.xml ]]; then + insinto /usr/share/qt6-doc/"${dir#*/*/}" + doins ${dir}/examples-manifest.xml + fi + done + fi + + insinto /usr/share/qt6/examples # QT6_EXAMPLESDIR + use examples && doins -r Examples/*/*/ } -- cgit v1.2.3