[gentoo-dev] [PATCH 01/14] apache-module.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/apache-module.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/apache-module.eclass b/eclass/apache-module.eclass
index 2594445c8b4f..60631171ed91 100644
--- a/eclass/apache-module.eclass
+++ b/eclass/apache-module.eclass
@@ -50,8 +50,6 @@ case ${EAPI} in
*) die "EAPI=${EAPI:-0} is not supported" ;;
 esac
 
-EXPORT_FUNCTIONS src_compile src_install pkg_postinst
-
 if [[ -z ${_APACHE_MODULE_ECLASS} ]]; then
 _APACHE_MODULE_ECLASS=1
 
@@ -247,3 +245,5 @@ apache-module_pkg_postinst() {
 }
 
 fi
+
+EXPORT_FUNCTIONS src_compile src_install pkg_postinst
-- 
2.33.0




[gentoo-dev] [PATCH 11/14] php-ext-pecl-r3.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/php-ext-pecl-r3.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/php-ext-pecl-r3.eclass b/eclass/php-ext-pecl-r3.eclass
index f3977b225aa4..ccb4bcfc83da 100644
--- a/eclass/php-ext-pecl-r3.eclass
+++ b/eclass/php-ext-pecl-r3.eclass
@@ -16,8 +16,6 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-EXPORT_FUNCTIONS src_install src_test
-
 if [[ -z ${_PHP_EXT_PECL_R3_ECLASS} ]] ; then
 _PHP_EXT_PECL_R3_ECLASS=1
 
@@ -96,3 +94,5 @@ php-ext-pecl-r3_src_test() {
 }
 
 fi
+
+EXPORT_FUNCTIONS src_install src_test
-- 
2.33.0




[gentoo-dev] [PATCH 12/14] php-ext-source-r3.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/php-ext-source-r3.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass
index a782081b72a7..556b51ecb0cf 100644
--- a/eclass/php-ext-source-r3.eclass
+++ b/eclass/php-ext-source-r3.eclass
@@ -12,8 +12,6 @@
 
 inherit autotools
 
-EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
-
 case ${EAPI:-0} in
6) inherit eapi7-ver ;;
7) ;;
@@ -461,3 +459,5 @@ php-ext-source-r3_addtoinifiles() {
done
done
 }
+
+EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test
-- 
2.33.0




[gentoo-dev] [PATCH 13/14] rpm.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/rpm.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass
index 77db8e808796..c97e23144c2b 100644
--- a/eclass/rpm.eclass
+++ b/eclass/rpm.eclass
@@ -14,8 +14,6 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-EXPORT_FUNCTIONS src_unpack
-
 if [[ -z ${_RPM_ECLASS} ]] ; then
 _RPM_ECLASS=1
 
@@ -145,3 +143,5 @@ rpm_spec_epatch() {
 }
 
 fi
+
+EXPORT_FUNCTIONS src_unpack
-- 
2.33.0




[gentoo-dev] [PATCH 24/44] kernel-install.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/kernel-install.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index b80a8d6ea93b..609afa754deb 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Michał Górny 
 # @SUPPORTED_EAPIS: 7
+# @PROVIDES: dist-kernel-utils
 # @BLURB: Installation mechanics for Distribution Kernels
 # @DESCRIPTION:
 # This eclass provides the logic needed to test and install different
-- 
2.33.0




[gentoo-dev] [PATCH 23/44] kernel-build.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/kernel-build.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 28fed910fff8..279649301087 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Michał Górny 
 # @SUPPORTED_EAPIS: 7
+# @PROVIDES: kernel-install
 # @BLURB: Build mechanics for Distribution Kernels
 # @DESCRIPTION:
 # This eclass provides the logic to build a Distribution Kernel from
-- 
2.33.0




[gentoo-dev] [PATCH 22/44] java-pkg-opt-2.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/java-pkg-opt-2.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/java-pkg-opt-2.eclass b/eclass/java-pkg-opt-2.eclass
index 7f1f5a2f8394..85783bae6e2d 100644
--- a/eclass/java-pkg-opt-2.eclass
+++ b/eclass/java-pkg-opt-2.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Thomas Matthijs 
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: java-utils-2
 # @BLURB: Eclass for package with optional Java support
 # @DESCRIPTION:
 # Inherit this eclass instead of java-pkg-2 if you only need optional Java
-- 
2.33.0




[gentoo-dev] [PATCH 21/44] java-pkg-2.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/java-pkg-2.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass
index 4d5cb7665728..96d33f9d1962 100644
--- a/eclass/java-pkg-2.eclass
+++ b/eclass/java-pkg-2.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Thomas Matthijs 
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: java-utils-2
 # @BLURB: Eclass for Java Packages
 # @DESCRIPTION:
 # This eclass should be inherited for pure Java packages, or by packages which
-- 
2.33.0




[gentoo-dev] [PATCH 32/44] multilib-minimal.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/multilib-minimal.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/multilib-minimal.eclass b/eclass/multilib-minimal.eclass
index 6c5c754381b5..9a1efe2cc466 100644
--- a/eclass/multilib-minimal.eclass
+++ b/eclass/multilib-minimal.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # Michał Górny 
 # @SUPPORTED_EAPIS: 5 6 7 8
+# @PROVIDES: multilib-build
 # @BLURB: wrapper for multilib builds providing convenient multilib_src_* 
functions
 # @DESCRIPTION:
 #
-- 
2.33.0




[gentoo-dev] [PATCH 33/44] perl-module.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/perl-module.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 3c1b4c3c5acc..cff6f203ab8f 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -8,6 +8,7 @@
 # Seemant Kulleen 
 # Andreas K. Hüttel 
 # @SUPPORTED_EAPIS: 5 6 7 8
+# @PROVIDES: perl-functions
 # @BLURB: eclass for installing Perl module distributions
 # @DESCRIPTION:
 # The perl-module eclass is designed to allow easier installation of Perl
-- 
2.33.0




[gentoo-dev] [PATCH 31/44] multilib-build.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/multilib-build.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
index e3e8730904ab..17cd7da0d189 100644
--- a/eclass/multilib-build.eclass
+++ b/eclass/multilib-build.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Author: Michał Górny 
 # @SUPPORTED_EAPIS: 5 6 7 8
+# @PROVIDES: multibuild
 # @BLURB: flags and utility functions for building multilib packages
 # @DESCRIPTION:
 # The multilib-build.eclass exports USE flags and utility functions
-- 
2.33.0




[gentoo-dev] [PATCH 04/44] cmake.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/cmake.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 4bd09459ea62..c19ea90264d1 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -10,6 +10,7 @@
 # (undisclosed contributors)
 # Original author: Zephyrus (zephy...@mirach.it)
 # @SUPPORTED_EAPIS: 7
+# @PROVIDES: ninja-utils
 # @BLURB: common ebuild functions for cmake-based packages
 # @DESCRIPTION:
 # The cmake eclass makes creating ebuilds for cmake-based packages much easier.
-- 
2.33.0




[gentoo-dev] [PATCH 06/44] cmake-utils.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/cmake-utils.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
index 8a4405bef86c..28753faf664b 100644
--- a/eclass/cmake-utils.eclass
+++ b/eclass/cmake-utils.eclass
@@ -10,6 +10,7 @@
 # (undisclosed contributors)
 # Original author: Zephyrus (zephy...@mirach.it)
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: ninja-utils
 # @BLURB: common ebuild functions for cmake-based packages
 # @DEPRECATED: cmake.eclass
 # @DESCRIPTION:
-- 
2.33.0




[gentoo-dev] [PATCH 05/44] cmake-multilib.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/cmake-multilib.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass
index 6b38d2606551..119ed1daff50 100644
--- a/eclass/cmake-multilib.eclass
+++ b/eclass/cmake-multilib.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Author: Michał Górny 
 # @SUPPORTED_EAPIS: 7
