From owner-freebsd-ports Sun Feb 17 7:50:53 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4911037B432 for ; Sun, 17 Feb 2002 07:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1HFo1W66312; Sun, 17 Feb 2002 07:50:01 -0800 (PST) (envelope-from gnats) Received: from postfix1-2.free.fr (postfix1-2.free.fr [213.228.0.130]) by hub.freebsd.org (Postfix) with ESMTP id 95FC037B416 for ; Sun, 17 Feb 2002 07:41:13 -0800 (PST) Received: from graf.pompo.net (lyon-1-a7-19-227.dial.proxad.net [62.147.19.227]) by postfix1-2.free.fr (Postfix) with ESMTP id 2F229AB0BC for ; Sun, 17 Feb 2002 16:41:09 +0100 (CET) Received: by graf.pompo.net (Postfix, from userid 1001) id 23A847523; Sun, 17 Feb 2002 16:40:08 +0100 (CET) Message-Id: <20020217154008.23A847523@graf.pompo.net> Date: Sun, 17 Feb 2002 16:40:08 +0100 (CET) From: Thierry Thomas Reply-To: Thierry Thomas To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/35048: devel/chora: fix wrong date display + add syntax highlighting Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35048 >Category: ports >Synopsis: devel/chora: fix wrong date display + add syntax highlighting >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sun Feb 17 07:50:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Thierry Thomas >Release: FreeBSD 4.5-STABLE i386 >Organization: Kabbale Eros >Environment: System: FreeBSD graf.pompo.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Sun Feb 3 16:21:08 CET 2002 root@graf.pompo.net:/usr/obj/mntsrc/src/sys/GRAF010429 i386 >Description: The date display in Chora 1.0 is incorrect. + adding support of enscript for syntax highlighting. >How-To-Repeat: If you committed files at 13:00 EST, cvs would store the date in UTC format, or 18:00 UTC. Chora would then call mktime on the UTC date that cvs gave it. mktime uses your local TZ setting, so now 18:00 (which was UTC, but treated as EST) became 23:00. Then chora calls gmdate on this value, which treats it as if it were UTC, and displays a file modification time of 23:00 EST, even though the file was committed at 13:00 EST. (description and fixes from CVS). >Fix: Pre-requisite: please commit PR ports/35047 on www/horde-devel before this one. Then apply the following patch: diff -urN /usr/ports/devel/chora.orig/Makefile /usr/ports/devel/chora/Makefile --- /usr/ports/devel/chora.orig/Makefile Sat Feb 9 09:50:30 2002 +++ /usr/ports/devel/chora/Makefile Sat Feb 16 19:05:45 2002 @@ -7,13 +7,32 @@ PORTNAME= chora PORTVERSION= 1.0 +PORTREVISION= 1 CATEGORIES= devel www MASTER_SITES= ftp://ftp.horde.org/pub/chora/tarballs/ \ ftp://ftp.uk.horde.org/mirrors/ftp.horde.org/pub/chora/tarballs/ MAINTAINER= thierry@pompo.net +#----------------------------------------------------------------------- +# You may define these options: +# +# - WITHOUT_ENSCRIPT : if you do not need syntax highlighting; +# +# - A4 or DJ : if you run enscript with this paper size. +# +#----------------------------------------------------------------------- + RUN_DEPENDS= ${LOCALBASE}/www/horde/index.php:${PORTSDIR}/www/horde-devel +.if !defined(WITHOUT_ENSCRIPT) +.if defined(A4) +RUN_DEPENDS= ${LOCALBASE}/bin/enscript:${PORTSDIR}/print/enscript-a4 +.elif defined(DJ) +RUN_DEPENDS= ${LOCALBASE}/bin/enscript:${PORTSDIR}/print/enscript-letterdj +.else +RUN_DEPENDS= ${LOCALBASE}/bin/enscript:${PORTSDIR}/print/enscript-letter +.endif +.endif NO_BUILD= yes @@ -58,6 +77,10 @@ ${HORDE_INC}/httpd.conf.chora @${PERL} -pi -e "s://UNCOMMENTWHENINSTCHORA::" \ ${HORDEDIR}/config/registry.php +.if !defined(WITHOUT_ENSCRIPT) + @${PERL} -pi -e "s://UNCOMMENTWHENINSTCHORA::" \ + ${HORDEDIR}/config/mime_drivers.php +.endif .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for FILE in ${DOCS} diff -urN /usr/ports/devel/chora.orig/files/patch-cvs.php /usr/ports/devel/chora/files/patch-cvs.php --- /usr/ports/devel/chora.orig/files/patch-cvs.php Thu Jan 1 01:00:00 1970 +++ /usr/ports/devel/chora/files/patch-cvs.php Sat Feb 16 20:30:01 2002 @@ -0,0 +1,11 @@ +--- cvs.php.orig Wed Jan 2 18:05:18 2002 ++++ cvs.php Sat Feb 16 20:29:37 2002 +@@ -176,7 +176,7 @@ + } + + $textURL= Chora::url('co', $where, array('r'=>$rev)); +- $commitDate = gmdate('jS F Y, g:ia', $lg->date); ++ $commitDate = date('jS F Y, g:ia', $lg->date); + $readableDate = CVSLib_File::readableTime($lg->date, true); + + $aid = $lg->queryAuthor(); diff -urN /usr/ports/devel/chora.orig/files/patch-history.php /usr/ports/devel/chora/files/patch-history.php --- /usr/ports/devel/chora.orig/files/patch-history.php Thu Jan 1 01:00:00 1970 +++ /usr/ports/devel/chora/files/patch-history.php Sat Feb 16 19:37:21 2002 @@ -0,0 +1,11 @@ +--- history.php.orig Wed Jan 2 18:05:19 2002 ++++ history.php Sat Feb 16 19:36:54 2002 +@@ -197,7 +197,7 @@ + $bg = isset($branchColours[$bgbr]) ? $branchColours[$bgbr] : 'white'; + $log = $fl->logs[$rev]; + $author = Chora::showAuthorName($log->queryAuthor()); +- $date = gmdate('jS M Y', $log->queryDate()); ++ $date = strftime('%e %b %Y', $log->queryDate()); + $lines = $log->queryChangedLines(); + include $registry->getTemplatePath() . '/history/rev.inc'; + diff -urN /usr/ports/devel/chora.orig/files/patch-lib_CVSLib_Log.php /usr/ports/devel/chora/files/patch-lib_CVSLib_Log.php --- /usr/ports/devel/chora.orig/files/patch-lib_CVSLib_Log.php Thu Jan 1 01:00:00 1970 +++ /usr/ports/devel/chora/files/patch-lib_CVSLib_Log.php Sat Feb 16 19:40:39 2002 @@ -0,0 +1,11 @@ +--- lib/CVSLib/Log.php.orig Sat Aug 11 22:59:31 2001 ++++ lib/CVSLib/Log.php Sat Feb 16 19:39:47 2002 +@@ -45,7 +45,7 @@ + case CVSLIB_LOG_DATE: + $line = array_shift($raw); + if (preg_match("|^date:\s+(\d+)/(\d+)/(\d+)\s+(\d+):(\d+):(\d+);\s+author:\s+(\S+);\s+state:\s+(\S+);(\s+lines:\s+([0-9\s+-]+))?|", $line, $parts)) { +- $this->date = mktime($parts[4], $parts[5], $parts[6], $parts[2], $parts[3], $parts[1]); ++ $this->date = gmmktime($parts[4], $parts[5], $parts[6], $parts[2], $parts[3], $parts[1]); + $this->author = $parts[7]; + $this->state = $parts[8]; + $this->lines = isset($parts[10])?$parts[10]:''; diff -urN /usr/ports/devel/chora.orig/pkg-plist /usr/ports/devel/chora/pkg-plist --- /usr/ports/devel/chora.orig/pkg-plist Tue Feb 5 23:17:25 2002 +++ /usr/ports/devel/chora/pkg-plist Sat Feb 16 20:31:27 2002 @@ -40,6 +40,7 @@ %%CHORADIR%%/lib/CVSLib/Error.php %%CHORADIR%%/lib/CVSLib/File.php %%CHORADIR%%/lib/CVSLib/Log.php +%%CHORADIR%%/lib/CVSLib/Log.php.orig %%CHORADIR%%/lib/CVSLib/Rev.php %%CHORADIR%%/lib/Chora.php %%CHORADIR%%/lib/MIME/Viewer/text.php >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message