Diff rsync-3.2.4-r3 with a rsync-3.2.7-r2

/usr/portage/net-misc/rsync/rsync-3.2.7-r2.ebuild 2023-10-09 14:52:34.680368481 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
if [[ ${PV} != 3.2.4 ]]; then
7
	# Make sure we revert the autotools hackery applied in 3.2.4.
8
	die "Please use rsync-9999.ebuild as a basis for version bumps"
9
fi
10

  
11
WANT_LIBTOOL=none
12

  
13
PYTHON_COMPAT=( python3_{9..10} )
14
inherit autotools flag-o-matic prefix python-single-r1 systemd
6
# Uncomment when introducing a patch which touches configure
7
#RSYNC_NEEDS_AUTOCONF=1
8
PYTHON_COMPAT=( python3_{9..11} )
9
inherit flag-o-matic prefix python-single-r1 systemd
15 10

  
16 11
DESCRIPTION="File transfer program to keep remote files into sync"
17 12
HOMEPAGE="https://rsync.samba.org/"
......
24 19
	VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/waynedavison.asc
25 20
	inherit verify-sig
26 21

  
22
	if [[ -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then
23
		inherit autotools
24
	fi
25

  
27 26
	if [[ ${PV} == *_pre* ]] ; then
28 27
		SRC_DIR="src-previews"
29 28
	else
......
38 37

  
39 38
LICENSE="GPL-3"
40 39
SLOT="0"
41
IUSE="acl examples iconv ipv6 lz4 ssl stunnel system-zlib xattr xxhash zstd"
40
IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr xxhash zstd"
42 41
REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )"
42
REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )"
43 43

  
44
RDEPEND="acl? ( virtual/acl )
44
RDEPEND="
45
	>=dev-libs/popt-1.5
46
	acl? ( virtual/acl )
45 47
	examples? (
46 48
		${PYTHON_DEPS}
47 49
		dev-lang/perl
48 50
	)
49
	lz4? ( app-arch/lz4 )
50
	ssl? ( dev-libs/openssl:0= )
51
	lz4? ( app-arch/lz4:= )
52
	rrsync? (
53
		${PYTHON_DEPS}
54
		$(python_gen_cond_dep '
55
			dev-python/bracex[${PYTHON_USEDEP}]
56
		')
57
	)
58
	ssl? ( dev-libs/openssl:= )
51 59
	system-zlib? ( sys-libs/zlib )
52 60
	xattr? ( kernel_linux? ( sys-apps/attr ) )
53
	xxhash? ( dev-libs/xxhash )
54
	zstd? ( >=app-arch/zstd-1.4 )
55
	>=dev-libs/popt-1.5
61
	xxhash? ( >=dev-libs/xxhash-0.8 )
62
	zstd? ( >=app-arch/zstd-1.4:= )
56 63
	iconv? ( virtual/libiconv )"
57 64
DEPEND="${RDEPEND}"
58
BDEPEND="examples? ( ${PYTHON_DEPS} )"
65
BDEPEND="
66
	examples? ( ${PYTHON_DEPS} )
67
	rrsync? ( ${PYTHON_DEPS} )
68
"
59 69

  
60 70
if [[ ${PV} == *9999 ]] ; then
61 71
	BDEPEND+=" ${PYTHON_DEPS}
......
67 77
fi
68 78

  
69 79
PATCHES=(
70
	"${FILESDIR}"/${P}-unsigned-char-checksum.patch
71
	# https://github.com/WayneD/rsync/issues/324
72
	"${FILESDIR}"/${P}-strlcpy.patch
73
	"${FILESDIR}"/${P}-notpedantic.patch
80
	"${FILESDIR}"/${P}-flist-memcmp-ub.patch
74 81
)
75 82

  
76 83
pkg_setup() {
77 84
	# - USE=examples needs Python itself at runtime, but nothing else
78 85
	# - 9999 needs commonmark at build time
79
	if [[ ${PV} == *9999 ]] || use examples ; then
86
	if [[ ${PV} == *9999 ]] || use examples || use rrsync; then
80 87
		python-single-r1_pkg_setup
81 88
	fi
82 89
}
......
84 91
src_prepare() {
85 92
	default
86 93

  
87
	eautoconf -o configure.sh
88
	eautoheader && touch config.h.in
94
	if [[ ${PV} == *9999 || -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then
95
		eaclocal -I m4
96
		eautoconf -o configure.sh
97
		eautoheader && touch config.h.in
98
	fi
99

  
100
	if use examples || use rrsync; then
101
		python_fix_shebang support/
102
	fi
103

  
104
	if [[ -f rrsync.1 ]]; then
105
		# If the pre-build rrsync.1 man page exists, then link to it
106
		# from support/rrsync.1 to avoid rsync's build system attempting
107
		# re-creating the man page (bug #883049).
108
		ln -s ../rrsync.1 support/rrsync.1 || die
109
	fi
89 110
}
90 111

  
91 112
src_configure() {
92
	# Force enable IPv6 on musl - upstream bug:
93
	# https://bugzilla.samba.org/show_bug.cgi?id=10715
94
	use elibc_musl && use ipv6 && append-cppflags -DINET6
95

  
96 113
	local myeconfargs=(
97 114
		--with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf
98 115
		--without-included-popt
116
		--enable-ipv6
99 117
		$(use_enable acl acl-support)
100 118
		$(use_enable iconv)
101
		$(use_enable ipv6)
102 119
		$(use_enable lz4)
120
		$(use_with rrsync)
103 121
		$(use_enable ssl openssl)
104 122
		$(use_with !system-zlib included-zlib)
105 123
		$(use_enable xattr xattr-support)
......
107 125
		$(use_enable zstd)
108 126
	)
109 127

  
128
	# https://github.com/WayneD/rsync/pull/428
129
	if is-flagq -fsanitize=undefined ; then
130
		sed -E -i \
131
			-e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \
132
			byteorder.h || die
133
		append-flags -DCAREFUL_ALIGNMENT
134
	fi
135

  
110 136
	econf "${myeconfargs[@]}"
111 137
}
112 138

  
......
134 160

  
135 161
	# Install the useful contrib scripts
136 162
	if use examples ; then
137
		python_fix_shebang support/
163
		# The 'rrsync' script is installed conditionally via the 'rrysnc'
164
		# USE flag, and not via the 'examples' USE flag.
165
		rm support/rrsync* || die
138 166

  
139 167
		exeinto /usr/share/rsync
140 168
		doexe support/*
Thank you!