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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CBC141581FB for ; Tue, 27 Aug 2024 15:24:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4BF72E2B88; Tue, 27 Aug 2024 15:16:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 13AF2E2B85 for ; Tue, 27 Aug 2024 15:16:47 +0000 (UTC) From: David Seifert To: gentoo-dev@lists.gentoo.org Cc: David Seifert Subject: [gentoo-dev] [PATCH 33/50] ruby-ng.eclass: drop support for EAPI 6 Date: Tue, 27 Aug 2024 17:15:18 +0200 Message-ID: <20240827151553.210835-33-soap@gentoo.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827151553.210835-1-soap@gentoo.org> References: <20240827151553.210835-1-soap@gentoo.org> 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: dd5da8c9-2e0f-4796-8f5b-aa43a47e0e79 X-Archives-Hash: f9a96b08ee40e869e566fa67e421ebb0 Signed-off-by: David Seifert --- eclass/ruby-ng.eclass | 75 +++++++++---------------------------------- 1 file changed, 16 insertions(+), 59 deletions(-) diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index d80ae96dd40b..03d3e72769b0 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: ruby-ng.eclass @@ -8,7 +8,7 @@ # Author: Diego E. Pettenò # Author: Alex Legler # Author: Hans de Graaff -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: An eclass for installing Ruby packages with proper support for multiple Ruby slots. # @DESCRIPTION: # The Ruby eclass is designed to allow an easier installation of Ruby packages @@ -67,14 +67,13 @@ # passed to "grep -E" to remove reporting of these shared objects. case ${EAPI} in - 6|7|8) ;; + 7|8) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac if [[ -z ${_RUBY_NG_ECLASS} ]]; then _RUBY_NG_ECLASS=1 -[[ ${EAPI} == 6 ]] && inherit eqawarn toolchain-funcs inherit multilib ruby-utils # S is no longer automatically assigned when it doesn't exist. @@ -218,16 +217,7 @@ ruby_add_rdepend() { case $# in 1) ;; 2) - case ${EAPI} in - 6) - [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_rdepend for $CATEGORY/$PF" - ruby_add_rdepend "$(_ruby_wrap_conditions "$1" "$2")" - return - ;; - *) - die "Use the usual depend syntax with a single argument in ruby_add_rdepend" - ;; - esac + die "Use the usual depend syntax with a single argument in ruby_add_rdepend" ;; *) die "bad number of arguments to $0" @@ -241,10 +231,7 @@ ruby_add_rdepend() { # Add the dependency as a test-dependency since we're going to # execute the code during test phase. - case ${EAPI} in - 6) DEPEND+=" test? ( ${_RUBY_ATOMS_SAMELIB_RESULT} )" ;; - *) BDEPEND+=" test? ( ${_RUBY_ATOMS_SAMELIB_RESULT} )" ;; - esac + BDEPEND+=" test? ( ${_RUBY_ATOMS_SAMELIB_RESULT} )" if ! has test "$IUSE"; then IUSE+=" test" RESTRICT+=" !test? ( test )" @@ -254,8 +241,8 @@ ruby_add_rdepend() { # @FUNCTION: ruby_add_bdepend # @USAGE: dependencies # @DESCRIPTION: -# Adds the specified dependencies, with use condition(s) to DEPEND (or -# BDEPEND in EAPI7), taking the current set of ruby targets into +# Adds the specified dependencies, with use condition(s) to BDEPEND, +# taking the current set of ruby targets into # account. This makes sure that all ruby dependencies of the package are # installed for the same ruby targets. Use this function for all ruby # dependencies instead of setting DEPEND or BDEPEND yourself. The list @@ -266,16 +253,7 @@ ruby_add_bdepend() { case $# in 1) ;; 2) - case ${EAPI} in - 6) - [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_bdepend for $CATEGORY/$PF" - ruby_add_bdepend "$(_ruby_wrap_conditions "$1" "$2")" - return - ;; - *) - die "Use the usual depend syntax with a single argument in ruby_add_bdepend" - ;; - esac + die "Use the usual depend syntax with a single argument in ruby_add_bdepend" ;; *) die "bad number of arguments to $0" @@ -285,25 +263,16 @@ ruby_add_bdepend() { _ruby_set_globals_invalidate_if_stale _ruby_atoms_samelib "$1" - case ${EAPI} in - 6) DEPEND+=" ${_RUBY_ATOMS_SAMELIB_RESULT}" ;; - *) BDEPEND+=" ${_RUBY_ATOMS_SAMELIB_RESULT}" ;; - esac + BDEPEND+=" ${_RUBY_ATOMS_SAMELIB_RESULT}" } # @FUNCTION: ruby_add_depend # @USAGE: dependencies # @DESCRIPTION: -# Adds the specified dependencies to DEPEND in EAPI7, similar to -# ruby_add_bdepend. +# Adds the specified dependencies to DEPEND, similar to ruby_add_bdepend. ruby_add_depend() { debug-print-function ${FUNCNAME} "${@}" - case ${EAPI} in - 6) die "only available in EAPI 7 and newer" ;; - *) ;; - esac - case $# in 1) ;; *) die "bad number of arguments to $0" ;; @@ -365,7 +334,7 @@ _ruby_get_use_targets() { # confuse this function with ruby_implementation_depend(). # # @EXAMPLE: -# EAPI=7 +# EAPI=8 # RUBY_OPTIONAL=yes # # inherit ruby-ng @@ -417,10 +386,7 @@ if [[ ${RUBY_OPTIONAL} != yes ]]; then DEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}" RDEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}" REQUIRED_USE+=" || ( ${_RUBY_GET_USE_TARGETS} )" - case ${EAPI} in - 6) ;; - *) BDEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}" ;; - esac + BDEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}" fi _ruby_invoke_environment() { @@ -534,18 +500,9 @@ ruby-ng_src_unpack() { } _ruby_apply_patches() { - case ${EAPI} in - 6) - if [[ -n ${RUBY_PATCHES[@]} ]]; then - eqawarn "RUBY_PATCHES is no longer supported, use PATCHES instead" - fi - ;; - *) - if [[ -n ${RUBY_PATCHES[@]} ]]; then - die "RUBY_PATCHES is no longer supported, use PATCHES instead" - fi - ;; - esac + if [[ -n ${RUBY_PATCHES[@]} ]]; then + die "RUBY_PATCHES is no longer supported, use PATCHES instead" + fi # This is a special case: instead of executing just in the special # "all" environment, this will actually copy the effects on _all_ @@ -695,7 +652,7 @@ doruby() { insinto "${sitelibdir#${EPREFIX}}" insopts -m 0644 doins "$@" - ) || die "failed to install $@" + ) } # @FUNCTION: ruby_get_libruby -- 2.46.0