From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 549A4139347 for ; Sun, 18 Jul 2021 16:55:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 17681E0CA2; Sun, 18 Jul 2021 16:55:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D00DDE0CA2 for ; Sun, 18 Jul 2021 16:55:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8DF8B342B59 for ; Sun, 18 Jul 2021 16:55:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 145A17D7 for ; Sun, 18 Jul 2021 16:55:41 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1626598432.19b4ef26c52864d1e0dce7d07e7d2d009ea73094.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/kde.org.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 19b4ef26c52864d1e0dce7d07e7d2d009ea73094 X-VCS-Branch: master Date: Sun, 18 Jul 2021 16:55:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f7309987-760e-465e-a058-1af5bfa2a0a1 X-Archives-Hash: 1273d8a41c3908783582312365bad13d commit: 19b4ef26c52864d1e0dce7d07e7d2d009ea73094 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Jul 18 08:30:46 2021 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Jul 18 08:53:52 2021 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=19b4ef26 kde.org.eclass: Allow KDE_BUILD_TYPE to hold "snapshot" value This value is set in conjunction with KDE_ORG_COMMIT to distinguish between proper release tarballs and snapshots. Minor changes in adv. of follow-up commit: - KDE_GEAR: move kde-apps/ fallback decl below default, improve eclassdoc - PRE_INHERIT: set it where necessary Signed-off-by: Andreas Sturmlechner gentoo.org> eclass/kde.org.eclass | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass index 31359c3f63..18f198e522 100644 --- a/eclass/kde.org.eclass +++ b/eclass/kde.org.eclass @@ -25,20 +25,6 @@ EXPORT_FUNCTIONS pkg_nofetch src_unpack if [[ -z ${_KDE_ORG_ECLASS} ]]; then _KDE_ORG_ECLASS=1 -# @ECLASS-VARIABLE: KDE_BUILD_TYPE -# @DESCRIPTION: -# If PV matches "*9999*", this is automatically set to "live". -# Otherwise, this is automatically set to "release". -KDE_BUILD_TYPE="release" -if [[ ${PV} == *9999* ]]; then - KDE_BUILD_TYPE="live" -fi -export KDE_BUILD_TYPE - -if [[ ${KDE_BUILD_TYPE} == live ]]; then - inherit git-r3 -fi - # @ECLASS-VARIABLE: KDE_ORG_CATEGORIES # @INTERNAL # @DESCRIPTION: @@ -82,12 +68,14 @@ declare -A KDE_ORG_CATEGORIES=( readonly KDE_ORG_CATEGORIES # @ECLASS-VARIABLE: KDE_ORG_CATEGORY +# @PRE_INHERIT # @DESCRIPTION: # If unset, default value is mapped from ${CATEGORY} to corresponding upstream # category on invent.kde.org, with "kde" as fallback value. : ${KDE_ORG_CATEGORY:=${KDE_ORG_CATEGORIES[${CATEGORY}]:-kde}} # @ECLASS-VARIABLE: KDE_ORG_COMMIT +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # If set, instead of a regular release tarball, pull tar.gz snapshot from an @@ -95,16 +83,42 @@ readonly KDE_ORG_CATEGORIES # at the desired COMMIT ID. # @ECLASS-VARIABLE: KDE_ORG_NAME +# @PRE_INHERIT # @DESCRIPTION: # If unset, default value is set to ${PN}. # Name of the package as hosted on kde.org mirrors. : ${KDE_ORG_NAME:=$PN} # @ECLASS-VARIABLE: KDE_GEAR +# @PRE_INHERIT # @DESCRIPTION: -# If set to "false", do nothing. +# Mark package is being part of KDE Gear release schedule. +# By default, this is set to "false" and does nothing. +# If CATEGORY equals kde-apps, this is automatically set to "true". # If set to "true", set SRC_URI accordingly and apply KDE_UNRELEASED. : ${KDE_GEAR:=false} +if [[ ${CATEGORY} == kde-apps ]]; then + KDE_GEAR=true +fi + +# @ECLASS-VARIABLE: KDE_BUILD_TYPE +# @DESCRIPTION: +# By default, this is set to "release". +# If PV matches "*9999*", this is automatically set to "live" and will cause +# git-r3.eclass to be inherited. +# In EAPI-8, if KDE_ORG_COMMIT is set, this is automatically set to "snapshot". +KDE_BUILD_TYPE="release" +if [[ ${PV} == *9999* ]]; then + KDE_BUILD_TYPE="live" +fi +if [[ ${EAPI} == 8 ]] && [[ -n ${KDE_ORG_COMMIT} ]]; then + KDE_BUILD_TYPE="snapshot" +fi +export KDE_BUILD_TYPE + +if [[ ${KDE_BUILD_TYPE} == live ]]; then + inherit git-r3 +fi # @ECLASS-VARIABLE: KDE_SELINUX_MODULE # @PRE_INHERIT @@ -138,16 +152,13 @@ case ${CATEGORY} in HOMEPAGE="https://community.kde.org/Qt5PatchCollection https://invent.kde.org/qt/qt/ https://www.qt.io/" ;; - kde-apps) - KDE_GEAR=true - ;; kde-plasma) HOMEPAGE="https://kde.org/plasma-desktop" ;; kde-frameworks) HOMEPAGE="https://kde.org/products/frameworks/" SLOT=5/${PV} - [[ ${KDE_BUILD_TYPE} == release ]] && SLOT=$(ver_cut 1)/$(ver_cut 1-2) + [[ ${KDE_BUILD_TYPE} != live ]] && SLOT=$(ver_cut 1)/$(ver_cut 1-2) ;; *) ;; esac @@ -284,6 +295,7 @@ case ${KDE_BUILD_TYPE} in *) _kde.org_calculate_src_uri debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" + # TODO: simplify after dropping support for EAPI-7 if [[ -n ${KDE_ORG_COMMIT} ]]; then S=${WORKDIR}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT} [[ ${CATEGORY} == dev-qt ]] && QT5_BUILD_DIR="${S}_build"