+# @PROVIDES: cmake cmake-utils multilib-minimal
 # @BLURB: cmake wrapper for multilib builds
 # @DESCRIPTION:
 # The cmake-multilib.eclass provides a glue between cmake.eclass(5)
-- 
2.33.0




[gentoo-dev] [PATCH 26/44] linux-mod.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/linux-mod.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index eda5e9aee013..4b61d2a8a62b 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -8,6 +8,7 @@
 # John Mylchreest ,
 # Stefan Schweizer 
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: linux-info
 # @BLURB: It provides the functionality required to install external modules 
against a kernel source tree.
 # @DESCRIPTION:
 # This eclass is used to interface with linux-info.eclass in such a way
-- 
2.33.0




[gentoo-dev] [PATCH 27/44] lua.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/lua.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/lua.eclass b/eclass/lua.eclass
index f1967ae6e015..5c2a7b290061 100644
--- a/eclass/lua.eclass
+++ b/eclass/lua.eclass
@@ -9,6 +9,7 @@
 # Marek Szuba 
 # Based on python-r1.eclass by Michał Górny  et al.
 # @SUPPORTED_EAPIS: 7 8
+# @PROVIDES: lua-utils
 # @BLURB: A common eclass for Lua packages
 # @DESCRIPTION:
 # A common eclass providing helper functions to build and install
-- 
2.33.0




[gentoo-dev] [PATCH 25/44] kodi-addon.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/kodi-addon.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/kodi-addon.eclass b/eclass/kodi-addon.eclass
index fc2a7a8d8aa7..64f8426e9b4b 100644
--- a/eclass/kodi-addon.eclass
+++ b/eclass/kodi-addon.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # candr...@gentoo.org
 # @SUPPORTED_EAPIS: 4 5 6 7
+# @PROVIDES: cmake cmake-utils
 # @BLURB: Helper for correct building and (importantly) installing Kodi addon 
packages.
 # @DESCRIPTION:
 # Provides a src_configure function for correct CMake configuration
-- 
2.33.0




[gentoo-dev] [PATCH 09/14] linux-mod.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/linux-mod.eclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index eda5e9aee013..4e56b609d025 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -153,8 +153,6 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile 
pkg_postrm
-
 if [[ -z ${_LINUX_MOD_ECLASS} ]] ; then
 _LINUX_MOD_ECLASS=1
 
@@ -796,3 +794,6 @@ linux-mod_pkg_postrm() {
 }
 
 fi
+
+EXPORT_FUNCTIONS pkg_setup src_compile src_install \
+   pkg_preinst pkg_postinst pkg_postrm
-- 
2.33.0




[gentoo-dev] [PATCH 08/14] kernel-2.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/kernel-2.eclass | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index c2f1e93dca68..ef70e250c179 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -199,12 +199,11 @@
 # that of course does not mean we're not willing to help.
 
 inherit estack toolchain-funcs
-[[ ${EAPI:-0} == 6 ]] && inherit eapi7-ver
-case ${EAPI:-0} in
-   6|7|8)
-   EXPORT_FUNCTIONS src_{unpack,prepare,compile,install,test} \
-   pkg_{setup,preinst,postinst,postrm} ;;
-   *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
+[[ ${EAPI} == 6 ]] && inherit eapi7-ver
+
+case ${EAPI} in
+   6|7|8) ;;
+   *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
 # Added by Daniel Ostrow 
@@ -1566,3 +1565,6 @@ kernel-2_pkg_postrm() {
ewarn "For more detailed kernel removal instructions, please see: "
ewarn "https://wiki.gentoo.org/wiki/Kernel/Removal;
 }
+
+EXPORT_FUNCTIONS src_{unpack,prepare,compile,install,test} \
+   pkg_{setup,preinst,postinst,postrm}
-- 
2.33.0




[gentoo-dev] [PATCH 10/14] mercurial.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/mercurial.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass
index b62ecdf102a5..5d0ebf0d9e4f 100644
--- a/eclass/mercurial.eclass
+++ b/eclass/mercurial.eclass
@@ -20,8 +20,6 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-EXPORT_FUNCTIONS src_unpack
-
 if [[ -z ${_MERCURIAL_ECLASS} ]] ; then
 _MERCURIAL_ECLASS=1
 
@@ -219,3 +217,5 @@ function mercurial_src_unpack {
 }
 
 fi
+
+EXPORT_FUNCTIONS src_unpack
-- 
2.33.0




[gentoo-dev] [PATCH 06/14] java-pkg-simple.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/java-pkg-simple.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass
index 184934eb3bd3..fc006ff2fcc4 100644
--- a/eclass/java-pkg-simple.eclass
+++ b/eclass/java-pkg-simple.eclass
@@ -21,8 +21,6 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-EXPORT_FUNCTIONS src_compile src_install src_test
-
 if [[ -z ${_JAVA_PKG_SIMPLE_ECLASS} ]] ; then
 _JAVA_PKG_SIMPLE_ECLASS=1
 
@@ -570,3 +568,5 @@ java-pkg-simple_src_test() {
 }
 
 fi
+
+EXPORT_FUNCTIONS src_compile src_install src_test
-- 
2.33.0




[gentoo-dev] [PATCH 05/14] java-pkg-opt-2.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/java-pkg-opt-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/java-pkg-opt-2.eclass b/eclass/java-pkg-opt-2.eclass
index 7f1f5a2f8394..f86609ad4710 100644
--- a/eclass/java-pkg-opt-2.eclass
+++ b/eclass/java-pkg-opt-2.eclass
@@ -17,8 +17,6 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst
-
 if [[ -z ${_JAVA_PKG_OPT_2_ECLASS} ]] ; then
 _JAVA_PKG_OPT_2_ECLASS=1
 
@@ -66,3 +64,5 @@ java-pkg-opt-2_pkg_preinst() {
 }
 
 fi
+
+EXPORT_FUNCTIONS pkg_setup src_prepare pkg_preinst
-- 
2.33.0




[gentoo-dev] [PATCH 07/14] java-virtuals.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/java-virtuals-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/java-virtuals-2.eclass b/eclass/java-virtuals-2.eclass
index 27ed9157da5b..dedbf2f26195 100644
--- a/eclass/java-virtuals-2.eclass
+++ b/eclass/java-virtuals-2.eclass
@@ -17,8 +17,6 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-EXPORT_FUNCTIONS src_install
-
 if [[ -z ${_JAVA_VIRTUALS_2_ECLASS} ]] ; then
 _JAVA_VIRTUALS_2_ECLASS=1
 
@@ -63,3 +61,5 @@ java-virtuals-2_do_write() {
 }
 
 fi
+
+EXPORT_FUNCTIONS src_install
-- 
2.33.0




[gentoo-dev] [PATCH 07/44] distutils-r1.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/distutils-r1.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 3207ed6f4b8e..75e8179c810e 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -8,6 +8,7 @@
 # Author: Michał Górny 
 # Based on the work of: Krzysztof Pawlik 
 # @SUPPORTED_EAPIS: 6 7 8
+# @PROVIDES: python-r1 python-single-r1
 # @BLURB: A simple eclass to build Python packages using distutils.
 # @DESCRIPTION:
 # A simple eclass providing functions to build Python packages using
-- 
2.33.0




[gentoo-dev] [PATCH 08/44] ecm.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/ecm.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 5f10a7caf78d..c67a9784e716 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # k...@gentoo.org
 # @SUPPORTED_EAPIS: 7
+# @PROVIDES: cmake
 # @BLURB: Support eclass for packages that use KDE Frameworks with ECM.
 # @DESCRIPTION:
 # This eclass is intended to streamline the creation of ebuilds for packages
-- 
2.33.0




