Uses a hardware tick counter to compensate for deviant system clock Depends upon ports/19348 How-To-Repeat: n/a
Patch fixing man pages to reflect hier(7) rules enforced by the port patches/patch-ab Besides, it fixes a named pipe that was forgot in the original patch. Files added: files/patch-ab diff -ruN clockspeed.orig/Makefile clockspeed/Makefile --- clockspeed.orig/Makefile Fri Jun 16 23:57:36 2000 +++ clockspeed/Makefile Sat Jun 17 12:37:35 2000 @@ -14,7 +14,7 @@ LIB_DEPENDS= tai.1:${PORTSDIR}/devel/libtai -EXTRA_PATCHES= ${WRKDIR}/patch-aa +EXTRA_PATCHES= ${WRKDIR}/patch-aa ${WRKDIR}/patch-ab ALL_TARGET= it INSTALL_TARGET= setup check @@ -27,14 +27,18 @@ PLIST_SUB+= PORTDOCS:= .endif # !defined(NOPORTDOCS) +PREPROCESS_PATCH_FILES= patch-aa patch-ab + do-configure: @${ECHO} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc @${ECHO} ${CC} -s -L${LOCALBASE}/lib > ${WRKSRC}/conf-ld @${ECHO} ${PREFIX} > ${WRKSRC}/conf-home pre-patch: - @${SED} s!PREFIX!${PREFIX}! ${FILESDIR}/patch-aa > \ - ${WRKDIR}/patch-aa +.for i in ${PREPROCESS_PATCH_FILES} + @${SED} s!PREFIX!${PREFIX}! ${FILESDIR}/${i} > \ + ${WRKDIR}/${i} +.endfor post-install: .if !defined(NOPORTDOCS) diff -ruN clockspeed.orig/files/patch-ab clockspeed/files/patch-ab --- clockspeed.orig/files/patch-ab Wed Dec 31 21:00:00 1969 +++ clockspeed/files/patch-ab Sat Jun 17 12:35:44 2000 @@ -0,0 +1,27 @@ +--- clockspeed.1.orig Sat Jun 17 12:28:41 2000 ++++ clockspeed.1 Sat Jun 17 12:33:27 2000 +@@ -12,7 +12,7 @@ + + .B clockspeed + reads the real-time measurements from +-.BR /usr/local/clockspeed/adjust . ++.BR PREFIX/etc/clockspeed/adjust . + Each real-time measurement must be a single 16-byte packet, + expressed as a TAI64NA time adjustment to the local UNIX clock. + +@@ -24,12 +24,12 @@ + .B clockspeed + can figure out the number of real attoseconds per tick. + It saves this number in TAI64NA format in +-.BR /usr/local/clockspeed/etc/atto , ++.BR PREFIX/etc/clockspeed/atto , + overwriting +-.B /usr/local/clockspeed/etc/atto.tmp ++.B PREFIX/etc/clockspeed/atto.tmp + for reliability. + It reads +-.B /usr/local/clockspeed/etc/atto ++.B PREFIX/etc/clockspeed/atto + when it starts up again. + + .B clockspeed diff -ruN clockspeed.orig/patches/patch-ac clockspeed/patches/patch-ac --- clockspeed.orig/patches/patch-ac Fri Jun 16 23:38:31 2000 +++ clockspeed/patches/patch-ac Sat Jun 17 12:32:49 2000 @@ -1,5 +1,5 @@ ---- clockspeed.c.orig Fri Jun 16 23:37:32 2000 -+++ clockspeed.c Fri Jun 16 23:38:10 2000 +--- clockspeed.c.orig Tue Oct 13 15:37:49 1998 ++++ clockspeed.c Sat Jun 17 12:32:12 2000 @@ -83,7 +83,7 @@ if (deriv <= 0) return; if (deriv > 200000000) return; /* 5Hz ticks? be serious */ @@ -18,7 +18,7 @@ } void main() -@@ -136,7 +136,7 @@ +@@ -136,16 +136,16 @@ if (chdir(auto_home) == -1) _exit(1); umask(033); @@ -27,3 +27,15 @@ r = read(0,buf,sizeof buf); if (r == sizeof buf) deriv = nano(buf); + close(0); + } + +- if (fifo_make("adjust",0600) == -1) if (errno != error_exist) _exit(1); +- if (open_read("adjust") != 0) _exit(1); +- if (open_write("adjust") == -1) _exit(1); ++ if (fifo_make("etc/clockspeed/adjust",0600) == -1) if (errno != error_exist) _exit(1); ++ if (open_read("etc/clockspeed/adjust") != 0) _exit(1); ++ if (open_write("etc/clockspeed/adjust") == -1) _exit(1); + + now(&first); + diff -ruN clockspeed.orig/pkg/PLIST clockspeed/pkg/PLIST --- clockspeed.orig/pkg/PLIST Fri Jun 16 23:59:20 2000 +++ clockspeed/pkg/PLIST Sat Jun 17 12:59:54 2000 @@ -4,10 +4,11 @@ bin/sntpclock bin/taiclock bin/taiclockd -%%PORTDOCS:%%share/doc/clockspeed/INSTALL +etc/clockspeed/adjust +etc/clockspeed/atto +etc/clockspeed/atto.tmp %%PORTDOCS:%%@dirrm share/doc/clockspeed +%%PORTDOCS:%%share/doc/clockspeed/INSTALL +@dirrm etc/clockspeed @mode 0755 @exec mkdir %D/etc/clockspeed -@unexec rm %D/etc/clockspeed/atto.tmp 2>/dev/null || true -@unexec rm %D/etc/clockspeed/atto 2>/dev/null || true -@unexec rmdir %D/etc/clockspeed 2>/dev/null || true
State Changed From-To: open->closed Committed, thanks!