# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
maintainers {fwright.net:fw @fhgwright} openmaintainer
description A secure, hardened, and improved implementation of NTP
long_description A secure, hardened, and improved implementation of Network \
Time Protocol derived from NTP Classic, Dave Mills’s original.
homepage https://www.ntpsec.org/
master_sites ftp://ftp.ntpsec.org/pub/releases/
checksums rmd160 50b7c2729118e23bf1b45fad5bc74430690c84c7 \
sha256 8445827a4d5029da508a11e9c8e7958db839f73b39de612ab3909244f89a1340 \
# To avoid breaking any code that uses our Python package, keep the Python
# version at 2.7 until we add variants for Python versions. The upstream
# code itself works with 2.6, 2.7, and 3.3+.
# Note that the upstream --python option doesn't work correctly, so waf
# must be run with the target Python version. The waf PortGroup doesn't
# currently allow selecting its Python version, but since it's hard-coded
# for 2.7, we can ignore this for now.
depends_build-append port:bison
depends_lib-append path:lib/libssl.dylib:openssl \
port:python${python.version}
patchfiles patch-PreHighSierra.diff
foreach f {ntpdig ntpkeygen ntploggps ntplogtemp ntpmon ntpq ntpsnmpd ntpsweep ntptrace ntpviz ntpwait} {
# Some programs may not exist, e.g. ntploggps w/o gpsd
if {[file exists ${destroot}${prefix}/bin/$f]} {
reinplace "s,^#!/usr/bin/env python,#!${python.bin}," ${destroot}${prefix}/bin/$f
configure.post_args-delete --nocache
configure.args --alltests \
--define=CONFIG_FILE=${prefix}/etc/ntp.conf \
--pythondir=${python.pkgd} \
--pythonarchdir=${python.pkgd}
destroot.cmd ${build.cmd}
# ntpsec has issues with universal builds:
# 1) It expects endianness to be single-valued at configure time.