commit:     5c800f1e7874f263845bc22ba72e7e6484feae75
Author:     12101111 <w12101111 <AT> gmail <DOT> com>
AuthorDate: Mon Jan 15 16:16:30 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Jan 15 17:32:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c800f1e

dev-util/mingw64-runtime: Use crossdev.eclass

crossdev.eclass contains code of parsing CTARGET from category and
include the support of crossdev with LLVM/Clang compiler

Bug: https://bugs.gentoo.org/680652
Signed-off-by: Han Puyu <w12101111 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34820
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild 
b/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild
index f58ee0b1fe5e..e6c64a8633a0 100644
--- a/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild
+++ b/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit flag-o-matic toolchain-funcs
+inherit crossdev flag-o-matic toolchain-funcs
 
 DESCRIPTION="Free Win64 runtime and import library definitions"
 HOMEPAGE="https://www.mingw-w64.org/";
@@ -20,13 +20,7 @@ IUSE="default-ucrt headers-only idl libraries tools"
 RESTRICT="strip" # portage would use the wrong strip executable
 
 pkg_setup() {
-       : "${CBUILD:=${CHOST}}"
-       : "${CTARGET:=${CHOST}}"
-       [[ ${CTARGET} == ${CHOST} && ${CATEGORY} == cross-* ]] &&
-               CTARGET=${CATEGORY#cross-}
-
-       [[ ${CHOST} != ${CTARGET} ]] && MW_CROSS=true || MW_CROSS=false
-
+       target_is_not_host && MW_CROSS=true || MW_CROSS=false
        [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] &&
                die "Invalid configuration, please see: 
https://wiki.gentoo.org/wiki/Mingw";
 }

Reply via email to