? cvsweb.diff Index: Makefile =================================================================== RCS file: /cvs/OpenBSD/ports/devel/cvsweb/Makefile,v retrieving revision 1.29 diff -u -w -r1.29 Makefile --- Makefile 16 Aug 2003 23:18:41 -0000 1.29 +++ Makefile 11 Oct 2003 08:40:43 -0000 @@ -38,6 +38,7 @@ do-install: ${INSTALL_SCRIPT_DIR} ${PREFIX}/cgi-bin ${INSTALL_SCRIPT} ${WRKSRC}/cvsweb.cgi ${PREFIX}/cgi-bin/cvsweb + ${INSTALL_SCRIPT} ${FILESDIR}/cvsgraph.cgi ${PREFIX}/cgi-bin/cvsgraph ${INSTALL_DATA_DIR} ${CONFDIR}/cvsweb .for file in ${CONFFILES} ${INSTALL_DATA} ${WRKSRC}/${file} ${CONFDIR}/cvsweb/${file}.dist Index: files/cvsgraph.cgi =================================================================== RCS file: files/cvsgraph.cgi diff -N files/cvsgraph.cgi --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/cvsgraph.cgi 11 Oct 2003 08:40:43 -0000 @@ -0,0 +1,15 @@ +#!/usr/bin/perl + +use CGI; + +# Turn off buffering of stdout to get the Content-Type header flushed +$| = 1; + +my $q = new CGI; + +my $root = $q->param('r'); +my $module = $q->param('m'); +my $file = $q->param('f'); + +print "Content-type: image/gif\n\n"; +system("/usr/local/bin/cvsgraph -r '$root' -m '$module' $file,v") Index: patches/patch-cvsweb_cgi =================================================================== RCS file: /cvs/OpenBSD/ports/devel/cvsweb/patches/patch-cvsweb_cgi,v retrieving revision 1.11 diff -u -w -r1.11 patch-cvsweb_cgi --- patches/patch-cvsweb_cgi 16 Aug 2003 23:18:41 -0000 1.11 +++ patches/patch-cvsweb_cgi 11 Oct 2003 08:40:43 -0000 @@ -1,22 +1,30 @@ $OpenBSD: patch-cvsweb_cgi,v 1.11 2003/08/16 23:18:41 naddy Exp $ ---- cvsweb.cgi.orig 2002-09-26 22:56:05.000000000 +0200 -+++ cvsweb.cgi 2003-08-17 01:07:29.000000000 +0200 +--- cvsweb.cgi.orig 2002-09-27 06:56:05.000000000 +1000 ++++ cvsweb.cgi 2003-10-11 18:19:23.000000000 +1000 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # cvsweb - a CGI interface to CVS trees. # -@@ -157,7 +157,7 @@ use File::Basename (); +@@ -95,6 +95,7 @@ use vars qw ( + $allow_tar @tar_options @gzip_options @zip_options @cvs_options + @annotate_options $LOG_FILESEPARATOR $LOG_REVSEPARATOR + $tmpdir $HTML_DOCTYPE $HTML_META ++ $cvsgraph + ); + + sub printDiffSelect($); +@@ -157,7 +158,7 @@ use File::Basename (); # == EDIT this == # Locations to search for user configuration, in order: -for ("$mydir/cvsweb.conf", '/usr/local/etc/cvsweb/cvsweb.conf') { -+for ("$mydir/cvsweb.conf", '%%CONFDIR%%/cvsweb/cvsweb.conf') { ++for ("$mydir/cvsweb.conf", '/var/www/conf/cvsweb/cvsweb.conf') { if (defined($_) && -r $_) { $config = $_; last; -@@ -193,7 +193,7 @@ $tmpdir = defined($ENV{TMPDIR}) ? $ENV{T +@@ -193,7 +194,7 @@ $tmpdir = defined($ENV{TMPDIR}) ? $ENV{T $LOG_FILESEPARATOR = q/^={77}$/; $LOG_REVSEPARATOR = q/^-{28}$/; @@ -25,7 +33,7 @@ @DIFFTYPES{@DIFFTYPES} = ( { 'descr' => 'colored', -@@ -215,11 +215,6 @@ $LOG_REVSEPARATOR = q/^-{28}$/; +@@ -215,11 +216,6 @@ $LOG_REVSEPARATOR = q/^-{28}$/; 'opts' => ['-c'], 'colored' => 0, }, @@ -37,7 +45,37 @@ ); @LOGSORTKEYS = qw(cvs date rev); -@@ -2014,20 +2009,6 @@ sub doDiff($$$$$$) { +@@ -693,6 +689,11 @@ if (-d $fullname) { + } + print "\n"; + ++ if ($cvsgraph) { ++ print "Graph\n"; ++ $infocols++; ++ } ++ + # do not display the other column-headers, if we do not have any files + # with revision information: + if (scalar(%fileinfo)) { +@@ -952,6 +953,17 @@ if (-d $fullname) { + print &link($fileicon, $url); + } + print ' ', &link(htmlquote($file), $url), $attic; ++ if ($cvsgraph) { ++ my $p = $fullname . ($attic ? "/Attic/" : "/") . $file; ++ $p =~ s|^$cvsroot||; ++ $p =~ s|^/$module/||; ++ print "\nGraph"; ++ } + print "\n " if ($dirtable); + download_link($fileurl, $rev, $rev, + $defaultViewable ? "text/x-cvsweb-markup" : +@@ -2014,20 +2026,6 @@ sub doDiff($$$$$$) { my @difftype = @{$difftype->{'opts'}}; my $human_readable = $difftype->{'colored'}; Index: patches/patch-cvsweb_conf =================================================================== RCS file: /cvs/OpenBSD/ports/devel/cvsweb/patches/patch-cvsweb_conf,v retrieving revision 1.9 diff -u -w -r1.9 patch-cvsweb_conf --- patches/patch-cvsweb_conf 16 Aug 2003 18:12:10 -0000 1.9 +++ patches/patch-cvsweb_conf 11 Oct 2003 08:40:43 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-cvsweb_conf,v 1.9 2003/08/16 18:12:10 naddy Exp $ ---- cvsweb.conf.orig 2002-09-23 07:30:17.000000000 +0200 -+++ cvsweb.conf 2003-08-16 18:25:42.000000000 +0200 +--- cvsweb.conf.orig 2002-09-23 15:30:17.000000000 +1000 ++++ cvsweb.conf 2003-10-11 17:48:46.000000000 +1000 @@ -115,7 +115,6 @@ $mancgi = # h Human readable # u Unified diff @@ -47,3 +47,15 @@ # quick mime-type lookup; maps file-suffices to # mime-types for displaying checkouts in the browser. +@@ -511,6 +497,11 @@ push @cvs_options, '-u' if ($uname eq 'N + # To make annotate work against a read only repository, add -n, e.g.: + # @annotate_options = (@cvs_options, '-n'); + ++ ++# URL of cvsgraph wrapper script ++#$cvsgraph = "/cgi-bin/cvsgraph"; ++$cvsgraph = ""; ++ + 1; + + #EOF Index: pkg/PLIST =================================================================== RCS file: /cvs/OpenBSD/ports/devel/cvsweb/pkg/PLIST,v retrieving revision 1.3 diff -u -w -r1.3 PLIST --- pkg/PLIST 22 Aug 2003 15:58:00 -0000 1.3 +++ pkg/PLIST 11 Oct 2003 08:40:43 -0000 @@ -1,4 +1,5 @@ @comment $OpenBSD: PLIST,v 1.3 2003/08/22 15:58:00 naddy Exp $ +cgi-bin/cvsgraph cgi-bin/cvsweb icons/cvsweb/back.gif icons/cvsweb/dir.gif