summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2019-01-10 03:12:46 +0000
committerschmonz <schmonz@pkgsrc.org>2019-01-10 03:12:46 +0000
commita1e7c670c0ad12a777cd89c2973575751eb307e6 (patch)
tree11cdb6e9b8c495860278e935e59c8242b999c3e7 /devel
parent04a315f0f097baedcf637e3f6d10a5f4a6e9e2ea (diff)
downloadpkgsrc-a1e7c670c0ad12a777cd89c2973575751eb307e6.tar.gz
Having leapsecs.dat is helpful for accuracy iff /etc/localtime is TAI,
which is not true of most systems. Add 'tai-system-clock' option, off by default, that installs leapsecs.dat in ${PKG_SYSCONFDIR} and also depends on leapsunpack for easy updating by the sysadmin. Bump PKGREVISION.
Diffstat (limited to 'devel')
-rw-r--r--devel/libtai/Makefile7
-rw-r--r--devel/libtai/options.mk11
2 files changed, 14 insertions, 4 deletions
diff --git a/devel/libtai/Makefile b/devel/libtai/Makefile
index 6219d264e7d..cbbb128958c 100644
--- a/devel/libtai/Makefile
+++ b/devel/libtai/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2019/01/08 03:57:11 schmonz Exp $
+# $NetBSD: Makefile,v 1.16 2019/01/10 03:12:46 schmonz Exp $
#
DISTNAME= libtai-0.60
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= devel
MASTER_SITES= http://cr.yp.to/libtai/
@@ -16,14 +16,13 @@ CONFLICTS= libowfat-[0-9]*
DJB_RESTRICTED= NO
EGDIR= share/examples/${PKGBASE}
-CONF_FILES+= ${EGDIR}/leapsecs.dat ${PKG_SYSCONFDIR}/leapsecs.dat
SUBST_FILES.djbware+= leapsecs_read.c
SUBST_CLASSES+= paths
SUBST_STAGE.paths= do-configure
SUBST_FILES.paths= leapsecs.3 leapsecs_read.c
-SUBST_SED.paths= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR:Q},g'
+SUBST_VARS.paths= PKG_SYSCONFDIR
INSTALLATION_DIRS= bin include lib ${EGDIR}
INSTALLATION_DIRS+= ${PKGMANDIR}/man3
diff --git a/devel/libtai/options.mk b/devel/libtai/options.mk
new file mode 100644
index 00000000000..1699d5da53d
--- /dev/null
+++ b/devel/libtai/options.mk
@@ -0,0 +1,11 @@
+# $NetBSD: options.mk,v 1.1 2019/01/10 03:12:46 schmonz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.libtai
+PKG_SUPPORTED_OPTIONS+= tai-system-clock
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mtai-system-clock)
+CONF_FILES+= ${EGDIR}/leapsecs.dat ${PKG_SYSCONFDIR}/leapsecs.dat
+DEPENDS+= leapsunpack-[0-9]*:../../time/leapsunpack
+.endif