From 67d48de01c6cfb4a4e5d2e56d8ed92af7520bf57 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 18 Jul 2026 20:47:20 +0100 Subject: [PATCH] net-misc/openrsync: add live ebuild Signed-off-by: Sam James --- .../openrsync-0.5.0_p20260706.ebuild | 9 ++- net-misc/openrsync/openrsync-9999.ebuild | 72 +++++++++++++++++++ 2 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 net-misc/openrsync/openrsync-9999.ebuild diff --git a/net-misc/openrsync/openrsync-0.5.0_p20260706.ebuild b/net-misc/openrsync/openrsync-0.5.0_p20260706.ebuild index 0252bafaf92e6..8ea1dbe62b47a 100644 --- a/net-misc/openrsync/openrsync-0.5.0_p20260706.ebuild +++ b/net-misc/openrsync/openrsync-0.5.0_p20260706.ebuild @@ -8,7 +8,10 @@ inherit multiprocessing toolchain-funcs DESCRIPTION="BSD-licensed implementation of rsync" HOMEPAGE="https://www.openrsync.org/" -if [[ ${PV} == *_p* ]] ; then +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/kristapsdz/openrsync" + inherit git-r3 +elif [[ ${PV} == *_p* ]] ; then OPENRSYNC_COMMIT="1878c030a784de38903afe422119ac0a84e0c4f1" SRC_URI="https://github.com/kristapsdz/openrsync/archive/${OPENRSYNC_COMMIT}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}"/${PN}-${OPENRSYNC_COMMIT} @@ -18,7 +21,9 @@ fi LICENSE="ISC" SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" +if [[ ${PV} != 9999 ]] ; then + KEYWORDS="~amd64 ~ppc ~x86" +fi IUSE="test" RESTRICT="!test? ( test )" diff --git a/net-misc/openrsync/openrsync-9999.ebuild b/net-misc/openrsync/openrsync-9999.ebuild new file mode 100644 index 0000000000000..8ea1dbe62b47a --- /dev/null +++ b/net-misc/openrsync/openrsync-9999.ebuild @@ -0,0 +1,72 @@ +# Copyright 2022-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=9 + +inherit multiprocessing toolchain-funcs + +DESCRIPTION="BSD-licensed implementation of rsync" +HOMEPAGE="https://www.openrsync.org/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/kristapsdz/openrsync" + inherit git-r3 +elif [[ ${PV} == *_p* ]] ; then + OPENRSYNC_COMMIT="1878c030a784de38903afe422119ac0a84e0c4f1" + SRC_URI="https://github.com/kristapsdz/openrsync/archive/${OPENRSYNC_COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/${PN}-${OPENRSYNC_COMMIT} +else + SRC_URI="https://github.com/kristapsdz/openrsync/archive/refs/tags/VERSION_$(ver_rs 3 _).tar.gz -> ${P}.tar.gz" +fi + +LICENSE="ISC" +SLOT="0" +if [[ ${PV} != 9999 ]] ; then + KEYWORDS="~amd64 ~ppc ~x86" +fi +IUSE="test" +RESTRICT="!test? ( test )" + +# https://github.com/kristapsdz/openrsync/issues/46 +BDEPEND=" + dev-build/bmake + test? ( + app-misc/jot + dev-util/cunit + net-misc/rsync + ) +" + +QA_CONFIG_IMPL_DECL_SKIP=( + # OpenBSD + crypt_checkpass crypt_newhash errc getexecname getprogname + memset_s pledge recallocarray strtonum TAILQ_FOREACH_SAFE + timingsafe_bcmp timingsafe_memcmp unveil warnc +) + +src_configure() { + tc-export CC + + local confargs=( + PREFIX="${EPREFIX}"/usr + MANDIR="${EPREFIX}"/usr/share/man + ) + + edo ./configure "${confargs[@]}" +} + +src_compile() { + local jobs="$(get_makeopts_jobs)" + unset MAKEOPTS + unset MAKEFLAGS + + export MAKEOPTS="-j${jobs}" + export MAKEFLAGS= + export MAKE=bmake + + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_test() { + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" regress +}