summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-13 13:36:46 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-13 13:36:46 +0100
commit7b02e37a04e4051a91a109814d386711f41f9a4b (patch)
treed0689f14f1d1df3a6a2525512a6812b146064a9e /eclass
parent5c0c70d5917e66743293789a6d6fd7d72250eb32 (diff)
gentoo auto-resync : 13:07:2022 - 13:36:46
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin36110 -> 36281 bytes
-rw-r--r--eclass/kde.org.eclass132
-rw-r--r--eclass/plasma.kde.org.eclass66
3 files changed, 114 insertions, 84 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 674724423d3c..118f128084e0 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
index b38ca5a024ab..099bbaa4ef71 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.eclass
@@ -101,13 +101,18 @@ readonly KDE_ORG_CATEGORIES
# Name of the package as hosted on kde.org mirrors.
: ${KDE_ORG_NAME:=$PN}
+# @ECLASS_VARIABLE: KDE_ORG_SCHEDULE_URI
+# @DESCRIPTION:
+# Known schedule URI of package or release group.
+: ${KDE_ORG_SCHEDULE_URI:="https://community.kde.org/Schedules"}
+
# @ECLASS_VARIABLE: KDE_GEAR
# @PRE_INHERIT
# @DESCRIPTION:
# 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.
+# If set to "true", set SRC_URI accordingly.
: ${KDE_GEAR:=false}
if [[ ${CATEGORY} == kde-apps ]]; then
KDE_GEAR=true
@@ -129,13 +134,21 @@ case ${KDE_SELINUX_MODULE} in
;;
esac
-# @ECLASS_VARIABLE: KDE_UNRELEASED
+# @ECLASS_VARIABLE: KDE_PV_UNRELEASED
# @INTERNAL
+# @DEFAULT_UNSET
# @DESCRIPTION:
-# An array of $CATEGORY-$PV pairs of packages that are unreleased upstream.
+# An array of package versions that are unreleased upstream.
# Any package matching this will have fetch restriction enabled, and receive
# a proper error message via pkg_nofetch.
-KDE_UNRELEASED=( )
+
+# @ECLASS_VARIABLE: KDE_ORG_UNRELEASED
+# @DESCRIPTION:
+# If set to "true" fetch restriction will be enabled, and a proper error
+# message displayed via pkg_nofetch.
+KDE_ORG_UNRELEASED=false
+has ${PV} "${KDE_PV_UNRELEASED[*]}" && KDE_ORG_UNRELEASED=true
+[[ ${KDE_ORG_UNRELEASED} == true ]] && RESTRICT+=" fetch"
# @ECLASS_VARIABLE: EGIT_MIRROR
# @DESCRIPTION:
@@ -156,35 +169,20 @@ case ${CATEGORY} in
https://invent.kde.org/qt/qt/ https://www.qt.io/"
;;
kde-plasma)
- HOMEPAGE="https://kde.org/plasma-desktop"
+ if [[ -z ${_PLASMA_KDE_ORG_ECLASS} ]]; then
+ HOMEPAGE="https://kde.org/plasma-desktop"
+ fi
;;
kde-frameworks)
- HOMEPAGE="https://kde.org/products/frameworks/"
- SLOT=5/${PV}
- [[ ${KDE_BUILD_TYPE} == release ]] && SLOT=$(ver_cut 1)/$(ver_cut 1-2)
+ if [[ -z ${_FRAMEWORKS_KDE_ORG_ECLASS} ]]; then
+ HOMEPAGE="https://kde.org/products/frameworks/"
+ SLOT=5/${PV}
+ [[ ${KDE_BUILD_TYPE} == release ]] && SLOT=$(ver_cut 1)/$(ver_cut 1-2)
+ fi
;;
*) ;;
esac
-# @FUNCTION: _kde.org_is_unreleased
-# @INTERNAL
-# @DESCRIPTION:
-# Return true if $CATEGORY-$PV matches against an entry in KDE_UNRELEASED array.
-_kde.org_is_unreleased() {
- local pair
- for pair in "${KDE_UNRELEASED[@]}" ; do
- if [[ "${pair}" == "${CATEGORY}-${PV}" ]]; then
- return 0
- elif [[ ${KDE_GEAR} == true ]]; then
- if [[ "${pair/kde-apps/${CATEGORY}}" == "${CATEGORY}-${PV}" ]]; then
- return 0
- fi
- fi
- done
-
- return 1
-}
-
# @FUNCTION: _kde.org_calculate_src_uri
# @INTERNAL
# @DESCRIPTION:
@@ -192,6 +190,18 @@ _kde.org_is_unreleased() {
_kde.org_calculate_src_uri() {
debug-print-function ${FUNCNAME} "$@"
+ if [[ -n ${KDE_ORG_COMMIT} ]]; then
+ SRC_URI="https://invent.kde.org/${KDE_ORG_CATEGORY}/${KDE_ORG_NAME}/-/"
+ SRC_URI+="archive/${KDE_ORG_COMMIT}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT}.tar.gz"
+ SRC_URI+=" -> ${KDE_ORG_NAME}-${PV}-${KDE_ORG_COMMIT:0:8}.tar.gz"
+ fi
+
+ [[ ${KDE_ORG_UNRELEASED} == true ]] && RESTRICT+=" fetch"
+
+ if [[ -n ${_FRAMEWORKS_KDE_ORG_ECLASS} ]] || [[ -n ${_PLASMA_KDE_ORG_ECLASS} ]] || [[ -n ${_GEAR_KDE_ORG_ECLASS} ]] || [[ -n ${KDE_ORG_COMMIT} ]]; then
+ return
+ fi
+
local _src_uri="mirror://kde/"
if [[ ${KDE_GEAR} == true ]]; then
@@ -233,51 +243,18 @@ _kde.org_calculate_src_uri() {
;;
esac
- if [[ ${PN} == kdevelop* && ${PV} == 5.6.2 ]]; then
- _src_uri+="stable/kdevelop/${PV}/src/"
- fi
-
- if [[ -n ${KDE_ORG_COMMIT} ]]; then
- SRC_URI="https://invent.kde.org/${KDE_ORG_CATEGORY}/${KDE_ORG_NAME}/-/"
- SRC_URI+="archive/${KDE_ORG_COMMIT}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT}.tar.gz"
- SRC_URI+=" -> ${KDE_ORG_NAME}-${PV}-${KDE_ORG_COMMIT:0:8}.tar.gz"
- else
- SRC_URI="${_src_uri}${KDE_ORG_NAME}-${PV}.tar.xz"
- fi
-
- if _kde.org_is_unreleased ; then
- RESTRICT+=" fetch"
- fi
-}
-
-# @FUNCTION: _kde.org_calculate_live_repo
-# @INTERNAL
-# @DESCRIPTION:
-# Determine fetch location for live sources
-_kde.org_calculate_live_repo() {
- debug-print-function ${FUNCNAME} "$@"
-
- SRC_URI=""
-
- EGIT_MIRROR=${EGIT_MIRROR:=https://invent.kde.org/${KDE_ORG_CATEGORY}}
-
- if [[ ${PV} == 5.??(.?)*.9999 && ${CATEGORY} == dev-qt ]]; then
- EGIT_BRANCH="kde/$(ver_cut 1-2)"
- fi
-
- if [[ ${PV} == ??.??.49.9999 && ${KDE_GEAR} == true ]]; then
- EGIT_BRANCH="release/$(ver_cut 1-2)"
- fi
-
- if [[ ${PV} != 9999 && ${CATEGORY} == kde-plasma ]]; then
- EGIT_BRANCH="Plasma/$(ver_cut 1-2)"
- fi
-
- EGIT_REPO_URI="${EGIT_MIRROR}/${EGIT_REPONAME:=$KDE_ORG_NAME}.git"
+ SRC_URI="${_src_uri}${KDE_ORG_NAME}-${PV}.tar.xz"
}
case ${KDE_BUILD_TYPE} in
- live) _kde.org_calculate_live_repo ;;
+ live)
+ EGIT_MIRROR=${EGIT_MIRROR:=https://invent.kde.org/${KDE_ORG_CATEGORY}}
+ EGIT_REPO_URI="${EGIT_MIRROR}/${EGIT_REPONAME:=$KDE_ORG_NAME}.git"
+
+ if [[ ${PV} == 5.??.?.9999 && ${CATEGORY} == dev-qt ]]; then
+ EGIT_BRANCH="kde/$(ver_cut 1-2)"
+ fi
+ ;;
*)
_kde.org_calculate_src_uri
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
@@ -296,20 +273,7 @@ esac
# KDE_UNRELEASED, display a giant warning that the package has not yet been
# released upstream and should not be used.
kde.org_pkg_nofetch() {
- if ! _kde.org_is_unreleased ; then
- return
- fi
-
- local sched_uri="https://community.kde.org/Schedules"
- case ${CATEGORY} in
- kde-frameworks) sched_uri+="/Frameworks" ;;
- kde-plasma) sched_uri+="/Plasma_5" ;;
- *)
- [[ ${KDE_GEAR} == true ]] &&
- sched_uri+="/KDE_Gear_$(ver_cut 1-2)_Schedule"
- ;;
- esac
-
+ [[ ${KDE_ORG_UNRELEASED} == true ]] || return
eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ "
eerror "| | | | \ | | _ \| ____| | | ____| / \ / ___|| ____| _ \ "
eerror "| | | | \| | |_) | _| | | | _| / _ \ \___ \| _| | | | |"
@@ -329,7 +293,7 @@ kde.org_pkg_nofetch() {
eerror ""
eerror "Please consult the upstream release schedule to see when this "
eerror "package is scheduled to be released:"
- eerror "${sched_uri}"
+ eerror "${KDE_ORG_SCHEDULE_URI}"
}
# @FUNCTION: kde.org_src_unpack
diff --git a/eclass/plasma.kde.org.eclass b/eclass/plasma.kde.org.eclass
new file mode 100644
index 000000000000..b0aad867ec1d
--- /dev/null
+++ b/eclass/plasma.kde.org.eclass
@@ -0,0 +1,66 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: plasma.kde.org.eclass
+# @MAINTAINER:
+# kde@gentoo.org
+# @SUPPORTED_EAPIS: 8
+# @PROVIDES: kde.org
+# @BLURB: Support eclass for KDE Plasma packages.
+# @DESCRIPTION:
+# This eclass extends kde.org.eclass for KDE Plasma release group to assemble
+# default SRC_URI for tarballs, set up git-r3.eclass for stable/master branch
+# versions or restrict access to unreleased (packager access only) tarballs
+# in Gentoo KDE overlay.
+#
+# This eclass unconditionally inherits kde.org.eclass and all its public
+# variables and helper functions (not phase functions) may be considered as
+# part of this eclass's API.
+
+case ${EAPI} in
+ 8) ;;
+ *) die "EAPI=${EAPI:-0} is not supported" ;;
+esac
+
+if [[ -z ${_PLASMA_KDE_ORG_ECLASS} ]]; then
+_PLASMA_KDE_ORG_ECLASS=1
+
+# @ECLASS_VARIABLE: KDE_PV_UNRELEASED
+# @INTERNAL
+# @DESCRIPTION:
+# For proper description see kde.org.eclass manpage.
+KDE_PV_UNRELEASED=( )
+
+inherit kde.org
+
+HOMEPAGE="https://kde.org/plasma-desktop"
+
+# @ECLASS_VARIABLE: KDE_ORG_SCHEDULE_URI
+# @INTERNAL
+# @DESCRIPTION:
+# For proper description see kde.org.eclass manpage.
+KDE_ORG_SCHEDULE_URI+="/Plasma_5"
+
+# @ECLASS_VARIABLE: _KDE_SRC_URI
+# @INTERNAL
+# @DESCRIPTION:
+# Helper variable to construct release group specific SRC_URI.
+_KDE_SRC_URI="mirror://kde/"
+
+if [[ ${KDE_BUILD_TYPE} == live ]]; then
+ if [[ ${PV} != 9999 ]]; then
+ EGIT_BRANCH="Plasma/$(ver_cut 1-2)"
+ fi
+elif [[ -z ${KDE_ORG_COMMIT} ]]; then
+ case ${PV} in
+ 5.??.[6-9]?* )
+ _KDE_SRC_URI+="unstable/plasma/$(ver_cut 1-3)/"
+ RESTRICT+=" mirror"
+ ;;
+ *) _KDE_SRC_URI+="stable/plasma/$(ver_cut 1-3)/" ;;
+ esac
+
+ SRC_URI="${_KDE_SRC_URI}${KDE_ORG_NAME}-${PV}.tar.xz"
+fi
+
+fi