git: a6c55f2db23d - 2026Q3 - mail/mailgraph: Fix mailgraph.cgi for rrdtool 1.10.x

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Thu, 30 Jul 2026 19:28:40 UTC
The branch 2026Q3 has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a6c55f2db23dfa60f11afd4ae0f4405b4d5d3ecd

commit a6c55f2db23dfa60f11afd4ae0f4405b4d5d3ecd
Author:     Fabian Wenk <fabian@wenks.ch>
AuthorDate: 2026-07-30 18:59:52 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2026-07-30 19:21:34 +0000

    mail/mailgraph: Fix mailgraph.cgi for rrdtool 1.10.x
    
    See also:       https://github.com/schweikert/mailgraph/pull/23
    
    PR:             296712
    Approved by:    maintainer timeout >2 weeks
    MFH:            2026Q3
    
    (cherry picked from commit 84b6f5ad5112ddf5ada4cc91c039ab9ac25a6c71)
---
 mail/mailgraph/Makefile                  |  2 +-
 mail/mailgraph/files/patch-mailgraph.cgi | 42 ++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/mail/mailgraph/Makefile b/mail/mailgraph/Makefile
index 36a1f3bd38ed..8b2d282962e6 100644
--- a/mail/mailgraph/Makefile
+++ b/mail/mailgraph/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	mailgraph
 PORTVERSION=	1.14
-PORTREVISION=	10
+PORTREVISION=	11
 CATEGORIES=	mail
 MASTER_SITES=	http://mailgraph.schweikert.ch/pub/ \
 		http://mailgraph.schweikert.ch/pub/old/
diff --git a/mail/mailgraph/files/patch-mailgraph.cgi b/mail/mailgraph/files/patch-mailgraph.cgi
index dd55a0b4694c..d97068626d08 100644
--- a/mail/mailgraph/files/patch-mailgraph.cgi
+++ b/mail/mailgraph/files/patch-mailgraph.cgi
@@ -1,3 +1,5 @@
+Add fix from https://github.com/schweikert/mailgraph/pull/23: ("removed version checks to tackle rrdtool pr #1331 - #23")
+
 --- mailgraph.cgi.orig	Wed Aug 29 17:06:01 2007
 +++ mailgraph.cgi	Thu Sep  6 22:46:09 2007
 @@ -16,8 +16,8 @@
@@ -11,6 +13,32 @@
  my $tmp_dir = '/tmp/mailgraph'; # temporary directory where to store the images
  
  my @graphs = (
+@@ -43,7 +43,7 @@
+ 	# choose carefully the end otherwise rrd will maybe pick the wrong RRA:
+ 	my $end  = time; $end -= $end % $step;
+ 	my $date = localtime(time);
+-	$date =~ s|:|\\:|g unless $RRDs::VERSION < 1.199908;
++	$date =~ s|:|\\:|g;
+ 
+ 	my ($graphret,$xs,$ys) = RRDs::graph($file,
+ 		'--imgformat', 'PNG',
+@@ -59,14 +59,14 @@
+ 		'--color', 'SHADEB#ffffff',
+ 		'--color', 'BACK#ffffff',
+ 
+-		$RRDs::VERSION < 1.2002 ? () : ( '--slope-mode'),
++		'--slope-mode',
+ 
+ 		@rrdargs,
+ 
+ 		'COMMENT:['.$date.']\r',
+ 	);
+ 
+-	my $ERR=RRDs::error;
++	my $ERR = RRDs::error;
+ 	die "ERROR: $ERR\n" if $ERR;
+ }
+ 
 @@ -163,7 +163,7 @@
  <title>Mail statistics for $host</title>
  <meta http-equiv="Refresh" content="300" />
@@ -20,3 +48,17 @@
  </head>
  <body>
  HEADER
+@@ -185,10 +185,10 @@
+ 	print <<FOOTER;
+ <hr/>
+ <table><tr><td>
+-<a href="http://mailgraph.schweikert.ch/">Mailgraph</a> $VERSION
+-by <a href="http://david.schweikert.ch/">David Schweikert</a></td>
++<a href="https://mailgraph.schweikert.ch/">Mailgraph</a> $VERSION
++by <a href="https://david.schweikert.ch/">David Schweikert</a></td>
+ <td align="right">
+-<a href="http://oss.oetiker.ch/rrdtool/"><img src="http://oss.oetiker.ch/rrdtool/.pics/rrdtool.gif" alt="" width="120" height="34"/></a>
++<a href="https://oss.oetiker.ch/rrdtool/"><img src="https://oss.oetiker.ch/rrdtool/.pics/rrdtool.gif" alt="" width="120" height="34"/></a>
+ </td></tr></table>
+ </body></html>
+ FOOTER