diff options
Diffstat (limited to 'net-misc/rsync/rsync-9999.ebuild')
-rw-r--r-- | net-misc/rsync/rsync-9999.ebuild | 79 |
1 files changed, 58 insertions, 21 deletions
diff --git a/net-misc/rsync/rsync-9999.ebuild b/net-misc/rsync/rsync-9999.ebuild index d172d6ec7259..6ea497c2e733 100644 --- a/net-misc/rsync/rsync-9999.ebuild +++ b/net-misc/rsync/rsync-9999.ebuild @@ -1,9 +1,11 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) +# Uncomment when introducing a patch which touches configure +RSYNC_NEEDS_AUTOCONF=1 +PYTHON_COMPAT=( python3_{10..12} ) inherit flag-o-matic prefix python-single-r1 systemd DESCRIPTION="File transfer program to keep remote files into sync" @@ -14,14 +16,18 @@ if [[ ${PV} == *9999 ]] ; then REQUIRED_USE="${PYTHON_REQUIRED_USE}" else - VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/waynedavison.asc + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/waynedavison.asc inherit verify-sig + if [[ -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then + inherit autotools + fi + if [[ ${PV} == *_pre* ]] ; then SRC_DIR="src-previews" else SRC_DIR="src" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz @@ -31,24 +37,35 @@ fi LICENSE="GPL-3" SLOT="0" -IUSE="acl examples iconv ipv6 lz4 ssl stunnel system-zlib xattr xxhash zstd" +IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr xxhash zstd" REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" +REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" -RDEPEND="acl? ( virtual/acl ) +RDEPEND=" + >=dev-libs/popt-1.5 + acl? ( virtual/acl ) examples? ( ${PYTHON_DEPS} dev-lang/perl ) - lz4? ( app-arch/lz4 ) - ssl? ( dev-libs/openssl:0= ) + lz4? ( app-arch/lz4:= ) + rrsync? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/bracex[${PYTHON_USEDEP}] + ') + ) + ssl? ( dev-libs/openssl:= ) system-zlib? ( sys-libs/zlib ) xattr? ( kernel_linux? ( sys-apps/attr ) ) - xxhash? ( dev-libs/xxhash ) - zstd? ( >=app-arch/zstd-1.4 ) - >=dev-libs/popt-1.5 + xxhash? ( >=dev-libs/xxhash-0.8 ) + zstd? ( >=app-arch/zstd-1.4:= ) iconv? ( virtual/libiconv )" DEPEND="${RDEPEND}" -BDEPEND="examples? ( ${PYTHON_DEPS} )" +BDEPEND=" + examples? ( ${PYTHON_DEPS} ) + rrsync? ( ${PYTHON_DEPS} ) +" if [[ ${PV} == *9999 ]] ; then BDEPEND+=" ${PYTHON_DEPS} @@ -62,7 +79,7 @@ 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 + if [[ ${PV} == *9999 ]] || use examples || use rrsync; then python-single-r1_pkg_setup fi } @@ -70,25 +87,35 @@ pkg_setup() { src_prepare() { default - if [[ ${PV} == *9999 ]] ; then + sed -i -e 's/AC_HEADER_MAJOR_FIXED/AC_HEADER_MAJOR/' configure.ac + + if [[ ${PV} == *9999 || -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then eaclocal -I m4 eautoconf -o configure.sh eautoheader && touch config.h.in fi + + if use examples || use rrsync; then + python_fix_shebang support/ + fi + + if [[ -f rrsync.1 ]]; then + # If the pre-build rrsync.1 man page exists, then link to it + # from support/rrsync.1 to avoid rsync's build system attempting + # re-creating the man page (bug #883049). + ln -s ../rrsync.1 support/rrsync.1 || die + fi } src_configure() { - # Force enable IPv6 on musl - upstream bug: - # https://bugzilla.samba.org/show_bug.cgi?id=10715 - use elibc_musl && use ipv6 && append-cppflags -DINET6 - local myeconfargs=( --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf --without-included-popt + --enable-ipv6 $(use_enable acl acl-support) $(use_enable iconv) - $(use_enable ipv6) $(use_enable lz4) + $(use_with rrsync) $(use_enable ssl openssl) $(use_with !system-zlib included-zlib) $(use_enable xattr xattr-support) @@ -96,6 +123,14 @@ src_configure() { $(use_enable zstd) ) + # https://github.com/WayneD/rsync/pull/428 + if is-flagq -fsanitize=undefined ; then + sed -E -i \ + -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ + byteorder.h || die + append-flags -DCAREFUL_ALIGNMENT + fi + econf "${myeconfargs[@]}" } @@ -123,7 +158,9 @@ src_install() { # Install the useful contrib scripts if use examples ; then - python_fix_shebang support/ + # The 'rrsync' script is installed conditionally via the 'rrysnc' + # USE flag, and not via the 'examples' USE flag. + rm support/rrsync* || die exeinto /usr/share/rsync doexe support/* |