Diff ntp-4.2.8_p15-r6 with a ntp-4.2.8_p17

/usr/portage/net-misc/ntp/ntp-4.2.8_p17.ebuild 2023-10-09 14:52:34.668368481 +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 6
inherit autotools flag-o-matic systemd tmpfiles
7 7

  
8 8
MY_P=${P/_p/p}
9 9
DESCRIPTION="Network Time Protocol suite/programs"
10
HOMEPAGE="http://www.ntp.org/"
11
SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
12
	https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz"
10
HOMEPAGE="https://www.ntp.org/"
11
SRC_URI="https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz"
12
S="${WORKDIR}/${MY_P}"
13 13

  
14 14
LICENSE="HPND BSD ISC"
15 15
SLOT="0"
16
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
16
KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
17 17
IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
18 18

  
19
COMMON_DEPEND="readline? ( >=sys-libs/readline-4.1:0= )
19
DEPEND="
20 20
	>=dev-libs/libevent-2.0.9:=[threads(+)?]
21
	readline? ( >=sys-libs/readline-4.1:= )
21 22
	kernel_linux? ( caps? ( sys-libs/libcap ) )
22 23
	zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
23 24
	snmp? ( net-analyzer/net-snmp )
24
	ssl? (
25
		dev-libs/openssl:0=
26
	)
27
	parse-clocks? ( net-misc/pps-tools )"
28
BDEPEND="virtual/pkgconfig
29
	acct-group/ntp
30
	acct-user/ntp"
31
DEPEND="${COMMON_DEPEND}"
32
RDEPEND="${COMMON_DEPEND}
25
	ssl? ( dev-libs/openssl:= )
26
	parse-clocks? ( net-misc/pps-tools )
27
"
28
RDEPEND="
29
	${DEPEND}
33 30
	acct-group/ntp
34 31
	acct-user/ntp
35 32
	selinux? ( sec-policy/selinux-ntp )
......
37 34
	!net-misc/ntpsec
38 35
	!openntpd? ( !net-misc/openntpd )
39 36
"
37
BDEPEND="
38
	acct-group/ntp
39
	acct-user/ntp
40
	virtual/pkgconfig
41
"
40 42
PDEPEND="openntpd? ( net-misc/openntpd )"
41 43

  
42
S="${WORKDIR}/${MY_P}"
43

  
44 44
PATCHES=(
45
	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
46
	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch #563922
47
	"${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch #711530
48
	"${FILESDIR}"/${PN}-4.2.8_p15-gcc10.patch #759409
49
	"${FILESDIR}"/${PN}-4.2.8_p15-glibc-2.34.patch
45
	"${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch # bug #533966
46
	"${FILESDIR}"/${PN}-4.2.8-sntp-test-pthreads.patch # bug #563922
47
	"${FILESDIR}"/${PN}-4.2.8_p14-add_cap_ipc_lock.patch # bug #711530
50 48
	"${FILESDIR}"/${PN}-4.2.8_p15-configure-clang16.patch
51 49
)
52 50

  
53 51
src_prepare() {
54 52
	default
55
	append-cppflags -D_GNU_SOURCE #264109
56
	# Make sure every build uses the same install layout. #539092
53

  
54
	# Make sure every build uses the same install layout, bug #539092
57 55
	find sntp/loc/ -type f '!' -name legacy -delete || die
58
	eautoreconf #622754
56

  
57
	# bug #622754
58
	eautoreconf
59

  
59 60
	# Disable pointless checks.
60
	touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
61
	touch .checkChangeLog .gcc-warning FRC.html html/.datecheck || die
61 62
}
62 63

  
63 64
src_configure() {
65
	# bug #264109
66
	append-cppflags -D_GNU_SOURCE
67

  
64 68
	# avoid libmd5/libelf
65 69
	export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
66 70
	export ac_cv_lib_elf_nlist=no
......
74 78
		--with-lineeditlibs=readline,edit,editline
75 79
		--with-yielding-select
76 80
		--disable-local-libevent
77
		# Increase the default memlimit from 32MiB to 128MiB.  #533232
81

  
82
		# Increase the default memlimit from 32MiB to 128MiB, bug #533232
78 83
		--with-memlock=256
84

  
85
		# Avoid overriding the user's toolchain settings, bug #895802
86
		--with-hardenfile=/dev/null
87

  
79 88
		$(use_enable caps linuxcaps)
80 89
		$(use_enable parse-clocks)
81 90
		$(use_enable ipv6)
......
86 95
		$(use_with ssl crypto)
87 96
		$(use_enable threads thread-support)
88 97
	)
98

  
89 99
	econf "${myeconfargs[@]}"
90 100
}
91 101

  
92 102
src_install() {
93 103
	default
94
	# move ntpd/ntpdate to sbin #66671
104

  
105
	# Move ntpd/ntpdate to sbin, bug #66671
95 106
	dodir /usr/sbin
96 107
	mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
97 108

  
98 109
	dodoc INSTALL WHERE-TO-START
99
	doman "${WORKDIR}"/man/*.[58]
100 110

  
101 111
	insinto /etc
102 112
	doins "${FILESDIR}"/ntp.conf
103
	use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
113

  
114
	#bug #524726
115
	use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf
116

  
104 117
	newinitd "${FILESDIR}"/ntpd.rc-r2 ntpd
105 118
	newconfd "${FILESDIR}"/ntpd.confd ntpd
106 119
	newinitd "${FILESDIR}"/ntp-client.rc ntp-client
......
116 129
		cd "${ED}" || die
117 130
		rm usr/sbin/ntpd || die
118 131
		rm etc/{conf,init}.d/ntpd || die
119
		rm usr/share/man/*/ntpd.8 || die
132
		rm usr/share/man/man1/ntpd.1 || die
120 133
	else
121 134
		newtmpfiles "${FILESDIR}"/ntp.tmpfiles ntp.conf
122 135
		systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
......
138 151
	if ! use openntpd; then
139 152
		tmpfiles_process ntp.conf
140 153
	fi
154

  
141 155
	if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
142 156
		eerror "The notrust option was found in your /etc/ntp.conf!"
143 157
		ewarn "If your ntpd starts sending out weird responses,"
Thank you!