eclass/gnome.org: upgrade for EAPI 7 support

versionator is deprecated in EAPI 7.

BUG=chromium:1099508
TEST=build

Change-Id: I3ea4c980179b6cfbb1fdc94d9977a734961dcb3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2268631
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Allen Webb <allenwebb@google.com>
Commit-Queue: Brian Norris <briannorris@chromium.org>
diff --git a/eclass/gnome.org.eclass b/eclass/gnome.org.eclass
index 34c53a0..fd6077e 100644
--- a/eclass/gnome.org.eclass
+++ b/eclass/gnome.org.eclass
@@ -1,6 +1,5 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome.org.eclass,v 1.15 2011/09/12 15:54:53 pacho Exp $
 
 # @ECLASS: gnome.org.eclass
 # @MAINTAINER:
@@ -12,7 +11,8 @@
 # @DESCRIPTION:
 # Provide a default SRC_URI for tarball hosted on gnome.org mirrors.
 
-inherit versionator
+# versionator inherit kept for older EAPIs due to ebuilds (potentially) relying on it
+[[ ${EAPI} == [0123456] ]] && inherit eapi7-ver versionator
 
 # @ECLASS-VARIABLE: GNOME_TARBALL_SUFFIX
 # @DESCRIPTION:
@@ -27,9 +27,13 @@
 fi
 
 # Even though xz-utils are in @system, they must still be added to DEPEND; see
-# http://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
+# https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
 if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then
-	DEPEND="${DEPEND} app-arch/xz-utils"
+	if [[ ${EAPI:-0} != [0123456] ]]; then
+		BDEPEND="app-arch/xz-utils"
+	else
+		DEPEND="app-arch/xz-utils"
+	fi
 fi
 
 # @ECLASS-VARIABLE: GNOME_ORG_MODULE
@@ -42,7 +46,7 @@
 # @INTERNAL
 # @DESCRIPTION:
 # Major and minor numbers of the version number.
-: ${GNOME_ORG_PVP:=$(get_version_component_range 1-2)}
+: ${GNOME_ORG_PVP:=$(ver_cut 1-2)}
 
 SRC_URI="mirror://gnome/sources/${GNOME_ORG_MODULE}/${GNOME_ORG_PVP}/${GNOME_ORG_MODULE}-${PV}.tar.${GNOME_TARBALL_SUFFIX}"