dotnet.eclass: Add EAPI 7 support
authorJames Le Cuirot <chewi@gentoo.org>
Tue, 17 Dec 2019 22:45:11 +0000 (22:45 +0000)
committerJames Le Cuirot <chewi@gentoo.org>
Mon, 23 Dec 2019 23:21:12 +0000 (23:21 +0000)
I could not see eutils.eclass being used anywhere but multilib.eclass
is needed for get_libdir. I will fix implicit use of eutils by
libgdiplus for prune_libtool_files.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
eclass/dotnet.eclass

index 3e834835b971aa7299bd7f8a552f8c234c49a65a..55e10645deb70987c6f0f780c341206d7ac4c8d7 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: dotnet.eclass
 # of dotnet packages.
 
 case ${EAPI:-0} in
-       0) die "this eclass doesn't support EAPI 0" ;;
-       1|2|3) ;;
-       *) ;; #if [[ ${USE_DOTNET} ]]; then REQUIRED_USE="|| (${USE_DOTNET})"; fi;;
+       0)
+               die "this eclass doesn't support EAPI 0" ;;
+       [1-6])
+               inherit eapi7-ver multilib
+               DEPEND="dev-lang/mono" ;;
+       *)
+               BDEPEND="dev-lang/mono" ;;
 esac
 
-inherit eutils versionator mono-env
+inherit mono-env
 
 # @ECLASS-VARIABLE: USE_DOTNET
 # @DESCRIPTION:
 # Use flags added to IUSE
 
-DEPEND+=" dev-lang/mono"
-
 # SET default use flags according on DOTNET_TARGETS
 for x in ${USE_DOTNET}; do
        case ${x} in
@@ -51,7 +53,7 @@ dotnet_pkg_setup() {
                                FRAMEWORK="${F}";
                        fi
                else
-                       version_is_at_least "${F}" "${FRAMEWORK}" || FRAMEWORK="${F}"
+                       ver_test "${F}" -le "${FRAMEWORK}" || FRAMEWORK="${F}"
                fi
        done
        if [[ -z ${FRAMEWORK} ]]; then