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 A1E6113835C for ; Sat, 1 May 2021 19:02:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB26FE0CAE; Sat, 1 May 2021 19:02:31 +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 C3B15E0CAE for ; Sat, 1 May 2021 19:02:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 975E7340CC5 for ; Sat, 1 May 2021 19:02:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DA2E973F for ; Sat, 1 May 2021 19:02:28 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1619895722.52c32f69e7dcf2844b34b2668722f8c9439cc59a.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/wxwidgets.eclass X-VCS-Directories: eclass/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 52c32f69e7dcf2844b34b2668722f8c9439cc59a X-VCS-Branch: master Date: Sat, 1 May 2021 19:02:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3f5aed41-c49c-43dc-bf08-0c83ab93cdb8 X-Archives-Hash: a9c7cda9feb7768c4b2cd691f9c13261 commit: 52c32f69e7dcf2844b34b2668722f8c9439cc59a Author: David Seifert gentoo org> AuthorDate: Sat May 1 19:02:02 2021 +0000 Commit: David Seifert gentoo org> CommitDate: Sat May 1 19:02:02 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52c32f69 wxwidgets.eclass: Restrict to EAPI 7 Signed-off-by: David Seifert gentoo.org> eclass/wxwidgets.eclass | 56 +++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 44 deletions(-) diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass index 019bc75ee79..5e9d569a16a 100644 --- a/eclass/wxwidgets.eclass +++ b/eclass/wxwidgets.eclass @@ -4,14 +4,14 @@ # @ECLASS: wxwidgets.eclass # @MAINTAINER: # wxwidgets@gentoo.org -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 +# @SUPPORTED_EAPIS: 7 # @BLURB: Manages build configuration for wxGTK-using packages. # @DESCRIPTION: # This eclass sets up the proper environment for ebuilds using the wxGTK # libraries. Ebuilds using wxPython do not need to inherit this eclass. # # More specifically, this eclass controls the configuration chosen by the -# /usr/bin/wx-config wrapper. +# ${ESYSROOT}/usr/bin/wx-config wrapper. # # Using the eclass is simple: # @@ -21,6 +21,12 @@ # The configuration chosen is based on the version required and the flags # wxGTK was built with. +case ${EAPI:-0} in + [0-6]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; + 7) ;; + *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; +esac + if [[ -z ${_WXWIDGETS_ECLASS} ]]; then _WXWIDGETS_ECLASS=1 @@ -39,44 +45,6 @@ readonly WX_GTK_VER inherit flag-o-matic -case ${EAPI:-0} in - 0|1|2|3|4|5) - inherit eutils multilib - - # This was used to set up a sane default for ebuilds so they could - # avoid calling need-wxwidgets if they didn't need a particular build. - # This was a bad idea for a couple different reasons, and because - # get_libdir() is now illegal in global scope in EAPI 6 we can't do it - # anymore. All ebuilds must now use setup-wxwidgets and this code is - # only here for backwards compatability. - if [[ -z ${WX_CONFIG} ]]; then - if [[ -n ${WX_GTK_VER} ]]; then - for _wxtoolkit in mac gtk2 base; do - # newer versions don't have a seperate debug config - for _wxdebug in xxx release- debug-; do - _wxconf="${_wxtoolkit}-unicode-${_wxdebug/xxx/}${WX_GTK_VER}" - - [[ -f ${EPREFIX}/usr/$(get_libdir)/wx/config/${_wxconf} ]] \ - || continue - - WX_CONFIG="${EPREFIX}/usr/$(get_libdir)/wx/config/${_wxconf}" - WX_ECLASS_CONFIG="${WX_CONFIG}" - break - done - [[ -n ${WX_CONFIG} ]] && break - done - [[ -n ${WX_CONFIG} ]] && export WX_CONFIG WX_ECLASS_CONFIG - fi - fi - unset _wxtoolkit - unset _wxdebug - unset _wxconf - ;; - 6) inherit multilib ;; # compatibility only, not needed by eclass - 7) ;; - *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported" ;; -esac - # @FUNCTION: setup-wxwidgets # @DESCRIPTION: # Call this in your ebuild to set up the environment for wxGTK in src_configure. @@ -104,18 +72,18 @@ setup-wxwidgets() { fi # toolkit overrides - if has_version "x11-libs/wxGTK:${WX_GTK_VER}[aqua]"; then + if has_version -d "x11-libs/wxGTK:${WX_GTK_VER}[aqua]"; then wxtoolkit="mac" - elif ! has_version "x11-libs/wxGTK:${WX_GTK_VER}[X]"; then + elif ! has_version -d "x11-libs/wxGTK:${WX_GTK_VER}[X]"; then wxtoolkit="base" fi wxconf="${wxtoolkit}-unicode-${WX_GTK_VER}" for w in "${CHOST:-${CBUILD}}-${wxconf}" "${wxconf}"; do - [[ -f ${ESYSROOT:-${EPREFIX}}/usr/$(get_libdir)/wx/config/${w} ]] && wxconf=${w} && break + [[ -f ${ESYSROOT}/usr/$(get_libdir)/wx/config/${w} ]] && wxconf=${w} && break done || die "Failed to find configuration ${wxconf}" - export WX_CONFIG="${ESYSROOT:-${EPREFIX}}/usr/$(get_libdir)/wx/config/${wxconf}" + export WX_CONFIG="${ESYSROOT}/usr/$(get_libdir)/wx/config/${wxconf}" export WX_ECLASS_CONFIG="${WX_CONFIG}" einfo