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 58B7F1581FB for ; Tue, 27 Aug 2024 15:24:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A046EE2B7C; Tue, 27 Aug 2024 15:16:46 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 5FD84E2B79 for ; Tue, 27 Aug 2024 15:16:46 +0000 (UTC) From: David Seifert To: gentoo-dev@lists.gentoo.org Cc: David Seifert Subject: [gentoo-dev] [PATCH 32/50] ruby-fakegem.eclass: drop support for EAPI 5 and 6 Date: Tue, 27 Aug 2024 17:15:17 +0200 Message-ID: <20240827151553.210835-32-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: 8b8326b1-6a43-4f6d-beba-ece7e818a8f1 X-Archives-Hash: c3fd91aefce4a8b8786bc78fb1267383 Signed-off-by: David Seifert --- eclass/ruby-fakegem.eclass | 50 ++++++++++++-------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index 40ff76ce900e..0a99406954b0 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.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-fakegem.eclass @@ -8,7 +8,7 @@ # Author: Diego E. Pettenò # Author: Alex Legler # Author: Hans de Graaff -# @SUPPORTED_EAPIS: 5 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @PROVIDES: ruby-ng # @BLURB: An eclass for installing Ruby packages to behave like RubyGems. # @DESCRIPTION: @@ -17,6 +17,11 @@ inherit ruby-ng +case ${EAPI} in + 7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + # @ECLASS_VARIABLE: RUBY_FAKEGEM_NAME # @PRE_INHERIT # @DESCRIPTION: @@ -61,14 +66,7 @@ RUBY_FAKEGEM_TASK_TEST="${RUBY_FAKEGEM_TASK_TEST-test}" # - rdoc (calls `rdoc-2`, adds dev-ruby/rdoc to the dependencies); # - yard (calls `yard`, adds dev-ruby/yard to the dependencies); # - none -case ${EAPI} in - 5|6) - RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rake}" - ;; - *) - RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rdoc}" - ;; -esac +: "${RUBY_FAKEGEM_RECIPE_DOC=rdoc}" # @ECLASS_VARIABLE: RUBY_FAKEGEM_DOCDIR # @DEFAULT_UNSET @@ -138,11 +136,6 @@ RUBY_FAKEGEM_BINDIR="${RUBY_FAKEGEM_BINDIR-bin}" # legacy way to install extensions for a long time. RUBY_FAKEGEM_EXTENSION_LIBDIR="${RUBY_FAKEGEM_EXTENSION_LIBDIR-lib}" -case ${EAPI} in - 5|6|7|8) ;; - *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; -esac - RUBY_FAKEGEM_SUFFIX="${RUBY_FAKEGEM_SUFFIX:-}" @@ -211,13 +204,7 @@ SRC_URI="https://rubygems.org/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}$ ruby_add_bdepend "virtual/rubygems" ruby_add_rdepend virtual/rubygems -case ${EAPI} in - 5|6) - ;; - *) - ruby_add_depend virtual/rubygems - ;; -esac +ruby_add_depend virtual/rubygems # Many (but not all) extensions use pkgconfig in src_configure. if [[ ${#RUBY_FAKEGEM_EXTENSIONS[@]} -gt 0 ]]; then @@ -254,7 +241,7 @@ ruby_fakegem_doins() { ( insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION} doins "$@" - ) || die "failed $0 $@" + ) } # @FUNCTION: ruby_fakegem_newins @@ -274,7 +261,7 @@ ruby_fakegem_newins() { insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${newdirname} newins "$1" ${newbasename} - ) || die "failed $0 $@" + ) } # @FUNCTION: ruby_fakegem_install_gemspec @@ -299,7 +286,7 @@ ruby_fakegem_install_gemspec() { ruby_fakegem_genspec ${gemspec} fi fi - ) || die "Unable to generate gemspec file." + ) insinto $(ruby_fakegem_gemsdir)/specifications newins ${gemspec} ${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}.gemspec || die "Unable to install gemspec file." @@ -345,14 +332,9 @@ ruby_fakegem_metadata_gemspec() { ruby_fakegem_genspec() { debug-print-function ${FUNCNAME} "${@}" - case ${EAPI} in - 5|6) ;; - *) - eqawarn "Generating generic fallback gemspec *without* dependencies" - eqawarn "This will only work when there are no runtime dependencies" - eqawarn "Set RUBY_FAKEGEM_GEMSPEC to generate a proper specifications file" - ;; - esac + eqawarn "Generating generic fallback gemspec *without* dependencies" + eqawarn "This will only work when there are no runtime dependencies" + eqawarn "Set RUBY_FAKEGEM_GEMSPEC to generate a proper specifications file" local required_paths="'lib'" for path in ${RUBY_FAKEGEM_REQUIRE_PATHS}; do @@ -430,7 +412,7 @@ EOF exeinto ${binpath:-/usr/bin} newexe "${T}"/gembin-wrapper-${gembinary} $(basename $newbinary) - ) || die "Unable to create fakegem wrapper" + ) } # @FUNCTION: each_fakegem_configure -- 2.46.0