[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-20 Thread Sam James
commit: dd5030fa0ad06728735f266e00a3e6258db46a83
Author: Sam James  gentoo  org>
AuthorDate: Thu Jun 20 09:55:20 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Jun 20 09:57:18 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd5030fa

toolchain.eclass: fix SRC_URI for releases

Signed-off-by: Sam James  gentoo.org>

 eclass/toolchain.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index bc61a8bddb2c..c7c366a37ad0 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -526,7 +526,7 @@ get_gcc_src_uri() {

GCC_SRC_URI="mirror://gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz"
else
GCC_SRC_URI="
-   mirror://gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.xz
+   
mirror://gcc/releases/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.xz

mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.xz
"
fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-20 Thread Florian Schmaus
commit: 5f5fe1e48984b8d2dc0202ac734a4feb49b46568
Author: Florian Schmaus  gentoo  org>
AuthorDate: Thu Jun 20 07:29:36 2024 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Thu Jun 20 07:29:49 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f5fe1e4

readme.gentoo-r1.eclass: use two spaces after full stop

Signed-off-by: Florian Schmaus  gentoo.org>

 eclass/readme.gentoo-r1.eclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
index 35c3d3748550..48023d9c049f 100644
--- a/eclass/readme.gentoo-r1.eclass
+++ b/eclass/readme.gentoo-r1.eclass
@@ -10,7 +10,7 @@
 # @BLURB: install a doc file shown via elog messages
 # @DESCRIPTION:
 # An eclass for installing a README.gentoo doc file recording tips
-# shown via elog messages. With this eclass, those elog messages will only be
+# shown via elog messages.  With this eclass, those elog messages will only be
 # shown at first package installation and a file for later reviewing will be
 # installed under /usr/share/doc/${PF}
 #
@@ -34,7 +34,7 @@ esac
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # If non-empty, DOC_CONTENTS information will be strictly respected,
-# not getting it automatically formatted by fold. If empty, it will
+# not getting it automatically formatted by fold.  If empty, it will
 # rely on fold for formatting and 'echo -e' options to tweak lines a bit.
 
 # @ECLASS_VARIABLE: FORCE_PRINT_ELOG
@@ -50,7 +50,7 @@ esac
 # @FUNCTION: readme.gentoo_create_doc
 # @DESCRIPTION:
 # Create doc file with ${DOC_CONTENTS} variable (preferred) and, if not set,
-# look for "${FILESDIR}/README.gentoo" contents. You can use
+# look for "${FILESDIR}/README.gentoo" contents.  You can use
 # ${FILESDIR}/README.gentoo-${SLOT} also.
 # Usually called at src_install phase.
 readme.gentoo_create_doc() {
@@ -84,7 +84,7 @@ readme.gentoo_create_doc() {
 
 # @FUNCTION: readme.gentoo_print_elog
 # @DESCRIPTION:
-# Print elog messages with "${T}"/README.gentoo contents. They will be
+# Print elog messages with "${T}"/README.gentoo contents.  They will be
 # shown only when package is installed at first time.
 # Usually called at pkg_postinst phase.
 #



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-20 Thread Florian Schmaus
commit: 15fbf774e0357c750bd1934592370223c595b6bd
Author: Florian Schmaus  gentoo  org>
AuthorDate: Wed Jun 19 12:11:51 2024 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Thu Jun 20 07:29:48 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15fbf774

readme.gentoo-r1.eclass: fix description of DISABLE_AUTOFORMATTING by 
s/fmt/fold/

The autoformatting tool was switched from fmt to fold in
3f9cdecb18c6 ("Change formatting tool as discussed with Ulrich Müller in
bug #460050, thanks a lot to him for his help.") but the description of
the DISABLE_AUTOFORMATTING variable still talks about fmt being used.

See also https://bugs.gentoo.org/460050#c7

Signed-off-by: Florian Schmaus  gentoo.org>

 eclass/readme.gentoo-r1.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
index 202ba31f4f70..35c3d3748550 100644
--- a/eclass/readme.gentoo-r1.eclass
+++ b/eclass/readme.gentoo-r1.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: readme.gentoo-r1.eclass
@@ -34,8 +34,8 @@ esac
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # If non-empty, DOC_CONTENTS information will be strictly respected,
-# not getting it automatically formatted by fmt. If empty, it will
-# rely on fmt for formatting and 'echo -e' options to tweak lines a bit.
+# not getting it automatically formatted by fold. If empty, it will
+# rely on fold for formatting and 'echo -e' options to tweak lines a bit.
 
 # @ECLASS_VARIABLE: FORCE_PRINT_ELOG
 # @DEFAULT_UNSET



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-18 Thread Andreas K. Hüttel
commit: a7f997b3232b4bb1869dd2d3d97c5bfc89cf47de
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Wed Jun 19 03:15:28 2024 +
Commit: Andreas K. Hüttel  gentoo  org>
CommitDate: Wed Jun 19 03:16:08 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7f997b3

perl-module.eclass: drop support for perl versions without PERL_FEATURES

Signed-off-by: Andreas K. Hüttel  gentoo.org>

 eclass/perl-module.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 432d1ab315dd..27cd053f0ea7 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -63,7 +63,7 @@ esac
 # @CODE
 
PERL_USEDEP="perl_features_debug=,perl_features_ithreads=,perl_features_quadmath="
 
-GENTOO_PERL_DEPSTRING=" || ( >=dev-lang/perl-5.38.2-r3[${PERL_USEDEP}] 


[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-17 Thread Andreas Sturmlechner
commit: d8ebc6b4f46647853745e0be779a6bcc1f50f95b
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Mon Jun 17 15:59:38 2024 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Mon Jun 17 17:06:30 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8ebc6b4

ecm.eclass: Fix _ecm_check_gcc_version

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/ecm.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 518f913815be..3d3b9328269d 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -307,7 +307,7 @@ unset COMMONDEPEND
 # @DESCRIPTION:
 # Determine if the current GCC version is acceptable, otherwise die.
 _ecm_check_gcc_version() {
-   if [[ ${MERGE_TYPE} != binary && -v ${KDE_GCC_MINIMAL} ]] && tc-is-gcc; 
then
+   if [[ ${MERGE_TYPE} != binary && -v KDE_GCC_MINIMAL ]] && tc-is-gcc; 
then
 
local version=$(gcc-version)
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-17 Thread James Le Cuirot
commit: 73aef61ba818739034dd5cc939a315213bc77741
Author: James Le Cuirot  gentoo  org>
AuthorDate: Sat Jun 15 13:59:15 2024 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Mon Jun 17 09:27:23 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73aef61b

cargo.eclass: Add cargo_target_dir helper function

Several Cargo-based ebuilds cannot use cargo_src_install for various
reasons and manually install binaries from within the target directory
instead. It is common to see `target/$(usex debug debug release)`, but
this lacks the target ABI when cross-compiling, so provide a helper
function.

There are some multilib Cargo-based ebuilds that always set the target
ABI, even when not cross-compiling. It would be simpler to do this in
general, so once ebuilds have been updated to use this new helper, I
might change the eclass again accordingly.

Signed-off-by: James Le Cuirot  gentoo.org>

 eclass/cargo.eclass | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 548aaef3ed69..7db34efb4e17 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -319,6 +319,16 @@ _cargo_gen_git_config() {
fi
 }
 
+# @FUNCTION: cargo_target_dir
+# @DESCRIPTION:
+# Return the directory within target that contains the build, e.g.
+# target/aarch64-unknown-linux-gnu/release.
+cargo_target_dir() {
+   local abi
+   tc-is-cross-compiler && abi=/$(rust_abi)
+   echo "${CARGO_TARGET_DIR:-target}${abi}/$(usex debug debug release)"
+}
+
 # @FUNCTION: cargo_src_unpack
 # @DESCRIPTION:
 # Unpacks the package and the cargo registry.



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-16 Thread Sam James
commit: 8ac18e94add62abf445280e5b3ddf9a20e5e17a7
Author: Sam James  gentoo  org>
AuthorDate: Mon Jun 17 00:53:32 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jun 17 00:53:32 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ac18e94

cargo.eclass: mention app-portage/pycargoebuild in @CRATES docs

Signed-off-by: Sam James  gentoo.org>

 eclass/cargo.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 40d98211ce7f..548aaef3ed69 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -48,7 +48,7 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
 # @PRE_INHERIT
 # @DESCRIPTION:
 # Bash string containing all crates that are to be downloaded.
-# It is used by cargo_crate_uris.
+# It is used by cargo_crate_uris. Typically generated by 
app-portage/pycargoebuild.
 #
 # Ideally, crate names and versions should be separated by a `@`
 # character.  A legacy syntax using hyphen is also supported but it is



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-15 Thread Michał Górny
commit: 9024dd273dbeca9f7f36b60fa48bc5ccf7c1f08c
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jun 15 10:17:47 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Jun 15 11:01:25 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9024dd27

llvm.org.eclass: Remove support for old snapshots

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 6 --
 1 file changed, 6 deletions(-)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index a362c3bb60b1..914a731a1768 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -78,12 +78,6 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
19.0.0_pre20240608)

EGIT_COMMIT=5aabbf0602c48b67bb89fd37f95bf97c95ded488
;;
-   19.0.0_pre20240525)
-   
EGIT_COMMIT=7dc2f6602212bf0a0433c157b70e4fc0d70bb730
-   ;;
-   19.0.0_pre20240518)
-   
EGIT_COMMIT=702198fc9ac5dba392f9d9ba7c56467996343c0a
-   ;;
*)
die "Unknown snapshot: ${PV}"
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-15 Thread Sam James
commit: e65892a87435c5b0dddbe7b02532eeb5ae806e46
Author: Sam James  gentoo  org>
AuthorDate: Sat Jun 15 07:57:41 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Jun 15 07:57:41 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e65892a8

toolchain.eclass: fix applying musl patches for live ebuilds

toolchain_fetch_git_patches had a typo for the case where we may
want to try use downloaded SRC_URI (rather than git) patches, so it
never applied them for live ebuilds.

Reported by awilfox.

Signed-off-by: Sam James  gentoo.org>

 eclass/toolchain.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 7d69f3b90e91..bc61a8bddb2c 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -589,7 +589,7 @@ toolchain_fetch_git_patches() {
mkdir "${WORKDIR}"/patch || die
mv "${WORKDIR}"/patch.tmp/${PATCH_GCC_VER}/gentoo/* "${WORKDIR}"/patch 
|| die
 
-   if [[ -n ${MUSL_VER} || -d "${WORKDIR}"/musl ]] && [[ ${CTARGET} == 
*musl* ]] ; then
+   if [[ -z ${MUSL_VER} || -d "${WORKDIR}"/musl ]] && [[ ${CTARGET} == 
*musl* ]] ; then
mkdir "${WORKDIR}"/musl || die
mv "${WORKDIR}"/patch.tmp/${PATCH_GCC_VER}/musl/* 
"${WORKDIR}"/musl || die
fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Michał Górny
commit: 4c9973d691bf1842f7a1fcefc90e31872054bc94
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jun  1 09:22:32 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jun 14 12:26:06 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9973d6

distutils-r1.eclass: Document BUILD_DIR for consistency

Closes: https://bugs.gentoo.org/910661
Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 16 
 1 file changed, 16 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 2b610a4d2ceb..3d72a5d3d554 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -206,6 +206,22 @@ esac
 # the build system in pure Python packages and packages using the stable
 # Python ABI.
 
+# @ECLASS_VARIABLE: BUILD_DIR
+# @OUTPUT_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The current build directory. In global scope, it is supposed to
+# contain an initial build directory; if unset, it defaults to ${S}.
+#
+# When running in multi-impl mode, the BUILD_DIR variable is set
+# by python-r1.eclass.  Otherwise, it is set by distutils-r1.eclass
+# for consistency.
+#
+# Example value:
+# @CODE
+# ${WORKDIR}/foo-1.3-python3_12
+# @CODE
+
 if [[ -z ${_DISTUTILS_R1_ECLASS} ]]; then
 _DISTUTILS_R1_ECLASS=1
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Michał Górny
commit: 941e9c718887243f880ee6f8271c5e6d9aeb75db
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Jun  2 18:01:26 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jun 14 12:26:08 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=941e9c71

distutils-r1.eclass: Remove distutils_install_for_testing

Remove `distutils_install_for_testing` function.  It is quite complex,
and it was used only in the legacy eclass mode.  All ebuilds using it
in ::gentoo have been migrated to PEP517 build already, and the PEP517
build implement the same functionality better.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 123 ++---
 1 file changed, 5 insertions(+), 118 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index f0d9d3a4b937..afed1fa547d1 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -704,123 +704,12 @@ esetup.py() {
 }
 
 # @FUNCTION: distutils_install_for_testing
-# @USAGE: [--via-root|--via-home|--via-venv] [...]
+# @DEPRECATED: DISTUTILS_USE_PEP517=...
 # @DESCRIPTION:
-# Install the package into a temporary location for running tests.
-# Update PYTHONPATH appropriately and set TEST_DIR to the test
-# installation root. The Python packages will be installed in 'lib'
-# subdir, and scripts in 'scripts' subdir (like in BUILD_DIR).
-#
-# Please note that this function should be only used if package uses
-# namespaces (and therefore proper install needs to be done to enforce
-# PYTHONPATH) or tests rely on the results of install command.
-# For most of the packages, tests built in BUILD_DIR are good enough.
-#
-# The function supports three install modes.  These are:
-#
-# --via-root (the default) that uses 'setup.py install --root=...'
-# combined with PYTHONPATH and is recommended for the majority
-# of packages.
-#
-# --via-venv that creates a (non-isolated) venv and installs the package
-# into it via 'setup.py install'.  This mode does not use PYTHONPATH
-# but requires python to be called via PATH.  It may solve a few corner
-# cases that --via-root do not support.
-#
-# --via-home that uses 'setup.py install --home=...'.  This is
-# a historical mode that was mostly broken by setuptools 50.3.0+.
-# If your package does not work with the other two modes but works with
-# this one, please report a bug.
-#
-# Please note that in order to test the solution properly you need
-# to unmerge the package first.
-#
-# This function is not available in PEP517 mode.  The eclass provides
-# a venv-style install unconditionally and therefore it should no longer
-# be necessary.
+# This function used to provide an installed package for running tests.
+# It is no longer implemented, PEP517 mode must be used instead.
 distutils_install_for_testing() {
-   debug-print-function ${FUNCNAME} "${@}"
-
-   if [[ ${DISTUTILS_USE_PEP517} ]]; then
-   die "${FUNCNAME} is not implemented in PEP517 mode"
-   fi
-
-   # A few notes about --via-home mode:
-   # 1) 'install --home' is terribly broken on pypy, so we need
-   #to override --install-lib and --install-scripts,
-   # 2) non-root 'install' complains about PYTHONPATH and missing dirs,
-   #so we need to set it properly and mkdir them,
-   # 3) it runs a bunch of commands which write random files to cwd,
-   #in order to avoid that, we add the necessary path overrides
-   #in _distutils-r1_create_setup_cfg.
-
-   local install_method=root
-   case ${1} in
-   --via-home)
-   [[ ${EAPI} == 7 ]] || die "${*} is banned in EAPI 
${EAPI}"
-   install_method=home
-   shift
-   ;;
-   --via-root)
-   install_method=root
-   shift
-   ;;
-   --via-venv)
-   install_method=venv
-   shift
-   ;;
-   esac
-
-   TEST_DIR=${BUILD_DIR}/test
-   local add_args=()
-
-   if [[ ${install_method} == venv ]]; then
-   # create a quasi-venv
-   mkdir -p "${TEST_DIR}"/bin || die
-   ln -s "${PYTHON}" "${TEST_DIR}/bin/${EPYTHON}" || die
-   ln -s "${EPYTHON}" "${TEST_DIR}/bin/python3" || die
-   ln -s "${EPYTHON}" "${TEST_DIR}/bin/python" || die
-   cat > "${TEST_DIR}"/pyvenv.cfg <<-EOF || die
-   include-system-site-packages = true
-   EOF
-
-   # we only do the minimal necessary subset of activate script
-   PATH=${TEST_DIR}/bin:${PATH}
-   # unset PYTHONPATH in order to prevent BUILD_DIR from overriding
-   # venv packages
-   unset PYTHONPATH
-
-   # force root-style install (note: venv adds TEST_DIR to 
prefixes,
-   

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Michał Górny
commit: 8c7703e917f8ff61c4fa7881ef664eb9054c23d6
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Jun 10 18:58:16 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jun 14 12:26:10 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c7703e9

python-r1.eclass: Override PYTHON*_USEDEP in sub-phases

Override the value of PYTHON_USEDEP and PYTHON_SINGLE_USEDEP to match
the current implementation inside sub-phase function.  This makes
it possible to use them in has_version checks with conditional
dependencies.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/python-r1.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index fbc6082a1d92..c5fa6770558f 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.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: python-r1.eclass
@@ -594,6 +594,8 @@ _python_multibuild_wrapper() {
 
local -x EPYTHON PYTHON
local -x PATH=${PATH} PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
+   local PYTHON_USEDEP="python_targets_${MULTIBUILD_VARIANT}(-)"
+   local 
PYTHON_SINGLE_USEDEP="python_single_target_${MULTIBUILD_VARIANT}(-)"
_python_export "${MULTIBUILD_VARIANT}" EPYTHON PYTHON
_python_wrapper_setup
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Michał Górny
commit: 030257a29d8a9900668ba0b57a21250ab600d232
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Jun  3 01:00:14 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jun 14 12:26:09 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=030257a2

distutils-r1.eclass: Change "PEP 517" to "PEP517", for consistency

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index afed1fa547d1..61c0a80323ec 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -99,7 +99,7 @@ esac
 # @PRE_INHERIT
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Enable the PEP 517 mode for the specified build system.  In this mode,
+# Enable the PEP517 mode for the specified build system.  In this mode,
 # the complete build and install is done in python_compile(),
 # a venv-style install tree is provided to python_test(),
 # and python_install() just merges the temporary install tree
@@ -182,7 +182,7 @@ esac
 # This is an eclass-generated build-time dependency string for the build
 # system packages.  This string is automatically appended to BDEPEND
 # unless DISTUTILS_OPTIONAL is used.  This variable is available only
-# in PEP 517 mode.
+# in PEP517 mode.
 #
 # Example use:
 # @CODE
@@ -1221,7 +1221,7 @@ distutils_wheel_install() {
 # @FUNCTION: distutils_pep517_install
 # @USAGE: 
 # @DESCRIPTION:
-# Build the wheel for the package in the current directory using PEP 517
+# Build the wheel for the package in the current directory using PEP517
 # backend and install it into .
 #
 # This function is intended for expert use only.  It does not handle



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Michał Górny
commit: 75da06793abc7dc2dc5fc0faec81fad7c56d9d45
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Jun  2 17:59:01 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jun 14 12:26:07 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75da0679

distutils-r1.eclass: Remove support for `d_e_t --install`

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 17 ++---
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 3d72a5d3d554..f0d9d3a4b937 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -566,7 +566,7 @@ distutils_enable_sphinx() {
 }
 
 # @FUNCTION: distutils_enable_tests
-# @USAGE: [--install] 
+# @USAGE: 
 # @DESCRIPTION:
 # Set up IUSE, RESTRICT, BDEPEND and python_test() for running tests
 # with the specified test runner.  Also copies the current value
@@ -578,10 +578,6 @@ distutils_enable_sphinx() {
 #
 # - unittest: for built-in Python unittest module
 #
-# Additionally, if --install is passed as the first parameter,
-# 'distutils_install_for_testing --via-root' is called before running
-# the test suite.
-#
 # This function is meant as a helper for common use cases, and it only
 # takes care of basic setup.  You still need to list additional test
 # dependencies manually.  If you have uncommon use case, you should
@@ -592,14 +588,9 @@ distutils_enable_sphinx() {
 distutils_enable_tests() {
debug-print-function ${FUNCNAME} "${@}"
 
-   _DISTUTILS_TEST_INSTALL=
case ${1} in
--install)
-   if [[ ${DISTUTILS_USE_PEP517} ]]; then
-   die "${FUNCNAME} --install is not implemented 
in PEP517 mode"
-   fi
-   _DISTUTILS_TEST_INSTALL=1
-   shift
+   die "${FUNCNAME} --install is no longer supported"
;;
esac
 
@@ -1679,10 +1670,6 @@ distutils-r1_python_test() {
 
_python_check_EPYTHON
 
-   if [[ ${_DISTUTILS_TEST_INSTALL} ]]; then
-   distutils_install_for_testing
-   fi
-
case ${_DISTUTILS_TEST_RUNNER} in
pytest)
epytest



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Michał Górny
commit: f5102bba40a66015d03da8f20387c0f9f40d56f9
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jun  1 09:17:46 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jun 14 12:26:06 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5102bba

distutils-r1.eclass: Doc DISTUTILS_IN_SOURCE_BUILD as deprecated

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 392725d48121..2b610a4d2ceb 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -371,6 +371,7 @@ unset -f _distutils_set_globals
 
 # @ECLASS_VARIABLE: DISTUTILS_IN_SOURCE_BUILD
 # @DEFAULT_UNSET
+# @DEPRECATED: (none)
 # @DESCRIPTION:
 # If set to a non-null value, in-source builds will be enabled.
 # If unset, the default is to use in-source builds when python_prepare()
@@ -384,6 +385,9 @@ unset -f _distutils_set_globals
 # on the sources directly, prepending setup.py arguments with
 # 'build --build-base ${BUILD_DIR}' to enforce keeping & using built
 # files in the specific root.
+#
+# In-source builds are deprecated and no longer supported in PEP517
+# mode.
 
 # @ECLASS_VARIABLE: DISTUTILS_ALL_SUBPHASE_IMPLS
 # @DEFAULT_UNSET



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Michał Górny
commit: a3266609c65361d1dc2e7c1be9c91721c899750a
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jun  1 09:09:37 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jun 14 12:26:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3266609

distutils-r1.eclass: Remove doc for DOCS, HTML_DOCS and PATCHES

Remove the redundant (and outdated) documentation for the DOCS,
HTML_DOCS and PATCHES variables.  All these variables are handled
through the default EAPI functions.

Closes: https://bugs.gentoo.org/932802
Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 46 --
 1 file changed, 46 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 71b80fafe1a5..eac4d592efaf 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -364,52 +364,6 @@ _distutils_set_globals() {
 _distutils_set_globals
 unset -f _distutils_set_globals
 
-# @ECLASS_VARIABLE: PATCHES
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# An array containing patches to be applied to the sources before
-# copying them.
-#
-# If unset, no custom patches will be applied.
-#
-# Please note, however, that at some point the eclass may apply
-# additional distutils patches/quirks independently of this variable.
-#
-# Example:
-# @CODE
-# PATCHES=( "${FILESDIR}"/${P}-make-gentoo-happy.patch )
-# @CODE
-
-# @ECLASS_VARIABLE: DOCS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# An array containing documents installed using dodoc. The files listed
-# there must exist in the directory from which
-# distutils-r1_python_install_all() is run (${S} by default).
-#
-# If unset, the function will instead look up files matching default
-# filename pattern list (from the Package Manager Specification),
-# and install those found.
-#
-# Example:
-# @CODE
-# DOCS=( NEWS README )
-# @CODE
-
-# @ECLASS_VARIABLE: HTML_DOCS
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# An array containing documents installed using dohtml. The files
-# and directories listed there must exist in the directory from which
-# distutils-r1_python_install_all() is run (${S} by default).
-#
-# If unset, no HTML docs will be installed.
-#
-# Example:
-# @CODE
-# HTML_DOCS=( doc/html/. )
-# @CODE
-
 # @ECLASS_VARIABLE: DISTUTILS_IN_SOURCE_BUILD
 # @DEFAULT_UNSET
 # @DESCRIPTION:



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Michał Górny
commit: d344e223068c8d9eb695ba464facb4451bb07d5c
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jun  1 09:14:26 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jun 14 12:26:05 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d344e223

distutils-r1.eclass: Doc DISTUTILS_OPTIONAL + DISTUTILS_SINGLE_IMPL

Closes: https://bugs.gentoo.org/780807
Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 5 +
 1 file changed, 5 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index eac4d592efaf..392725d48121 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -78,6 +78,11 @@ esac
 # for your package (using ${PYTHON_DEPS}) and to either call
 # distutils-r1 default phase functions or call the build system
 # manually.
+#
+# Note that if DISTUTILS_SINGLE_IMPL is used, python-single-r1 exports
+# pkg_setup() function.  In that case, it is necessary to redefine
+# pkg_setup() to call python-single-r1_pkg_setup over correct
+# conditions.
 
 # @ECLASS_VARIABLE: DISTUTILS_SINGLE_IMPL
 # @DEFAULT_UNSET



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Miroslav Šulc
commit: 3e3b6279bd902e90032243148e7c96cc755afc6d
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Fri Jun 14 12:12:00 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Fri Jun 14 12:19:36 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e3b6279

Revert "java-utils-2.eclass: eerror if java-utils-2 is inherited directly"

This reverts commit 41faa907e3a36f4ed00aced3499d469abb865281.

Bug: https://bugs.gentoo.org/207098
Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/37156
Signed-off-by: Miroslav Šulc  gentoo.org>

 eclass/java-utils-2.eclass | 6 --
 1 file changed, 6 deletions(-)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index b72a00b352d2..adbc5242053a 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -34,12 +34,6 @@ export WANT_JAVA_CONFIG="2"
 
 has test ${JAVA_PKG_IUSE} && RESTRICT+=" !test? ( test )"
 
-# this eclass must be inherited after java-pkg-2 or java-pkg-opt-2
-# bug #207098
-if ! has java-pkg-2 ${INHERITED} && ! has java-pkg-opt-2 ${INHERITED}; then
-   eerror "java-utils-2 eclass must not be inherited directly."
-fi
-
 # @VARIABLE: JAVA_PKG_E_DEPEND
 # @INTERNAL
 # @DESCRIPTION:



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Miroslav Šulc
commit: a065e86dbe3e86803ae1f656b86ee0278ab4b835
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Tue Feb 13 07:32:45 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Fri Jun 14 10:00:10 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a065e86d

java-utils-2.eclass: improve message of java-pkg_die

Closes: https://bugs.gentoo.org/591142
Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Signed-off-by: Miroslav Šulc  gentoo.org>

 eclass/java-utils-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 1e0555742b84..ac0c67942b41 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -2816,7 +2816,7 @@ java-pkg_die() {
echo "!!! When you file a bug report, please include the following 
information:" >&2
echo "GENTOO_VM=${GENTOO_VM}  CLASSPATH=\"${CLASSPATH}\" 
JAVA_HOME=\"${JAVA_HOME}\"" >&2
echo "JAVACFLAGS=\"${JAVACFLAGS}\" COMPILER=\"${GENTOO_COMPILER}\"" >&2
-   echo "and of course, the output of emerge --info =${P}" >&2
+   echo "and of course, the output of emerge --info =${CATEGORY}/${PF}" >&2
 }
 
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Miroslav Šulc
commit: b18c31b629bfbcf3d1882cff297d96ec7725b459
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Mon Feb 12 09:47:43 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Fri Jun 14 10:00:05 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b18c31b6

java-utils-2.eclass: solve Unexpected tag in "funcvar" state

Closes: https://bugs.gentoo.org/637768
Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Signed-off-by: Miroslav Šulc  gentoo.org>

 eclass/java-utils-2.eclass | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 47123287ce70..58463fd5e1ed 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -319,12 +319,15 @@ java-pkg_doexamples() {
 # arguments are passed through to find.
 #
 # @CODE
+# Parameters:
+# $1 - jar file
+# $2 - resource tree directory
+# $* - arguments to pass to find
+#
+# Example:
 #  java-pkg_addres ${PN}.jar resources ! -name "*.html"
 # @CODE
 #
-# @param $1 - jar file
-# @param $2 - resource tree directory
-# @param $* - arguments to pass to find
 java-pkg_addres() {
debug-print-function ${FUNCNAME} $*
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Miroslav Šulc
commit: ad8cd90f68f7448bbaf6d4501a28ffb41555305f
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Sun May 26 08:00:48 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Fri Jun 14 10:00:10 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad8cd90f

java-utils-2.eclass: drop redundant java-pkg_get-current-vm()

Removes the first of two different versions of java-pkg_get-current-vm()

Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/35287
Signed-off-by: Miroslav Šulc  gentoo.org>

 eclass/java-utils-2.eclass | 4 
 1 file changed, 4 deletions(-)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index bc6fe9086583..b72a00b352d2 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -1646,10 +1646,6 @@ java-pkg_set-current-vm() {
export GENTOO_VM=${1}
 }
 
-java-pkg_get-current-vm() {
-   echo ${GENTOO_VM}
-}
-
 java-pkg_current-vm-matches() {
has $(java-pkg_get-current-vm) ${@}
return $?



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Miroslav Šulc
commit: 41faa907e3a36f4ed00aced3499d469abb865281
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Mon Feb 26 09:37:01 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Fri Jun 14 10:00:10 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41faa907

java-utils-2.eclass: eerror if java-utils-2 is inherited directly

Closes: https://bugs.gentoo.org/207098
Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Signed-off-by: Miroslav Šulc  gentoo.org>

 eclass/java-utils-2.eclass | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index ac0c67942b41..bc6fe9086583 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -34,6 +34,12 @@ export WANT_JAVA_CONFIG="2"
 
 has test ${JAVA_PKG_IUSE} && RESTRICT+=" !test? ( test )"
 
+# this eclass must be inherited after java-pkg-2 or java-pkg-opt-2
+# bug #207098
+if ! has java-pkg-2 ${INHERITED} && ! has java-pkg-opt-2 ${INHERITED}; then
+   eerror "java-utils-2 eclass must not be inherited directly."
+fi
+
 # @VARIABLE: JAVA_PKG_E_DEPEND
 # @INTERNAL
 # @DESCRIPTION:



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-14 Thread Miroslav Šulc
commit: d7462249b3a531af33ca05b99a02806f580fa032
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Tue Feb 13 07:19:02 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Fri Jun 14 10:00:10 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7462249

java-utils-2.eclass: prepend "QA Notice" to eqawarn

Closes: https://bugs.gentoo.org/813342
Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Signed-off-by: Miroslav Šulc  gentoo.org>

 eclass/java-utils-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 58463fd5e1ed..1e0555742b84 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -2934,7 +2934,7 @@ java-pkg_ensure-dep() {
 #  if is-java-strict; then
 #  die "${dev_error}"
 #  else
-   eqawarn "java-pkg_ensure-dep: ${dev_error}"
+   eqawarn "QA Notice: java-pkg_ensure-dep: ${dev_error}"
 #  eerror "Because you have ${target_pkg} installed,"
 #  eerror "the package will build without problems, but 
please"
 #  eerror "report this to https://bugs.gentoo.org.;
@@ -2945,7 +2945,7 @@ java-pkg_ensure-dep() {
 #  if is-java-strict; then
 #  die "${dev_error}"
 #  else
-   eqawarn "java-pkg_ensure-dep: ${dev_error}"
+   eqawarn "QA Notice: java-pkg_ensure-dep: ${dev_error}"
 #  eerror "The package will build without problems, but 
may fail to run"
 #  eerror "if you don't have ${target_pkg} installed,"
 #  eerror "so please report this to 
https://bugs.gentoo.org.;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-13 Thread Ulrich Müller
commit: e4333a984533c5d42d637f42a388f90b5eb8b856
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Jun 13 18:33:07 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Jun 13 18:35:31 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4333a98

rebar.eclass: Fix EPREFIX and ED usage

The path returned by $(get_erl_libs) starts with a slash, so
${EPREFIX}/$(get_erl_libs) resulted in a double slash.

Fixes: 7ee6937e6219f250559ee26eb64e5991b27cd289
Closes: https://bugs.gentoo.org/770283
Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/rebar.eclass | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index c1a3aca67b54..1c131dd496be 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.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: rebar.eclass
@@ -63,7 +63,7 @@ _rebar_find_dep() {
local p
local result
 
-   pushd "${EPREFIX}/$(get_erl_libs)" >/dev/null || return 1
+   pushd "${EPREFIX}$(get_erl_libs)" >/dev/null || return 1
for p in ${pn} ${pn}-*; do
if [[ -d ${p} ]]; then
# Ensure there's at most one matching.
@@ -102,7 +102,7 @@ erebar() {
 
(( $# > 0 )) || die "erebar: at least one target is required"
 
-   local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)"
+   local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
[[ ${1} == eunit ]] && local -x ERL_LIBS="."
 
rebar -v skip_deps=true "$@" || die -n "rebar $@ failed"
@@ -123,7 +123,7 @@ rebar_fix_include_path() {
 
local pn="${1}"
local rebar_config="${2:-rebar.config}"
-   local erl_libs="${EPREFIX}/$(get_erl_libs)"
+   local erl_libs="${EPREFIX}$(get_erl_libs)"
local p
 
p="$(_rebar_find_dep "${pn}")" \
@@ -212,7 +212,7 @@ rebar_src_prepare() {
 rebar_src_configure() {
debug-print-function ${FUNCNAME} "${@}"
 
-   local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)"
+   local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
default
 }
 
@@ -252,7 +252,7 @@ rebar_src_install() {
[[ -d bin ]] && for bin in bin/*; do dobin "$bin"; done
 
if [[ -d priv ]]; then
-   cp -pR priv "${ED%/}/${dest}/" || die "failed to install priv/"
+   cp -pR priv "${ED%/}${dest}/" || die "failed to install priv/"
fi
 
einstalldocs



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-13 Thread Andreas Sturmlechner
commit: 500eb409f00c5714f78325d171e60789603156e7
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu Jun 13 17:32:27 2024 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Jun 13 20:42:12 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=500eb409

ecm.eclass: For _KFSLOT=6, RDEPEND on >=kde-frameworks/kf-env-6

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/ecm.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index d36b11ebd5e8..518f913815be 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -277,14 +277,15 @@ BDEPEND+="
dev-libs/libpcre2:*
>=kde-frameworks/extra-cmake-modules-${KFMIN}:*
 "
-RDEPEND+=" >=kde-frameworks/kf-env-4"
 if [[ ${ECM_TEST} != false ]]; then
IUSE+=" test"
RESTRICT+=" !test? ( test )"
 fi
 if [[ ${_KFSLOT} == 6 ]]; then
+   RDEPEND+=" >=kde-frameworks/kf-env-6"
COMMONDEPEND+=" dev-qt/qtbase:${_KFSLOT}"
 else
+   RDEPEND+=" >=kde-frameworks/kf-env-4"
COMMONDEPEND+=" dev-qt/qtcore:${_KFSLOT}"
if [[ ${ECM_TEST} != false ]]; then
DEPEND+=" test? ( dev-qt/qttest:5 )"



[gentoo-commits] repo/gentoo:master commit in: eclass/tests/

2024-06-13 Thread Ulrich Müller
commit: ba67b6e7fd84fff922569627003bb3ae326c7f41
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Jun 13 18:29:44 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Jun 13 18:35:30 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba67b6e7

eclass/tests: Rename test function in savedconfig.sh

Overriding a shell builtin command is generally a very bad idea,
especially when that command is used in code that is sourced (in this
case, /lib/gentoo/functions.sh). Therefore, rename test() to test_sc().

Also make sure that the directories that are used as targets for rm -rf
in cleanup() are actually different from the root directory.

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/tests/savedconfig.sh | 22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/eclass/tests/savedconfig.sh b/eclass/tests/savedconfig.sh
index 16645fc05854..ad03ce2d2d94 100755
--- a/eclass/tests/savedconfig.sh
+++ b/eclass/tests/savedconfig.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -18,7 +18,13 @@ quiet() {
 sc() { EBUILD_PHASE=install quiet save_config "$@" ; }
 rc() { EBUILD_PHASE=prepare quiet restore_config "$@" ; }
 
-cleanup() { rm -rf "${ED}"/* "${T}"/* "${WORKDIR}"/* ; }
+cleanup() {
+   # make sure that these variables exist
+   [[ -n ${ED} && -n ${T} && -n ${WORKDIR} ]] \
+   || { die "${FUNCNAME[0]}: undefined variable"; exit 1; }
+   rm -rf "${ED}"/* "${T}"/* "${WORKDIR}"/*
+}
+
 test-it() {
local ret=0
tbegin "$@"
@@ -26,7 +32,7 @@ test-it() {
: $(( ret |= $? ))
pushd "${WORKDIR}" >/dev/null
: $(( ret |= $? ))
-   test
+   test_sc
: $(( ret |= $? ))
popd >/dev/null
: $(( ret |= $? ))
@@ -34,21 +40,21 @@ test-it() {
cleanup
 }
 
-test() {
+test_sc() {
touch f || return 1
sc f || return 1
[[ -f ${ED}/etc/portage/savedconfig/${CATEGORY}/${PF} ]]
 }
 test-it "simple save_config"
 
-test() {
+test_sc() {
touch a b c || return 1
sc a b c || return 1
[[ -d ${ED}/etc/portage/savedconfig/${CATEGORY}/${PF} ]]
 }
 test-it "multi save_config"
 
-test() {
+test_sc() {
mkdir dir || return 1
touch dir/{a,b,c} || return 1
sc dir || return 1
@@ -58,14 +64,14 @@ test-it "dir save_config"
 
 PORTAGE_CONFIGROOT=${D}
 
-test() {
+test_sc() {
echo "ggg" > f || return 1
rc f || return 1
[[ $( f || return 1
rc f || return 1
[[ $(

[gentoo-commits] repo/gentoo:master commit in: eclass/tests/

2024-06-13 Thread Ulrich Müller
commit: 2d60db117655b37a8c3864f68d30c199a5d3b802
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Jun 13 19:40:54 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Jun 13 19:53:15 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d60db11

eclass/tests: Fail the .%.sh.ok Makefile recipe if the test fails

With .ONESHELL active, only the return status of the final recipe line
will be checked.

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/tests/Makefile | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/tests/Makefile b/eclass/tests/Makefile
index e5d1c3915fe1..99e824dea86d 100644
--- a/eclass/tests/Makefile
+++ b/eclass/tests/Makefile
@@ -2,18 +2,20 @@ SH_FILES := $(wildcard *.sh)
 TEST_FILES := $(filter-out tests-common.sh version-funcs.sh, $(SH_FILES))
 TEST_OK_FILES := $(patsubst %.sh, .%.sh.ok,$ $(TEST_FILES))
 
+# !!! _All_ recipe lines for each target will be provided to a single
+# !!! invocation of the shell.
+.ONESHELL:
+
 # We cache a successful test result if the testfile itself did not
 # change (%.sh) and the contents of the eclass/ directory did not
 # change (.eclasssum).
 .%.sh.ok: %.sh .eclasssum
-   ./$<
-   touch $@
+   ./$< && touch $@
 
 .PHONY: test
 test: $(TEST_OK_FILES)
 
 .PHONY: force
-.ONESHELL:
 .eclasssum: SHELL = /bin/bash
 .eclasssum: force
set -euo pipefail



[gentoo-commits] repo/gentoo:master commit in: eclass/tests/

2024-06-13 Thread Ulrich Müller
commit: 0fcc9d42818f61e8e094bae67740a656b6d16caa
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Jun 13 19:39:31 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Jun 13 19:53:14 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fcc9d42

eclass/tests: Filter version-funcs.sh from the list of tests

Fixes: 16b2c5ebb2869f4132536e5eb0a465b534556fb6
Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/tests/Makefile b/eclass/tests/Makefile
index ee4a454912c3..e5d1c3915fe1 100644
--- a/eclass/tests/Makefile
+++ b/eclass/tests/Makefile
@@ -1,5 +1,5 @@
 SH_FILES := $(wildcard *.sh)
-TEST_FILES := $(filter-out tests-common.sh, $(SH_FILES))
+TEST_FILES := $(filter-out tests-common.sh version-funcs.sh, $(SH_FILES))
 TEST_OK_FILES := $(patsubst %.sh, .%.sh.ok,$ $(TEST_FILES))
 
 # We cache a successful test result if the testfile itself did not



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-13 Thread Ulrich Müller
commit: a74cd3b3c5b4ac4cdc793e42ad04cd60f750fa17
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Jun 13 18:34:34 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Jun 13 18:35:32 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a74cd3b3

rebar.eclass: Drop support for EAPI 6

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/rebar.eclass | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index 1c131dd496be..97638c761814 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.eclass
@@ -6,7 +6,7 @@
 # maintainer-nee...@gentoo.org
 # @AUTHOR:
 # Amadeusz Żołnowski 
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: Build Erlang/OTP projects using dev-util/rebar.
 # @DESCRIPTION:
 # An eclass providing functions to build Erlang/OTP projects using
@@ -20,7 +20,7 @@
 # installation in a generic way for Erlang/OTP structured projects.
 
 case ${EAPI} in
-   6|7|8) ;;
+   7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
@@ -33,9 +33,6 @@ BDEPEND="
dev-util/rebar:0
>=sys-apps/gawk-4.1
 "
-if [[ ${EAPI} == 6 ]]; then
-   DEPEND+=" ${BDEPEND}"
-fi
 
 # @ECLASS_VARIABLE: REBAR_APP_SRC
 # @DESCRIPTION:
@@ -252,7 +249,7 @@ rebar_src_install() {
[[ -d bin ]] && for bin in bin/*; do dobin "$bin"; done
 
if [[ -d priv ]]; then
-   cp -pR priv "${ED%/}${dest}/" || die "failed to install priv/"
+   cp -pR priv "${ED}${dest}/" || die "failed to install priv/"
fi
 
einstalldocs



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-13 Thread Miroslav Šulc
commit: ad91645400d2f60a4c19a7f41024a70a499d8ea5
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Sat Jun  8 07:26:08 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Thu Jun 13 13:21:05 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad916454

java-vm-2.eclass: drop EAPI 7

Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Signed-off-by: Miroslav Šulc  gentoo.org>

 eclass/java-vm-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass
index e5d3159f2854..c7a207ae24f7 100644
--- a/eclass/java-vm-2.eclass
+++ b/eclass/java-vm-2.eclass
@@ -4,14 +4,14 @@
 # @ECLASS: java-vm-2.eclass
 # @MAINTAINER:
 # j...@gentoo.org
-# @SUPPORTED_EAPIS: 7 8
+# @SUPPORTED_EAPIS: 8
 # @BLURB: Java Virtual Machine eclass
 # @DESCRIPTION:
 # This eclass provides functionality which assists with installing
 # virtual machines, and ensures that they are recognized by java-config.
 
 case ${EAPI} in
-   7|8) ;;
+   8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-12 Thread James Le Cuirot
commit: 82ae7b64442ed6fb9ea99e6d64af1eb173a54adb
Author: James Le Cuirot  gentoo  org>
AuthorDate: Wed Jun 12 16:59:23 2024 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Wed Jun 12 17:13:21 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82ae7b64

rust-toolchain.eclass: Drop unused rust_all_abis() and multilib inherit

multilib USE flags have unintentionally appeared against all Cargo
packages since this eclass was used by cargo.eclass. The rust_all_abis()
function is not used anywhere though, and removing it makes the
multilib-build inherit that is causing the issue redundant.

Signed-off-by: James Le Cuirot  gentoo.org>

 eclass/rust-toolchain.eclass | 25 ++---
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass
index 5484d150614f..111aece796ce 100644
--- a/eclass/rust-toolchain.eclass
+++ b/eclass/rust-toolchain.eclass
@@ -7,17 +7,14 @@
 # @SUPPORTED_EAPIS: 8
 # @BLURB: helps map gentoo arches to rust ABIs
 # @DESCRIPTION:
-# This eclass contains a src_unpack default phase function, and
-# helper functions, to aid in proper rust-ABI handling for various
-# gentoo arches.
+# This eclass contains helper functions, to aid in proper rust-ABI handling for
+# various gentoo arches.
 
 case ${EAPI} in
8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
-inherit multilib-build
-
 # @ECLASS_VARIABLE: RUST_TOOLCHAIN_BASEURL
 # @DESCRIPTION:
 # This variable specifies the base URL used by the
@@ -57,24 +54,6 @@ rust_abi() {
   esac
 }
 
-# @FUNCTION: rust_all_abis
-# @DESCRIPTION:
-# Outputs a list of all the enabled Rust ABIs
-rust_all_abis() {
-   if use multilib; then
-   local abi
-   local ALL_ABIS=()
-   for abi in $(multilib_get_enabled_abis); do
-   ALL_ABIS+=( $(rust_abi $(get_abi_CHOST ${abi})) )
-   done
-   local abi_list
-   IFS=, eval 'abi_list=${ALL_ABIS[*]}'
-   echo ${abi_list}
-   else
-   rust_abi
-   fi
-}
-
 # @FUNCTION: rust_arch_uri
 # @USAGE:   [alt-distfile-basename]
 # @DESCRIPTION:



[gentoo-commits] repo/gentoo:master commit in: eclass/tests/

2024-06-12 Thread Ulrich Müller
commit: 8c8239bdffa74b2c12ff9bbb5c25d62947e9a0a2
Author: Ulrich Müller  gentoo  org>
AuthorDate: Wed Jun 12 15:37:07 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Jun 12 16:47:34 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c8239bd

eclass/tests: Drop FreeBSD test from toolchain-funcs.sh

Prefix targets have been dropped from toolchain-funcs.eclass in
commit cab79611b07c9eb. Update tests accordingly.

Fixes: cab79611b07c9ebb795c6f65562ef72ba77550b1
Closes: https://bugs.gentoo.org/934150
Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/tests/toolchain-funcs.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index 08cfd74611aa..ee10ddf50c1e 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -28,7 +28,7 @@ test-tc-arch-kernel() {
 tbegin "tc-arch-kernel() (KV=2.6.30)"
 test-tc-arch-kernel 2.6.30 \
i{3..6}86:x86 x86_64:x86 \
-   powerpc{,64}:powerpc i{3..6}86-gentoo-freebsd:i386 \
+   powerpc{,64}:powerpc \
or1k:openrisc or1k-linux-musl:openrisc
 tend $?
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-12 Thread Patrick Lauer
commit: 7abcd95126ff4da8684953573eec02e2c71059cb
Author: Patrick Lauer  gentoo  org>
AuthorDate: Wed Jun 12 16:35:30 2024 +
Commit: Patrick Lauer  gentoo  org>
CommitDate: Wed Jun 12 16:36:20 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7abcd951

postgres-multi.eclass: Fix annotations

Signed-off-by: Patrick Lauer  gentoo.org>

 eclass/postgres-multi.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass
index 52ca83b9126f..92299b8cf34c 100644
--- a/eclass/postgres-multi.eclass
+++ b/eclass/postgres-multi.eclass
@@ -6,7 +6,7 @@
 # PostgreSQL 
 # @AUTHOR:
 # Aaron W. Swenson 
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
 # @PROVIDES: multibuild postgres
 # @BLURB: An eclass to build PostgreSQL-related packages against multiple slots
 # @DESCRIPTION:



[gentoo-commits] repo/gentoo:master commit in: eclass/tests/

2024-06-12 Thread Michał Górny
commit: 2a7763a875ff6f4a74b6c40c0238a50febcfafab
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Jun 12 15:34:29 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Jun 12 15:35:31 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a7763a8

eclass/tests: Remove git-r3.sh

Remove base git-r3 tests, they are broken for a long time and I can't
figure out how to fix them properly.  There is probably no point
in testing these functions standalone anyway since they're extensively
used by ebuilds.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/tests/git-r3.sh | 208 -
 1 file changed, 208 deletions(-)

diff --git a/eclass/tests/git-r3.sh b/eclass/tests/git-r3.sh
deleted file mode 100755
index 02cbcbc59125..
--- a/eclass/tests/git-r3.sh
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# git no longer allows ext: protocol, meh
-exit 0
-
-EAPI=7
-
-source tests-common.sh || exit
-
-inherit git-r3
-
-testdir=${pkg_root}/git
-mkdir "${testdir}" || die "unable to mkdir testdir"
-cd "${testdir}" || die "unable to cd to testdir"
-
-EGIT3_STORE_DIR=store
-mkdir "${EGIT3_STORE_DIR}" || die "unable to mkdir store"
-
-test_file() {
-   local fn=${1}
-   local expect=${2}
-
-   if [[ ! -f ${fn} ]]; then
-   eerror "${fn} does not exist (not checked out?)"
-   else
-   local got=$(<"${fn}")
-
-   if [[ ${got} != ${expect} ]]; then
-   eerror "${fn}, expected: ${expect}, got: ${got}"
-   else
-   return 0
-   fi
-   fi
-   return 1
-}
-
-test_no_file() {
-   local fn=${1}
-
-   if [[ -f ${fn} ]]; then
-   eerror "${fn} exists (wtf?!)"
-   else
-   return 0
-   fi
-   return 1
-}
-
-test_repo_clean() {
-   local P=${P}_${FUNCNAME#test_}
-
-   (
-   mkdir repo
-   cd repo
-   git init -q
-   echo test > file
-   git add file
-   git commit -m 1 -q
-   echo other-text > file2
-   git add file2
-   git commit -m 2 -q
-   ) || die "unable to prepare repo"
-
-   # we need to use an array to preserve whitespace
-   local EGIT_REPO_URI=(
-   "ext::git daemon --export-all --base-path=. --inetd %G/repo"
-   )
-
-   tbegin "fetching from a simple repo"
-   (
-   git-r3_src_unpack
-   test_file "${WORKDIR}/${P}/file" test && \
-   test_file "${WORKDIR}/${P}/file2" other-text
-   ) &>fetch.log
-
-   eend ${?} || cat fetch.log
-}
-
-test_repo_revert() {
-   local P=${P}_${FUNCNAME#test_}
-
-   (
-   cd repo
-   git revert -n HEAD^
-   git commit -m r1 -q
-   ) || die "unable to prepare repo"
-
-   # we need to use an array to preserve whitespace
-   local EGIT_REPO_URI=(
-   "ext::git daemon --export-all --base-path=. --inetd %G/repo"
-   )
-
-   tbegin "fetching revert"
-   (
-   git-r3_src_unpack
-   test_no_file "${WORKDIR}/${P}/file" && \
-   test_file "${WORKDIR}/${P}/file2" other-text
-   ) &>fetch.log
-
-   eend ${?} || cat fetch.log
-}
-
-test_repo_branch() {
-   local P=${P}_${FUNCNAME#test_}
-
-   (
-   cd repo
-   git branch -q other-branch HEAD^
-   git checkout -q other-branch
-   echo one-more > file3
-   git add file3
-   git commit -m 3 -q
-   git checkout -q master
-   ) || die "unable to prepare repo"
-
-   # we need to use an array to preserve whitespace
-   local EGIT_REPO_URI=(
-   "ext::git daemon --export-all --base-path=. --inetd %G/repo"
-   )
-   local EGIT_BRANCH=other-branch
-
-   tbegin "switching branches"
-   (
-   git-r3_src_unpack
-   test_file "${WORKDIR}/${P}/file" test && \
-   test_file "${WORKDIR}/${P}/file2" other-text && \
-   test_file "${WORKDIR}/${P}/file3" one-more
-   ) &>fetch.log
-
-   eend ${?} || cat fetch.log
-}
-
-test_repo_merge() {
-   local P=${P}_${FUNCNAME#test_}
-
-   (
-   cd repo
-   git branch -q one-more-branch HEAD^
-   git checkout -q one-more-branch
-   echo foobarbaz > file3
-   git add file3
-   git commit -m 3b -q
-   git checkout -q master
-   git merge -m 4 -q one-more-branch
-   ) || die "unable to prepare repo"
-
-   # we need to use an array to preserve whitespace
-   local EGIT_REPO_URI=(
-   "ext::git daemon --export-all --base-path=. --inetd %G/repo"
-   )
-
- 

[gentoo-commits] repo/gentoo:master commit in: eclass/tests/

2024-06-12 Thread Ulrich Müller
commit: dfbc5ab206ba0da4c5fcab2559bb662fb46084a1
Author: Ulrich Müller  gentoo  org>
AuthorDate: Wed Jun 12 15:28:23 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Jun 12 15:31:47 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfbc5ab2

eclass/tests: Make *-bench.sh work with reference dc

dc from sys-devel/bc doesn't support the -S option. Set the precision
with the k command instead.

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/tests/cargo-bench.sh| 4 ++--
 eclass/tests/pypi-bench.sh | 4 ++--
 eclass/tests/python-utils-bench.sh | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/tests/cargo-bench.sh b/eclass/tests/cargo-bench.sh
index d30b04569905..9347fe339c12 100755
--- a/eclass/tests/cargo-bench.sh
+++ b/eclass/tests/cargo-bench.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -39,7 +39,7 @@ timeit() {
local xr avg
for x in real user; do
xr="${x}[*]"
-   avg=$(dc -S 3 -e "${ITERATIONS} ${RUNS} * ${!xr} + + / p")
+   avg=$(dc -e "3 k ${ITERATIONS} ${RUNS} * ${!xr} + + / p")
 
printf '%s %4.0f it/s\n' "${x}" "${avg}"
done

diff --git a/eclass/tests/pypi-bench.sh b/eclass/tests/pypi-bench.sh
index cce93527b729..02855563db3f 100755
--- a/eclass/tests/pypi-bench.sh
+++ b/eclass/tests/pypi-bench.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -39,7 +39,7 @@ timeit() {
local xr avg
for x in real user; do
xr="${x}[*]"
-   avg=$(dc -S 3 -e "${ITERATIONS} ${RUNS} * ${!xr} + + / p")
+   avg=$(dc -e "3 k ${ITERATIONS} ${RUNS} * ${!xr} + + / p")
 
printf '%s %4.0f it/s\n' "${x}" "${avg}"
done

diff --git a/eclass/tests/python-utils-bench.sh 
b/eclass/tests/python-utils-bench.sh
index 7f27adef5509..f718b9f125cb 100755
--- a/eclass/tests/python-utils-bench.sh
+++ b/eclass/tests/python-utils-bench.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -38,7 +38,7 @@ timeit() {
local xr avg
for x in real user; do
xr="${x}[*]"
-   avg=$(dc -S 3 -e "${ITERATIONS} ${RUNS} * ${!xr} + + / p")
+   avg=$(dc -e "3 k ${ITERATIONS} ${RUNS} * ${!xr} + + / p")
 
printf '%s %4.0f it/s\n' "${x}" "${avg}"
done



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-12 Thread Patrick Lauer
commit: 64a7bf34f31437b26886cc75cff8d5585fc50236
Author: Patrick Lauer  gentoo  org>
AuthorDate: Wed Jun 12 14:16:14 2024 +
Commit: Patrick Lauer  gentoo  org>
CommitDate: Wed Jun 12 14:27:05 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a7bf34

postgres-multi.eclass: Add EAPI 8 support

Previously blocked by postgres.eclass, which was fixed in
304ab5e1acc056aca413ed69bc6791270502cbce

Signed-off-by: Patrick Lauer  gentoo.org>

 eclass/postgres-multi.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass
index d93df851cd24..52ca83b9126f 100644
--- a/eclass/postgres-multi.eclass
+++ b/eclass/postgres-multi.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: postgres-multi.eclass
@@ -15,7 +15,7 @@
 # POSTGRES_TARGETS use flags.
 
 case ${EAPI} in
-   7) ;;
+   7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-12 Thread James Le Cuirot
commit: e274b7b2ebe1261cb204064880be78c13300d13d
Author: James Le Cuirot  gentoo  org>
AuthorDate: Fri Jun  7 16:57:37 2024 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Wed Jun 12 13:18:00 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e274b7b2

cargo.eclass: Drop EAPI 7 support

It is going to inherit rust-toolchain, which is EAPI 8 only.

Closes: https://bugs.gentoo.org/715890
Signed-off-by: James Le Cuirot  gentoo.org>

 eclass/cargo.eclass | 19 ++-
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index a685cd99fb38..72c740cda906 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -7,11 +7,11 @@
 # @AUTHOR:
 # Doug Goldstein 
 # Georgy Yakovlev 
-# @SUPPORTED_EAPIS: 7 8
+# @SUPPORTED_EAPIS: 8
 # @BLURB: common functions and variables for cargo builds
 
 case ${EAPI} in
-   7|8) ;;
+   8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
@@ -23,10 +23,6 @@ _CARGO_ECLASS=1
 RUST_DEPEND="virtual/rust"
 
 case ${EAPI} in
-   7)
-   # 1.37 added 'cargo vendor' subcommand and net.offline config 
knob
-   RUST_DEPEND=">=virtual/rust-1.37.0"
-   ;;
8)
# 1.39 added --workspace
# 1.46 added --target dir
@@ -556,17 +552,6 @@ cargo_src_install() {
 
rm -f "${ED}/usr/.crates.toml" || die
rm -f "${ED}/usr/.crates2.json" || die
-
-   # it turned out to be non-standard dir, so get rid of it future EAPI
-   # and only run for EAPI=7
-   # https://bugs.gentoo.org/715890
-   case ${EAPI:-0} in
-   7)
-   if [ -d "${S}/man" ]; then
-   doman "${S}/man" || return 0
-   fi
-   ;;
-   esac
 }
 
 # @FUNCTION: cargo_src_test



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-12 Thread James Le Cuirot
commit: 375da3684e685c6fd8367ffcf37e090526d55e4d
Author: James Le Cuirot  gentoo  org>
AuthorDate: Fri May 31 21:49:47 2024 +
Commit: James Le Cuirot  gentoo  org>
CommitDate: Wed Jun 12 13:18:01 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=375da368

cargo.eclass: Enable cross-compiling by setting environment variables

CARGO_BUILD_TARGET and CARGO_TARGET__LINKER are enough for pure
Rust. The linker otherwise defaults to `cc`. This doesn't respect any
linker specified in LDFLAGS, but this is also true for native builds. We
would need to do something with RUSTFLAGS.

The HOST_* variables are for the cc-rs crate, which is often used to
build non-Rust code. It uses the usual variables (CC, CFLAGS, etc) for
the target.

Signed-off-by: James Le Cuirot  gentoo.org>

 eclass/cargo.eclass | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 72c740cda906..40d98211ce7f 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -34,7 +34,7 @@ case ${EAPI} in
;;
 esac
 
-inherit flag-o-matic multiprocessing toolchain-funcs
+inherit flag-o-matic multiprocessing rust-toolchain toolchain-funcs
 
 [[ ! ${CARGO_OPTIONAL} ]] && BDEPEND="${RUST_DEPEND}"
 
@@ -525,6 +525,21 @@ cargo_src_compile() {
filter-lto
tc-export AR CC CXX PKG_CONFIG
 
+   if tc-is-cross-compiler; then
+   export CARGO_BUILD_TARGET=$(rust_abi)
+   local TRIPLE=${CARGO_BUILD_TARGET//-/_}
+   export CARGO_TARGET_"${TRIPLE^^}"_LINKER=$(tc-getCC)
+
+   # Set vars for cc-rs crate.
+   tc-export_build_env
+   export \
+   HOST_AR=$(tc-getBUILD_AR)
+   HOST_CC=$(tc-getBUILD_CC)
+   HOST_CXX=$(tc-getBUILD_CXX)
+   HOST_CFLAGS=${BUILD_CFLAGS}
+   HOST_CXXFLAGS=${BUILD_CXXFLAGS}
+   fi
+
set -- cargo build $(usex debug "" --release) ${ECARGO_ARGS[@]} "$@"
einfo "${@}"
"${@}" || die "cargo build failed"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-12 Thread Arthur Zamarin
commit: e1e4f7a904235dee36d00eb23dcfcf66519c27e6
Author: Arthur Zamarin  gentoo  org>
AuthorDate: Wed Jun 12 06:57:12 2024 +
Commit: Arthur Zamarin  gentoo  org>
CommitDate: Wed Jun 12 10:23:41 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1e4f7a9

rust-toolchain.eclass: support riscv64*musl

Signed-off-by: Arthur Zamarin  gentoo.org>

 eclass/rust-toolchain.eclass | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass
index 5824a48734f9..5484d150614f 100644
--- a/eclass/rust-toolchain.eclass
+++ b/eclass/rust-toolchain.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: rust-toolchain.eclass
@@ -48,7 +48,8 @@ rust_abi() {
powerpc64le*) echo powerpc64le-unknown-linux-gnu;;
powerpc64*)   echo powerpc64-unknown-linux-gnu;;
powerpc*) echo powerpc-unknown-linux-gnu;;
-   riscv64*) echo riscv64gc-unknown-linux-gnu;;
+   riscv64*gnu)  echo riscv64gc-unknown-linux-gnu;;
+   riscv64*musl) echo riscv64gc-unknown-linux-musl;;
s390x*)   echo s390x-unknown-linux-gnu;;
x86_64*gnu)   echo x86_64-unknown-linux-gnu;;
x86_64*musl)  echo x86_64-unknown-linux-musl;;
@@ -127,7 +128,9 @@ rust_all_arch_uris()
big-endian?  ( $(rust_arch_uri powerpc64-unknown-linux-gnu   
"$@") )
!big-endian? ( $(rust_arch_uri powerpc64le-unknown-linux-gnu 
"$@") )
)
-   riscv? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu "$@") )
+   riscv? (
+   elibc_glibc? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu 
"$@") )
+   )
s390?  ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") )
"
 



[gentoo-commits] repo/gentoo:master commit in: eclass/tests/

2024-06-12 Thread Ulrich Müller
commit: 8629d5a9fc153679289b85189f385af8348f4f25
Author: Ulrich Müller  gentoo  org>
AuthorDate: Wed Jun 12 09:43:49 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Jun 12 09:46:39 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8629d5a9

eclass/tests: Override use() in linux-info_get_running_version.sh

linux-info.eclass checks for the kernel_linux flag since 2018,
introduced with commit 9e7c4b6d2daa9a8b1c33154f8dd296a2d1a26e92.

Closes: https://bugs.gentoo.org/934130
Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/tests/linux-info_get_running_version.sh | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/eclass/tests/linux-info_get_running_version.sh 
b/eclass/tests/linux-info_get_running_version.sh
index 57aaf2fedcd4..b8ae8c4b85ae 100755
--- a/eclass/tests/linux-info_get_running_version.sh
+++ b/eclass/tests/linux-info_get_running_version.sh
@@ -1,12 +1,20 @@
 #!/bin/bash
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
 source tests-common.sh || exit
+source version-funcs.sh || exit
 
 inherit linux-info
 
+use() {
+   case $1 in
+   kernel_linux) return 0 ;;
+   esac
+   die "${FUNCNAME[0]}: unknown flag"
+}
+
 test_get_running_version() {
local test_kv=$1 major=$2 minor=$3 patch=$4 extra=$5
tbegin "get_running_version ${test_kv}"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-10 Thread Ulrich Müller
commit: 34e850c850431cde8a2bb93bc4f763894b3a2d5f
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Jun  8 19:37:10 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Jun 10 14:22:43 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34e850c8

common-lisp-3.eclass: Support EAPI 8

Minor stylistic changes.

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/common-lisp-3.eclass | 22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index 26d31268a598..b859c7859bfb 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -1,17 +1,17 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: common-lisp-3.eclass
 # @MAINTAINER:
 # Common Lisp project 
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 6 7 8
 # @BLURB: functions to support the installation of Common Lisp libraries
 # @DESCRIPTION:
 # Since Common Lisp libraries share similar structure, this eclass aims
 # to provide a simple way to write ebuilds with these characteristics.
 
 case ${EAPI} in
-   6|7) ;;
+   6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
@@ -121,7 +121,8 @@ common-lisp-install-sources() {
 
local fpredicate=$(common-lisp-get-fpredicate "${ftype}")
 
-   for path in "${@}" ; do
+   local path
+   for path ; do
if [[ -f ${path} ]] ; then
common-lisp-install-one-source ${fpredicate} "${path}" 
"$(dirname "${path}")"
elif [[ -d ${path} ]] ; then
@@ -148,7 +149,7 @@ common-lisp-install-sources() {
 # Installs ${1} asdf file in CLSOURCEROOT/CLPACKAGE and symlinks it in
 # CLSYSTEMROOT.
 common-lisp-install-one-asdf() {
-   [[ $# != 1 ]] && die "${FUNCNAME[0]} must receive exactly one argument"
+   [[ $# -eq 1 ]] || die "${FUNCNAME[0]} must receive exactly one argument"
 
# the suffix «.asd» is optional
local source=${1%.asd}.asd
@@ -166,9 +167,11 @@ common-lisp-install-one-asdf() {
 common-lisp-install-asdf() {
dodir "${CLSYSTEMROOT}"
 
-   [[ $# = 0 ]] && set - ${CLSYSTEMS}
-   [[ $# = 0 ]] && set - $(find . -type f -name \*.asd)
-   for sys in "${@}" ; do
+   [[ $# -eq 0 ]] && set - ${CLSYSTEMS}
+   [[ $# -eq 0 ]] && set - $(find . -type f -name \*.asd)
+
+   local sys
+   for sys ; do
common-lisp-install-one-asdf ${sys}
done
 }
@@ -187,6 +190,7 @@ common-lisp-3_src_install() {
 # Outputs an installed Common Lisp implementation. Transverses
 # CLIMPLEMENTATIONS to find it.
 common-lisp-find-lisp-impl() {
+   local lisp
for lisp in ${CLIMPLEMENTATIONS} ; do
[[ "$(best_version dev-lisp/${lisp})" ]] && echo "${lisp}" && 
return
done
@@ -203,7 +207,7 @@ common-lisp-find-lisp-impl() {
 #   * CL_LOAD: load a certain file
 #   * CL_EVAL: eval a certain expression at startup
 common-lisp-export-impl-args() {
-   if [[ $# != 1 ]]; then
+   if [[ $# -ne 1 ]]; then
eerror "Usage: ${FUNCNAME[0]} lisp-implementation"
die "${FUNCNAME[0]}: wrong number of arguments: $#"
fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-10 Thread Ulrich Müller
commit: c84e9a2e8477d99be37fa90357212eb20aa8784a
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Jun  8 19:38:23 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Jun 10 14:22:49 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c84e9a2e

common-lisp-3.eclass: sbcl supports --no-sysinit --no-userinit

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/common-lisp-3.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index b859c7859bfb..99825190f32e 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -215,7 +215,7 @@ common-lisp-export-impl-args() {
case "${CL_BINARY}" in
sbcl)
CL_BINARY="${CL_BINARY} --non-interactive"
-   CL_NORC="--sysinit /dev/null --userinit /dev/null"
+   CL_NORC="--no-sysinit --no-userinit"
CL_LOAD="--load"
CL_EVAL="--eval"
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-10 Thread Joonas Niilola
commit: fd49668a8bb2346908b62a1bfd9fbf9ece5f972b
Author: Martin Dummer  gmx  net>
AuthorDate: Wed May  1 12:49:37 2024 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Mon Jun 10 12:45:21 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd49668a

vdr-plugin-2.eclass: change qa warnings to einfo

many vdr plugins need small adjustments because API or makefile changes
in upstream media-video/vdr which can be easily fixed with small changes
These fixes should no longer be reported as "equawarn", instead now only
an "einfo" will be printed out.

Closes: https://bugs.gentoo.org/925762
Closes: https://bugs.gentoo.org/925763
Closes: https://bugs.gentoo.org/925764
Closes: https://bugs.gentoo.org/925765
Closes: https://bugs.gentoo.org/925766
Closes: https://bugs.gentoo.org/925767
Closes: https://bugs.gentoo.org/925768
Closes: https://bugs.gentoo.org/925769
Closes: https://bugs.gentoo.org/925770
Closes: https://bugs.gentoo.org/925771
Closes: https://bugs.gentoo.org/925773
Closes: https://bugs.gentoo.org/925774
Closes: https://bugs.gentoo.org/925775
Closes: https://bugs.gentoo.org/925776
Closes: https://bugs.gentoo.org/925777
Closes: https://bugs.gentoo.org/925778
Closes: https://bugs.gentoo.org/925779
Closes: https://bugs.gentoo.org/925780
Closes: https://bugs.gentoo.org/925781
Closes: https://bugs.gentoo.org/925782
Closes: https://bugs.gentoo.org/925783
Closes: https://bugs.gentoo.org/925784
Closes: https://bugs.gentoo.org/925785
Closes: https://bugs.gentoo.org/925786
Closes: https://bugs.gentoo.org/925787
Closes: https://bugs.gentoo.org/925788
Closes: https://bugs.gentoo.org/925791
Closes: https://bugs.gentoo.org/925792
Closes: https://bugs.gentoo.org/925793
Closes: https://bugs.gentoo.org/925794
Closes: https://bugs.gentoo.org/925795
Closes: https://bugs.gentoo.org/925796
Closes: https://bugs.gentoo.org/925797
Closes: https://bugs.gentoo.org/925798
Closes: https://bugs.gentoo.org/925799
Closes: https://bugs.gentoo.org/925800
Closes: https://bugs.gentoo.org/925801
Closes: https://bugs.gentoo.org/925802
Closes: https://bugs.gentoo.org/925803
Closes: https://bugs.gentoo.org/925804
Closes: https://bugs.gentoo.org/925805
Closes: https://bugs.gentoo.org/925806
Closes: https://bugs.gentoo.org/925807
Closes: https://bugs.gentoo.org/925808
Closes: https://bugs.gentoo.org/925809
Closes: https://bugs.gentoo.org/925810
Closes: https://bugs.gentoo.org/925811
Closes: https://bugs.gentoo.org/925812
Closes: https://bugs.gentoo.org/925817
Closes: https://bugs.gentoo.org/925818
Closes: https://bugs.gentoo.org/925819
Closes: https://bugs.gentoo.org/925820
Closes: https://bugs.gentoo.org/925821
Closes: https://bugs.gentoo.org/925822
Closes: https://bugs.gentoo.org/925823
Closes: https://bugs.gentoo.org/925824
Closes: https://bugs.gentoo.org/925825
Closes: https://bugs.gentoo.org/925826
Closes: https://bugs.gentoo.org/925827
Closes: https://bugs.gentoo.org/925828
Closes: https://bugs.gentoo.org/925829
Closes: https://bugs.gentoo.org/925830
Closes: https://bugs.gentoo.org/925831
Closes: https://bugs.gentoo.org/925832
Closes: https://bugs.gentoo.org/925833
Closes: https://bugs.gentoo.org/925834
Closes: https://bugs.gentoo.org/925835
Closes: https://bugs.gentoo.org/925837
Closes: https://bugs.gentoo.org/925838
Closes: https://bugs.gentoo.org/925839
Closes: https://bugs.gentoo.org/925840
Closes: https://bugs.gentoo.org/925841
Closes: https://bugs.gentoo.org/925842
Closes: https://bugs.gentoo.org/925922
Closes: https://bugs.gentoo.org/925923
Closes: https://bugs.gentoo.org/925924
Signed-off-by: Martin Dummer  gmx.net>
Closes: https://github.com/gentoo/gentoo/pull/36504
Signed-off-by: Joonas Niilola  gentoo.org>

 eclass/vdr-plugin-2.eclass | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index 8f56511032c8..289c3d1a624a 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -160,7 +160,6 @@ vdr_create_header_checksum_file() {
 # Plugins failed on compile with wrong path of libsi includes,
 # this can be fixed by 'function + space separated list of files'
 fix_vdr_libsi_include() {
-   eqawarn "QA Notice: Fixing include of libsi-headers"
local f
for f; do
sed -i "${f}" \
@@ -245,7 +244,7 @@ vdr_gettext_missing() {
 
local GETTEXT_MISSING=$( grep xgettext Makefile )
if [[ -z ${GETTEXT_MISSING} ]]; then
-   eqawarn "QA Notice: Plugin isn't converted to gettext handling!"
+   einfo "Notice: Plugin isn't converted to gettext handling!"
fi
 }
 
@@ -306,11 +305,11 @@ vdr_i18n() {
if [[ -n ${I18N_OBJECT} ]]; then
 
if [[ "${KEEP_I18NOBJECT:-no}" = "yes" ]]; then
-   eqawarn "QA Notice: Forced to keep i18n.o"
+   einfo "Notice: Forced to keep i18n.o"
else
sed -i "s:i18n.o::g" Makefile \

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-08 Thread Michał Górny
commit: 5b45aef4ab0b6d0ed7f414facaf9e243cdb36cfc
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jun  8 15:46:39 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Jun  8 15:46:56 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b45aef4

ltprune.eclass: Mark @DEAD

Signed-off-by: Michał Górny  gentoo.org>

 eclass/ltprune.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/ltprune.eclass b/eclass/ltprune.eclass
index 5a36647d1d1c..51f5aaabfea7 100644
--- a/eclass/ltprune.eclass
+++ b/eclass/ltprune.eclass
@@ -1,6 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# @DEAD
 # @ECLASS: ltprune.eclass
 # @MAINTAINER:
 # Michał Górny 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-08 Thread Michał Górny
commit: 48f76a8faeaba63830608b7acc9b6c90a52c03ad
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jun  8 10:24:46 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Jun  8 10:27:51 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48f76a8f

Add 19.0.0_pre20240608 snapshot

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 9d2dc78e0d92..30d919db2300 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
 
case ${PV} in
+   19.0.0_pre20240608)
+   
EGIT_COMMIT=5aabbf0602c48b67bb89fd37f95bf97c95ded488
+   ;;
19.0.0_pre20240525)

EGIT_COMMIT=7dc2f6602212bf0a0433c157b70e4fc0d70bb730
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-07 Thread Ulrich Müller
commit: 0883d6e38e1f7132a0e2998917243c0996f2d151
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Jun  8 03:52:16 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Jun  8 03:52:16 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0883d6e3

epatch.eclass: Remove dead eclass

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/epatch.eclass | 381 ---
 1 file changed, 381 deletions(-)

diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass
deleted file mode 100644
index ff3fd13721fe..
--- a/eclass/epatch.eclass
+++ /dev/null
@@ -1,381 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# @ECLASS: epatch.eclass
-# @MAINTAINER:
-# base-sys...@gentoo.org
-# @SUPPORTED_EAPIS: 6
-# @BLURB: easy patch application functions
-# @DEPRECATED: eapply from EAPI 7
-# @DESCRIPTION:
-# An eclass providing epatch and epatch_user functions to easily apply
-# patches to ebuilds. Mostly superseded by eapply* in EAPI 6.
-
-if [[ -z ${_EPATCH_ECLASS} ]]; then
-
-case ${EAPI} in
-   6) ;;
-   *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
-inherit estack
-
-# @VARIABLE: EPATCH_SOURCE
-# @DESCRIPTION:
-# Default directory to search for patches.
-EPATCH_SOURCE="${WORKDIR}/patch"
-# @VARIABLE: EPATCH_SUFFIX
-# @DESCRIPTION:
-# Default extension for patches (do not prefix the period yourself).
-EPATCH_SUFFIX="patch.bz2"
-# @VARIABLE: EPATCH_OPTS
-# @DESCRIPTION:
-# Options to pass to patch.  Meant for ebuild/package-specific tweaking
-# such as forcing the patch level (-p#) or fuzz (-F#) factor.  Note that
-# for single patch tweaking, you can also pass flags directly to epatch.
-EPATCH_OPTS=""
-# @VARIABLE: EPATCH_COMMON_OPTS
-# @DESCRIPTION:
-# Common options to pass to `patch`.  You probably should never need to
-# change these.  If you do, please discuss it with base-system first to
-# be sure.
-# @CODE
-#  -g0 - keep RCS, ClearCase, Perforce and SCCS happy #24571
-#  --no-backup-if-mismatch - do not leave .orig files behind
-#  -E - automatically remove empty files
-# @CODE
-EPATCH_COMMON_OPTS="-g0 -E --no-backup-if-mismatch"
-# @VARIABLE: EPATCH_EXCLUDE
-# @DESCRIPTION:
-# List of patches not to apply. Note this is only file names,
-# and not the full path.  Globs accepted.
-EPATCH_EXCLUDE=""
-# @VARIABLE: EPATCH_MULTI_MSG
-# @DESCRIPTION:
-# Change the printed message for multiple patches.
-EPATCH_MULTI_MSG="Applying various patches (bugfixes/updates) ..."
-# @VARIABLE: EPATCH_FORCE
-# @DESCRIPTION:
-# Only require patches to match EPATCH_SUFFIX rather than the extended
-# arch naming style.
-EPATCH_FORCE="no"
-# @VARIABLE: EPATCH_USER_EXCLUDE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# List of patches not to apply. Note this is only file names,
-# and not the full path.  Globs accepted.
-
-# @FUNCTION: epatch
-# @USAGE: [options] [patches] [dirs of patches]
-# @DESCRIPTION:
-# epatch is designed to greatly simplify the application of patches.  It can
-# process patch files directly, or directories of patches.  The patches may be
-# compressed (bzip/gzip/etc...) or plain text.  You generally need not specify
-# the -p option as epatch will automatically attempt -p0 to -p4 until things
-# apply successfully.
-#
-# If you do not specify any patches/dirs, then epatch will default to the
-# directory specified by EPATCH_SOURCE.
-#
-# Any options specified that start with a dash will be passed down to patch
-# for this specific invocation.  As soon as an arg w/out a dash is found, then
-# arg processing stops.
-#
-# When processing directories, epatch will apply all patches that match:
-# @CODE
-#  if ${EPATCH_FORCE} != "yes"
-#  ??_${ARCH}_foo.${EPATCH_SUFFIX}
-#  else
-#  *.${EPATCH_SUFFIX}
-# @CODE
-# The leading ?? are typically numbers used to force consistent patch ordering.
-# The arch field is used to apply patches only for the host architecture with
-# the special value of "all" means apply for everyone.  Note that using values
-# other than "all" is highly discouraged -- you should apply patches all the
-# time and let architecture details be detected at configure/compile time.
-#
-# If EPATCH_SUFFIX is empty, then no period before it is implied when searching
-# for patches to apply.
-#
-# Refer to the other EPATCH_xxx variables for more customization of behavior.
-epatch() {
-   _epatch_draw_line() {
-   # create a line of same length as input string
-   [[ -z $1 ]] && set "$(printf "%65s" '')"
-   echo "${1//?/=}"
-   }
-
-   unset P4CONFIG P4PORT P4USER # keep perforce at bay #56402
-
-   # First process options.  We localize the EPATCH_OPTS setting
-   # from above so that we can pass it on in the loop below with
-   # any additional values the user has specified.
-   local EPATCH_OPTS=( 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-06 Thread Mike Gilbert
commit: 66011abd663671947fe07835f0d9cc360f5de317
Author: Eli Schwartz  gmail  com>
AuthorDate: Sun Jun  2 19:08:07 2024 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Thu Jun  6 20:36:48 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66011abd

meson.eclass: stop using the incomparably broken "meson compile"

With my upstream meson hat on, I have griped about this for years any
time someone mentions "meson compile" to me. I think it was badly
motivated and shouldn't exist.

The purpose of this command is "for symmetry" with meson setup and meson
test and meson install, even though all of those are python programs
first and foremost, which have ninja targets that simply call back into
the meson tool but with less control.

Symmetry doesn't make a whole lot of sense. The compile phase actually
is implemented as a... ninja file, not a python program. Using ninja
directly is:
- faster, since you don't load hundreds of python modules into memory,
  just to fork out to ninja
- easier to control, since you can directly control the ninja arguments

The "meson compile" program actually, in fact, only really exists for
two reasons:

- meson supports multiple backends -- only when manually requested -- on
  operating systems other than linux. Namely, VS on Windows, and xcode
  on macOS. The wrapper first checks which backend has been generated,
  and then runs the appropriate command there. It also provides the
  ninja argument syntax for options that multiple backends understand,
  so, you can pass -v -j8 and it actually works regardless of backend
  (even if in fact it has to pass `-verbosity:minimal -maxCpuCount:8` to
  do it).

- via retconning, on Windows when using the MSVC `cl.exe` meson compile
  started actually adding this to PATH and setting it up (because it
  requires sourcing a batch script in order to both add to PATH and set
  inscrutable mandatory environment variables) to prevent ninja utterly
  failing if you missed this yourself.

For portage purposes, neither of these matter whatsoever. Even if
portage were to ever use cl.exe on Windows (???) it could set up the
environment just fine on its own, and actually using alternative
backends would require extending the eclass to configure xcode/vs for
tremendous slowdown in compile time, which would be silly.

In exchange for all these features portage doesn't need, what do we get?

meson compile unabashedly doesn't support all possible ninja arguments,
and says you should instead pass the combination of --ninja-args "..."
--vs-args "..." --xcode-args "..." and it will figure out which ones are
relevant for *your* backend and forward it to the backend. We don't
actually do that -- it would be super ugly for the common case of -v
-j8.

As a result, we ignore $NINJAOPTS, which ninja-utils.eclass claims we
are allowed to use. Instead we manually parse out some subset of
"supported" values. We *cannot* respect NINJAOPTS anyways, because...

... meson compile sucks and cannot handle it. To be more accurate: it
expects --ninja-args to be formatted using `meson-format-array`, the
same format that machine files use. No thank you!

And we still have to move to get_NINJAOPTS, then pass it as:

```
meson compile -C "${BUILD_DIR}" --ninja-args="['-j', '8', '-k', '0', '-v', 
'-l', '0']"
```

instead of:
```
meson compile -C "${BUILD_DIR}" -j 8 -v -l 0 --ninja-args="['-k0']"
```

The overengineered complexity of this is immense. ninja-utils.eclass
exists for an extremely good reason, provides best practices, and means
we don't have to maintain an interface to a custom tool with unintuitive
behavior since we get precisely the common functionality we already
want, for free.

Just use eninja.

Fixes:

- the absolute inability to use standard $NINJAOPTS to fine-tune
  meson-using packages, for example to keep going and collect all the
  build errors before aborting with a failure.
- support for ${NINJA_VERBOSE} (expected to be the fallback if
  MESON_VERBOSE isn't set)

Signed-off-by: Eli Schwartz  gmail.com>
Signed-off-by: Mike Gilbert  gentoo.org>

 eclass/meson.eclass | 16 ++--
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index a22a85887584..a2bc5537e458 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -440,23 +440,11 @@ meson_src_compile() {
 
pushd "${BUILD_DIR}" > /dev/null || die
 
-   local mesoncompileargs=(
-   --jobs "$(get_makeopts_jobs 0)"
-   --load-average "$(get_makeopts_loadavg 0)"
-   )
-
case ${MESON_VERBOSE} in
-   OFF) ;;
-   *) mesoncompileargs+=( --verbose ) ;;
+   OFF) NINJA_VERBOSE=OFF eninja "$@" ;;
+   *) eninja "$@" ;;
esac
-
-   mesoncompileargs+=( "$@" )
-
-   set -- meson compile "${mesoncompileargs[@]}"
-   echo "$@" >&2
-   "$@"
local rv=$?
-   [[ ${rv} -eq 0 ]] || die -n 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-02 Thread Ionen Wolkens
commit: 3373a27c24cd4b06084f8e0ac9fb9d2a695ac214
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Sun Jun  2 07:08:01 2024 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Sun Jun  2 08:22:07 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3373a27c

qt6-build.eclass: use different workaround for cpu flags issues

This also replaces the nasty workaround from qtbase's ebuild
on top of the function here.

Should "hopefully" be far less error prone, while still allowing
-march=native for people who aren't affected. Does mean slightly
worse optimizations for those affected, but this still tries
to use the highest x86-64-v* and should be insignificant.

Tentative, can't fully test without having an affected cpu so
may still need work.

Closes: https://bugs.gentoo.org/933374
Signed-off-by: Ionen Wolkens  gentoo.org>

 eclass/qt6-build.eclass | 87 -
 1 file changed, 58 insertions(+), 29 deletions(-)

diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
index 4fc838c478af..4966c52adc4c 100644
--- a/eclass/qt6-build.eclass
+++ b/eclass/qt6-build.eclass
@@ -122,7 +122,7 @@ qt6-build_src_prepare() {
fi
 
_qt6-build_prepare_env
-   _qt6-build_match_cpu_flags
+   _qt6-build_sanitize_cpu_flags
 
# LTO cause test failures in several components (e.g. qtcharts,
# multimedia, scxml, wayland, webchannel, ...).
@@ -235,34 +235,6 @@ _qt6-build_create_user_facing_links() {
done < "${BUILD_DIR}"/user_facing_tool_links.txt || die
 }
 
-# @FUNCTION: _qt6-build_match_cpu_flags
-# @INTERNAL
-# @DESCRIPTION:
-# Try to adjust -m* cpu CXXFLAGS so that they match a configuration
-# accepted by Qt's headers, see bug #908420.
-_qt6-build_match_cpu_flags() {
-   use amd64 || use x86 || return 0
-
-   local flags=() intrin intrins
-   while IFS=' ' read -ra intrins; do
-   [[ ${intrins[*]} == *=[^_]* && ${intrins[*]} == *=_* ]] &&
-   for intrin in "${intrins[@]%=*}"; do
-   [[ ${intrin} ]] && flags+=( -mno-${intrin} )
-   done
-   done < <(
-   $(tc-getCXX) -E -P ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 2
-   avx2=__AVX2__ =__BMI__ =__BMI2__ =__F16C__ =__FMA__ 
=__LZCNT__ =__POPCNT__
-   avx512f=__AVX512F__ avx512bw=__AVX512BW__ 
avx512cd=__AVX512CD__ avx512dq=__AVX512DQ__ avx512vl=__AVX512VL__
-   EOF
-   assert
-   )
-
-   if (( ${#flags[@]} )); then
-   einfo "Adjusting CXXFLAGS for https://bugs.gentoo.org/908420 
with: ${flags[*]}"
-   append-cxxflags "${flags[@]}"
-   fi
-}
-
 # @FUNCTION: _qt6-build_prepare_env
 # @INTERNAL
 # @DESCRIPTION:
@@ -289,6 +261,63 @@ _qt6-build_prepare_env() {
readonly QT6_TRANSLATIONDIR=${QT6_DATADIR}/translations
 }
 
+# @FUNCTION: _qt6-build_sanitize_cpu_flags
+# @INTERNAL
+# @DESCRIPTION:
+# Qt hardly support use of -mno-* or -march=native for unusual CPUs
+# (or VMs) that support incomplete x86-64 feature levels, and attempts
+# to allow this anyway has worked poorly.  This instead tries to detect
+# unusual configurations and fallbacks to generic -march=x86-64* if so
+# (bug #898644,#908420,#913400,#933374).
+_qt6-build_sanitize_cpu_flags() {
+   # less of an issue with non-amd64, will revisit only if needed
+   use amd64 || return 0
+
+   local cpuflags=(
+   # list of checked cpu features by qtbase in configure.cmake
+   aes avx avx2 avx512{bw,cd,dq,er,f,ifma,pf,vbmi,vbmi2,vl}
+   f16c rdrnd rdseed sha sse2 sse3 sse4_1 sse4_2 ssse3 vaes
+
+   # extras checked by qtbase's qsimd_p.h
+   bmi bmi2 f16c fma lzcnt popcnt
+   )
+
+   # check if any known problematic -mno-* C(XX)FLAGS
+   if ! is-flagq "@($(IFS='|'; echo "${cpuflags[*]/#/-mno-}"))"; then
+   # check if qsimd_p.h (search for "enable all") will accept 
-march
+   : "$($(tc-getCXX) -E -P ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail 
-n 1
+   #if (defined(__AVX2__) && (__BMI__ + __BMI2__ + 
__F16C__ + __FMA__ + __LZCNT__ + __POPCNT__) != 6) || \
+   (defined(__AVX512F__) && (__AVX512BW__ 
+ __AVX512CD__ + __AVX512DQ__ + __AVX512VL__) != 4)
+   bad
+   #endif
+   EOF
+   assert
+   )"
+   [[ ${_} == bad ]] || return 0 # *should* be fine as-is
+   fi
+
+   # determine highest(known) usable x86-64 feature level
+   local march=$(
+   $(tc-getCXX) -E -P ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 1
+   default
+   #if (__CRC32__ + __LAHF_SAHF__ + __POPCNT__ + __SSE3__ 
+ __SSE4_1__ + __SSE4_2__ + __SSSE3__) == 7
+   

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-01 Thread Alfredo Tupone
commit: 387f6b19891fc78d3369a0e85518c4d706dddbc2
Author: Alfredo Tupone  gentoo  org>
AuthorDate: Sat Jun  1 21:33:40 2024 +
Commit: Alfredo Tupone  gentoo  org>
CommitDate: Sat Jun  1 21:34:37 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=387f6b19

findlib.eclass: ignore TEXTRELS

Closes: https://bugs.gentoo.org/738418
Signed-off-by: Alfredo Tupone  gentoo.org>

 eclass/findlib.eclass | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass
index fdcaa0c1b77c..f0371ef00e10 100644
--- a/eclass/findlib.eclass
+++ b/eclass/findlib.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: findlib.eclass
@@ -68,6 +68,10 @@ findlib_src_preinst() {
 # @DESCRIPTION:
 # Install with a properly setup findlib
 findlib_src_install() {
+   # OCaml generates textrels on 32-bit arches
+   if use arm || use ppc || use x86 ; then
+   export QA_TEXTRELS='.*'
+   fi
findlib_src_preinst
make DESTDIR="${D}" "$@" install || die "make failed"
 }



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-01 Thread Alfredo Tupone
commit: d7b08071fdc32a112221f564862e350da18ad0ee
Author: Alfredo Tupone  gentoo  org>
AuthorDate: Sat Jun  1 21:09:49 2024 +
Commit: Alfredo Tupone  gentoo  org>
CommitDate: Sat Jun  1 21:10:45 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7b08071

dune.eclass: filter TEXTRELS warnings on 32 bit arch

Closes: https://bugs.gentoo.org/928104
Signed-off-by: Alfredo Tupone  gentoo.org>

 eclass/dune.eclass | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/eclass/dune.eclass b/eclass/dune.eclass
index f0faea007c9f..ba54e87ceaf9 100644
--- a/eclass/dune.eclass
+++ b/eclass/dune.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: dune.eclass
@@ -185,6 +185,10 @@ dune-install() {
 }
 
 dune_src_install() {
+   # OCaml generates textrels on 32-bit arches
+   if use arm || use ppc || use x86 ; then
+   export QA_TEXTRELS='.*'
+   fi
dune-install ${1:-${DUNE_PKG_NAME}}
 }
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-01 Thread Hans de Graaff
commit: c4106df30b444ae1a74c9ddf66528fbce7185539
Author: Hans de Graaff  gentoo  org>
AuthorDate: Sun May 12 06:33:52 2024 +
Commit: Hans de Graaff  gentoo  org>
CommitDate: Sat Jun  1 06:19:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4106df3

ruby-ng-gnome2.eclass: drop obsolete SRC_URI

The last version below 3.4.0 that used this SRC_URI has been removed in
2021 in bd4380d7b621baa6b63b24bedce94dfebe171cf3

Signed-off-by: Hans de Graaff  gentoo.org>

 eclass/ruby-ng-gnome2.eclass | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 8cce47cf1903..77c004f56998 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -47,13 +47,8 @@ ruby_add_bdepend "
 HOMEPAGE="https://ruby-gnome.github.io/;
 LICENSE="LGPL-2.1+"
 SLOT="0"
-if ver_test -ge "3.4.0"; then
-   SRC_URI="https://github.com/ruby-gnome/ruby-gnome/archive/${PV}.tar.gz 
-> ruby-gnome2-${PV}.tar.gz"
-   RUBY_S=ruby-gnome-${PV}/${RUBY_FAKEGEM_NAME}
-else
-   
SRC_URI="https://downloads.sourceforge.net/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz;
-   RUBY_S=ruby-gnome2-all-${PV}/${RUBY_FAKEGEM_NAME}
-fi
+SRC_URI="https://github.com/ruby-gnome/ruby-gnome/archive/${PV}.tar.gz -> 
ruby-gnome2-${PV}.tar.gz"
+RUBY_S=ruby-gnome-${PV}/${RUBY_FAKEGEM_NAME}
 
 ruby-ng-gnome2_all_ruby_prepare() {
# Avoid compilation of dependencies during test.



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-01 Thread Hans de Graaff
commit: b51412f49546e7531d05540588390e91a5a5a825
Author: Hans de Graaff  gentoo  org>
AuthorDate: Sun May 12 06:39:40 2024 +
Commit: Hans de Graaff  gentoo  org>
CommitDate: Sat Jun  1 06:19:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b51412f4

ruby-ng-gnome2.eclass: allow EAPI 8

Signed-off-by: Hans de Graaff  gentoo.org>

 eclass/ruby-ng-gnome2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index 77c004f56998..c38c5f15904d 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -6,7 +6,7 @@
 # Ruby herd 
 # @AUTHOR:
 # Author: Hans de Graaff 
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
 # @PROVIDES: ruby-ng
 # @BLURB: An eclass to simplify handling of various ruby-gnome2 parts.
 # @DESCRIPTION:
@@ -14,7 +14,7 @@
 # ruby-gnome2 since they share a very common installation procedure.
 
 case ${EAPI} in
-   7) ;;
+   7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-06-01 Thread Hans de Graaff
commit: 6d38c6eace7a34a42dfd60401e9c3bd85766509f
Author: Hans de Graaff  gentoo  org>
AuthorDate: Sun May 12 06:32:32 2024 +
Commit: Hans de Graaff  gentoo  org>
CommitDate: Sat Jun  1 06:19:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d38c6ea

ruby-ng-gnome2.eclass: remove "default" SRC_URI

This default was never used since it was always overwritten by the
if/else following it.

Signed-off-by: Hans de Graaff  gentoo.org>

 eclass/ruby-ng-gnome2.eclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index e10f1e625993..8cce47cf1903 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -44,7 +44,6 @@ BDEPEND="virtual/pkgconfig"
 ruby_add_bdepend "
dev-ruby/pkg-config
test? ( >=dev-ruby/test-unit-2 )"
-SRC_URI="https://downloads.sourceforge.net/ruby-gnome2/ruby-gnome2-all-${PV}.tar.gz;
 HOMEPAGE="https://ruby-gnome.github.io/;
 LICENSE="LGPL-2.1+"
 SLOT="0"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-31 Thread Michał Górny
commit: 857bea2590e56110ce52f52fb593f34900d7c6e1
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Feb 21 14:33:30 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri May 31 12:42:39 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=857bea25

llvm-r1.eclass: Use := slot op in examples

Include the ':=' slot operator in examples.  While generally LLVM
does not change its ABI within a single slot, it technically reserves
that possibility and it has historically been used in LLVM 11.1.0.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm-r1.eclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/llvm-r1.eclass b/eclass/llvm-r1.eclass
index 658946a1ecbd..075df9218be8 100644
--- a/eclass/llvm-r1.eclass
+++ b/eclass/llvm-r1.eclass
@@ -31,8 +31,8 @@
 # DEPEND="
 #   dev-libs/libfoo[${LLVM_USEDEP}]
 #   $(llvm_gen_dep '
-# sys-devel/clang:${LLVM_SLOT}
-# sys-devel/llvm:${LLVM_SLOT}
+# sys-devel/clang:${LLVM_SLOT}=
+# sys-devel/llvm:${LLVM_SLOT}=
 #   ')
 # "
 # @CODE
@@ -158,8 +158,8 @@ unset -f _llvm_set_globals
 # @CODE
 # DEPEND="
 #   $(llvm_gen_dep '
-# sys-devel/clang:${LLVM_SLOT}
-# sys-devel/llvm:${LLVM_SLOT}
+# sys-devel/clang:${LLVM_SLOT}=
+# sys-devel/llvm:${LLVM_SLOT}=
 #   ')
 # "
 # @CODE



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-26 Thread Miroslav Šulc
commit: bfe9319b5d4631a85ebbb9c2fcda1d46f09c2320
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Sun May 26 07:38:15 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Sun May 26 08:18:19 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfe9319b

java-osgi.eclass: drop EAPI 7

Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/36819
Signed-off-by: Miroslav Šulc  gentoo.org>

 eclass/java-osgi.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/java-osgi.eclass b/eclass/java-osgi.eclass
index 7019fab7b203..172b42225c6e 100644
--- a/eclass/java-osgi.eclass
+++ b/eclass/java-osgi.eclass
@@ -1,4 +1,4 @@
-# Copyright 2007-2022 Gentoo Authors
+# Copyright 2007-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: java-osgi.eclass
@@ -6,7 +6,7 @@
 # j...@gentoo.org
 # @AUTHOR:
 # Java maintainers 
-# @SUPPORTED_EAPIS: 7 8
+# @SUPPORTED_EAPIS: 8
 # @PROVIDES: java-utils-2
 # @BLURB: Java OSGi eclass
 # @DESCRIPTION:
@@ -16,7 +16,7 @@
 # could extend this so that Gentoo Java system would be fully OSGi compliant.
 
 case ${EAPI} in
-   7|8) ;;
+   8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-25 Thread Michał Górny
commit: 63c74a9a2231c426759af524cd14004d04f1cf32
Author: Michał Górny  gentoo  org>
AuthorDate: Sat May 25 08:33:25 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat May 25 08:35:14 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63c74a9a

Remove support for old snapshots

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 9 -
 1 file changed, 9 deletions(-)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index f0915a0e42cc..9d2dc78e0d92 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -78,15 +78,6 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
19.0.0_pre20240518)

EGIT_COMMIT=702198fc9ac5dba392f9d9ba7c56467996343c0a
;;
-   19.0.0_pre20240509)
-   
EGIT_COMMIT=a7ee81e8279e0bf6e05617a4a638e5f2f8e45022
-   ;;
-   19.0.0_pre20240504)
-   
EGIT_COMMIT=76aa042dde6ba9ba57c680950f5818259ee02690
-   ;;
-   19.0.0_pre20240427)
-   
EGIT_COMMIT=338561657685c1831a53563b1bc36ffc7470239e
-   ;;
*)
die "Unknown snapshot: ${PV}"
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/tests/

2024-05-25 Thread Ulrich Müller
commit: 16b2c5ebb2869f4132536e5eb0a465b534556fb6
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu May  9 10:45:26 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat May 25 08:22:48 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16b2c5eb

eclass/tests: Copy code from eapi7-ver.eclass to version-functions.sh

With EAPI 6 banned, eapi7-ver.eclass will be removed in the foreseeable
future. Copy its code because it is still needed for tests.

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/tests/dist-kernel-utils.sh   |   6 +-
 eclass/tests/eapi7-ver.sh   |   7 +-
 eclass/tests/eapi7-ver_benchmark.sh | 147 --
 eclass/tests/toolchain.sh   |   4 +-
 eclass/tests/version-funcs.sh   | 302 
 5 files changed, 309 insertions(+), 157 deletions(-)

diff --git a/eclass/tests/dist-kernel-utils.sh 
b/eclass/tests/dist-kernel-utils.sh
index 7f04f55ce302..50ba001f8e9c 100755
--- a/eclass/tests/dist-kernel-utils.sh
+++ b/eclass/tests/dist-kernel-utils.sh
@@ -1,14 +1,14 @@
 #!/usr/bin/env bash
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
 source tests-common.sh || exit
+# TODO: hack because tests-common don't implement ver_cut
+source version-funcs.sh || exit
 
 inherit dist-kernel-utils
-# TODO: hack because tests-common don't implement ver_cut
-EAPI=6 inherit eapi7-ver
 
 test_PV_to_KV() {
local kv=${1}

diff --git a/eclass/tests/eapi7-ver.sh b/eclass/tests/eapi7-ver.sh
index 13cd671e7158..ee7e6d728ef7 100755
--- a/eclass/tests/eapi7-ver.sh
+++ b/eclass/tests/eapi7-ver.sh
@@ -1,12 +1,9 @@
 #!/bin/bash
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-
 source tests-common.sh || exit
-
-inherit eapi7-ver
+source version-funcs.sh || exit
 
 teq() {
local expected=${1}; shift

diff --git a/eclass/tests/eapi7-ver_benchmark.sh 
b/eclass/tests/eapi7-ver_benchmark.sh
deleted file mode 100755
index ab324edb95c9..
--- a/eclass/tests/eapi7-ver_benchmark.sh
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-source tests-common.sh || exit
-
-inherit eapi7-ver versionator
-
-cutting() {
-   local x
-   for x in {1..1000}; do
-   ver_cut 1 1.2.3
-   ver_cut 1-2 1.2.3
-   ver_cut 2- 1.2.3
-   ver_cut 1- 1.2.3
-   ver_cut 3-4 1.2.3b_alpha4
-   ver_cut 5 1.2.3b_alpha4
-   ver_cut 1-2 .1.2.3
-   ver_cut 0-2 .1.2.3
-   ver_cut 2-3 1.2.3.
-   ver_cut 2- 1.2.3.
-   ver_cut 2-4 1.2.3.
-   done >/dev/null
-}
-
-cutting_versionator() {
-   local x
-   for x in {1..100}; do
-   get_version_component_range 1 1.2.3
-   get_version_component_range 1-2 1.2.3
-   get_version_component_range 2- 1.2.3
-   get_version_component_range 1- 1.2.3
-   get_version_component_range 3-4 1.2.3b_alpha4
-   get_version_component_range 5 1.2.3b_alpha4
-   get_version_component_range 1-2 .1.2.3
-   get_version_component_range 0-2 .1.2.3
-   get_version_component_range 2-3 1.2.3.
-   get_version_component_range 2- 1.2.3.
-   get_version_component_range 2-4 1.2.3.
-   done >/dev/null
-}
-
-replacing() {
-   local x
-   for x in {1..1000}; do
-   ver_rs 1 - 1.2.3
-   ver_rs 2 - 1.2.3
-   ver_rs 1-2 - 1.2.3.4
-   ver_rs 2- - 1.2.3.4
-   ver_rs 2 . 1.2-3
-   ver_rs 3 . 1.2.3a
-   ver_rs 2-3 - 1.2_alpha4
-   #ver_rs 3 - 2 "" 1.2.3b_alpha4
-   #ver_rs 3-5 _ 4-6 - a1b2c3d4e5
-   ver_rs 1 - .1.2.3
-   ver_rs 0 - .1.2.3
-   done >/dev/null
-}
-
-replacing_versionator() {
-   local x
-   for x in {1..100}; do
-   replace_version_separator 1 - 1.2.3
-   replace_version_separator 2 - 1.2.3
-   replace_version_separator 1-2 - 1.2.3.4
-   replace_version_separator 2- - 1.2.3.4
-   replace_version_separator 2 . 1.2-3
-   replace_version_separator 3 . 1.2.3a
-   replace_version_separator 2-3 - 1.2_alpha4
-   #replace_version_separator 3 - 2 "" 1.2.3b_alpha4
-   #replace_version_separator 3-5 _ 4-6 - a1b2c3d4e5
-   replace_version_separator 1 - .1.2.3
-   replace_version_separator 0 - .1.2.3
-   done >/dev/null
-}
-
-comparing() {
-   local x
-   for x in {1..1000}; do
-   ver_test 1b_p1 -le 1_p1
-   ver_test 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-24 Thread Sam James
commit: e790e4d2c3dc3b996854ce70ace17244e8e8b9d8
Author: Sam James  gentoo  org>
AuthorDate: Sat May 25 05:55:09 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat May 25 05:55:24 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e790e4d2

plasma.kde.org.eclass: support 6.x betas

Signed-off-by: Sam James  gentoo.org>

 eclass/plasma.kde.org.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/plasma.kde.org.eclass b/eclass/plasma.kde.org.eclass
index 491f1fcecc8c..1a626de37bfb 100644
--- a/eclass/plasma.kde.org.eclass
+++ b/eclass/plasma.kde.org.eclass
@@ -63,7 +63,7 @@ if [[ ${KDE_BUILD_TYPE} == live ]]; then
fi
 elif [[ -z ${KDE_ORG_COMMIT} ]]; then
case ${PV} in
-   5.??.[6-9][05]* )
+   5.??.[6-9][05]* | 6.?.[6-9][05]* )
_KDE_SRC_URI+="unstable/plasma/$(ver_cut 1-3)/"
RESTRICT+=" mirror"
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-21 Thread Sam James
commit: 69d4cc312072ad28491d2dce5798dd49d63713e5
Author: Sam James  gentoo  org>
AuthorDate: Wed May 22 01:40:06 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed May 22 01:43:56 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69d4cc31

perl-module.eclass: don't set 'ccflags' for Module::Build

TL;DR: If we set 'ccflags', we're clobbering the Perl default. We're already
setting 'optimize' which is what we're supposed to use here.

We set ccflags *and* optimize for Module::Build (which dev-perl/Net-DNS uses),
while we only set OPTIMIZE (case is fine) for MM (which dev-perl/Net-LibIDN2 
uses).

ccflags clobbers the Perl default, while optimize appends. We should just set 
optimize -
to not clobber what Perl sets, but also for consistency between the two build 
systems).

(Unfortunately, this does mean we also inherit things we don't really
want to, which don't affect ABI, like -fno-strict-aliasing, but let's
live with it for now...)

Bug: https://bugs.gentoo.org/261375
Bug: https://bugs.gentoo.org/877659
Closes: https://bugs.gentoo.org/932176
Signed-off-by: Sam James  gentoo.org>

 eclass/perl-module.eclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index f32c2c237d05..432d1ab315dd 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -279,7 +279,6 @@ perl-module_src_configure() {
--config ld="$(tc-getCC)" \
--config nm="$(tc-getNM)" \
--config ranlib="$(tc-getRANLIB)" \
-   --config ccflags="${CFLAGS}" \
--config optimize="${CFLAGS}" \
--config ldflags="${LDFLAGS}" \
"${myconf_local[@]}"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-21 Thread Florian Schmaus
commit: 90b41ec50f152da26b8c8d4004d38d7cd4b3dd53
Author: Florian Schmaus  gentoo  org>
AuthorDate: Mon May 20 11:00:27 2024 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Tue May 21 08:58:07 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90b41ec5

texlive-module.eclass: do not treat grep returning 1 as error

In case every man page of the dev-texlive/* package is filtered, because
the man pages are already installed by texlive-core, grep returns an
exit status of 1, which we must not treat as an error condition.

Adjust the PIPESTATUS comparison accordingly.

Closes: https://bugs.gentoo.org/931994
Signed-off-by: Florian Schmaus  gentoo.org>

 eclass/texlive-module.eclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 0daca41961ff..b202a0188b66 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -539,7 +539,10 @@ texlive-module_src_install() {
find texmf-dist/doc/man -type f -name '*.[0-9n]' -print 
|
grep -v "${grep_expressions[@]}" |
xargs -d '\n' --no-run-if-empty doman
-   [[ "${PIPESTATUS[*]}" =~ ^0(" 0")*$ ]]
+   # The grep in the middle of the pipe may return 1 in 
case
+   # everything from the input is dropped.
+   # See https://bugs.gentoo.org/931994
+   [[ "${PIPESTATUS[*]}" == "0 "[01]" 0" ]]
eend $? || die "error installing man pages"
 
# Delete all man pages under texmf-dist/doc/man



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-21 Thread Florian Schmaus
commit: 0c2599b9db997df77af21ca8d3ce8da16e512649
Author: Florian Schmaus  gentoo  org>
AuthorDate: Mon May 20 11:02:15 2024 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Tue May 21 08:58:08 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c2599b9

texlive-module.eclass: invoke doman with nonfatal

In case doman fails, we do not want to die immediatly as it would
"break" the ebegin/eend combination. Instead, the exit status is passed
through xargs. It will then subsequently appear in PIPESTATUS, where it
is processed by eend || die.

Signed-off-by: Florian Schmaus  gentoo.org>
Suggested-by: Ulrich Müller  gentoo.org>

 eclass/texlive-module.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index b202a0188b66..7d40bfc58994 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -538,7 +538,7 @@ texlive-module_src_install() {
ebegin "Installing man pages"
find texmf-dist/doc/man -type f -name '*.[0-9n]' -print 
|
grep -v "${grep_expressions[@]}" |
-   xargs -d '\n' --no-run-if-empty doman
+   xargs -d '\n' --no-run-if-empty nonfatal doman
# The grep in the middle of the pipe may return 1 in 
case
# everything from the input is dropped.
# See https://bugs.gentoo.org/931994



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-21 Thread Florian Schmaus
commit: 66780befaf58c6956afb4221911bd2ed1c240810
Author: Florian Schmaus  gentoo  org>
AuthorDate: Mon May 20 11:04:55 2024 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Tue May 21 08:58:08 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66780bef

texlive-module.eclass: include PIPESTATUS in die message

Signed-off-by: Florian Schmaus  gentoo.org>

 eclass/texlive-module.eclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index 7d40bfc58994..d7ec59c25a8a 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -539,11 +539,12 @@ texlive-module_src_install() {
find texmf-dist/doc/man -type f -name '*.[0-9n]' -print 
|
grep -v "${grep_expressions[@]}" |
xargs -d '\n' --no-run-if-empty nonfatal doman
+   local pipestatus="${PIPESTATUS[*]}"
# The grep in the middle of the pipe may return 1 in 
case
# everything from the input is dropped.
# See https://bugs.gentoo.org/931994
-   [[ "${PIPESTATUS[*]}" == "0 "[01]" 0" ]]
-   eend $? || die "error installing man pages"
+   [[ ${pipestatus} == "0 "[01]" 0" ]]
+   eend $? || die "error installing man pages (pipestatus: 
${pipestatus})"
 
# Delete all man pages under texmf-dist/doc/man
find texmf-dist/doc/man -type f -name '*.[0-9n]' 
-delete ||



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-20 Thread Michał Górny
commit: be50ed0537e06560614cedc379c60292300a7e3e
Author: Michał Górny  gentoo  org>
AuthorDate: Tue May 14 12:48:38 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon May 20 16:56:44 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be50ed05

python-utils-r1.eclass: Support passing EPYTEST_FLAGS

Closes: https://bugs.gentoo.org/905863
Signed-off-by: Michał Górny  gentoo.org>

 eclass/python-utils-r1.eclass | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 275ac3a96523..584ed831f816 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1321,6 +1321,15 @@ _python_check_occluded_packages() {
 # Specifies the number of jobs for parallel (pytest-xdist) test runs.
 # When unset, defaults to -j from MAKEOPTS, or the current nproc.
 
+# @ECLASS_VARIABLE: EPYTEST_FLAGS
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Additional flags to pass to pytest.  This is intended to be set
+# in the environment when debugging packages (options such as -x or -s
+# are useful here), rather than globally.  It must not be set
+# in ebuilds.
+
 # @FUNCTION: epytest
 # @USAGE: [...]
 # @DESCRIPTION:
@@ -1432,7 +1441,7 @@ epytest() {
for x in "${EPYTEST_IGNORE[@]}"; do
args+=( --ignore "${x}" )
done
-   set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}"
+   set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}" ${EPYTEST_FLAGS}
 
echo "${@}" >&2
"${@}" || die -n "pytest failed with ${EPYTHON}"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-20 Thread Michał Górny
commit: c607b1afeebb85474a0beac84944e7ad54d0a54e
Author: Michał Górny  gentoo  org>
AuthorDate: Tue May 14 10:17:08 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon May 20 16:56:41 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c607b1af

distutils-r1.eclass: Set DISTUTILS_WHEEL_PATH in PEP517 install

Store the created wheel path in DISTUTILS_WHEEL_PATH when returning
from distutils_pep517_install.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index a67122a59a33..1037c0abe239 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1343,6 +1343,10 @@ distutils_wheel_install() {
\) -delete || die
 }
 
+# @VARIABLE: DISTUTILS_WHEEL_PATH
+# @DESCRIPTION:
+# Path to the wheel created by distutils_pep517_install.
+
 # @FUNCTION: distutils_pep517_install
 # @USAGE: 
 # @DESCRIPTION:
@@ -1350,7 +1354,8 @@ distutils_wheel_install() {
 # backend and install it into .
 #
 # This function is intended for expert use only.  It does not handle
-# wrapping executables.
+# wrapping executables.  The wheel path is returned
+# in DISTUTILS_WHEEL_PATH variable.
 distutils_pep517_install() {
debug-print-function ${FUNCNAME} "${@}"
[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: root"
@@ -1523,6 +1528,8 @@ distutils_pep517_install() {
[[ -n ${wheel} ]] || die "No wheel name returned"
 
distutils_wheel_install "${root}" "${WHEEL_BUILD_DIR}/${wheel}"
+
+   DISTUTILS_WHEEL_PATH=${WHEEL_BUILD_DIR}/${wheel}
 }
 
 # @FUNCTION: distutils-r1_python_compile



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-20 Thread Michał Górny
commit: 6cc41bab19c96e2bf1456389fd368f98ba16605c
Author: Michał Górny  gentoo  org>
AuthorDate: Wed May 15 15:40:39 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon May 20 16:56:45 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6cc41bab

distutils-r1.eclass: Update scikit-build-core to 0.9.4

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index a8f9817a3cf0..3aa2c8984ab2 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -279,7 +279,7 @@ _distutils_set_globals() {
;;
scikit-build-core)
bdep+='
-   
>=dev-python/scikit-build-core-0.8.2[${PYTHON_USEDEP}]
+   
>=dev-python/scikit-build-core-0.9.4[${PYTHON_USEDEP}]
'
;;
setuptools)
@@ -1457,8 +1457,6 @@ distutils_pep517_install() {
"${DISTUTILS_ARGS[@]}"
)
 
-   # NB: we need to pass strings for boolean fields
-   # 
https://github.com/scikit-build/scikit-build-core/issues/707
config_settings=$(
"${EPYTHON}" - "${cmake_args[@]}" <<-EOF || die
import json
@@ -1466,8 +1464,8 @@ distutils_pep517_install() {
print(json.dumps({
"cmake.args": 
";".join(sys.argv[1:]),
"cmake.build-type": 
"${CMAKE_BUILD_TYPE}",
-   "cmake.verbose": "true",
-   "install.strip": "false",
+   "cmake.verbose": True,
+   "install.strip": False,
}))
EOF
)



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-20 Thread Michał Górny
commit: e6198d16c66dea2cf6db7fb528cd911493c90bd2
Author: Michał Górny  gentoo  org>
AuthorDate: Wed May 15 15:42:19 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon May 20 16:56:45 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6198d16

distutils-r1.eclass: Pass ninja options to scikit-build-core

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 3aa2c8984ab2..71b80fafe1a5 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1457,11 +1457,17 @@ distutils_pep517_install() {
"${DISTUTILS_ARGS[@]}"
)
 
+   local -x NINJAOPTS=$(get_NINJAOPTS)
config_settings=$(
"${EPYTHON}" - "${cmake_args[@]}" <<-EOF || die
import json
+   import os
+   import shlex
import sys
+
+   ninjaopts = 
shlex.split(os.environ["NINJAOPTS"])
print(json.dumps({
+   "build.tool-args": ninjaopts,
"cmake.args": 
";".join(sys.argv[1:]),
"cmake.build-type": 
"${CMAKE_BUILD_TYPE}",
"cmake.verbose": True,



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-20 Thread Michał Górny
commit: d5e060a2d9ae439620689acc720d9a11a859a3a1
Author: Michał Górny  gentoo  org>
AuthorDate: Fri May 17 13:09:44 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon May 20 16:56:46 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5e060a2

python-utils-r1.eclass: Fix cleanup in failing epytest

Fix epytest to call `die -n` after performing the cleanup, rather than
before.  This ensures that stray cache files are cleaned up even if
we're actually going to die, e.g. when using
`FEATURES=test-fail-continue`.

Signed-off-by: Michał Górny  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/36672
Signed-off-by: Michał Górny  gentoo.org>

 eclass/python-utils-r1.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 584ed831f816..c47565fa1db2 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1444,7 +1444,7 @@ epytest() {
set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}" ${EPYTEST_FLAGS}
 
echo "${@}" >&2
-   "${@}" || die -n "pytest failed with ${EPYTHON}"
+   "${@}"
local ret=${?}
 
# remove common temporary directories left over by pytest plugins
@@ -1455,6 +1455,7 @@ epytest() {
find "${BUILD_DIR}" -name '*-pytest-*.pyc' -delete || die
fi
 
+   [[ ${ret} -ne 0 ]] && die -n "pytest failed with ${EPYTHON}"
return ${ret}
 }
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-20 Thread Michał Górny
commit: 314c6b009037cf21ddfb35b6c372c5dd3819e0c5
Author: Michał Górny  gentoo  org>
AuthorDate: Tue May 14 12:09:24 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon May 20 16:56:43 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=314c6b00

distutils-r1.eclass: Support reusing prior wheels when compatible

Support reusing the wheels built for earlier Python implementations
if they are compatible with the subsequent implementations being built.
This includes pure Python wheels in packages that do not set
DISTUTILS_EXT, and stable ABI wheels.

Closes: https://bugs.gentoo.org/931689
Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 38 ++
 1 file changed, 38 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 29e901720e6c..a8f9817a3cf0 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -189,6 +189,18 @@ esac
 # ${DISTUTILS_DEPS}"
 # @CODE
 
+# @ECLASS_VARIABLE: DISTUTILS_ALLOW_WHEEL_REUSE
+# @DEFAULT_UNSET
+# @USER_VARIABLE
+# @DESCRIPTION:
+# If set to a non-empty value, the eclass is allowed to reuse a wheel
+# that was built for a prior Python implementation, provided that it is
+# compatible with the current one, rather than building a new one.
+#
+# This is an optimization that can avoid the overhead of calling into
+# the build system in pure Python packages and packages using the stable
+# Python ABI.
+
 if [[ -z ${_DISTUTILS_R1_ECLASS} ]]; then
 _DISTUTILS_R1_ECLASS=1
 
@@ -1585,6 +1597,32 @@ distutils-r1_python_compile() {
esac
 
if [[ ${DISTUTILS_USE_PEP517} ]]; then
+   if [[ ${DISTUTILS_ALLOW_WHEEL_REUSE} ]]; then
+   local whl
+   for whl in "${!DISTUTILS_WHEELS[@]}"; do
+   # use only wheels corresponding to the current 
directory
+   if [[ ${PWD} != ${DISTUTILS_WHEELS["${whl}"]} 
]]; then
+   continue
+   fi
+
+   # 1. Use pure Python wheels only if we're not 
expected
+   # to build extensions.  Otherwise, we may end up
+   # not building the extension at all when e.g. 
PyPy3
+   # is built without one.
+   #
+   # 2. For CPython, we can reuse stable ABI 
wheels.  Note
+   # that this relies on the assumption that we're 
building
+   # from the oldest to the newest implementation,
+   # and the wheels are forward-compatible.
+   if [[ ( ! ${DISTUTILS_EXT} && ${whl} == 
*py3-none-any* ) ||
+   ( ${EPYTHON} == python* && ${whl} == 
*-abi3-* ) ]]
+   then
+   distutils_wheel_install 
"${BUILD_DIR}/install" "${whl}"
+   return
+   fi
+   done
+   fi
+
distutils_pep517_install "${BUILD_DIR}/install"
DISTUTILS_WHEELS+=( "${DISTUTILS_WHEEL_PATH}" "${PWD}" )
fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-20 Thread Michał Górny
commit: a0e04d66dad73b419f423ef1a3e0459f7715da50
Author: Michał Górny  gentoo  org>
AuthorDate: Tue May 14 10:26:59 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon May 20 16:56:42 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0e04d66

distutils-r1.eclass: Store created wheels in DISTUTILS_WHEELS

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 1037c0abe239..955c41fe4e2d 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1532,6 +1532,15 @@ distutils_pep517_install() {
DISTUTILS_WHEEL_PATH=${WHEEL_BUILD_DIR}/${wheel}
 }
 
+# @VARIABLE: DISTUTILS_WHEELS
+# @DESCRIPTION:
+# An associative array of wheels created as a result
+# of distutils-r1_python_compile invocations, mapped to the source
+# directories.  Note that this includes only wheels implicitly created
+# by the eclass, and not wheels created as a result of direct
+# distutils_pep517_install calls in the ebuild.
+declare -g -A DISTUTILS_WHEELS=()
+
 # @FUNCTION: distutils-r1_python_compile
 # @USAGE: [additional-args...]
 # @DESCRIPTION:
@@ -1541,6 +1550,7 @@ distutils_pep517_install() {
 #
 # If DISTUTILS_USE_PEP517 is set to any other value, builds a wheel
 # using the PEP517 backend and installs it into ${BUILD_DIR}/install.
+# Path to the wheel is then added to DISTUTILS_WHEELS array.
 #
 # In legacy mode, runs 'esetup.py build'. Any parameters passed to this
 # function will be appended to setup.py invocation, i.e. passed
@@ -1576,6 +1586,7 @@ distutils-r1_python_compile() {
 
if [[ ${DISTUTILS_USE_PEP517} ]]; then
distutils_pep517_install "${BUILD_DIR}/install"
+   DISTUTILS_WHEELS+=( "${DISTUTILS_WHEEL_PATH}" "${PWD}" )
fi
 }
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-20 Thread Michał Górny
commit: a3895e6ab84b171c1470ac790b8002d9d9a820de
Author: Michał Górny  gentoo  org>
AuthorDate: Tue May 14 11:13:52 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon May 20 16:56:42 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3895e6a

distutils-r1.eclass: Add a QA warning for pure Python file mismatch

If the package is creating at least one pure Python wheel, check whether
the baseline package contents (i.e. everything but compiled Python
modules, extensions and .dist-info) match between implementations.
This is meant to ensure that we can safely optimize builds by reusing
pure Python wheels from previous builds.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 40 
 1 file changed, 40 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 955c41fe4e2d..29e901720e6c 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -2022,6 +2022,44 @@ distutils-r1_src_configure() {
return ${ret}
 }
 
+# @FUNCTION: _distutils-r1_compare_installed_files
+# @INTERNAL
+# @DESCRIPTION:
+# Verify the the match between files installed between this and previous
+# implementation.
+_distutils-r1_compare_installed_files() {
+   debug-print-function ${FUNCNAME} "${@}"
+
+   # QA check requires diff(1).
+   if ! type -P diff &>/dev/null; then
+   return
+   fi
+
+   # Perform the check only if at least one potentially reusable wheel
+   # has been produced.  Nonpure packages (e.g. NumPy) may install
+   # interpreter configuration details into sitedir.
+   if [[ ${!DISTUTILS_WHEELS[*]} != *-none-any.whl* &&
+   ${!DISTUTILS_WHEELS[*]} != *-abi3-*.whl ]]; then
+   return
+   fi
+
+   local sitedir=${BUILD_DIR}/install$(python_get_sitedir)
+   if [[ -n ${_DISTUTILS_PREVIOUS_SITE} ]]; then
+   diff -dur \
+   --exclude=__pycache__ \
+   --exclude='*.dist-info' \
+   --exclude="*$(get_modname)" \
+   "${_DISTUTILS_PREVIOUS_SITE}" "${sitedir}"
+   if [[ ${?} -ne 0 ]]; then
+   eqawarn "Package creating at least one pure Python 
wheel installs different"
+   eqawarn "Python files between implementations.  See 
diff in build log, above"
+   eqawarn "this message."
+   fi
+   fi
+
+   _DISTUTILS_PREVIOUS_SITE=${sitedir}
+}
+
 # @FUNCTION: _distutils-r1_post_python_compile
 # @INTERNAL
 # @DESCRIPTION:
@@ -2056,6 +2094,8 @@ _distutils-r1_post_python_compile() {
find "${bindir}" -type f -exec sed -i \
-e 
"1s@^#!\(${EPREFIX}/usr/bin/\(python\|pypy\)\)@#!${root}\1@" \
{} + || die
+
+   _distutils-r1_compare_installed_files
fi
 }
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-18 Thread Michał Górny
commit: 277634d1957c735f02bd64a3a68ccf05995d8a16
Author: Michał Górny  gentoo  org>
AuthorDate: Sat May 18 13:08:10 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat May 18 13:25:16 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=277634d1

Add 19.0.0_pre20240518 snapshot

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 3ada7d2a373b..08fa68022174 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
 
case ${PV} in
+   19.0.0_pre20240518)
+   
EGIT_COMMIT=702198fc9ac5dba392f9d9ba7c56467996343c0a
+   ;;
19.0.0_pre20240509)

EGIT_COMMIT=a7ee81e8279e0bf6e05617a4a638e5f2f8e45022
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/, profiles/desc/

2024-05-17 Thread Benda XU
commit: 7475e8ff0742ead7b45edea3ed7e79c394e23958
Author: Yiyang Wu  gmail  com>
AuthorDate: Sun Apr 14 15:43:17 2024 +
Commit: Benda XU  gentoo  org>
CommitDate: Sat May 18 03:46:51 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7475e8ff

rocm.eclass: Enable ROCm 6, add gfx94{0,1,2} (MI300) support

Update the references, since the original reference does not
contain MI300. The "see also" blog is also removed because it hasn't been
updated for 2 years.

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 eclass/rocm.eclass| 12 +++-
 profiles/desc/amdgpu_targets.desc | 14 ++
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/eclass/rocm.eclass b/eclass/rocm.eclass
index e03e8bdd507a..7039455dec6b 100644
--- a/eclass/rocm.eclass
+++ b/eclass/rocm.eclass
@@ -161,7 +161,7 @@ _rocm_set_globals() {
gfx906 gfx908 gfx90a gfx1030
)
;;
-   5.*|)
+   5.*)
unofficial_amdgpu_targets=(
gfx803 gfx900 gfx1010 gfx1011 gfx1012
gfx1031 gfx1100 gfx1101 gfx1102
@@ -170,6 +170,16 @@ _rocm_set_globals() {
gfx906 gfx908 gfx90a gfx1030
)
;;
+   6.*|)
+   unofficial_amdgpu_targets=(
+   gfx803 gfx900 gfx940 gfx941
+   gfx1010 gfx1011 gfx1012
+   gfx1031 gfx1101 gfx1102
+   )
+   official_amdgpu_targets=(
+   gfx906 gfx908 gfx90a gfx942 gfx1030 gfx1100
+   )
+   ;;
*)
die "Unknown ROCm major version! Please update 
rocm.eclass before bumping to new ebuilds"
;;

diff --git a/profiles/desc/amdgpu_targets.desc 
b/profiles/desc/amdgpu_targets.desc
index d52080781947..8f337b03f63d 100644
--- a/profiles/desc/amdgpu_targets.desc
+++ b/profiles/desc/amdgpu_targets.desc
@@ -1,15 +1,21 @@
-# Copyright 1999-2023 Gentoo Authors.
+# Copyright 1999-2024 Gentoo Authors.
 # Distributed under the terms of the GNU General Public License v2
 
-# Reference:
-# GPU name and Architecture codename: 
https://github.com/GPUOpen-Tools/device_info/blob/master/DeviceInfo.cpp
-# See also: 
https://www.coelacanth-dream.com/posts/2019/12/30/did-rid-product-matome-p2/#fn:67
+# Reference: GPU name and architecture codename documented by
+# GPUOpen-Tools 
https://github.com/GPUOpen-Tools/device_info/blob/master/DeviceInfo.cpp
+# ROCm official document (Instinct accelerator only) 
https://rocm.docs.amd.com/en/latest/reference/gpu-arch/gpu-arch-spec-overview.html
+# Kernel document (note: GC version is not amdgpu gfx target) 
https://www.kernel.org/doc/html/latest/gpu/amdgpu/driver-misc.html#discrete-gpu-info
+# Kernel source code (map of IP version vs amdgpu gfx target) 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/amd/amdkfd/kfd_device.c
 kgd2kfd_probe function
+# Mesa drm source code 
https://gitlab.freedesktop.org/mesa/drm/blob/main/data/amdgpu.ids
 
 gfx803 - Fiji GPU, codename fiji, including Radeon R9 Nano/Fury/FuryX, Radeon 
Pro Duo, FirePro S9300x2, Radeon Instinct MI8
 gfx900 - Vega GPU, codename vega10, including Radeon Vega Frontier Edition, 
Radeon RX Vega 56/64, Radeon RX Vega 64 Liquid, Radeon Pro Vega 48/56/64/64X, 
Radeon Pro WX 8200/9100, Radeon Pro V320/V340/SSG, Radeon Instinct MI25
 gfx906 - Vega GPU, codename vega20, including Radeon (Pro) VII, Radeon 
Instinct MI50/MI60
 gfx908 - CDNA Accelerator, codename arcturus, including AMD Instinct MI100 
Accelerator
 gfx90a - CDNA2 Accelerator, codename aldebaran, including AMD Instinct MI200 
series Accelerators
+gfx940 - CDNA3 Accelerator, codename aqua_vangaram, MI300A rev 0
+gfx941 - CDNA3 Accelerator, codename aqua_vangaram, MI300X rev 0
+gfx942 - CDNA3 Accelerator, codename aqua_vangaram, MI300A and MI300X rev >=1
 gfx1010 - RDNA GPU, codename navi10, including Radeon RX 
5700XT/5700/5700M/5700B/5700XTB/5600XT/5600/5600M, Radeon Pro 5700XT/5700, 
Radeon Pro W5700X/W5700
 gfx1011 - RDNA GPU, codename navi12, including Radeon Pro 5600M/V520
 gfx1012 - RDNA GPU, codename navi14, including Radeon RX 
5500XT/5500/5500M/5500XTB/5300/5300M, Radeon Pro 5500XT/5500M/5300/5300M, 
Radeon Pro W5500X/W5500/W5500M/W5300M



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-17 Thread Benda XU
commit: bd29b1782a348f0017d74a92204acd6f2704c96c
Author: Yiyang Wu  gmail  com>
AuthorDate: Mon Apr  8 06:10:07 2024 +
Commit: Benda XU  gentoo  org>
CommitDate: Sat May 18 03:45:39 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd29b178

rocm.eclass: remove xnack flag for broader compatibility

Initially, rocm.eclass append xnack[1,2] feature flag to gfx9 GPUs,
since ROCm upstream does this in many of their math libraries, e.g.
rocBLAS [3]. The list includes gfx90a:xnack+, indicating xnack is usable
for MI200 series, thus rocm.eclass append :xnack+ to gfx90a.

But it turns out xnack- is also common for MI200 series, restricting to
xnack+ produces incompatible GPU kernel with xnack- mode.

Also, community also explores using xnack on other gfx9 GPU [4,5], which
is previously restricted to xnack- in rocm.eclass.

By not appending xnack feature flag, GPU kernels are compiled to "xnack
any" mode, which can be run in either mode, potentially scarifying some
performance [6,7], with no direct evidence. rocFFT reports no
performance penalty[8].

For the reason above, do not append xnack feature flag to AMDGPU_TARGETS,
which is compatible with GPUs operate in both xnack mode.

[1] https://wiki.gentoo.org/wiki/ROCm#XNACK_target_feature
[2] https://rocm.docs.amd.com/en/latest/conceptual/gpu-memory.html#xnack
[3] 
https://github.com/ROCm/rocBLAS/blob/release/rocm-rel-5.0/CMakeLists.txt#L201
[4] https://niconiconi.neocities.org/tech-notes/xnack-on-amd-gpus/
[5] https://arxiv.org/abs/2401.02680
[6] https://llvm.org/docs/AMDGPUUsage.html#target-features
[7] 
https://docs.olcf.ornl.gov/systems/crusher_quick_start_guide.html#compiling-hip-kernels-for-specific-xnack-modes
[8] 
https://github.com/ROCm/rocFFT/commit/cd2689360ba3b3579d044d8925838ff307b4b4cf

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/36254

 eclass/rocm.eclass | 19 ++-
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/eclass/rocm.eclass b/eclass/rocm.eclass
index 9804ecde97d0..e03e8bdd507a 100644
--- a/eclass/rocm.eclass
+++ b/eclass/rocm.eclass
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: rocm.eclass
@@ -201,22 +201,7 @@ unset -f _rocm_set_globals
 # Append default target feature to GPU arch. See
 # https://llvm.org/docs/AMDGPUUsage.html#target-features
 get_amdgpu_flags() {
-   local amdgpu_target_flags
-   for gpu_target in ${AMDGPU_TARGETS}; do
-   local target_feature=
-   case ${gpu_target} in
-   gfx906|gfx908)
-   target_feature=:xnack-
-   ;;
-   gfx90a)
-   target_feature=:xnack+
-   ;;
-   *)
-   ;;
-   esac
-   amdgpu_target_flags+="${gpu_target}${target_feature};"
-   done
-   echo "${amdgpu_target_flags}"
+   echo $(printf "%s;" ${AMDGPU_TARGETS[@]})
 }
 
 # @FUNCTION: check_amdgpu



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-17 Thread Ionen Wolkens
commit: 2e1c05e68ecf30083b5fe1e2f83aa0c5548ce9a0
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Fri May 17 21:45:44 2024 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Fri May 17 23:02:54 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e1c05e6

linux-mod-r1.eclass: update depmod.d comment

Likely a non-issue with dracut now (untested) but will leave it
alone for now and just updating comment. Maybe if users start
having more problems that'd require it or if we want to more
liberally rename modules install paths while ensuring it does not
use the old one on a same kernel (point of this was just to make
things more robust and is not hard-required).

Also adjust the commented out function to match dracut.conf.d (guess
glob makes it more straight forward, not that it's necessary).

Signed-off-by: Ionen Wolkens  gentoo.org>

 eclass/linux-mod-r1.eclass | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 6060074d8734..6d35a7068bfb 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -583,10 +583,11 @@ modules_post_process() {
(( ${#mods[@]} )) ||
die "${FUNCNAME[0]} was called with no installed modules under 
${path}"
 
-   # TODO?: find way for sane use with dracut (its 90kernel-modules-extra
-   # parses depmod.d files directly and assumes should include its modules
-   # which can lead to unnecessarily increased size or stale modules)
-#  _modules_process_depmod.d "${mods[@]#"${path}/"}"
+   # TODO?: look into re-introducing after verifying it works as expected,
+   # formerly omitted because dracut's 90kernel-modules-extra parses 
depmod.d
+   # files directly and assumes should include its modules but we now 
create
+   # dracut omit files that *hopefully* prevent this
+#  _modules_process_depmod.d "${mods[@]##*/}"
 
_modules_process_dracut.conf.d "${mods[@]##*/}"
_modules_process_strip "${mods[@]}"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-17 Thread Ionen Wolkens
commit: 166cfd020d65a3c4189a0897fa2dc11fa503211f
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Fri May 17 21:55:03 2024 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Fri May 17 23:03:39 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=166cfd02

linux-mod-r1.eclass: minor style & misc adjustments

No real functional changes:
* fix indent for dist-kernel_reinstall_initramfs
* explicit return 0 to avoid returning a failure, not that return
  codes should ever be checked for that function
* use printf %q for LD path in case of unlikely spaces
* move dist-kernel version sanity check inside
  _modules_sanity_kernelversion which fits and is called from the
  same function the check was in (also document it)

Signed-off-by: Ionen Wolkens  gentoo.org>

 eclass/linux-mod-r1.eclass | 47 --
 1 file changed, 25 insertions(+), 22 deletions(-)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 6d35a7068bfb..43c5a7d7b140 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -499,7 +499,7 @@ linux-mod-r1_pkg_postinst() {
if [[ -z ${ROOT} && ${MODULES_INITRAMFS_IUSE} ]] &&
use dist-kernel && use ${MODULES_INITRAMFS_IUSE#+}
then
-   dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+   dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
fi
 
if has_version virtual/dist-kernel && ! use dist-kernel; then
@@ -695,24 +695,6 @@ _modules_prepare_kernel() {
fi
 
linux-info_pkg_setup
-
-   if use dist-kernel &&
-   ! has_version 
"~virtual/dist-kernel-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
-   then
-   ewarn
-   ewarn "The kernel modules in ${CATEGORY}/${PN} are being built 
for"
-   ewarn "kernel version ${KV_FULL}. But this does not match the"
-   ewarn "installed version of virtual/dist-kernel."
-   ewarn
-   ewarn "If this is not intentional, the problem may be corrected 
by"
-   ewarn "using \"eselect kernel\" to set the default kernel 
version to"
-   ewarn "the same version as the installed version of 
virtual/dist-kernel."
-   ewarn
-   ewarn "If the distribution kernel is being downgraded, ensure 
that"
-   ewarn "virtual/dist-kernel is also downgraded to the same 
version"
-   ewarn "before rebuilding external kernel modules."
-   ewarn
-   fi
 }
 
 # @FUNCTION: _modules_prepare_sign
@@ -857,7 +839,7 @@ _modules_prepare_toolchain() {
# can work but raises concerns about breaking packages that may use 
these
if linux_chkconfig_present LTO_CLANG_THIN && tc-ld-is-lld; then
KERNEL_LD=${T}/linux-mod-r1_ld.lld
-   printf '#!/usr/bin/env sh\nexec %s "${@}" 
--thinlto-cache-dir=\n' \
+   printf '#!/usr/bin/env sh\nexec %q "${@}" 
--thinlto-cache-dir=\n' \
"${LD}" > "${KERNEL_LD}" || die
chmod +x -- "${KERNEL_LD}" || die
fi
@@ -899,7 +881,7 @@ _modules_prepare_toolchain() {
 # If enabled in the kernel configuration, this compresses the given
 # modules using the same format.
 _modules_process_compress() {
-   use modules-compress || return
+   use modules-compress || return 0
 
local -a compress
if linux_chkconfig_present MODULE_COMPRESS_XZ; then
@@ -1144,7 +1126,10 @@ _modules_sanity_kernelbuilt() {
 # @DESCRIPTION:
 # Prints a warning if the kernel version is greater than to
 # MODULES_KERNEL_MAX (while only considering same amount of version
-# components), or aborts if it is less than MODULES_KERNEL_MIN
+# components), or aborts if it is less than MODULES_KERNEL_MIN.
+#
+# With USE=dist-kernel, also warn if virtual/dist-kernel is of a
+# different version than the one being built against.
 _modules_sanity_kernelversion() {
local kv=${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}
 
@@ -1194,6 +1179,24 @@ _modules_sanity_kernelversion() {
ewarn
fi
fi
+
+   if use dist-kernel &&
+   ! has_version 
"~virtual/dist-kernel-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+   then
+   ewarn
+   ewarn "The kernel modules in ${CATEGORY}/${PN} are being built 
for"
+   ewarn "kernel version ${KV_FULL}. But this does not match the"
+   ewarn "installed version of virtual/dist-kernel."
+   ewarn
+   ewarn "If this is not intentional, the problem may be corrected 
by"
+   ewarn "using \"eselect kernel\" to set the default kernel 
version to"
+   ewarn "the same version as the installed version of 
virtual/dist-kernel."
+   ewarn
+   ewarn "If the distribution kernel is being downgraded, ensure 
that"
+   ewarn 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-17 Thread Andrew Ammerlaan
commit: 05ad18f837f89cfa2b20e01264ef6332c240072c
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Thu May  9 17:01:00 2024 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Fri May 17 12:06:46 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05ad18f8

linux-info.eclass: respect eselect kernel setting in binpkgs

Commit f51cd5b64c14ddfb83488a12d538c66a4a309376 resets kernel environment
variables when binpkgs are merged, this makes sense since we care about the
system that the binpkg will be installed on, not the system the binpkg was
built on. This introduced Bug 931213 as a side-effect, which will be fixed
in a separate commit to linux-mod-r1.eclass. In preparation of that, we document
and rename the LINUX_INFO_BINARY_RESET to SKIP_KERNEL_BINPKG_ENV_RESET.

However, commit f51cd5b64c14ddfb83488a12d538c66a4a309376 also makes binpkgs
always use the running kernel version. This behaviour is surprising and
confusing. In principle the 'eselect kernel' setting should still be respected
when binpkgs are used.

Bug: https://bugs.gentoo.org/926063
Bug: https://bugs.gentoo.org/931213
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/linux-info.eclass | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 864594f607ca..9449a6359d2a 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -158,6 +158,14 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}"
 # This is a user flag and should under _no circumstances_ be set in the ebuild.
 : "${SKIP_KERNEL_CHECK:=""}"
 
+# @ECLASS_VARIABLE: SKIP_KERNEL_BINPKG_ENV_RESET
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set, do not reset the kernel environment variables when merging a package
+# as a binpkg.
+# Main use-case is for kernel modules, i.e. linux-mod-r1.eclass.
+# This should be set before running linux-info_pkg_setup
+
 # And to ensure all the weirdness with crosscompile
 inherit toolchain-funcs
 [[ ${EAPI} == 6 ]] && inherit eapi7-ver
@@ -696,12 +704,12 @@ linux-info_get_any_version() {
die "${FUNCNAME}() called on non-Linux system, please fix the 
ebuild"
fi
 
-   if [[ ${MERGE_TYPE} == binary && -z ${LINUX_INFO_BINARY_RESET} ]]; then
+   if [[ ${MERGE_TYPE} == binary && -z ${SKIP_KERNEL_BINPKG_ENV_RESET} ]]; 
then
unset KV_FULL _LINUX_CONFIG_EXISTS_DONE KV_OUT_DIR
-   LINUX_INFO_BINARY_RESET=1
+   SKIP_KERNEL_BINPKG_ENV_RESET=1
fi
 
-   if [[ ${MERGE_TYPE} != binary ]] && ! get_version; then
+   if ! get_version; then
ewarn "Unable to calculate Linux Kernel version for build, 
attempting to use running version"
fi
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-17 Thread Andrew Ammerlaan
commit: f439b4ec05b1982f06f67fbf39a46ae0db187a76
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Wed May  8 06:02:53 2024 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Fri May 17 12:06:42 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f439b4ec

linux-mod-r1.eclass: add USE=initramfs

Adds a new variable that adds the "initramfs" flag when set. This new
flag controls whether or not the modules that were built should be
included in the initramfs. If the modules should be included, then we
also rebuild the initramfs/uki in post_install using installkernel.

Bug: https://bugs.gentoo.org/923025
Bug: https://bugs.gentoo.org/928271
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/linux-mod-r1.eclass | 54 ++
 1 file changed, 54 insertions(+)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 4b267aae4db1..d9651f962604 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -131,6 +131,15 @@ IDEPEND="
sys-apps/kmod[tools]
 "
 
+if [[ ${MODULES_INITRAMFS_IUSE} ]]; then
+   IUSE+=" ${MODULES_INITRAMFS_IUSE}"
+   IDEPEND+="
+   ${MODULES_INITRAMFS_IUSE#+}? (
+   sys-kernel/installkernel
+   )
+   "
+fi
+
 if [[ -n ${MODULES_OPTIONAL_IUSE} ]]; then
: "${MODULES_OPTIONAL_IUSE#+}? ( | )"
RDEPEND=${_/|/${RDEPEND}} DEPEND=${_/|/${DEPEND}} \
@@ -179,6 +188,22 @@ fi
 #
 # May want to look at KERNEL_CHOST before considering this.
 
+# @ECLASS_VARIABLE: MODULES_INITRAMFS_IUSE
+# @DEFAULT_UNSET
+# @PRE_INHERIT
+# @DESCRIPTION:
+# If set, adds the specified USE flag. When this flag is enabled the
+# installed kernel modules are registered for inclusion in the dracut
+# initramfs. Additionally, if distribution kernels are used
+# (USE="dist-kernel") then these kernels are re-installed.
+#
+# The typical recommended value is "initramfs" or "+initramfs" (global
+# IUSE).
+#
+# If MODULES_INITRAMFS_IUSE is not set, or the specified flag is not
+# enabled, then the installed kernel modules are omitted from the
+# dracut initramfs.
+
 # @ECLASS_VARIABLE: MODULES_SIGN_HASH
 # @USER_VARIABLE
 # @DEFAULT_UNSET
@@ -471,6 +496,19 @@ linux-mod-r1_pkg_postinst() {
dist-kernel_compressed_module_cleanup "${EROOT}/lib/modules/${KV_FULL}"
_modules_update_depmod
 
+   if [[ -z ${ROOT} && ${MODULES_INITRAMFS_IUSE} ]] &&
+   use dist-kernel && use ${MODULES_INITRAMFS_IUSE#+}
+   then
+   dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+   fi
+
+   if has_version virtual/dist-kernel && ! use dist-kernel; then
+   ewarn "virtual/dist-kernel is installed, but 
USE=\"dist-kernel\""
+   ewarn "is not enabled for ${CATEGORY}/${PN}."
+   ewarn "It's recommended to globally enable the dist-kernel USE 
flag"
+   ewarn "to automatically trigger initramfs rebuilds on kernel 
updates"
+   fi
+
# post_process ensures modules were installed and that the eclass' USE
# are likely not no-ops (unfortunately postinst itself may be missed)
[[ -v _MODULES_GLOBAL[ran:post_process] ]] ||
@@ -550,6 +588,7 @@ modules_post_process() {
# which can lead to unnecessarily increased size or stale modules)
 #  _modules_process_depmod.d "${mods[@]#"${path}/"}"
 
+   _modules_process_dracut.conf.d "${mods[@]##*/}"
_modules_process_strip "${mods[@]}"
_modules_process_sign "${mods[@]}"
_modules_sanity_modversion "${mods[@]}" # after strip/sign in case 
broke it
@@ -904,6 +943,21 @@ _modules_process_depmod.d() {
)
 }
 
+# @FUNCTION: _modules_process_dracut.conf.d
+# @USAGE: ...
+# @INTERNAL
+# @DESCRIPTION:
+# Create dracut.conf.d snippet defining if module should be included in the
+# initramfs.
+_modules_process_dracut.conf.d() {
+   (
+   insinto /usr/lib/dracut/dracut.conf.d
+   [[ ${MODULES_INITRAMFS_IUSE} ]] && use 
${MODULES_INITRAMFS_IUSE#+} &&
+   : add || : omit
+   newins - 10-${PN}.conf <<<"${_}_drivers+=\" ${*%.ko} \""
+   )
+}
+
 # @FUNCTION: _modules_process_sign
 # @USAGE: ...
 # @INTERNAL



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-17 Thread Andrew Ammerlaan
commit: 7ca8ee3261f35705fbe94af7688e41815b42c0e6
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Thu May  9 17:33:00 2024 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Fri May 17 12:06:47 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ca8ee32

linux-mod-r1.eclass: do not reset kernel env vars in binpkgs

Closes: https://bugs.gentoo.org/931213
Bug: https://bugs.gentoo.org/926063
Signed-off-by: Andrew Ammerlaan  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/36597
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/linux-mod-r1.eclass | 5 +
 1 file changed, 5 insertions(+)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index d9651f962604..6060074d8734 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -661,6 +661,11 @@ _modules_check_migration() {
 # Handles linux-info bits to provide usable sources, KV_ variables,
 # and CONFIG_CHECK use.
 _modules_prepare_kernel() {
+   # The modules we build are specific to each kernel version, we don't
+   # want to reset the environment to use the user selected kernel version.
+   # Bug 931213, 926063
+   SKIP_KERNEL_BINPKG_ENV_RESET=1
+
get_version
 
# linux-info allows skipping checks if SKIP_KERNEL_CHECK is set and



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-17 Thread Michał Górny
commit: bf9a8b7af96bb7161956fc8276d9d07f021bda8a
Author: Michał Górny  gentoo  org>
AuthorDate: Sat May 11 18:53:28 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri May 17 06:25:48 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf9a8b7a

cargo.eclass: Optimize crate unpacking

Unpack crates in parallel using xargs to utilize multicore systems
better.  Perform checksumming via a single sha256sum invocation.

For dev-python/watchfiles, this speeds up unpacking on my machine
from 2.6 s to 0.75 s (warm cache).

Signed-off-by: Michał Górny  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/36645
Signed-off-by: Michał Górny  gentoo.org>

 eclass/cargo.eclass | 56 +++--
 1 file changed, 33 insertions(+), 23 deletions(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 0f2da982f60c..a685cd99fb38 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -329,40 +329,50 @@ _cargo_gen_git_config() {
 cargo_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
 
-   mkdir -p "${ECARGO_VENDOR}" || die
-   mkdir -p "${S}" || die
+   mkdir -p "${ECARGO_VENDOR}" "${S}" || die
 
local archive shasum pkg
+   local crates=()
for archive in ${A}; do
case "${archive}" in
*.crate)
-   # when called by pkgdiff-mg, do not unpack 
crates
-   [[ ${PKGBUMPING} == ${PVR} ]] && continue
-
-   ebegin "Loading ${archive} into Cargo registry"
-   tar -xf "${DISTDIR}"/${archive} -C 
"${ECARGO_VENDOR}/" || die
-   # generate sha256sum of the crate itself as 
cargo needs this
-   shasum=$(sha256sum "${DISTDIR}"/${archive} | 
cut -d ' ' -f 1)
-   pkg=$(basename ${archive} .crate)
-   cat <<- EOF > 
${ECARGO_VENDOR}/${pkg}/.cargo-checksum.json
-   {
-   "package": "${shasum}",
-   "files": {}
-   }
-   EOF
-   # if this is our target package we need it in 
${WORKDIR} too
-   # to make ${S} (and handle any revisions too)
-   if [[ ${P} == ${pkg}* ]]; then
-   tar -xf "${DISTDIR}"/${archive} -C 
"${WORKDIR}" || die
-   fi
-   eend $?
+   crates+=( "${archive}" )
;;
*)
-   unpack ${archive}
+   unpack "${archive}"
;;
esac
done
 
+   if [[ ${PKGBUMPING} != ${PVR} && ${crates[@]} ]]; then
+   pushd "${DISTDIR}" >/dev/null || die
+
+   ebegin "Unpacking crates"
+   printf '%s\0' "${crates[@]}" |
+   xargs -0 -P "$(makeopts_jobs)" -n 1 -t -- \
+   tar -x -C "${ECARGO_VENDOR}" -f
+   assert
+   eend $?
+
+   while read -d '' -r shasum archive; do
+   pkg=${archive%.crate}
+   cat <<- EOF > 
${ECARGO_VENDOR}/${pkg}/.cargo-checksum.json || die
+   {
+   "package": "${shasum}",
+   "files": {}
+   }
+   EOF
+
+   # if this is our target package we need it in 
${WORKDIR} too
+   # to make ${S} (and handle any revisions too)
+   if [[ ${P} == ${pkg}* ]]; then
+   tar -xf "${archive}" -C "${WORKDIR}" || die
+   fi
+   done < <(sha256sum -z "${crates[@]}" || die)
+
+   popd >/dev/null || die
+   fi
+
cargo_gen_config
 }
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-15 Thread Michał Górny
commit: ec0d09c191f0b047aec7c9dad3abca98973fb972
Author: Michał Górny  gentoo  org>
AuthorDate: Wed May 15 18:02:03 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed May 15 18:02:03 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec0d09c1

cargo.eclass: Revert "Optimize crate unpacking"

Reverts: 32928116fdcf631b6999705c78640e5718bd7a27
Bug: https://bugs.gentoo.org/931955
Signed-off-by: Michał Górny  gentoo.org>

 eclass/cargo.eclass | 56 ++---
 1 file changed, 23 insertions(+), 33 deletions(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 5a16d3a30528..0f2da982f60c 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -329,50 +329,40 @@ _cargo_gen_git_config() {
 cargo_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
 
-   mkdir -p "${ECARGO_VENDOR}" "${S}" || die
+   mkdir -p "${ECARGO_VENDOR}" || die
+   mkdir -p "${S}" || die
 
local archive shasum pkg
-   local crates=()
for archive in ${A}; do
case "${archive}" in
*.crate)
-   crates+=( "${archive}" )
+   # when called by pkgdiff-mg, do not unpack 
crates
+   [[ ${PKGBUMPING} == ${PVR} ]] && continue
+
+   ebegin "Loading ${archive} into Cargo registry"
+   tar -xf "${DISTDIR}"/${archive} -C 
"${ECARGO_VENDOR}/" || die
+   # generate sha256sum of the crate itself as 
cargo needs this
+   shasum=$(sha256sum "${DISTDIR}"/${archive} | 
cut -d ' ' -f 1)
+   pkg=$(basename ${archive} .crate)
+   cat <<- EOF > 
${ECARGO_VENDOR}/${pkg}/.cargo-checksum.json
+   {
+   "package": "${shasum}",
+   "files": {}
+   }
+   EOF
+   # if this is our target package we need it in 
${WORKDIR} too
+   # to make ${S} (and handle any revisions too)
+   if [[ ${P} == ${pkg}* ]]; then
+   tar -xf "${DISTDIR}"/${archive} -C 
"${WORKDIR}" || die
+   fi
+   eend $?
;;
*)
-   unpack "${archive}"
+   unpack ${archive}
;;
esac
done
 
-   if [[ ${PKGBUMPING} != ${PVR} ]]; then
-   pushd "${DISTDIR}" >/dev/null || die
-
-   ebegin "Unpacking crates"
-   printf '%s\0' "${crates[@]}" |
-   xargs -0 -P "$(makeopts_jobs)" -n 1 -- \
-   tar -x -C "${ECARGO_VENDOR}" -f
-   assert
-   eend $?
-
-   while read -d '' -r shasum archive; do
-   pkg=${archive%.crate}
-   cat <<- EOF > 
${ECARGO_VENDOR}/${pkg}/.cargo-checksum.json || die
-   {
-   "package": "${shasum}",
-   "files": {}
-   }
-   EOF
-
-   # if this is our target package we need it in 
${WORKDIR} too
-   # to make ${S} (and handle any revisions too)
-   if [[ ${P} == ${pkg}* ]]; then
-   tar -xf "${archive}" -C "${WORKDIR}" || die
-   fi
-   done < <(sha256sum -z "${crates[@]}" || die)
-
-   popd >/dev/null || die
-   fi
-
cargo_gen_config
 }
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-15 Thread Michał Górny
commit: 32928116fdcf631b6999705c78640e5718bd7a27
Author: Michał Górny  gentoo  org>
AuthorDate: Sat May 11 18:53:28 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed May 15 14:19:43 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32928116

cargo.eclass: Optimize crate unpacking

Unpack crates in parallel using xargs to utilize multicore systems
better.  Perform checksumming via a single sha256sum invocation.

For dev-python/watchfiles, this speeds up unpacking on my machine
from 2.6 s to 0.75 s (warm cache).

Signed-off-by: Michał Górny  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/36645
Signed-off-by: Michał Górny  gentoo.org>

 eclass/cargo.eclass | 56 +++--
 1 file changed, 33 insertions(+), 23 deletions(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 0f2da982f60c..5a16d3a30528 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -329,40 +329,50 @@ _cargo_gen_git_config() {
 cargo_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
 
-   mkdir -p "${ECARGO_VENDOR}" || die
-   mkdir -p "${S}" || die
+   mkdir -p "${ECARGO_VENDOR}" "${S}" || die
 
local archive shasum pkg
+   local crates=()
for archive in ${A}; do
case "${archive}" in
*.crate)
-   # when called by pkgdiff-mg, do not unpack 
crates
-   [[ ${PKGBUMPING} == ${PVR} ]] && continue
-
-   ebegin "Loading ${archive} into Cargo registry"
-   tar -xf "${DISTDIR}"/${archive} -C 
"${ECARGO_VENDOR}/" || die
-   # generate sha256sum of the crate itself as 
cargo needs this
-   shasum=$(sha256sum "${DISTDIR}"/${archive} | 
cut -d ' ' -f 1)
-   pkg=$(basename ${archive} .crate)
-   cat <<- EOF > 
${ECARGO_VENDOR}/${pkg}/.cargo-checksum.json
-   {
-   "package": "${shasum}",
-   "files": {}
-   }
-   EOF
-   # if this is our target package we need it in 
${WORKDIR} too
-   # to make ${S} (and handle any revisions too)
-   if [[ ${P} == ${pkg}* ]]; then
-   tar -xf "${DISTDIR}"/${archive} -C 
"${WORKDIR}" || die
-   fi
-   eend $?
+   crates+=( "${archive}" )
;;
*)
-   unpack ${archive}
+   unpack "${archive}"
;;
esac
done
 
+   if [[ ${PKGBUMPING} != ${PVR} ]]; then
+   pushd "${DISTDIR}" >/dev/null || die
+
+   ebegin "Unpacking crates"
+   printf '%s\0' "${crates[@]}" |
+   xargs -0 -P "$(makeopts_jobs)" -n 1 -- \
+   tar -x -C "${ECARGO_VENDOR}" -f
+   assert
+   eend $?
+
+   while read -d '' -r shasum archive; do
+   pkg=${archive%.crate}
+   cat <<- EOF > 
${ECARGO_VENDOR}/${pkg}/.cargo-checksum.json || die
+   {
+   "package": "${shasum}",
+   "files": {}
+   }
+   EOF
+
+   # if this is our target package we need it in 
${WORKDIR} too
+   # to make ${S} (and handle any revisions too)
+   if [[ ${P} == ${pkg}* ]]; then
+   tar -xf "${archive}" -C "${WORKDIR}" || die
+   fi
+   done < <(sha256sum -z "${crates[@]}" || die)
+
+   popd >/dev/null || die
+   fi
+
cargo_gen_config
 }
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-14 Thread Florian Schmaus
commit: b5d7d615c01a4b76bccde0a06de3a9ac3c7a850c
Author: Florian Schmaus  gentoo  org>
AuthorDate: Tue May 14 09:19:09 2024 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Tue May 14 09:19:24 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5d7d615

edob: do not die if log file exists

Signed-off-by: Florian Schmaus  gentoo.org>

 eclass/edo.eclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/eclass/edo.eclass b/eclass/edo.eclass
index ed8ec8d3201e..5fd77a676a8b 100644
--- a/eclass/edo.eclass
+++ b/eclass/edo.eclass
@@ -80,7 +80,6 @@ edob() {
[[ -z ${log_name} ]] && log_name="$(basename ${1})"
 
local log_file="${T}/${log_name}.log"
-   [[ -f ${log_file} ]] && die "Log file ${log_file} exists. Consider 
using \"edob -l\""
 
ebegin "${message}"
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-14 Thread Florian Schmaus
commit: 7d549d95818204c6d7a770d1c0de0fa0e6fcb5e8
Author: Florian Schmaus  gentoo  org>
AuthorDate: Fri Apr  5 12:45:54 2024 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Tue May 14 07:58:12 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d549d95

texlive-common.eclass: eftmutil-sys: use edob

Signed-off-by: Florian Schmaus  gentoo.org>

 eclass/texlive-common.eclass | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 15d475799a88..072581dde78e 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -22,6 +22,8 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
+inherit edo
+
 if [[ -z ${_TEXLIVE_COMMON_ECLASS} ]]; then
 _TEXLIVE_COMMON_ECLASS=1
 
@@ -199,9 +201,9 @@ etexmf-update() {
 efmtutil-sys() {
if has_version 'app-text/texlive-core' ; then
if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; 
then
-   einfo "Rebuilding formats"
-   "${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null ||
-   die -n "fmtutil-sys returned non-zero exit 
status ${?}"
+   edob -m "Rebuilding TexLive formats" \
+-l fmtutils-sys-all \
+"${EPREFIX}"/usr/bin/fmtutil-sys --all
else
ewarn "Cannot run fmtutil-sys for some reason."
ewarn "Your formats might be inconsistent with your 
installed ${PN} version"



[gentoo-commits] repo/gentoo:master commit in: eclass/, eclass/tests/

2024-05-14 Thread Florian Schmaus
commit: fa90907e9d23cbbaa15567eb9924b604740aacd6
Author: Florian Schmaus  gentoo  org>
AuthorDate: Thu Apr  4 15:22:25 2024 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Tue May 14 07:58:12 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa90907e

edo.eclass: enhance edob for usage with noisy commands

Normally, edob can, or rather should, not be used with noisy commands,
i.e., commands that produce an output. This is because the output
destroys the concept of ebegin and eend, where the eend marker is shown
on the same line that is produced by ebegin.

However, it sometimes would be nice to use edob with noisy commands, but
this means to redirect stdout and stderr of those commands. Instead of
redirecting the output to /dev/null, we save the output in a log file
under T. This allows us to present the output to the user in case the
command fails, making it furthermore part of the build.log, which we
expect users to attach to bug reports.

Closes: https://github.com/gentoo/gentoo/pull/36117
Signed-off-by: Florian Schmaus  gentoo.org>

 eclass/edo.eclass   |  68 ++-
 eclass/tests/edo.sh | 113 
 2 files changed, 171 insertions(+), 10 deletions(-)

diff --git a/eclass/edo.eclass b/eclass/edo.eclass
index c2e7ed60083f..ed8ec8d3201e 100644
--- a/eclass/edo.eclass
+++ b/eclass/edo.eclass
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: edo.eclass
@@ -12,10 +12,16 @@
 # This eclass provides the 'edo' command, and an 'edob' variant for 
ebegin/eend,
 # which logs the command used verbosely and dies (exits) on failure.
 #
-# This eclass should be used only where needed to give a more verbose log, e.g.
-# for invoking non-standard ./configure scripts, or building objects/binaries
-# directly within ebuilds via compiler invocations. It is NOT to be used
-# in place of generic 'command || die' where verbosity is unnecessary.
+# The 'edo' command should be used only where needed to give a more verbose 
log,
+# e.g. for invoking non-standard ./configure scripts, or building
+# objects/binaries directly within ebuilds via compiler invocations.  It is NOT
+# to be used in place of generic 'command || die' where verbosity is
+# unnecessary.
+#
+# The 'edob' command can be used for long running commands, even if
+# those commands produce output.  The 'edob' command will suppress the
+# command's output and only present it if the command returned with a
+# non-zero exit status.
 case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
@@ -35,14 +41,56 @@ edo() {
 }
 
 # @FUNCTION: edob
-# @USAGE:  [...]
+# @USAGE: [-l ] [-m ]  [...]
 # @DESCRIPTION:
 # Executes 'command' with ebegin & eend with any given arguments and exits
-# on failure unless called under 'nonfatal'.
+# on failure unless called under 'nonfatal'.  This function redirects
+# stdout and stderr to a log file.  The content of the log file is shown
+# if the command returns with a non-zero exit status.
+#
+# If -m  is provided, then invokes ebegin with , otherwise
+# a default message is used.  If -l  is provided, then  is
+# used to construct the name of the log file where stdout and stderr of the
+# command is redirected to.
 edob() {
-   ebegin "Running $@"
-   "$@"
-   eend $? || die -n "Failed to run command: $@"
+   local message
+   local log_name
+
+   while true; do
+   case "${1}" in
+   -l|-m)
+   [[ $# -lt 2 ]] && die "Must provide an argument 
to ${1}"
+   case "${1}" in
+   -l)
+   log_name="${2}"
+   ;;
+   -m)
+   message="${2}"
+   ;;
+   esac
+   shift 2
+   ;;
+   *)
+   break
+   ;;
+   esac
+   done
+
+   [[ -z ${message} ]] && message="Running $@"
+   [[ -z ${log_name} ]] && log_name="$(basename ${1})"
+
+   local log_file="${T}/${log_name}.log"
+   [[ -f ${log_file} ]] && die "Log file ${log_file} exists. Consider 
using \"edob -l\""
+
+   ebegin "${message}"
+
+   "$@" &> "${log_file}"
+   local ret=$?
+
+   if ! eend $ret; then
+   cat "${log_file}"
+   die -n "Command \"$@\" failed with exit status $ret"
+   fi
 }
 
 fi

diff --git a/eclass/tests/edo.sh b/eclass/tests/edo.sh
new file mode 100755
index ..cac03e0401ba
--- /dev/null
+++ b/eclass/tests/edo.sh
@@ 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-13 Thread Sam James
commit: 7010b055a0051e6557cfd2ef644e432fe84dc388
Author: Sam James  gentoo  org>
AuthorDate: Mon May 13 21:49:39 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon May 13 21:51:23 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7010b055

toolchain.eclass: don't depend on self if gnat-gpl

Without this, we get:
```
 * Error: circular dependencies:

(sys-devel/gcc-13.2.1_p20240210:13/13::gentoo, ebuild scheduled for merge) 
depends on
 (dev-lang/gnat-gpl-2021-r5:10/10::gentoo, ebuild scheduled for merge) 
(buildtime)
  (sys-devel/gcc-13.2.1_p20240210:13/13::gentoo, ebuild scheduled for merge) 
(buildtime)
```

Reported on IRC by dormito.

Fixes: 74414ea0c4d70c96bbec234df290d7e5f14d8f51
Signed-off-by: Sam James  gentoo.org>

 eclass/toolchain.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 25dedd4e5262..7d69f3b90e91 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -393,7 +393,7 @@ fi
 
 # TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler
 # supports Ada.
-if tc_has_feature ada ; then
+if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then
BDEPEND+=" ada? ( || ( sys-devel/gcc[ada] dev-lang/gnat-gpl[ada] ) )"
 fi
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-13 Thread Michael Orlitzky
commit: bd3da28e258a68566d1abe18aa6713594adcd0ff
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Thu May  9 20:17:12 2024 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Mon May 13 13:13:27 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd3da28e

eclass/acct-group.eclass: use $PN to construct make.conf override vars

If (after upcasing and replacing hyphens by underscores) ACCT_GROUP_NAME
is set to something that isn't valid in a bash variable name, the eclass
will crash: it uses ACCT_GROUP_NAME to construct the make.conf override
variables in pkg_pretend() and src_install(). This commit constructs the
variable names using PN instead of ACCT_GROUP_NAME. In ::gentoo, the two
are equivalent, but in an overlay this allows weirder group names at the
expense of slightly mismatched variable names.

Signed-off-by: Michael Orlitzky  gentoo.org>

 eclass/acct-group.eclass | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index 6dd6dc06a07e..2c2c88cfc7e1 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -96,8 +96,9 @@ acct-group_pkg_pretend() {
[[ ${ACCT_GROUP_ID} -ge -1 ]] || die "Ebuild error: 
ACCT_GROUP_ID=${ACCT_GROUP_ID} invalid!"
local group_id=${ACCT_GROUP_ID}
 
-   # check for the override
-   local override_name=${ACCT_GROUP_NAME^^}
+   # check for the override, use PN in case this is an overlay and
+   # ACCT_GROUP_NAME is not PN and not valid in a bash variable name
+   local override_name=${PN^^}
local override_var=ACCT_GROUP_${override_name//-/_}_ID
if [[ -n ${!override_var} ]]; then
group_id=${!override_var}
@@ -132,8 +133,9 @@ acct-group_pkg_pretend() {
 acct-group_src_install() {
debug-print-function ${FUNCNAME} "${@}"
 
-   # check for the override
-   local override_name=${ACCT_GROUP_NAME^^}
+   # check for the override, use PN in case this is an overlay and
+   # ACCT_GROUP_NAME is not PN and not valid in a bash variable name
+   local override_name=${PN^^}
local override_var=ACCT_GROUP_${override_name//-/_}_ID
if [[ -n ${!override_var} ]]; then
ewarn "${override_var}=${!override_var} override in effect, 
support will not be provided."



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-13 Thread Michael Orlitzky
commit: b7643fbe45d849aee68e4a162c05f48b4f830029
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Wed May  8 14:41:55 2024 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Mon May 13 13:13:22 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7643fbe

acct-user.eclass: make ACCT_USER_NAME writable

The ACCT_USER_NAME variable is set to $PN by Gentoo policy. Prior to
this commit, it was also marked "readonly", preventing it from being
changed in an ebuild. In an overlay, and combined with the package
naming restrictions in the PMS, this has the unfortunate side effect of
prohibiting some otherwise-valid usernames. We drop the "readonly" to
allow those users to be managed (in overlays) using GLEP81 packages.

Signed-off-by: Michael Orlitzky  gentoo.org>

 eclass/acct-user.eclass | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 66a4d6667888..765487391fbd 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2023 Gentoo Authors
+# Copyright 2019-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: acct-user.eclass
@@ -58,12 +58,12 @@ inherit user-info
 # << Eclass variables >>
 
 # @ECLASS_VARIABLE: ACCT_USER_NAME
-# @INTERNAL
 # @DESCRIPTION:
-# The name of the user.  This is forced to ${PN} and the policy prohibits
-# it from being changed.
+# The name of the user.  This is forced to ${PN} and the policy
+# prohibits it from being changed.  The variable is left writable for
+# use in overlays; package naming restrictions would prohibit some
+# otherwise-valid usernames.
 ACCT_USER_NAME=${PN}
-readonly ACCT_USER_NAME
 
 # @ECLASS_VARIABLE: ACCT_USER_ID
 # @REQUIRED



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-13 Thread Michael Orlitzky
commit: b7e37226a665a0613facd10386ec8696699e
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Thu May  9 20:07:19 2024 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Mon May 13 13:13:26 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7e37226

eclass/acct-user.eclass: use $PN to construct make.conf override vars

If (after upcasing and replacing hyphens by underscores) ACCT_USER_NAME
is set to something that isn't valid in a bash variable name, the eclass
will crash: it uses ACCT_USER_NAME to construct the make.conf override
variables in pkg_pretend() and src_install(). This commit constructs the
variable names using PN instead of ACCT_USER_NAME. In ::gentoo, the two
are equivalent, but in an overlay this allows weirder usernames at the
expense of slightly mismatched variable names.

Signed-off-by: Michael Orlitzky  gentoo.org>

 eclass/acct-user.eclass | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 765487391fbd..9eab1f4c4ae6 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -231,8 +231,9 @@ acct-user_pkg_pretend() {
[[ ${ACCT_USER_ID} -ge -1 ]] || die "Ebuild error: 
ACCT_USER_ID=${ACCT_USER_ID} invalid!"
local user_id=${ACCT_USER_ID}
 
-   # check for the override
-   local override_name=${ACCT_USER_NAME^^}
+   # check for the override, use PN in case this is an overlay and
+   # ACCT_USER_NAME is not PN and not valid in a bash variable name
+   local override_name=${PN^^}
local override_var=ACCT_USER_${override_name//-/_}_ID
if [[ -n ${!override_var} ]]; then
user_id=${!override_var}
@@ -274,8 +275,9 @@ acct-user_src_install() {
# serialize for override support
local ACCT_USER_GROUPS=${ACCT_USER_GROUPS[*]}
 
-   # support make.conf overrides
-   local override_name=${ACCT_USER_NAME^^}
+   # support make.conf overrides, use PN in case this is an overlay and
+   # ACCT_USER_NAME is not PN and not valid in a bash variable name
+   local override_name=${PN^^}
override_name=${override_name//-/_}
local var
for var in ACCT_USER_{ID,COMMENT,SHELL,HOME{,_OWNER,_PERMS},GROUPS}; do
@@ -437,7 +439,7 @@ acct-user_pkg_postinst() {
has "${g}" "${groups[@]}" || del_groups+="${del_groups:+, }${g}"
done
if [[ -n ${del_groups} ]]; then
-   local override_name=${ACCT_USER_NAME^^}
+   local override_name=${PN^^}
override_name=${override_name//-/_}
ewarn "Removing user ${ACCT_USER_NAME} from group(s): 
${del_groups}"
ewarn "To retain the user's group membership in the local 
system"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-13 Thread Michael Orlitzky
commit: d5eb382b49a78b0ad0283480f8eef68cd97c4739
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Wed May  8 21:19:32 2024 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Mon May 13 13:13:26 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5eb382b

acct-group.eclass: make ACCT_GROUP_NAME writable

The ACCT_GROUP_NAME variable is set to $PN by Gentoo policy. Prior to
this commit, it was also marked "readonly", preventing it from being
changed in an ebuild. In an overlay, and combined with the package
naming restrictions in the PMS, this has the unfortunate side effect of
prohibiting some otherwise-valid group names. We drop the "readonly" to
allow those groups to be managed (in overlays) using GLEP81 packages.

Signed-off-by: Michael Orlitzky  gentoo.org>

 eclass/acct-group.eclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index a0ad86066309..6dd6dc06a07e 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2023 Gentoo Authors
+# Copyright 2019-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: acct-group.eclass
@@ -50,12 +50,12 @@ inherit user-info
 # << Eclass variables >>
 
 # @ECLASS_VARIABLE: ACCT_GROUP_NAME
-# @INTERNAL
 # @DESCRIPTION:
 # The name of the group.  This is forced to ${PN} and the policy
-# prohibits it from being changed.
+# prohibits it from being changed.  The variable is left writable for
+# use in overlays; package naming restrictions would prohibit some
+# otherwise-valid group names.
 ACCT_GROUP_NAME=${PN}
-readonly ACCT_GROUP_NAME
 
 # @ECLASS_VARIABLE: ACCT_GROUP_ID
 # @REQUIRED



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-13 Thread Florian Schmaus
commit: cc5f4511b43b91f6df2fe63a4194ab596b706a80
Author: Florian Schmaus  gentoo  org>
AuthorDate: Mon May 13 08:31:53 2024 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Mon May 13 08:31:53 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc5f4511

texlive-module.eclass: check if texmf-dist/doc/man exists

Closes: https://bugs.gentoo.org/931798
Closes: https://bugs.gentoo.org/931799
Closes: https://bugs.gentoo.org/931800
Closes: https://bugs.gentoo.org/931801
Closes: https://bugs.gentoo.org/931802
Closes: https://bugs.gentoo.org/931803
Closes: https://bugs.gentoo.org/931804
Closes: https://bugs.gentoo.org/931805
Closes: https://bugs.gentoo.org/931806
Closes: https://bugs.gentoo.org/931807
Closes: https://bugs.gentoo.org/931808
Closes: https://bugs.gentoo.org/931809
Closes: https://bugs.gentoo.org/931810
Closes: https://bugs.gentoo.org/931811
Closes: https://bugs.gentoo.org/931812
Signed-off-by: Florian Schmaus  gentoo.org>

 eclass/texlive-module.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index da33e25a39dc..0daca41961ff 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -360,7 +360,7 @@ texlive-module_src_install() {
cp -pR texmf-doc "${ED}/usr/share/" || die
fi
 
-   if ver_test -ge 2023 && [[ ${CATEGORY} == dev-texlive ]]; then
+   if ver_test -ge 2023 && [[ -d texmf-dist/doc/man && ${CATEGORY} 
== dev-texlive ]]; then
local texlive_core_man_pages=(
afm2pl.1
aleph.1



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-13 Thread Miroslav Šulc
commit: 0a8b1dd5b29020e81f14a5aeb13fd5a73d850e23
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Mon May 13 05:17:22 2024 +
Commit: Miroslav Šulc  gentoo  org>
CommitDate: Mon May 13 07:07:17 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a8b1dd5

ant-tasks.eclass: drop ant-tasks.eclass

Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/36659
Signed-off-by: Miroslav Šulc  gentoo.org>

 eclass/ant-tasks.eclass | 172 
 1 file changed, 172 deletions(-)

diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
deleted file mode 100644
index 2b10e0f3e1e0..
--- a/eclass/ant-tasks.eclass
+++ /dev/null
@@ -1,172 +0,0 @@
-# Copyright 2007-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# @ECLASS: ant-tasks.eclass
-# @MAINTAINER:
-# j...@gentoo.org
-# @AUTHOR:
-# Vlastimil Babka 
-# @SUPPORTED_EAPIS: 7
-# @PROVIDES: java-utils-2
-# @BLURB: Eclass for building dev-java/ant-* packages
-# @DESCRIPTION:
-# This eclass provides functionality and default ebuild variables for building
-# dev-java/ant-* packages easily.
-
-case ${EAPI} in
-   7) ;;
-   *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
-if [[ -z ${_ANT_TASKS_ECLASS} ]]; then
-_ANT_TASKS_ECLASS=1
-
-# we set ant-core dep ourselves, restricted
-JAVA_ANT_DISABLE_ANT_CORE_DEP=true
-# rewriting build.xml for are the testcases has no reason atm
-JAVA_PKG_BSFIX_ALL=no
-inherit java-pkg-2 java-ant-2
-
-# @ECLASS_VARIABLE: ANT_TASK_JDKVER
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Affects the >=virtual/jdk version set in DEPEND string. Defaults to 1.8, can
-# be overridden from ebuild BEFORE inheriting this eclass.
-ANT_TASK_JDKVER=${ANT_TASK_JDKVER-1.8}
-
-# @ECLASS_VARIABLE: ANT_TASK_JREVER
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Affects the >=virtual/jre version set in DEPEND string. Defaults to 1.8, can
-# be overridden from ebuild BEFORE inheriting this eclass.
-ANT_TASK_JREVER=${ANT_TASK_JREVER-1.8}
-
-# @ECLASS_VARIABLE: ANT_TASK_NAME
-# @DESCRIPTION:
-# The name of this ant task as recognized by ant's build.xml, derived from $PN
-# by removing the ant- prefix. Read-only.
-ANT_TASK_NAME="${PN#ant-}"
-
-# @ECLASS_VARIABLE: ANT_TASK_DEPNAME
-# @PRE_INHERIT
-# @DESCRIPTION:
-# Specifies JAVA_PKG_NAME (PN{-SLOT} used with java-pkg_jar-from) of the 
package
-# that this one depends on. Defaults to the name of ant task, ebuild can
-# override it before inheriting this eclass. In case there is more than one
-# dependency, the variable can be specified as bash array with multiple 
strings,
-# one for each dependency.
-ANT_TASK_DEPNAME=${ANT_TASK_DEPNAME-${ANT_TASK_NAME}}
-
-# @ECLASS_VARIABLE: ANT_TASK_DISABLE_VM_DEPS
-# @PRE_INHERIT
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If set, no JDK/JRE deps are added.
-
-# @VARIABLE: ANT_TASK_PV
-# @INTERNAL
-# @DESCRIPTION:
-# Version of ant-core this task is intended to register and thus load with.
-ANT_TASK_PV="${PV}"
-
-# default for final releases
-MY_PV=${PV}
-
-UPSTREAM_PREFIX="mirror://apache/ant/source"
-GENTOO_PREFIX="https://dev.gentoo.org/~fordfrog/distfiles;
-
-# source/workdir name
-MY_P="apache-ant-${MY_PV}"
-
-# Default values for standard ebuild variables, can be overridden from ebuild.
-DESCRIPTION="Apache Ant's optional tasks depending on ${ANT_TASK_DEPNAME}"
-HOMEPAGE="https://ant.apache.org/;
-SRC_URI="${UPSTREAM_PREFIX}/${MY_P}-src.tar.bz2
-   ${GENTOO_PREFIX}/ant-${PV}-gentoo.tar.bz2"
-LICENSE="Apache-2.0"
-SLOT="0"
-
-RDEPEND="~dev-java/ant-core-${PV}:0"
-DEPEND="${RDEPEND}"
-
-if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
-   RDEPEND+=" >=virtual/jre-${ANT_TASK_JREVER}"
-   DEPEND+=" >=virtual/jdk-${ANT_TASK_JDKVER}"
-fi
-
-# Would run the full ant test suite for every ant task
-RESTRICT="test"
-
-S="${WORKDIR}/${MY_P}"
-
-# @FUNCTION: ant-tasks_src_unpack
-# @USAGE: [ base ] [ jar-dep ] [ all ]
-# @DESCRIPTION:
-# The function Is split into two parts, defaults to both of them ('all').
-#
-# base: performs the unpack, build.xml replacement and symlinks ant.jar from
-#  ant-core
-#
-# jar-dep: symlinks the jar file(s) from dependency package(s)
-ant-tasks_src_unpack() {
-   [[ -z "${1}" ]] && ant-tasks_src_unpack all
-
-   while [[ -n "${1}" ]]; do
-   case ${1} in
-   base)
-   unpack ${A}
-   cd "${S}"
-
-   # replace build.xml with our modified for split 
building
-   if [ -e "${WORKDIR}"/${PV}-build.patch ] ; then
-   eapply "${WORKDIR}"/${PV}-build.patch
-   else
-   mv -f "${WORKDIR}"/build.xml .
-   fi
-
-   cd lib
-   # remove 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-11 Thread Sam James
commit: ded2b2cd180ee3896423dca54c4f24962d5c9b0a
Author: Sam James  gentoo  org>
AuthorDate: Sun May 12 04:49:41 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sun May 12 04:49:41 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ded2b2cd

flag-o-matic.eclass: allow -mevex512 and -mno-evex512

The whole -m/-mno-* situation needs to be improved in the eclass but
let's do this for now for the benefit of Chromium (see 
754d6f5226a532ed086afa276b48e89ffafe0484).

Bug: https://bugs.gentoo.org/931623
Signed-off-by: Sam James  gentoo.org>

 eclass/flag-o-matic.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 0e5271c7824f..ecac452aa0ef 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -139,6 +139,8 @@ _setup-allowed-flags() {
-mno-fxsr -mno-hle -mno-rtm -mno-xsave -mno-xsaveopt
# gcc 4.9
-mno-avx512cd -mno-avx512er -mno-avx512f -mno-avx512pf -mno-sha
+
+   -mevex512 -mno-evex512
)
 
# Allow some safe individual flags. Should come along with the bug 
reference.



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-11 Thread Michał Górny
commit: 612110afb9863977815127fa296628fd4c99b701
Author: Michał Górny  gentoo  org>
AuthorDate: Sat May 11 13:36:54 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat May 11 13:36:54 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=612110af

Add 19.0.0_pre20240509 snapshot

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 623a7c1f3f4a..3ada7d2a373b 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
 
case ${PV} in
+   19.0.0_pre20240509)
+   
EGIT_COMMIT=a7ee81e8279e0bf6e05617a4a638e5f2f8e45022
+   ;;
19.0.0_pre20240504)

EGIT_COMMIT=76aa042dde6ba9ba57c680950f5818259ee02690
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-11 Thread Joonas Niilola
commit: 567cb9242b182006a4b80f9266e3641f422472f0
Author: Joonas Niilola  gentoo  org>
AuthorDate: Sat May 11 06:41:45 2024 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Sat May 11 06:44:32 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=567cb924

go-env.eclass: temporary EAPI guard for EAPI-6

 - there are still a handful of EAPI-6 ebuilds which don't support BDEPENDs.
   While the has_version check is imperfect without -b switch, this is better
   than nothing. I assume gcc[debug] isn't be that widely used either.

Signed-off-by: Joonas Niilola  gentoo.org>

 eclass/go-env.eclass | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index e0987ec7dee7..1a2c9787a146 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -34,7 +34,14 @@ go-env_set_compile_environment() {
use x86 && export GO386=$(go-env_go386)
 
# XXX: Hack for checking ICE (bug #912152, gcc PR113204)
-   has_version -b "sys-devel/gcc[debug]" && filter-lto
+   case ${EAPI} in
+   6)
+   has_version "sys-devel/gcc[debug]" && filter-lto
+   ;;
+   *)
+   has_version -b "sys-devel/gcc[debug]" && filter-lto
+   ;;
+   esac
 
export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-11 Thread Hans de Graaff
commit: 2b71eff4ae0058a049cb95d8f43dba38e2ab7008
Author: Hans de Graaff  gentoo  org>
AuthorDate: Sat May 11 06:20:15 2024 +
Commit: Hans de Graaff  gentoo  org>
CommitDate: Sat May 11 06:21:01 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b71eff4

eclass/apache2.eclass: remove rustls dependency

This dependency differs per ebuild and has been moved to the ebuilds.

Signed-off-by: Hans de Graaff  gentoo.org>

 eclass/apache-2.eclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index 17b8b0e2a64a..352337f551d6 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -162,7 +162,6 @@ RDEPEND="
apache2_modules_session_crypto? (
dev-libs/apr-util[openssl]
)
-   apache2_modules_tls? ( >=net-libs/rustls-ffi-0.9.2:= 


[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-10 Thread Sam James
commit: 31791351d915acb4db8135beb1a2a107538daeeb
Author: Sam James  gentoo  org>
AuthorDate: Sat May 11 01:52:04 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat May 11 01:52:19 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31791351

alternatives.eclass: support EAPI 8

Signed-off-by: Sam James  gentoo.org>

 eclass/alternatives.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/alternatives.eclass b/eclass/alternatives.eclass
index 2489fc67359a..7871e7f42b4a 100644
--- a/eclass/alternatives.eclass
+++ b/eclass/alternatives.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: alternatives.eclass
@@ -6,7 +6,7 @@
 # maintainer-nee...@gentoo.org
 # @AUTHOR:
 # Alastair Tse  (03 Oct 2003)
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: Creates symlink to the latest version of multiple slotted packages.
 # @DESCRIPTION:
 # When a package is SLOT'ed, very often we need to have a symlink to the
@@ -42,7 +42,7 @@
 # consider using this unless you are want to do something special.
 
 case ${EAPI} in
-   7) ;;
+   7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-10 Thread Sam James
commit: 4d6705884ff5a06e8dbbbd86d0b4f8decf300275
Author: Sam James  gentoo  org>
AuthorDate: Sat May 11 00:54:29 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat May 11 00:54:29 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d670588

go-env.eclass: update GCC workaround for LTO

Not fixed upstream yet so change workaround to look for sys-devel/gcc[debug]
instead as 14 is released now.

Bug: https://bugs.gentoo.org/912152
Signed-off-by: Sam James  gentoo.org>

 eclass/go-env.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index baba0d3ee8b3..e0987ec7dee7 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -34,7 +34,7 @@ go-env_set_compile_environment() {
use x86 && export GO386=$(go-env_go386)
 
# XXX: Hack for checking ICE (bug #912152, gcc PR113204)
-   [[ $(gcc-fullversion) == 14.0.1 ]] && filter-lto
+   has_version -b "sys-devel/gcc[debug]" && filter-lto
 
export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-10 Thread Sam James
commit: 9923973f58e7f5af1b1b53d9077b210224fc81b0
Author: Sam James  gentoo  org>
AuthorDate: Sat May  4 10:18:43 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May 10 17:27:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9923973f

perl-module.eclass: stop using ${D} for Module::Build in src_configure

See 
https://github.com/Perl-Toolchain-Gang/Module-Build/blob/a2ecdf98c25af7dfc7070280232513e8ccec4986/lib/Module/Build/Cookbook.pm#L122.

Bug: https://bugs.gentoo.org/778806
Signed-off-by: Sam James  gentoo.org>

 eclass/perl-module.eclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index fd1af4f945b1..9e3cfab16f94 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -272,7 +272,6 @@ perl-module_src_configure() {
set -- \
--installdirs=vendor \
--libdoc= \
-   --destdir="${D}" \
--create_packlist=1 \
--config ar="$(tc-getAR)" \
--config cc="$(tc-getCC)" \
@@ -439,7 +438,7 @@ perl-module_src_install() {
 
if [[ -f Build ]]; then
mytargets="${mytargets:-install}"
-   mbparams="${mbparams:---pure}"
+   mbparams="${mbparams:---destdir="${D}" --pure}"
einfo "./Build ${mytargets} ${mbparams}"
./Build ${mytargets} ${mbparams} \
|| die "./Build ${mytargets} ${mbparams} failed"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-10 Thread Sam James
commit: 0831622e109dde6f781219c904f7b275c1b8877f
Author: Sam James  gentoo  org>
AuthorDate: Sat May  4 08:39:43 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May 10 17:27:03 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0831622e

perl-module.eclass: respect toolchain variables for Module::Build via --config 
...

Based off 
https://github.com/Perl-Toolchain-Gang/Module-Build/blob/a2ecdf98c25af7dfc7070280232513e8ccec4986/lib/Module/Build/Cookbook.pm#L63.

Bug: https://bugs.gentoo.org/261375
Signed-off-by: Sam James  gentoo.org>

 eclass/perl-module.eclass | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 029fc78e4a85..fd1af4f945b1 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.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: perl-module.eclass
@@ -274,6 +274,15 @@ perl-module_src_configure() {
--libdoc= \
--destdir="${D}" \
--create_packlist=1 \
+   --config ar="$(tc-getAR)" \
+   --config cc="$(tc-getCC)" \
+   --config ld="$(tc-getCC)" \
+   --config cpp="$(tc-getCPP)" \
+   --config nm="$(tc-getNM)" \
+   --config ranlib="$(tc-getRANLIB)" \
+   --config ccflags="${CFLAGS}" \
+   --config optimize="${CFLAGS}" \
+   --config ldflags="${LDFLAGS}" \
"${myconf_local[@]}"
einfo "perl Build.PL" "$@"
perl Build.PL "$@" <<< "${pm_echovar}" \



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-05-10 Thread Sam James
commit: 3a650e223a09b0616a4e619c73cc033478fb7a61
Author: Sam James  gentoo  org>
AuthorDate: Sat May  4 10:32:18 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May 10 17:27:05 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a650e22

perl-module.eclass: respect toolchain environment for MakeMaker

based on https://bugs.gentoo.org/261375#c5 and 
https://metacpan.org/dist/ExtUtils-MakeMaker/view/lib/ExtUtils/MakeMaker.pm#OPTIMIZE.

Bug: https://bugs.gentoo.org/261375
Signed-off-by: Sam James  gentoo.org>

 eclass/perl-module.eclass | 8 
 1 file changed, 8 insertions(+)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index aed16b41df89..eb496e4a64df 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -289,6 +289,14 @@ perl-module_src_configure() {
elif [[ -f Makefile.PL ]] ; then
einfo "Using ExtUtils::MakeMaker"
set -- \
+   AR="$(tc-getAR)" \
+   CC="$(tc-getCC)" \
+   LD="$(tc-getCC)" \
+   CPP="$(tc-getCPP)" \
+   NM="$(tc-getNM)" \
+   RANLIB="$(tc-getRANLIB)" \
+   OPTIMIZE="${CFLAGS}" \
+   LDFLAGS="${LDFLAGS}" \
PREFIX="${EPREFIX}"/usr \
INSTALLDIRS=vendor \
INSTALLMAN3DIR='none' \



  1   2   3   4   5   6   7   8   9   10   >