summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-08-12 13:29:36 +0100
committerSam James <sam@gentoo.org>2024-08-12 13:32:26 +0100
commit91b1222f17bb1f28e3151b1e00d2ddb22645e00a (patch)
treebd57e0f233a17c2793708996305d6a7dc46e00c7 /sci-geosciences
parentsys-kernel/git-sources: add 6.11_rc3 (diff)
downloadgentoo-91b1222f17bb1f28e3151b1e00d2ddb22645e00a.tar.gz
gentoo-91b1222f17bb1f28e3151b1e00d2ddb22645e00a.tar.bz2
gentoo-91b1222f17bb1f28e3151b1e00d2ddb22645e00a.zip
sci-geosciences/gpsd: fix USE=python install
* Add missing `assert` which reveals one problem where the directory is trashed after one impl, which is a problem given the package is multi impl. * grep for the known-bad shebang before fixing so we don't try to touch ELF. Closes: https://bugs.gentoo.org/937612 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-geosciences')
-rw-r--r--sci-geosciences/gpsd/gpsd-3.25-r2.ebuild (renamed from sci-geosciences/gpsd/gpsd-3.25-r1.ebuild)17
1 files changed, 12 insertions, 5 deletions
diff --git a/sci-geosciences/gpsd/gpsd-3.25-r1.ebuild b/sci-geosciences/gpsd/gpsd-3.25-r2.ebuild
index f7f785b3ea35..615d6bafd6f9 100644
--- a/sci-geosciences/gpsd/gpsd-3.25-r1.ebuild
+++ b/sci-geosciences/gpsd/gpsd-3.25-r2.ebuild
@@ -213,10 +213,11 @@ python_test() {
:;
}
-python_install(){
- mkdir -p "${T}/scripts" || die
- grep -Rl "${D}/usr/bin" -e "/usr/bin/env python" | xargs mv -t "${T}/scripts"
- python_doscript "${T}"/scripts/*
+python_install() {
+ while read -d '' -r file ; do
+ grep -q "#!/usr/bin/env python" "${file}" && python_doscript "${file}"
+ done < <(find "${T}"/scripts -type f -print0)
+
distutils-r1_python_install
}
@@ -231,7 +232,13 @@ src_install() {
find "${D}"/python-discard/ -type d -delete
# Install correct multi-python copy
pushd "${P}" || die
- use python && distutils-r1_src_install
+ if use python ; then
+ mkdir -p "${T}/scripts" || die
+ grep -Rl "${D}/usr/bin" -e "/usr/bin/env python" | xargs cp -t "${T}/scripts"
+ assert "Moving Python scripts failed"
+
+ distutils-r1_src_install
+ fi
popd || die
}