[PATCH 8/9] sci-physics/geant-data: port to esplit.eclass
Sam James <[email protected]> Thu, 9 Jul 2026 22:22:17 +0100
| Newsgroups | gmane.linux.gentoo.devel |
|---|---|
| Message-ID | <a19594772e30385cdd59dad82da71ebe3c08758a.1783632126.git.sam@gentoo.org> |
Avoid global-scope use of a heredoc which requires the use of a temporary file for any size with < EAPI 9 and with large sizes still with >= EAPI 9. Closes: https://bugs.gentoo.org/978943 Signed-off-by: Sam James <[email protected]> --- sci-physics/geant-data/geant-data-4.11.3.ebuild | 11 ++++++++--- sci-physics/geant-data/geant-data-4.11.4.ebuild | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sci-physics/geant-data/geant-data-4.11.3.ebuild b/sci-physics/geant-data/geant-data-4.11.3.ebuild index 8cc5e6fc73d2a..d46cbadc864cd 100644 --- a/sci-physics/geant-data/geant-data-4.11.3.ebuild +++ b/sci-physics/geant-data/geant-data-4.11.3.ebuild @@ -1,8 +1,10 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 +inherit esplit + DESCRIPTION="Data files for Geant4 physical processes" HOMEPAGE="https://geant4.web.cern.ch" SRC_DATA="https://geant4-data.web.cern.ch/geant4-data/datasets" @@ -35,10 +37,13 @@ DATASETS=( ) for DATASET in ${!DATASETS[@]}; do - read FILENAME VERSION ENVVAR <<< "${DATASETS[$DATASET]}" + mapfile -d '' fields < <(esplit "${DATASETS[$DATASET]}") + FILENAME=${fields[0]} + VERSION=${fields[1]} + ENVVAR=${fields[2]} SRC_URI+="${SRC_DATA}/${FILENAME}.${VERSION}.tar.gz " done -unset DATASET FILENAME VERSION ENVVAR +unset DATASET FILENAME VERSION ENVVAR fields src_unpack() { # unpack in destination only to avoid copy diff --git a/sci-physics/geant-data/geant-data-4.11.4.ebuild b/sci-physics/geant-data/geant-data-4.11.4.ebuild index 1505d4cc15309..2b2496df3ad3b 100644 --- a/sci-physics/geant-data/geant-data-4.11.4.ebuild +++ b/sci-physics/geant-data/geant-data-4.11.4.ebuild @@ -1,8 +1,10 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 +inherit esplit + DESCRIPTION="Data files for Geant4 physical processes" HOMEPAGE="https://geant4.web.cern.ch" SRC_DATA="https://geant4-data.web.cern.ch/geant4-data/datasets" @@ -35,10 +37,13 @@ DATASETS=( ) for DATASET in ${!DATASETS[@]}; do - read FILENAME VERSION ENVVAR <<< "${DATASETS[$DATASET]}" + mapfile -d '' fields < <(esplit "${DATASETS[$DATASET]}") + FILENAME=${fields[0]} + VERSION=${fields[1]} + ENVVAR=${fields[2]} SRC_URI+="${SRC_DATA}/${FILENAME}.${VERSION}.tar.gz " done -unset DATASET FILENAME VERSION ENVVAR +unset DATASET FILENAME VERSION ENVVAR fields src_unpack() { # unpack in destination only to avoid copy -- 2.55.0