--- ntp-4.2.4_p0.ebuild 2007-05-06 10:35:55.000000000 +0200 +++ ntp-4.2.4_p0-r1.ebuild 2007-05-07 10:18:24.000000000 +0200 @@ -13,12 +13,12 @@ LICENSE="as-is" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" -IUSE="caps debug ipv6 mdnsresponder openntpd parse-clocks selinux ssl" +IUSE="caps debug ipv6 openntpd parse-clocks selinux ssl zeroconf" DEPEND=">=sys-libs/ncurses-5.2 >=sys-libs/readline-4.1 kernel_linux? ( caps? ( sys-libs/libcap ) ) - mdnsresponder? ( net-misc/mDNSResponder ) + zeroconf? ( || ( net-dns/avahi net-misc/mDNSResponder ) ) !openntpd? ( !net-misc/openntpd ) ssl? ( dev-libs/openssl ) selinux? ( sec-policy/selinux-ntp )" @@ -39,6 +39,10 @@ pkg_setup() { enewgroup ntp 123 enewuser ntp 123 -1 /dev/null ntp + if use zeroconf && has_version net-dns/avahi && ! built_with_use net-dns/avahi mdnsresponder-compat ; then + ewarn "You need to recompile net-dns/avahi with mdnsresponder-compat USE flag" + die "net-dns/avahi is missing required mdnsresponder-compat support." + fi } src_unpack() { @@ -58,7 +62,7 @@ src_compile() { hax_bitkeeper # blah, no real configure options #176333 - export ac_cv_header_dns_sd_h=$(use mdnsresponder && echo yes || echo no) + export ac_cv_header_dns_sd_h=$(use zeroconf && echo yes || echo no) export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h} econf \ $(use_enable caps linuxcaps) \ @@ -102,6 +106,14 @@ newconfd "${FILESDIR}"/ntp-client.confd ntp-client use caps || dosed "s|-u ntp:ntp||" /etc/conf.d/ntpd dosed "s:/usr/bin:/usr/sbin:" /etc/init.d/ntpd + + # nuke the Avahi compatibility layer warning. Related info: + # http://0pointer.de/avahi-compat?s=libdns_sd&e=ntpd + # https://ntp.isc.org/bugs/show_bug.cgi?id=578 + if use zeroconf && has_version net-dns/avahi ; then + dosed 's:start-stop-daemon:AVAHI_COMPAT_NOWARN="1" start-stop-daemon:' \ + /etc/init.d/ntpd + fi keepdir /var/lib/ntp fowners ntp:ntp /var/lib/ntp @@ -126,10 +138,10 @@ ewarn "Review /etc/ntp.conf to setup server info." ewarn "Review /etc/conf.d/ntpd to setup init.d info." echo - einfo "The way ntp sets and maintains your system time has changed." - einfo "Now you can use /etc/init.d/ntp-client to set your time at" - einfo "boot while you can use /etc/init.d/ntpd to maintain your time" - einfo "while your machine runs" + elog "The way ntp sets and maintains your system time has changed." + elog "Now you can use /etc/init.d/ntp-client to set your time at" + elog "boot while you can use /etc/init.d/ntpd to maintain your time" + elog "while your machine runs" if [[ -n $(egrep '^[^#].*notrust' "${ROOT}"/etc/ntp.conf) ]] ; then echo eerror "The notrust option was found in your /etc/ntp.conf!"