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 4B7CA138334 for ; Wed, 16 Oct 2019 12:02:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 00667E09A6; Wed, 16 Oct 2019 12:01:57 +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 A20FAE09A2 for ; Wed, 16 Oct 2019 12:01:56 +0000 (UTC) Received: from tuxbrain.localnet (91-115-217-203.adsl.highway.telekom.at [91.115.217.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: asturm) by smtp.gentoo.org (Postfix) with ESMTPSA id 65FDD34BDB8 for ; Wed, 16 Oct 2019 12:01:55 +0000 (UTC) From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH 2/2] kde5.eclass: Inherit kde.org.eclass and drop moved functions/vars Date: Wed, 16 Oct 2019 14:01:47 +0200 Message-ID: <5877751.qS0fyWJGDP@tuxbrain> In-Reply-To: References: <9898161.uzqcMZjEFU@tuxk10> <4600891.LxcutymfD9@tuxbrain> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Archives-Salt: b2718848-209d-4038-8d3d-6fd2543afcf7 X-Archives-Hash: b130457bcf8d5f4051ad382598e028d7 Functions moved to kde.org: - _kde_is_unreleased - _calculate_src_uri - _calculate_live_repo - kde5_pkg_nofetch - kde5_src_unpack Variables moved to kde.org: - KDE_BUILD_TYPE - KDE_SELINUX_MODULE - KDE_UNRELEASED - HOMEPAGE Variables deprecated: - KDE_SUBSLOT (define SLOT in ebuild) - KMNAME (use KDE_ORG_NAME in kde.org.eclass instead) --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -25,6 +25,12 @@ if [[ -z ${_KDE5_ECLASS} ]]; then _KDE5_ECLASS=1 +# Propagate KMNAME to kde.org.eclass +# PORTING: Use KDE_ORG_NAME from kde.org.eclass instead +if [[ -z ${KDE_ORG_NAME} ]]; then + KDE_ORG_NAME=${KMNAME:=$PN} +fi + # @ECLASS-VARIABLE: VIRTUALX_REQUIRED # @DESCRIPTION: # For proper description see virtualx.eclass manpage. @@ -32,17 +38,13 @@ _KDE5_ECLASS=1 # for tests you should proceed with setting VIRTUALX_REQUIRED=test. : ${VIRTUALX_REQUIRED:=manual} -inherit cmake-utils flag-o-matic kde5-functions virtualx xdg - -if [[ ${KDE_BUILD_TYPE} = live ]]; then - inherit git-r3 -fi +inherit cmake-utils flag-o-matic kde.org kde5-functions virtualx xdg if [[ -v KDE_GCC_MINIMAL ]]; then EXPORT_FUNCTIONS pkg_pretend fi -EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm +EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm # @ECLASS-VARIABLE: ECM_KDEINSTALLDIRS # @DESCRIPTION: @@ -127,37 +129,19 @@ if [[ ${CATEGORY} = kde-frameworks ]]; then fi : ${KDE_TEST:=false} -# @ECLASS-VARIABLE: KDE_SELINUX_MODULE -# @DESCRIPTION: -# If set to "none", do nothing. -# For any other value, add selinux to IUSE, and depending on that useflag -# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND. -: ${KDE_SELINUX_MODULE:=none} - # @ECLASS-VARIABLE: KDE_SUBSLOT # @DESCRIPTION: # If set to "false", do nothing. # If set to "true", add a subslot to the package, where subslot is either # defined as major.minor version for kde-*/ categories or ${PV} if other. # For any other value, that value will be used as subslot. +# PORTING: no replacement, define in ebuild : ${KDE_SUBSLOT:=false} -# @ECLASS-VARIABLE: KDE_UNRELEASED -# @INTERNAL -# @DESCRIPTION -# An array of $CATEGORY-$PV pairs of packages that are unreleased upstream. -# Any package matching this will have fetch restriction enabled, and receive -# a proper error message via pkg_nofetch. -KDE_UNRELEASED=( ) - -HOMEPAGE="https://kde.org/" +# PORTING: LICENSE no longer set by eclass, define in ebuild LICENSE="GPL-2" - -SLOT=5 - -if [[ ${CATEGORY} = kde-frameworks ]]; then - KDE_SUBSLOT=true -fi +# PORTING: SLOT no longer set by eclass except for kde-frameworks +[[ ${CATEGORY} = kde-frameworks ]] || SLOT=5 case ${KDE_SUBSLOT} in false) ;; @@ -245,154 +229,10 @@ case ${KDE_TEST} in ;; esac -case ${KDE_SELINUX_MODULE} in - none) ;; - *) - IUSE+=" selinux" - RDEPEND+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )" - ;; -esac - DEPEND+=" ${COMMONDEPEND}" RDEPEND+=" ${COMMONDEPEND}" unset COMMONDEPEND -if [[ -n ${KMNAME} && ${KMNAME} != ${PN} && ${KDE_BUILD_TYPE} = release ]]; then - S=${WORKDIR}/${KMNAME}-${PV} -fi - -_kde_is_unreleased() { - local pair - for pair in "${KDE_UNRELEASED[@]}" ; do - if [[ "${pair}" = "${CATEGORY}-${PV}" ]]; then - return 0 - fi - done - - return 1 -} - -# Determine fetch location for released tarballs -_calculate_src_uri() { - debug-print-function ${FUNCNAME} "$@" - - local _kmname - - if [[ -n ${KMNAME} ]]; then - _kmname=${KMNAME} - else - _kmname=${PN} - fi - - case ${PN} in - kdelibs4support | \ - kdewebkit | \ - khtml | \ - kjs | \ - kjsembed | \ - kmediaplayer | \ - kross) - _kmname="portingAids/${_kmname}" - ;; - kdesignerplugin) - [[ ${PV} = 5.6[01].* ]] || _kmname="portingAids/${_kmname}" - ;; - esac - - case ${CATEGORY} in - kde-apps) - case ${PV} in - ??.?.[6-9]? | ??.??.[6-9]? ) - SRC_URI="mirror://kde/unstable/applications/$ {PV}/src/${_kmname}-${PV}.tar.xz" - RESTRICT+=" mirror" - ;; - *) - SRC_URI="mirror://kde/stable/applications/${PV}/ src/${_kmname}-${PV}.tar.xz" ;; - esac - ;; - kde-frameworks) - SRC_URI="mirror://kde/stable/frameworks/${PV%.*}/${_kmname}- ${PV}.tar.xz" ;; - kde-plasma) - local plasmapv=$(ver_cut 1-3) - - case ${PV} in - 5.?.[6-9]? | 5.??.[6-9]? ) - # Plasma 5 beta releases - SRC_URI="mirror://kde/unstable/plasma/$ {plasmapv}/${_kmname}-${PV}.tar.xz" - RESTRICT+=" mirror" - ;; - *) - # Plasma 5 stable releases - SRC_URI="mirror://kde/stable/plasma/${plasmapv}/ ${_kmname}-${PV}.tar.xz" ;; - esac - ;; - esac - - if [[ ${PN} = kdevelop* ]]; then - case ${PV} in - *.*.[6-9]? ) - SRC_URI="mirror://kde/unstable/kdevelop/${PV}/src/$ {_kmname}-${PV}.tar.xz" - RESTRICT+=" mirror" - ;; - *) - SRC_URI="mirror://kde/stable/kdevelop/${PV}/src/$ {_kmname}-${PV}.tar.xz" ;; - esac - fi - - if _kde_is_unreleased ; then - RESTRICT+=" fetch" - fi -} - -# Determine fetch location for live sources -_calculate_live_repo() { - debug-print-function ${FUNCNAME} "$@" - - SRC_URI="" - - # @ECLASS-VARIABLE: EGIT_MIRROR - # @DESCRIPTION: - # This variable allows easy overriding of default kde mirror service - # (anongit) with anything else you might want to use. - EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org} - - local _kmname - - # @ECLASS-VARIABLE: EGIT_REPONAME - # @DESCRIPTION: - # This variable allows overriding of default repository - # name. Specify only if this differ from PN and KMNAME. - if [[ -n ${EGIT_REPONAME} ]]; then - # the repository and kmname different - _kmname=${EGIT_REPONAME} - elif [[ -n ${KMNAME} ]]; then - _kmname=${KMNAME} - else - _kmname=${PN} - fi - - if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then - EGIT_BRANCH="Applications/$(ver_cut 1-2)" - fi - - if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then - EGIT_BRANCH="Plasma/$(ver_cut 1-2)" - fi - - if [[ ${PV} != 9999 && ${PN} = kdevelop* ]]; then - EGIT_BRANCH="$(ver_cut 1-2)" - fi - - EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}" -} - -case ${KDE_BUILD_TYPE} in - live) _calculate_live_repo ;; - *) _calculate_src_uri ;; -esac - -debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" - # @FUNCTION: kde5_pkg_pretend # @DESCRIPTION: # Checks if the active compiler meets the minimum version requirements. @@ -410,49 +250,12 @@ kde5_pkg_setup() { _check_gcc_version } -# @FUNCTION: kde5_pkg_nofetch -# @DESCRIPTION: -# Intended for use in the KDE overlay. If this package matches something in -# KDE_UNRELEASED, display a giant warning that the package has not yet been -# released upstream and should not be used. -kde5_pkg_nofetch() { - if ! _kde_is_unreleased ; then - return - fi - - eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ " - eerror "| | | | \ | | _ \| ____| | | ____| / \ / ___|| ____| _ \ " - eerror "| | | | \| | |_) | _| | | | _| / _ \ \___ \| _| | | | |" - eerror "| |_| | |\ | _ <| |___| |___| |___ / ___ \ ___) | |___| |_| |" - eerror " \___/|_| \_|_| \_\_____|_____|_____/_/ \_\____/|_____|____/ " - eerror " " - eerror " ____ _ ____ _ __ _ ____ _____ " - eerror "| _ \ / \ / ___| |/ / / \ / ___| ____|" - eerror "| |_) / _ \| | | ' / / _ \| | _| _| " - eerror "| __/ ___ \ |___| . \ / ___ \ |_| | |___ " - eerror "|_| /_/ \_\____|_|\_\/_/ \_\____|_____|" - eerror - eerror "${CATEGORY}/${P} has not been released to the public yet" - eerror "and is only available to packagers right now." - eerror "" - eerror "This is not a bug. Please do not file bugs or contact upstream about this." - eerror "" - eerror "Please consult the upstream release schedule to see when this " - eerror "package is scheduled to be released:" - eerror "https://community.kde.org/Schedules" -} - # @FUNCTION: kde5_src_unpack # @DESCRIPTION: # Unpack the sources, automatically handling both release and live ebuilds. kde5_src_unpack() { debug-print-function ${FUNCNAME} "$@" - - if [[ ${KDE_BUILD_TYPE} = live ]]; then - git-r3_src_unpack - else - default - fi + kde.org_src_unpack } # @FUNCTION: kde5_src_prepare