[gentoo-dev] [PATCH 29/44] meson.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/meson.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index eaff26709a75..c5e3b91f9a15 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -6,6 +6,7 @@
 # William Hubbs 
 # Mike Gilbert 
 # @SUPPORTED_EAPIS: 6 7 8
+# @PROVIDES: ninja-utils
 # @BLURB: common ebuild functions for meson-based packages
 # @DESCRIPTION:
 # This eclass contains the default phase functions for packages which
-- 
2.33.0




[gentoo-dev] [PATCH 30/44] meson-multilib.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/meson-multilib.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/meson-multilib.eclass b/eclass/meson-multilib.eclass
index 1ed95f99fa18..49c64418727e 100644
--- a/eclass/meson-multilib.eclass
+++ b/eclass/meson-multilib.eclass
@@ -8,6 +8,7 @@
 # Michał Górny 
 # Matt Turner 
 # @SUPPORTED_EAPIS: 7 8
+# @PROVIDES: meson multilib-minimal
 # @BLURB: meson wrapper for multilib builds
 # @DESCRIPTION:
 # The meson-multilib.eclass provides a glue between meson.eclass(5)
-- 
2.33.0




[gentoo-dev] [PATCH 28/44] lua-single.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/lua-single.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass
index 26967000748c..2f4ebaa14198 100644
--- a/eclass/lua-single.eclass
+++ b/eclass/lua-single.eclass
@@ -9,6 +9,7 @@
 # Marek Szuba 
 # Based on python-single-r1.eclass by Michał Górny  et al.
 # @SUPPORTED_EAPIS: 7 8
+# @PROVIDES: lua-utils
 # @BLURB: An eclass for Lua packages not installed for multiple 
implementations.
 # @DESCRIPTION:
 # An extension of lua.eclass suite for packages which don't support being
-- 
2.33.0




[gentoo-dev] [PATCH 43/44] xdg.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/xdg.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass
index 08dc8432a5e0..a3e75103a046 100644
--- a/eclass/xdg.eclass
+++ b/eclass/xdg.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Original author: Gilles Dartiguelongue 
 # @SUPPORTED_EAPIS: 5 6 7 8
+# @PROVIDES: xdg-utils
 # @BLURB: Provides phases for XDG compliant packages.
 # @DESCRIPTION:
 # Utility eclass to update the desktop, icon and shared mime info as laid
-- 
2.33.0




[gentoo-dev] [PATCH 44/44] xorg-3.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/xorg-3.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass
index 7ed96c60848a..cfa679b766ce 100644
--- a/eclass/xorg-3.eclass
+++ b/eclass/xorg-3.eclass
@@ -9,6 +9,7 @@
 # Author: Donnie Berkholz 
 # Author: Matt Turner 
 # @SUPPORTED_EAPIS: 7
+# @PROVIDES: multilib-minimal
 # @BLURB: Reduces code duplication in the modularized X11 ebuilds.
 # @DESCRIPTION:
 # This eclass makes trivial X ebuilds possible for apps, drivers,
-- 
2.33.0




[gentoo-dev] [PATCH 17/44] gstreamer-meson.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/gstreamer-meson.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/gstreamer-meson.eclass b/eclass/gstreamer-meson.eclass
index 2a45df008c29..152a52b984f1 100644
--- a/eclass/gstreamer-meson.eclass
+++ b/eclass/gstreamer-meson.eclass
@@ -14,6 +14,7 @@
 # Steven Newbury
 # @SUPPORTED_EAPIS: 7
 # @BLURB: Helps building core & split gstreamer plugins
+# @PROVIDES: meson multilib-minimal
 # @DESCRIPTION:
 # Eclass to make external gst-plugins emergable on a per-plugin basis
 # and to solve the problem with gst-plugins generating far too much
-- 
2.33.0




[gentoo-dev] [PATCH 19/44] java-ant-2.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/java-ant-2.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass
index 5592186936c0..501d17ef229e 100644
--- a/eclass/java-ant-2.eclass
+++ b/eclass/java-ant-2.eclass
@@ -8,6 +8,7 @@
 # kiorky 
 # Petteri Räty 
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: java-utils-2
 # @BLURB: eclass for ant based Java packages
 # @DESCRIPTION:
 # Eclass for Ant-based Java packages. Provides support for both automatic and
-- 
2.33.0




[gentoo-dev] [PATCH 18/44] haskell-cabal.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/haskell-cabal.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 9587c33a12b6..ab1b865fda93 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -8,6 +8,7 @@
 # Original author: Andres Loeh 
 # Original author: Duncan Coutts 
 # @SUPPORTED_EAPIS: 6 7 8
+# @PROVIDES: ghc-package
 # @BLURB: for packages that make use of the Haskell Common Architecture for 
Building Applications and Libraries (cabal)
 # @DESCRIPTION:
 # Basic instructions:
-- 
2.33.0




[gentoo-dev] [PATCH 20/44] java-osgi.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/java-osgi.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/java-osgi.eclass b/eclass/java-osgi.eclass
index abbf73cdd3fa..74c7c1a07f5c 100644
--- a/eclass/java-osgi.eclass
+++ b/eclass/java-osgi.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Java maintainers 
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: java-utils-2
 # @BLURB: Java OSGi eclass
 # @DESCRIPTION:
 # This eclass provides functionality which is used by packages that need to be
-- 
2.33.0




[gentoo-dev] [PATCH 42/44] ruby-single.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/ruby-single.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/ruby-single.eclass b/eclass/ruby-single.eclass
index e19597b99a01..ed230f4a84e5 100644
--- a/eclass/ruby-single.eclass
+++ b/eclass/ruby-single.eclass
@@ -8,6 +8,7 @@
 # Author: Hans de Graaff 
 # Based on python-single-r1 by: Michał Górny 
 # @SUPPORTED_EAPIS: 4 5 6 7 8
+# @PROVIDES: ruby-utils
 # @BLURB: An eclass for Ruby packages not installed for multiple 
implementations.
 # @DESCRIPTION:
 # An eclass for packages which don't support being installed for
-- 
2.33.0




[gentoo-dev] [PATCH 41/44] ruby-ng-gnome2.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/ruby-ng-gnome2.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 3b18faf95aae..cc475b36b731 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Author: Hans de Graaff 
 # @SUPPORTED_EAPIS: 6 7
+# @PROVIDES: ruby-ng
 # @BLURB: An eclass to simplify handling of various ruby-gnome2 parts.
 # @DESCRIPTION:
 # This eclass simplifies installation of the various pieces of
-- 
2.33.0




Re: [gentoo-dev] [PATCH 00/44] @PROVIDES for eclasses

2021-09-02 Thread Marek Szuba

On 2021-09-02 11:46, Michał Górny wrote:


   lua.eclass: Set @PROVIDES
   lua-single.eclass: Set @PROVIDES


ACK on these two.

--
Marecki



OpenPGP_signature
Description: OpenPGP digital signature


Re: [gentoo-dev] [PATCH 02/44] apache-module.eclass: Set @PROVIDES

2021-09-02 Thread Michael Orlitzky
On Thu, 2021-09-02 at 12:46 +0200, Michał Górny wrote:
> Signed-off-by: Michał Górny 
> ---
>  eclass/apache-module.eclass | 1 +
>  1 file changed, 1 insertion(+)
> ...
>  # @SUPPORTED_EAPIS: 5 6 7
> +# @PROVIDES: depend.apache

I'm not sure about this one. The depend.apache eclass is junk and we
should be encouraging people to move away from it (bug 616612):

  * If you want to depend on apache, depend on apache.

  * If you need paths like APACHE_MODULESDIR, the "apxs" tool is now
in PATH so you can get it from $(apxs -q libexecdir)

  * If you need paths like APACHE_MODULES_CONFDIR, the eclass doesn't 
