textproc/diffutils: timestamp precision

Byung-Hee HWANG bh at izb.knu.ac.kr
Wed Oct 19 20:21:44 PDT 2005


>Submitter-Id:	current-users
>Originator:	Byung-Hee HWANG
>Organization:	InZealBomb
>Confidential:	no
>Synopsis:	textproc/diffutils: timestamp precision
>Severity:	non-critical
>Priority:	low
>Category:	ports
>Class:		update
>Release:	FreeBSD 5.4-STABLE i386
>Environment:
System: FreeBSD viola.izb.knu.ac.kr 5.4-STABLE FreeBSD 5.4-STABLE #0: Mon Sep 26 16:45:09 KST 2005 bh at viola.izb.knu.ac.kr:/usr/src/sys/i386/compile/II82801BA i386

>Description:
GNU Diff program have timestamp precision option of diff format.
For example, see follow:

	--- hello.c.orig      2005-10-20 11:57:11.967564207 +0900
	+++ hello.c   2005-10-20 11:57:20.547697157 +0900

As you can see, she can display NanoSeconds format.

By the way, the option is not build under FreeBSD. 
Thus we need to patch for that. 

>How-To-Repeat:
This patch has been tested under FreeBSD 4.11-STABLE and FreeBSD 5.4-STABLE.

>Fix:

--- ports-diffutils-timestamp-preision.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/textproc/diffutils/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	21 Dec 2003 00:22:51 -0000	1.5
+++ Makefile	20 Oct 2005 02:49:21 -0000
@@ -22,6 +22,12 @@
 
 MAN1=		gcmp.1 gdiff.1 gdiff3.1 gsdiff.1
 
+.if defined(WITH_TIMESTAMP_PRECISION)
+PATCH_SITES+=	http://izb.knu.ac.kr/~bh/diffs/
+PATCHFILES+=	diffutils-2.8.1-timestamp_precision.diff
+PATCH_DIST_STRIP+=	-p1
+.endif
+
 #post-extract: remove-info-files
 #
 #remove-info-files:
@@ -37,5 +43,13 @@
 #
 #install-info:
 #	@${INSTALL_INFO} ${PREFIX}/info/${PORTNAME:S/utils//}.info ${PREFIX}/info/dir
+
+post-patch:
+.if defined(WITH_TIMESTAMP_PRECISION)
+	@${ECHO_MSG} "" ; \
+	${ECHO_MSG} "===> This rule need to a change of sysctl value." ; \
+	${ECHO_MSG} "===> Do not forget to run the following command." ; \
+	${ECHO_MSG} "===> sysctl vfs.timestamp_precision=1" ;
+.endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/textproc/diffutils/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo	29 Jan 2004 16:11:56 -0000	1.3
+++ distinfo	20 Oct 2005 02:49:21 -0000
@@ -1,2 +1,4 @@
 MD5 (diffutils-2.8.1.tar.gz) = 71f9c5ae19b60608f6c7f162da86a428
 SIZE (diffutils-2.8.1.tar.gz) = 780086
+MD5 (diffutils-2.8.1-timestamp_precision.diff) = 1ac049df51ef80fe9acaba123b2a4128
+SIZE (diffutils-2.8.1-timestamp_precision.diff) = 1989
--- ports-diffutils-timestamp-preision.diff ends here ---



More information about the freebsd-ports mailing list