1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

fix wrong date display + add syntax highlighting

PR:		35048
Submitted by:	maintainer
This commit is contained in:
Ying-Chieh Liao 2002-04-01 13:32:17 +00:00
parent b2424d7fdd
commit 783c54116d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=57136
10 changed files with 114 additions and 0 deletions

View File

@ -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 @@ do-install:
${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}

View File

@ -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();

View File

@ -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';

View File

@ -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]:'';

View File

@ -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

View File

@ -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 @@ do-install:
${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}

View File

@ -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();

View File

@ -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';

View File

@ -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]:'';

View File

@ -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