work anyway. You can hard-code those paths yourself (relative to
apxs -q sysconfdir), or if anyone feels up to the task, they could
write a greatly simplified apache-paths.eclass that provides these
paths via functions that are to be called outside of global scope.

If people are using anything in depend.apache, I think a warning is
appropriate. Making a promise that apache-module (which is not junk)
provides depend.apache will moreover make it harder to disentangle them
in the future if anyone decides to fix things.

Disclaimer: I'm not the apache maintainer.





Re: [gentoo-dev] [PATCH 02/44] apache-module.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
On Thu, 2021-09-02 at 08:50 -0400, Michael Orlitzky wrote:
> On Thu, 2021-09-02 at 12:46 +0200, Michał Górny wrote:
> > Signed-off-by: Michał Górny 
> > ---
> >  eclass/apache-module.eclass | 1 +
> >  1 file changed, 1 insertion(+)
> > ...
> >  # @SUPPORTED_EAPIS: 5 6 7
> > +# @PROVIDES: depend.apache
> 
> I'm not sure about this one. The depend.apache eclass is junk and we
> should be encouraging people to move away from it (bug 616612):
> 
>   * If you want to depend on apache, depend on apache.
> 
>   * If you need paths like APACHE_MODULESDIR, the "apxs" tool is now
> in PATH so you can get it from $(apxs -q libexecdir)
> 
>   * If you need paths like APACHE_MODULES_CONFDIR, the eclass doesn't 
> work anyway. You can hard-code those paths yourself (relative to
> apxs -q sysconfdir), or if anyone feels up to the task, they could
> write a greatly simplified apache-paths.eclass that provides these
> paths via functions that are to be called outside of global scope.
> 
> If people are using anything in depend.apache, I think a warning is
> appropriate. Making a promise that apache-module (which is not junk)
> provides depend.apache will moreover make it harder to disentangle them
> in the future if anyone decides to fix things.
> 

