public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Various changes to eclasses
@ 2022-09-04 19:35 Arthur Zamarin
  2022-09-04 19:35 ` [gentoo-dev] [PATCH 1/4] kodi-addon.eclass: drop support for EAPI<7 Arthur Zamarin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Arthur Zamarin @ 2022-09-04 19:35 UTC (permalink / raw
  To: gentoo-dev; +Cc: Conrad Kostecki, candrews

This patchset is part of a branch I opened where I cleaned some simple
warning of pkgcheck for UnquotedVariable. As part of this branch, I was
instructed kindly to not post the simple changes I did (as they will
spam) but do include the serious changes across the eclasses.

The full changes can be found at [1], and all changes will be merged
together to minimize eclass cache invalidation.

[1] https://github.com/gentoo/gentoo/pull/27123




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH 1/4] kodi-addon.eclass: drop support for EAPI<7
  2022-09-04 19:35 [gentoo-dev] Various changes to eclasses Arthur Zamarin
@ 2022-09-04 19:35 ` Arthur Zamarin
  2022-09-04 19:35 ` [gentoo-dev] [PATCH 2/4] myspell-r2.eclass: " Arthur Zamarin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Arthur Zamarin @ 2022-09-04 19:35 UTC (permalink / raw
  To: gentoo-dev; +Cc: Conrad Kostecki, candrews, Arthur Zamarin

- No consumers for EAPI<7 remain in ::gentoo tree
- For those EAPIs, it tries to inherit cmake-utils eclass, which
  doesn't exist, so it would just fail!
- Simplify the eclass logic
- Fix UnquotedVariable for EPREFIX

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
---
 eclass/kodi-addon.eclass | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/eclass/kodi-addon.eclass b/eclass/kodi-addon.eclass
index 8cbbad9224..6e7fa26f3c 100644
--- a/eclass/kodi-addon.eclass
+++ b/eclass/kodi-addon.eclass
@@ -1,25 +1,22 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: kodi-addon.eclass
 # @MAINTAINER:
 # candrews@gentoo.org
-# @SUPPORTED_EAPIS: 4 5 6 7
-# @PROVIDES: cmake cmake-utils
+# @SUPPORTED_EAPIS: 7
+# @PROVIDES: cmake
 # @BLURB: Helper for correct building and (importantly) installing Kodi addon packages.
 # @DESCRIPTION:
 # Provides a src_configure function for correct CMake configuration
 
-case "${EAPI:-0}" in
-	4|5|6)
-		inherit cmake-utils multilib
-		;;
-	7)
-		inherit cmake
-		;;
-	*) die "EAPI=${EAPI} is not supported" ;;
+case ${EAPI} in
+	7) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
+inherit cmake
+
 EXPORT_FUNCTIONS src_configure
 
 # @FUNCTION: kodi-addon_src_configure
@@ -28,11 +25,8 @@ EXPORT_FUNCTIONS src_configure
 kodi-addon_src_configure() {
 
 	mycmakeargs+=(
-		-DCMAKE_INSTALL_LIBDIR=${EPREFIX%/}/usr/$(get_libdir)/kodi
+		-DCMAKE_INSTALL_LIBDIR="${EPREFIX}/usr/$(get_libdir)/kodi"
 	)
 
-	case ${EAPI} in
-		4|5|6) cmake-utils_src_configure ;;
-		7) cmake_src_configure ;;
-	esac
+	cmake_src_configure
 }
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH 2/4] myspell-r2.eclass: drop support for EAPI<7
  2022-09-04 19:35 [gentoo-dev] Various changes to eclasses Arthur Zamarin
  2022-09-04 19:35 ` [gentoo-dev] [PATCH 1/4] kodi-addon.eclass: drop support for EAPI<7 Arthur Zamarin
