summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-04-16 09:29:13 +0100
committerSam James <sam@gentoo.org>2022-04-16 09:34:16 +0100
commit3ca7f6278c1a408b646d5412b7231e6cb72cfb9c (patch)
tree06a0bf10e7e03bf4775c502c0c6a3675c16c0e20 /net-misc
parentdev-python/werkzeug: Keyword 2.1.1 sparc, #836368 (diff)
downloadgentoo-3ca7f6278c1a408b646d5412b7231e6cb72cfb9c.tar.gz
gentoo-3ca7f6278c1a408b646d5412b7231e6cb72cfb9c.tar.bz2
gentoo-3ca7f6278c1a408b646d5412b7231e6cb72cfb9c.zip
net-misc/rsync: fix shebang on examples scripts
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/rsync/rsync-3.2.4-r1.ebuild (renamed from net-misc/rsync/rsync-3.2.4.ebuild)27
-rw-r--r--net-misc/rsync/rsync-9999.ebuild28
2 files changed, 44 insertions, 11 deletions
diff --git a/net-misc/rsync/rsync-3.2.4.ebuild b/net-misc/rsync/rsync-3.2.4-r1.ebuild
index f3a4a1f6ee43..d172d6ec7259 100644
--- a/net-misc/rsync/rsync-3.2.4.ebuild
+++ b/net-misc/rsync/rsync-3.2.4-r1.ebuild
@@ -3,14 +3,16 @@
EAPI=7
-inherit flag-o-matic prefix systemd
+PYTHON_COMPAT=( python3_{8,9,10} )
+inherit flag-o-matic prefix python-single-r1 systemd
DESCRIPTION="File transfer program to keep remote files into sync"
HOMEPAGE="https://rsync.samba.org/"
if [[ ${PV} == *9999 ]] ; then
- PYTHON_COMPAT=( python3_{8,9,10} )
EGIT_REPO_URI="https://github.com/WayneD/rsync.git"
- inherit autotools git-r3 python-any-r1
+ inherit autotools git-r3
+
+ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
else
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/waynedavison.asc
inherit verify-sig
@@ -30,8 +32,13 @@ fi
LICENSE="GPL-3"
SLOT="0"
IUSE="acl examples iconv ipv6 lz4 ssl stunnel system-zlib xattr xxhash zstd"
+REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="acl? ( virtual/acl )
+ examples? (
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ )
lz4? ( app-arch/lz4 )
ssl? ( dev-libs/openssl:0= )
system-zlib? ( sys-libs/zlib )
@@ -41,16 +48,25 @@ RDEPEND="acl? ( virtual/acl )
>=dev-libs/popt-1.5
iconv? ( virtual/libiconv )"
DEPEND="${RDEPEND}"
+BDEPEND="examples? ( ${PYTHON_DEPS} )"
if [[ ${PV} == *9999 ]] ; then
BDEPEND+=" ${PYTHON_DEPS}
- $(python_gen_any_dep '
+ $(python_gen_cond_dep '
dev-python/commonmark[${PYTHON_USEDEP}]
')"
else
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-waynedavison )"
fi
+pkg_setup() {
+ # - USE=examples needs Python itself at runtime, but nothing else
+ # - 9999 needs commonmark at build time
+ if [[ ${PV} == *9999 ]] || use examples ; then
+ python-single-r1_pkg_setup
+ fi
+}
+
src_prepare() {
default
@@ -107,8 +123,11 @@ src_install() {
# Install the useful contrib scripts
if use examples ; then
+ python_fix_shebang support/
+
exeinto /usr/share/rsync
doexe support/*
+
rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c}
fi
diff --git a/net-misc/rsync/rsync-9999.ebuild b/net-misc/rsync/rsync-9999.ebuild
index a6b2f8bee049..d172d6ec7259 100644
--- a/net-misc/rsync/rsync-9999.ebuild
+++ b/net-misc/rsync/rsync-9999.ebuild
@@ -3,14 +3,16 @@
EAPI=7
-inherit flag-o-matic prefix systemd
+PYTHON_COMPAT=( python3_{8,9,10} )
+inherit flag-o-matic prefix python-single-r1 systemd
DESCRIPTION="File transfer program to keep remote files into sync"
HOMEPAGE="https://rsync.samba.org/"
if [[ ${PV} == *9999 ]] ; then
- PYTHON_COMPAT=( python3_{8,9,10} )
EGIT_REPO_URI="https://github.com/WayneD/rsync.git"
- inherit autotools git-r3 python-any-r1
+ inherit autotools git-r3
+
+ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
else
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/waynedavison.asc
inherit verify-sig
@@ -30,8 +32,13 @@ fi
LICENSE="GPL-3"
SLOT="0"
IUSE="acl examples iconv ipv6 lz4 ssl stunnel system-zlib xattr xxhash zstd"
+REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="acl? ( virtual/acl )
+ examples? (
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ )
lz4? ( app-arch/lz4 )
ssl? ( dev-libs/openssl:0= )
system-zlib? ( sys-libs/zlib )
@@ -41,19 +48,23 @@ RDEPEND="acl? ( virtual/acl )
>=dev-libs/popt-1.5
iconv? ( virtual/libiconv )"
DEPEND="${RDEPEND}"
+BDEPEND="examples? ( ${PYTHON_DEPS} )"
if [[ ${PV} == *9999 ]] ; then
BDEPEND+=" ${PYTHON_DEPS}
- $(python_gen_any_dep '
+ $(python_gen_cond_dep '
dev-python/commonmark[${PYTHON_USEDEP}]
')"
else
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-waynedavison )"
fi
-# Only required for live ebuild
-python_check_deps() {
- has_version -b "dev-python/commonmark[${PYTHON_USEDEP}]"
+pkg_setup() {
+ # - USE=examples needs Python itself at runtime, but nothing else
+ # - 9999 needs commonmark at build time
+ if [[ ${PV} == *9999 ]] || use examples ; then
+ python-single-r1_pkg_setup
+ fi
}
src_prepare() {
@@ -112,8 +123,11 @@ src_install() {
# Install the useful contrib scripts
if use examples ; then
+ python_fix_shebang support/
+
exeinto /usr/share/rsync
doexe support/*
+
rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c}
fi