Apparently, need_apache* is the problem.  Most of the ebuilds in www-
apache/* are calling it:

libapreq2/libapreq2-2.15-r1.ebuild:need_apache2
libapreq2/libapreq2-2.16.ebuild:need_apache2
mod_auth_kerb/mod_auth_kerb-5.4-r2.ebuild:need_apache2
mod_auth_radius/mod_auth_radius-1.5.8.ebuild:need_apache2
mod_auth_tkt/mod_auth_tkt-2.1.0-r1.ebuild:need_apache2
mod_authnz_external/mod_authnz_external-3.3.2.ebuild:need_apache2_4
...

Ofc, I'm fine with leaving it as-is, i.e. assuming they all need to
inherit depend.apache explicitly.

-- 
Best regards,
Michał Górny





[gentoo-dev] [PATCH 14/14] subversion.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/subversion.eclass | 21 +
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index 6ed8a62dbe35..aa1a5c355877 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -14,18 +14,10 @@
 
 ESVN="${ECLASS}"
 
-case ${EAPI:-0} in
-   4|5)
-   inherit eutils
-   EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
-   ;;
-   6|7)
-   inherit estack
-   EXPORT_FUNCTIONS src_unpack pkg_preinst
-   ;;
-   *)
-   die "${ESVN}: EAPI ${EAPI:-0} is not supported"
-   ;;
+case ${EAPI} in
+   4|5) inherit eutils ;;
+   6|7) inherit estack ;;
+   *) die "${ESVN}: EAPI ${EAPI:-0} is not supported" ;;
 esac
 
 PROPERTIES+=" live"
@@ -543,3 +535,8 @@ subversion__get_peg_revision() {
 
echo "${peg_rev}"
 }
+
+EXPORT_FUNCTIONS src_unpack pkg_preinst
+if [[ ${EAPI} == [45] ]]; then
+   EXPORT_FUNCTIONS src_prepare
+fi
-- 
2.33.0




[gentoo-dev] [PATCH 00/44] @PROVIDES for eclasses

2021-09-02 Thread Michał Górny
Hi,

Here are proposed @PROVIDES value for eclasses.

@PROVIDES is the new eclassdoc key that indicates that the eclass
indirectly provides API of another eclasses, i.e. if X has @PROVIDES
on Y, then you don't have to inherit Y explicitly when using X.

For example, python-r1 eclasses all provide python-utils-r1 since you
never have to inherit it when using python-r1 eclasses, and distutils-r1
provides python-r1 or python-single-r1.  @PROVIDES are processed
recursively, i.e. you don't need to list indirectly provided eclasses.

I've assembled the list by running `pkgcheck scan -c InheritsCheck`
until it didn't seem to list any obvious false positives.  However,
eclass maintainers probably know better which eclasses should be
provided indirectly, so please review.


Michał Górny (44):
  ant-tasks.eclass: Set @PROVIDES
  apache-module.eclass: Set @PROVIDES
  autotools.eclass: Set @PROVIDES
  cmake.eclass: Set @PROVIDES
  cmake-multilib.eclass: Set @PROVIDES
  cmake-utils.eclass: Set @PROVIDES
  distutils-r1.eclass: Set @PROVIDES
  ecm.eclass: Set @PROVIDES
  eutils.eclass: Set @PROVIDES
  gnome2.eclass: Set @PROVIDES
  gnome2-utils.eclass: Set @PROVIDES
  gnustep-2.eclass: Set @PROVIDES
  golang-build.eclass: Set @PROVIDES
  golang-vcs-snapshot.eclass: Set @PROVIDES
  go-module.eclass: Set @PROVIDES
  gstreamer.eclass: Set @PROVIDES
  gstreamer-meson.eclass: Set @PROVIDES
  haskell-cabal.eclass: Set @PROVIDES
  java-ant-2.eclass: Set @PROVIDES
  java-osgi.eclass: Set @PROVIDES
  java-pkg-2.eclass: Set @PROVIDES
  java-pkg-opt-2.eclass: Set @PROVIDES
  kernel-build.eclass: Set @PROVIDES
  kernel-install.eclass: Set @PROVIDES
  kodi-addon.eclass: Set @PROVIDES
  linux-mod.eclass: Set @PROVIDES
  lua.eclass: Set @PROVIDES
  lua-single.eclass: Set @PROVIDES
  meson.eclass: Set @PROVIDES
  meson-multilib.eclass: Set @PROVIDES
  multilib-build.eclass: Set @PROVIDES
  multilib-minimal.eclass: Set @PROVIDES
  perl-module.eclass: Set @PROVIDES
  php-ext-pecl-r3.eclass: Set @PROVIDES
  postgres-multi.eclass: Set @PROVIDES
  python-any-r1.eclass: Set @PROVIDES
  python-r1.eclass: Set @PROVIDES
  python-single-r1.eclass: Set @PROVIDES
  ros-catkin.eclass: Set @PROVIDES
  ruby-fakegem.eclass: Set @PROVIDES
  ruby-ng-gnome2.eclass: Set @PROVIDES
  ruby-single.eclass: Set @PROVIDES
  xdg.eclass: Set @PROVIDES
  xorg-3.eclass: Set @PROVIDES

 eclass/ant-tasks.eclass   | 1 +
 eclass/apache-module.eclass   | 1 +
 eclass/autotools.eclass   | 1 +
 eclass/cmake-multilib.eclass  | 1 +
 eclass/cmake-utils.eclass | 1 +
 eclass/cmake.eclass   | 1 +
 eclass/distutils-r1.eclass| 1 +
 eclass/ecm.eclass | 1 +
 eclass/eutils.eclass  | 1 +
 eclass/gnome2-utils.eclass| 1 +
 eclass/gnome2.eclass  | 1 +
 eclass/gnustep-2.eclass   | 1 +
 eclass/go-module.eclass   | 3 ++-
 eclass/golang-build.eclass| 1 +
 eclass/golang-vcs-snapshot.eclass | 1 +
 eclass/gstreamer-meson.eclass | 1 +
 eclass/gstreamer.eclass   | 1 +
 eclass/haskell-cabal.eclass   | 1 +
 eclass/java-ant-2.eclass  | 1 +
 eclass/java-osgi.eclass   | 1 +
 eclass/java-pkg-2.eclass  | 1 +
 eclass/java-pkg-opt-2.eclass  | 1 +
 eclass/kernel-build.eclass| 1 +
 eclass/kernel-install.eclass  | 1 +
 eclass/kodi-addon.eclass  | 1 +
 eclass/linux-mod.eclass   | 1 +
 eclass/lua-single.eclass  | 1 +
 eclass/lua.eclass | 1 +
 eclass/meson-multilib.eclass  | 1 +
 eclass/meson.eclass   | 1 +
 eclass/multilib-build.eclass  | 1 +
 eclass/multilib-minimal.eclass| 1 +
 eclass/perl-module.eclass | 1 +
 eclass/php-ext-pecl-r3.eclass | 1 +
 eclass/postgres-multi.eclass  | 1 +
 eclass/python-any-r1.eclass   | 1 +
 eclass/python-r1.eclass   | 1 +
 eclass/python-single-r1.eclass| 1 +
 eclass/ros-catkin.eclass  | 1 +
 eclass/ruby-fakegem.eclass| 1 +
 eclass/ruby-ng-gnome2.eclass  | 1 +
 eclass/ruby-single.eclass | 1 +
 eclass/xdg.eclass | 1 +
 eclass/xorg-3.eclass  | 1 +
 44 files changed, 45 insertions(+), 1 deletion(-)

-- 
2.33.0




[gentoo-dev] [PATCH 02/44] apache-module.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/apache-module.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/apache-module.eclass b/eclass/apache-module.eclass
index 2594445c8b4f..16ebed9faa96 100644
--- a/eclass/apache-module.eclass
+++ b/eclass/apache-module.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # apache-b...@gentoo.org
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: depend.apache
 # @BLURB: Provides a common set of functions for apache modules
 # @DESCRIPTION:
 # This eclass handles apache modules in a sane way.
-- 
2.33.0




[gentoo-dev] [PATCH 03/44] autotools.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/autotools.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 66d4686849db..bded69fc8fb5 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # base-sys...@gentoo.org
 # @SUPPORTED_EAPIS: 5 6 7 8
+# @PROVIDES: libtool
 # @BLURB: Regenerates auto* build scripts
 # @DESCRIPTION:
 # This eclass is for safely handling autotooled software packages that need to
-- 
2.33.0




[gentoo-dev] [PATCH 01/44] ant-tasks.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/ant-tasks.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
index ea347fd706af..71923261084c 100644
--- a/eclass/ant-tasks.eclass
+++ b/eclass/ant-tasks.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Vlastimil Babka 
 # @SUPPORTED_EAPIS: 6 7
+# @PROVIDES: java-utils-2
 # @BLURB: Eclass for building dev-java/ant-* packages
 # @DESCRIPTION:
 # This eclass provides functionality and default ebuild variables for building
-- 
2.33.0




[gentoo-dev] [PATCH 15/44] go-module.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/go-module.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index d1e81babf1f8..110d3f039838 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: go-module.eclass
@@ -8,6 +8,7 @@
 # William Hubbs 
 # Robin H. Johnson 
 # @SUPPORTED_EAPIS: 7 8
+# @PROVIDES: golang-base
 # @BLURB: basic eclass for building software written as go modules
 # @DESCRIPTION:
 # This eclass provides basic settings and functions needed by all software
-- 
2.33.0




[gentoo-dev] [PATCH 16/44] gstreamer.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/gstreamer.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/gstreamer.eclass b/eclass/gstreamer.eclass
index 301d0874106e..399fe1377329 100644
--- a/eclass/gstreamer.eclass
+++ b/eclass/gstreamer.eclass
@@ -11,6 +11,7 @@
 # foser 
 # zaheerm 
 # @SUPPORTED_EAPIS: 5 6
+# @PROVIDES: multilib-minimal
 # @BLURB: Helps building core & split gstreamer plugins.
 # @DESCRIPTION:
 # Eclass to make external gst-plugins emergable on a per-plugin basis
-- 
2.33.0




[gentoo-dev] [PATCH 13/44] golang-build.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/golang-build.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/golang-build.eclass b/eclass/golang-build.eclass
index d106a30eb58a..308503e84950 100644
--- a/eclass/golang-build.eclass
+++ b/eclass/golang-build.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # William Hubbs 
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: golang-base
 # @BLURB: Eclass for compiling go packages.
 # @DESCRIPTION:
 # This eclass provides default  src_compile, src_test and src_install
-- 
2.33.0




[gentoo-dev] [PATCH 14/44] golang-vcs-snapshot.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/golang-vcs-snapshot.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/golang-vcs-snapshot.eclass 
b/eclass/golang-vcs-snapshot.eclass
index abdb7fa119dd..66503e38b59d 100644
--- a/eclass/golang-vcs-snapshot.eclass
+++ b/eclass/golang-vcs-snapshot.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # William Hubbs 
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: golang-base
 # @BLURB: eclass to unpack VCS snapshot tarballs for Go software
 # @DESCRIPTION:
 # This eclass provides a convenience src_unpack() which unpacks the
-- 
2.33.0




[gentoo-dev] [PATCH 40/44] ruby-fakegem.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/ruby-fakegem.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index 76a80f6b9be2..d999ace34286 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -9,6 +9,7 @@
 # Author: Alex Legler 
 # Author: Hans de Graaff 
 # @SUPPORTED_EAPIS: 4 5 6 7 8
+# @PROVIDES: ruby-ng
 # @BLURB: An eclass for installing Ruby packages to behave like RubyGems.
 # @DESCRIPTION:
 # This eclass allows to install arbitrary Ruby libraries (including Gems),
-- 
2.33.0




[gentoo-dev] [PATCH 37/44] python-r1.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/python-r1.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 3a4d257036c8..dc624946cfc1 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -8,6 +8,7 @@
 # Author: Michał Górny 
 # Based on work of: Krzysztof Pawlik 
 # @SUPPORTED_EAPIS: 6 7 8
+# @PROVIDES: multibuild python-utils-r1
 # @BLURB: A common, simple eclass for Python packages.
 # @DESCRIPTION:
 # A common eclass providing helper functions to build and install
-- 
2.33.0




[gentoo-dev] [PATCH 39/44] ros-catkin.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/ros-catkin.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/ros-catkin.eclass b/eclass/ros-catkin.eclass
index 48121bf1d2a1..906d76843574 100644
--- a/eclass/ros-catkin.eclass
+++ b/eclass/ros-catkin.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Alexis Ballier 
 # @SUPPORTED_EAPIS: 7
+# @PROVIDES: cmake python-single-r1
 # @BLURB: Template eclass for catkin based ROS packages.
 # @DESCRIPTION:
 # Provides function for building ROS packages on Gentoo.
-- 
2.33.0




[gentoo-dev] [PATCH 38/44] python-single-r1.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/python-single-r1.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index da0113b6d57b..228c66a77af6 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -8,6 +8,7 @@
 # Author: Michał Górny 
 # Based on work of: Krzysztof Pawlik 
 # @SUPPORTED_EAPIS: 6 7 8
+# @PROVIDES: python-utils-r1
 # @BLURB: An eclass for Python packages not installed for multiple 
implementations.
 # @DESCRIPTION:
 # An extension of the python-r1 eclass suite for packages which
-- 
2.33.0




Re: [gentoo-dev] [PATCH 02/44] apache-module.eclass: Set @PROVIDES

2021-09-02 Thread Michael Orlitzky
On Thu, 2021-09-02 at 14:58 +0200, Michał Górny wrote:
> > 
> Apparently, need_apache* is the problem.  Most of the ebuilds in www-
> apache/* are calling it:
> 

The apache-module eclass tells you to do that because it needs some of
those APACHE_* paths. It should really be figuring them out itself
rather than telling the user to call a function that does it in global
scope. It's an easy fix:

  APXS=apxs
  APACHE_MODULESDIR=$(apxs -q libexecdir)
  APACHE_MODULES_CONFDIR=$(apxs -q sysconfdir)/modules.d
  APACHE_VHOSTS_CONFDIR=$(apxs -q sysconfdir)/vhosts.d

On the one hand, we probably don't want ebuild maintainers trying to
solve that themselves when the eclass could do it. But for whatever
such a promise is worth, it also feels wrong to promise that apache-
module will provide all of depend.apache -- what if we someday apply
the fix above to apache-module and want to drop the depend.apache
inherit?

If we do ever update apache-module, updating ebuilds and retiring
depend.apache would be a lot easier if you could find the candidates
with `git grep depend.apache`, rather than having to look through all
consumers of apache-module for implicit uses of depend.apache.





[gentoo-dev] [PATCH 02/14] emboss-r2.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/emboss-r2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/emboss-r2.eclass b/eclass/emboss-r2.eclass
index 680b7b7e4d61..bcab338ad614 100644
--- a/eclass/emboss-r2.eclass
+++ b/eclass/emboss-r2.eclass
@@ -40,8 +40,6 @@ case ${EAPI:-0} in
*) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;;
 esac
 
-EXPORT_FUNCTIONS src_prepare src_configure src_install
-
 if [[ ! ${_EMBOSS_R2_ECLASS} ]]; then
 _EMBOSS_R2_ECLASS=1
 
@@ -156,3 +154,5 @@ emboss-r2_src_install() {
 }
 
 fi
+
+EXPORT_FUNCTIONS src_prepare src_configure src_install
-- 
2.33.0




[gentoo-dev] [PATCH 03/14] gnustep-base.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/gnustep-base.eclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass
index fb4a48b734cd..3a76939e60ff 100644
--- a/eclass/gnustep-base.eclass
+++ b/eclass/gnustep-base.eclass
@@ -15,8 +15,6 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install 
pkg_postinst
-
 if [[ -z ${_GNUSTEP_BASE_ECLASS} ]] ; then
 _GNUSTEP_BASE_ECLASS=1
 
@@ -263,3 +261,6 @@ EOF
 }
 
 fi
+
+EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_install \
+   pkg_postinst
-- 
2.33.0




[gentoo-dev] [PATCH 04/14] java-pkg-2.eclass: Move EXPORT_FUNCTIONS below inherit

2021-09-02 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/java-pkg-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass
index 4d5cb7665728..11f508cf349f 100644
--- a/eclass/java-pkg-2.eclass
+++ b/eclass/java-pkg-2.eclass
@@ -17,8 +17,6 @@ case ${EAPI:-0} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-EXPORT_FUNCTIONS pkg_setup src_prepare src_compile pkg_preinst
-
 if [[ -z ${_JAVA_PKG_2_ECLASS} ]] ; then
 _JAVA_PKG_2_ECLASS=1
 
@@ -158,3 +156,5 @@ java-pkg-2_pkg_preinst() {
 }
 
 fi
+
+EXPORT_FUNCTIONS pkg_setup src_prepare src_compile pkg_preinst
-- 
2.33.0




[gentoo-dev] [PATCH 12/44] gnustep-2.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/gnustep-2.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/gnustep-2.eclass b/eclass/gnustep-2.eclass
index 2d615db3a1f2..68c15bbc62e1 100644
--- a/eclass/gnustep-2.eclass
+++ b/eclass/gnustep-2.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # GNUstep Herd 
 # @SUPPORTED_EAPIS: 5 6 7 8
+# @PROVIDES: gnustep-base
 # @BLURB: eclass for GNUstep Apps, Frameworks, and Bundles build
 # @DESCRIPTION:
 # This eclass sets up GNUstep environment to properly install
-- 
2.33.0




[gentoo-dev] [PATCH 09/44] eutils.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/eutils.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 207d05e7f975..276d3ddace88 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # base-sys...@gentoo.org
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: desktop edos2unix epatch estack ltprune multilib preserve-libs 
strip-linguas toolchain-funcs vcs-clean wrapper
 # @BLURB: many extra (but common) functions that are used in ebuilds
 # @DESCRIPTION:
 # The eutils eclass contains a suite of functions that complement
-- 
2.33.0




[gentoo-dev] [PATCH 11/44] gnome2-utils.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/gnome2-utils.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index 8513de0af4d6..f7d45090f820 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # gn...@gentoo.org
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: xdg-utils
 # @BLURB: Auxiliary functions commonly used by Gnome packages.
 # @DESCRIPTION:
 # This eclass provides a set of auxiliary functions needed by most Gnome
-- 
2.33.0




[gentoo-dev] [PATCH 10/44] gnome2.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/gnome2.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index 27ea9f96c0d9..6fab55785be5 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # gn...@gentoo.org
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: gnome2-utils
 # @BLURB: Provides phases for Gnome/Gtk+ based packages.
 # @DESCRIPTION:
 # Exports portage base functions used by ebuilds written for packages using the
-- 
2.33.0




[gentoo-dev] [PATCH 34/44] php-ext-pecl-r3.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/php-ext-pecl-r3.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/php-ext-pecl-r3.eclass b/eclass/php-ext-pecl-r3.eclass
index f3977b225aa4..1727a53ebba6 100644
--- a/eclass/php-ext-pecl-r3.eclass
+++ b/eclass/php-ext-pecl-r3.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # Gentoo PHP team 
 # @SUPPORTED_EAPIS: 6 7
+# @PROVIDES: php-ext-source-r3
 # @BLURB: A uniform way to install PECL extensions
 # @DESCRIPTION:
 # This eclass should be used by all dev-php/pecl-* ebuilds as a uniform
-- 
2.33.0




[gentoo-dev] [PATCH 35/44] postgres-multi.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/postgres-multi.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass
index acaa5077217f..5e37a7d0b471 100644
--- a/eclass/postgres-multi.eclass
+++ b/eclass/postgres-multi.eclass
@@ -11,6 +11,7 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_compile 
src_install src_test
 # @AUTHOR:
 # Aaron W. Swenson 
 # @SUPPORTED_EAPIS: 5 6 7
+# @PROVIDES: multibuild postgres
 # @BLURB: An eclass to build PostgreSQL-related packages against multiple slots
 # @DESCRIPTION:
 # postgres-multi enables ebuilds, particularly PostgreSQL extensions, to
-- 
2.33.0




[gentoo-dev] [PATCH 36/44] python-any-r1.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/python-any-r1.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index eaae5379b732..7af9474d9a1f 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -8,6 +8,7 @@
 # Author: Michał Górny 
 # Based on work of: Krzysztof Pawlik 
 # @SUPPORTED_EAPIS: 6 7 8
+# @PROVIDES: python-utils-r1
 # @BLURB: An eclass for packages having build-time dependency on Python.
 # @DESCRIPTION:
 # A minimal eclass for packages which need any Python interpreter
-- 
2.33.0




Re: [gentoo-dev] [PATCH 29/44] meson.eclass: Set @PROVIDES

2021-09-02 Thread Mike Gilbert
On Thu, Sep 2, 2021 at 6:47 AM Michał Górny  wrote:
>
> Signed-off-by: Michał Górny 
> ---
>  eclass/meson.eclass | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/eclass/meson.eclass b/eclass/meson.eclass
> index eaff26709a75..c5e3b91f9a15 100644
> --- a/eclass/meson.eclass
> +++ b/eclass/meson.eclass
> @@ -6,6 +6,7 @@
>  # William Hubbs 
>  # Mike Gilbert 
>  # @SUPPORTED_EAPIS: 6 7 8
> +# @PROVIDES: ninja-utils
>  # @BLURB: common ebuild functions for meson-based packages
>  # @DESCRIPTION:
>  # This eclass contains the default phase functions for packages which
> --
> 2.33.0

Please drop this patch. meson.eclass does not use ninja-utils since
5974284d8cb3c2b6d3dab3ad83c2f270db3b0798, and we certainly don't want
to implicitly provide it to consumers.

We should probably remove the ninja-utils inherit from meson.eclass instead.



Re: [gentoo-dev] [PATCH 29/44] meson.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
On Thu, 2021-09-02 at 10:17 -0400, Mike Gilbert wrote:
> On Thu, Sep 2, 2021 at 6:47 AM Michał Górny  wrote:
> > 
> > Signed-off-by: Michał Górny 
> > ---
> >  eclass/meson.eclass | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/eclass/meson.eclass b/eclass/meson.eclass
> > index eaff26709a75..c5e3b91f9a15 100644
> > --- a/eclass/meson.eclass
> > +++ b/eclass/meson.eclass
> > @@ -6,6 +6,7 @@
> >  # William Hubbs 
> >  # Mike Gilbert 
> >  # @SUPPORTED_EAPIS: 6 7 8
> > +# @PROVIDES: ninja-utils
> >  # @BLURB: common ebuild functions for meson-based packages
> >  # @DESCRIPTION:
> >  # This eclass contains the default phase functions for packages which
> > --
> > 2.33.0
> 
> Please drop this patch. meson.eclass does not use ninja-utils since
> 5974284d8cb3c2b6d3dab3ad83c2f270db3b0798, and we certainly don't want
> to implicitly provide it to consumers.
> 
> We should probably remove the ninja-utils inherit from meson.eclass instead.
> 

Removed.

-- 
Best regards,
Michał Górny





Re: [gentoo-dev] [PATCH 02/44] apache-module.eclass: Set @PROVIDES

2021-09-02 Thread Michał Górny
On Thu, 2021-09-02 at 09:50 -0400, Michael Orlitzky wrote:
> On Thu, 2021-09-02 at 14:58 +0200, Michał Górny wrote:
> > > 
> > Apparently, need_apache* is the problem.  Most of the ebuilds in www-
> > apache/* are calling it:
> > 
> 
> The apache-module eclass tells you to do that because it needs some of
> those APACHE_* paths. It should really be figuring them out itself
> rather than telling the user to call a function that does it in global
> scope. It's an easy fix:
> 
>   APXS=apxs
>   APACHE_MODULESDIR=$(apxs -q libexecdir)
>   APACHE_MODULES_CONFDIR=$(apxs -q sysconfdir)/modules.d
>   APACHE_VHOSTS_CONFDIR=$(apxs -q sysconfdir)/vhosts.d
> 
> On the one hand, we probably don't want ebuild maintainers trying to
> solve that themselves when the eclass could do it. But for whatever
> such a promise is worth, it also feels wrong to promise that apache-
> module will provide all of depend.apache -- what if we someday apply
> the fix above to apache-module and want to drop the depend.apache
> inherit?
> 
> If we do ever update apache-module, updating ebuilds and retiring
> depend.apache would be a lot easier if you could find the candidates
> with `git grep depend.apache`, rather than having to look through all
> consumers of apache-module for implicit uses of depend.apache.
> 

Ok, I've removed this commit from my branch.  If maintainers want it
otherwise, it's easy enough to do it again.

-- 
Best regards,
Michał Górny





[gentoo-dev] last rites : toolchain-glibc.eclass

2021-09-02 Thread Andreas K. Huettel
toolchain-glibc.eclass is long obsolete and not used anymore since glibc-2.26. 

Last ebuild is gone now, so removing the eclass in 30 days.

-- 
Andreas K. Hüttel
dilfri...@gentoo.org
Gentoo Linux developer 
(council, qa, toolchain, base-system, perl, libreoffice)


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] [PATCH] linux-info.eclass : Support valid Make files

2021-09-02 Thread Mike Pagano

Support the possibility that the Makefile could be
one of the following and should be checked in
the order described here:

https://www.gnu.org/software/make/manual/make.html

Order of checking and valid Makefiles names:
GNUMakefile, makefile, Makefile

Bug: https://bugs.gentoo.org/663368

Signed-off-by: Mike Pagano 
---
 eclass/linux-info.eclass | 33 +
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 0b6df1bf5..2dfc8979f 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -80,6 +80,15 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}"
 # There are also a couple of variables which are set by this, and shouldn't be
 # set by hand. These are as follows:
 
+# @ECLASS-VARIABLE: KERNEL_MAKEFILE

+# @INTERNAL
+# @DESCRIPTION:
+# According to upstream documentation, by default, when make looks for the 
makefile, it tries
+# the following names, in order: GNUmakefile, makefile and Makefile. Set this 
variable to the
+# proper Makefile name or the eclass will search in this order for it.
+# See https://www.gnu.org/software/make/manual/make.html
+: ${KERNEL_MAKEFILE:=""}
+
 # @ECLASS-VARIABLE: KV_FULL
 # @OUTPUT_VARIABLE
 # @DESCRIPTION:
@@ -510,7 +519,9 @@ get_version() {
qeinfo "${KV_DIR}"
fi
 
-	if [ ! -s "${KV_DIR}/Makefile" ]

+   get_makefile
+
+   if [ ! -s "${KERNEL_MAKEFILE}" ]
then
if [ -z "${get_version_warning_done}" ]; then
get_version_warning_done=1
@@ -526,9 +537,6 @@ get_version() {
# do we pass KBUILD_OUTPUT on the CLI?
local OUTPUT_DIR=${KBUILD_OUTPUT}
 
-	# keep track of it

-   KERNEL_MAKEFILE="${KV_DIR}/Makefile"
-
if [[ -z ${OUTPUT_DIR} ]]; then
# Decide the function used to extract makefile variables.
local mkfunc=$(get_makefile_extract_function 
"${KERNEL_MAKEFILE}")
@@ -971,3 +979,20 @@ linux-info_pkg_setup() {
 
 	[ -n "${CONFIG_CHECK}" ] && check_extra_config;

 }
+
+# @FUNCTION: get_makefile
+# @DESCRIPTION:
+# Support the possibility that the Makefile could be one of the following and 
should
+# be checked in the order described here:
+# https://www.gnu.org/software/make/manual/make.html
+# Order of checking and valid Makefiles names:  GNUMakefile, makefile, Makefile
+get_makefile() {
+
+if [[ -s "${KV_DIR}"/GNUMakefile ]]; then
+KERNEL_MAKEFILE="${KV_DIR}/GNUMakefile"
+elif [[ -s "${KV_DIR}"/makefile ]]; then
+KERNEL_MAKEFILE="${KV_DIR}/makefile"
+else
+KERNEL_MAKEFILE="${KV_DIR}/Makefile"
+fi
+}
--
2.32.0




[gentoo-dev] [PATCH v3] linux-info.eclass : Support valid Make files

2021-09-02 Thread Mike
Support the possibility that the Makefile could be
one of the following and should be checked in the order described here:

https://www.gnu.org/software/make/manual/make.html

Order of checking and valid Makefiles names:
GNUMakefile, makefile, Makefile

Bug: https://bugs.gentoo.org/663368

Signed-off-by: Mike Pagano 
---
 eclass/linux-info.eclass | 30 ++
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 0b6df1bf5..a6159eac2 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -80,6 +80,15 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}"
 # There are also a couple of variables which are set by this, and shouldn't be
 # set by hand. These are as follows:
 
+# @ECLASS-VARIABLE: KERNEL_MAKEFILE
+# @INTERNAL
+# @DESCRIPTION:
+# According to upstream documentation, by default, when make looks for the 
makefile, it tries
+# the following names, in order: GNUmakefile, makefile and Makefile. Set this 
variable to the
+# proper Makefile name or the eclass will search in this order for it.
+# See https://www.gnu.org/software/make/manual/make.html
+: ${KERNEL_MAKEFILE:=""}
+
 # @ECLASS-VARIABLE: KV_FULL
 # @OUTPUT_VARIABLE
 # @DESCRIPTION:
@@ -510,7 +519,9 @@ get_version() {
qeinfo "${KV_DIR}"
fi
 
-   if [ ! -s "${KV_DIR}/Makefile" ]
+   get_makefile
+
+   if [[ ! -s "${KERNEL_MAKEFILE}" ]]
then
if [ -z "${get_version_warning_done}" ]; then
get_version_warning_done=1
@@ -526,9 +537,6 @@ get_version() {
# do we pass KBUILD_OUTPUT on the CLI?
local OUTPUT_DIR=${KBUILD_OUTPUT}
 
-   # keep track of it
-   KERNEL_MAKEFILE="${KV_DIR}/Makefile"
-
if [[ -z ${OUTPUT_DIR} ]]; then
# Decide the function used to extract makefile variables.
local mkfunc=$(get_makefile_extract_function 
"${KERNEL_MAKEFILE}")
@@ -971,3 +979,17 @@ linux-info_pkg_setup() {
 
[ -n "${CONFIG_CHECK}" ] && check_extra_config;
 }
+
+# @FUNCTION: get_makefile
+# @DESCRIPTION:
+# Support the possibility that the Makefile could be one of the following and 
should
+# be checked in the order described here:
+# https://www.gnu.org/software/make/manual/make.html
+# Order of checking and valid Makefiles names:  GNUMakefile, makefile, Makefile
+get_makefile() {
+
+   [[ -s "${KV_DIR}"/GNUMakefile ]] && 
KERNEL_MAKEFILE="${KV_DIR}/GNUMakefile"
+   [[ -s "${KV_DIR}"/makefile ]] && KERNEL_MAKEFILE="${KV_DIR}/makefile"
+   [[ -s "${KV_DIR}"/Makefile ]] && KERNEL_MAKEFILE="${KV_DIR}/Makefile"
+
+}
-- 
2.32.0





[gentoo-dev] [PATCH v2] linux-info.eclass : Support valid Make files

2021-09-02 Thread Mike
Support the possibility that the Makefile could be
one of the following and should be checked in the order described here:

https://www.gnu.org/software/make/manual/make.html

Order of checking and valid Makefiles names:
GNUMakefile, makefile, Makefile

Bug: https://bugs.gentoo.org/663368

Signed-off-by: Mike Pagano 
---
 eclass/linux-info.eclass | 30 ++
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 0b6df1bf5..7e225236f 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -80,6 +80,15 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}"
 # There are also a couple of variables which are set by this, and shouldn't be
 # set by hand. These are as follows:
 
+# @ECLASS-VARIABLE: KERNEL_MAKEFILE
+# @INTERNAL
+# @DESCRIPTION:
+# According to upstream documentation, by default, when make looks for the 
makefile, it tries
+# the following names, in order: GNUmakefile, makefile and Makefile. Set this 
variable to the
+# proper Makefile name or the eclass will search in this order for it.
+# See https://www.gnu.org/software/make/manual/make.html
+: ${KERNEL_MAKEFILE:=""}
+
 # @ECLASS-VARIABLE: KV_FULL
 # @OUTPUT_VARIABLE
 # @DESCRIPTION:
@@ -510,7 +519,9 @@ get_version() {
qeinfo "${KV_DIR}"
fi
 
-   if [ ! -s "${KV_DIR}/Makefile" ]
+   get_makefile
+
+   if [ ! -s "${KERNEL_MAKEFILE}" ]
then
if [ -z "${get_version_warning_done}" ]; then
get_version_warning_done=1
@@ -526,9 +537,6 @@ get_version() {
# do we pass KBUILD_OUTPUT on the CLI?
local OUTPUT_DIR=${KBUILD_OUTPUT}
 
-   # keep track of it
-   KERNEL_MAKEFILE="${KV_DIR}/Makefile"
-
if [[ -z ${OUTPUT_DIR} ]]; then
# Decide the function used to extract makefile variables.
local mkfunc=$(get_makefile_extract_function 
"${KERNEL_MAKEFILE}")
@@ -971,3 +979,17 @@ linux-info_pkg_setup() {
 
[ -n "${CONFIG_CHECK}" ] && check_extra_config;
 }
+
+# @FUNCTION: get_makefile
+# @DESCRIPTION:
+# Support the possibility that the Makefile could be one of the following and 
should
+# be checked in the order described here:
+# https://www.gnu.org/software/make/manual/make.html
+# Order of checking and valid Makefiles names:  GNUMakefile, makefile, Makefile
+get_makefile() {
+
+   [[ -s "${KV_DIR}"/GNUMakefile ]] && 
KERNEL_MAKEFILE="${KV_DIR}/GNUMakefile"
+   [[ -s "${KV_DIR}"/makefile ]] && KERNEL_MAKEFILE="${KV_DIR}/makefile"
+   [[ -s "${KV_DIR}"/Makefile ]] && KERNEL_MAKEFILE="${KV_DIR}/Makefile"
+
+}
-- 
2.32.0





Re: [gentoo-dev] [PATCH] linux-info.eclass : Support valid Make files

2021-09-02 Thread Sam James


> On 2 Sep 2021, at 20:42, Mike Pagano  wrote:
> 
> Support the possibility that the Makefile could be
> one of the following and should be checked in
> the order described here:
> 
> https://www.gnu.org/software/make/manual/make.html
> 
> Order of checking and valid Makefiles names:
> GNUMakefile, makefile, Makefile
> 
> Bug: https://bugs.gentoo.org/663368
> 
> Signed-off-by: Mike Pagano 
> ---
> eclass/linux-info.eclass | 33 +
> 1 file changed, 29 insertions(+), 4 deletions(-)
> 
> diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
> index 0b6df1bf5..2dfc8979f 100644
> --- a/eclass/linux-info.eclass
> +++ b/eclass/linux-info.eclass
> @@ -80,6 +80,15 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}"
> # There are also a couple of variables which are set by this, and shouldn't be
> # set by hand. These are as follows:
> +# @ECLASS-VARIABLE: KERNEL_MAKEFILE
> +# @INTERNAL
> +# @DESCRIPTION:
> +# According to upstream documentation, by default, when make looks for the 
> makefile, it tries
> +# the following names, in order: GNUmakefile, makefile and Makefile. Set 
> this variable to the
> +# proper Makefile name or the eclass will search in this order for it.
> +# See https://www.gnu.org/software/make/manual/make.html
> +: ${KERNEL_MAKEFILE:=""}

Thanks for adding the reference! I'm often an advocate for adding _more_ links 
and explanation
because while it's sometimes a bit dull to add, it makes life a lot easier 
later on when researching.

> +
> # @ECLASS-VARIABLE: KV_FULL
> # @OUTPUT_VARIABLE
> # @DESCRIPTION:
> @@ -510,7 +519,9 @@ get_version() {
>   qeinfo "${KV_DIR}"
>   fi
> - if [ ! -s "${KV_DIR}/Makefile" ]
> + get_makefile
> +
> + if [ ! -s "${KERNEL_MAKEFILE}" ]
>   then

Can you use Bash tests instead?

(https://devmanual.gentoo.org/tools-reference/bash/#single-versus-double-brackets-in-bash)

Best,
sam



signature.asc
Description: Message signed with OpenPGP