@ 2022-09-04 19:35 ` Arthur Zamarin
  2022-09-04 19:35 ` [gentoo-dev] [PATCH 3/4] myspell-r2.eclass: improve code examples format Arthur Zamarin
  2022-09-04 19:35 ` [gentoo-dev] [PATCH 4/4] rebar.eclass: add support for EAPI=8 Arthur Zamarin
  3 siblings, 0 replies; 5+ messages in thread
From: Arthur Zamarin @ 2022-09-04 19:35 UTC (permalink / raw
  To: gentoo-dev; +Cc: Conrad Kostecki, candrews, Arthur Zamarin

- No consumers for EAPI<7 remain in ::gentoo tree
- Simplifies dependency logic
- fix UnquotedVariable of DISTDIR

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
---
 eclass/myspell-r2.eclass | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/eclass/myspell-r2.eclass b/eclass/myspell-r2.eclass
index 6dbd1e19e1..cce75ae4d6 100644
--- a/eclass/myspell-r2.eclass
+++ b/eclass/myspell-r2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: myspell-r2.eclass
@@ -6,7 +6,7 @@
 # Conrad Kostecki <conikost@gentoo.org>
 # @AUTHOR:
 # Tomáš Chvátal <scarabeus@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: An eclass to streamline the construction of ebuilds for new Myspell dictionaries.
 # @DESCRIPTION:
 # The myspell-r2 eclass is designed to streamline the construction of ebuilds for
@@ -30,8 +30,8 @@
 # Array variable containing list of all thesarus files.
 # MYSPELL_THES=( "file.dat" "dir/file2.idx" )
 
-case ${EAPI:-0} in
-	[5-8])
+case ${EAPI} in
+	7|8)
 		;;
 	*)
 		die "${ECLASS}: EAPI ${EAPI:-0} not supported"
@@ -43,12 +43,7 @@ EXPORT_FUNCTIONS src_unpack src_install
 # Basically no extra deps needed.
 # Unzip is required for .oxt libreoffice extensions
 # which are just fancy zip files.
-if [[ ${EAPI:-0} != [56] ]]; then
-	BDEPEND="app-arch/unzip"
-else
-	DEPEND="app-arch/unzip"
-	RDEPEND=""
-fi
+BDEPEND="app-arch/unzip"
 
 # by default this stuff does not have any folder in the pack
 S="${WORKDIR}"
@@ -65,7 +60,7 @@ myspell-r2_src_unpack() {
 		case ${f} in
 			*.oxt)
 				echo ">>> Unpacking "${DISTDIR}/${f}" to ${PWD}"
-				unzip -qoj ${DISTDIR}/${f}
+				unzip -qoj "${DISTDIR}"/${f}
 				assert "failed unpacking ${DISTDIR}/${f}"
 				;;
 			*) unpack ${f} ;;
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH 3/4] myspell-r2.eclass: improve code examples format
  2022-09-04 19:35 [gentoo-dev] Various changes to eclasses Arthur Zamarin
  2022-09-04 19:35 ` [gentoo-dev] [PATCH 1/4] kodi-addon.eclass: drop support for EAPI<7 Arthur Zamarin
  2022-09-04 19:35 ` [gentoo-dev] [PATCH 2/4] myspell-r2.eclass: " Arthur Zamarin
@ 2022-09-04 19:35 ` Arthur Zamarin
  2022-09-04 19:35 ` [gentoo-dev] [PATCH 4/4] rebar.eclass: add support for EAPI=8 Arthur Zamarin
  3 siblings, 0 replies; 5+ messages in thread
From: Arthur Zamarin @ 2022-09-04 19:35 UTC (permalink / raw
  To: gentoo-dev; +Cc: Conrad Kostecki, candrews, Arthur Zamarin

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
---
 eclass/myspell-r2.eclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eclass/myspell-r2.eclass b/eclass/myspell-r2.eclass
index cce75ae4d6..965327ac1b 100644
--- a/eclass/myspell-r2.eclass
+++ b/eclass/myspell-r2.eclass
@@ -16,19 +16,25 @@
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Array variable containing list of all dictionary files.
+# @CODE
 # MYSPELL_DICT=( "file.dic" "dir/file2.aff" )
+# @CODE
 
 # @ECLASS_VARIABLE: MYSPELL_HYPH
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Array variable containing list of all hyphenation files.
+# @CODE
 # MYSPELL_HYPH=( "file.dic" "dir/file2.dic" )
+# @CODE
 
 # @ECLASS_VARIABLE: MYSPELL_THES
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Array variable containing list of all thesarus files.
+# @CODE
 # MYSPELL_THES=( "file.dat" "dir/file2.idx" )
+# @CODE
 
 case ${EAPI} in
 	7|8)
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-dev] [PATCH 4/4] rebar.eclass: add support for EAPI=8
  2022-09-04 19:35 [gentoo-dev] Various changes to eclasses Arthur Zamarin
                   ` (2 preceding siblings ...)
  2022-09-04 19:35 ` [gentoo-dev] [PATCH 3/4] myspell-r2.eclass: improve code examples format Arthur Zamarin
@ 2022-09-04 19:35 ` Arthur Zamarin
  3 siblings, 0 replies; 5+ messages in thread
From: Arthur Zamarin @ 2022-09-04 19:35 UTC (permalink / raw
  To: gentoo-dev; +Cc: Conrad Kostecki, candrews, Arthur Zamarin

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
---
 eclass/rebar.eclass | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index c982dea5d1..1c7bc20def 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.eclass
@@ -6,7 +6,7 @@
 # maintainer-needed@gentoo.org
 # @AUTHOR:
 # Amadeusz Żołnowski <aidecoe@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 6 7 8
 # @BLURB: Build Erlang/OTP projects using dev-util/rebar.
 # @DESCRIPTION:
 # An eclass providing functions to build Erlang/OTP projects using
@@ -19,15 +19,9 @@
 # targets. The eclass workarounds some of these problems. It handles
 # installation in a generic way for Erlang/OTP structured projects.
 
-case "${EAPI:-0}" in
-	0|1|2|3|4|5)
-		die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
-		;;
-	6|7)
-		;;
-	*)
-		die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
-		;;
+case ${EAPI} in
+	6|7|8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
 EXPORT_FUNCTIONS src_prepare src_compile src_test src_install
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-04 19:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-04 19:35 [gentoo-dev] Various changes to eclasses Arthur Zamarin
2022-09-04 19:35 ` [gentoo-dev] [PATCH 1/4] kodi-addon.eclass: drop support for EAPI<7 Arthur Zamarin
2022-09-04 19:35 ` [gentoo-dev] [PATCH 2/4] myspell-r2.eclass: " Arthur Zamarin
2022-09-04 19:35 ` [gentoo-dev] [PATCH 3/4] myspell-r2.eclass: improve code examples format Arthur Zamarin
2022-09-04 19:35 ` [gentoo-dev] [PATCH 4/4] rebar.eclass: add support for EAPI=8 Arthur Zamarin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox