aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/pnp
diff options
context:
space:
mode:
authorglarkin <glarkin@FreeBSD.org>2010-07-24 04:59:08 +0800
committerglarkin <glarkin@FreeBSD.org>2010-07-24 04:59:08 +0800
commitbd45c7d7c241e61ab9caa3a0035ec800c08829cb (patch)
tree4ce66a85107a6ea164ac1b71330b70a7b09b2539 /net-mgmt/pnp
parentabacfdef7b601b5ff76d3609bc07a39a9680c3f3 (diff)
downloadfreebsd-ports-gnome-bd45c7d7c241e61ab9caa3a0035ec800c08829cb.tar.gz
freebsd-ports-gnome-bd45c7d7c241e61ab9caa3a0035ec800c08829cb.tar.zst
freebsd-ports-gnome-bd45c7d7c241e61ab9caa3a0035ec800c08829cb.zip
- Patch code emitting warnings after PHP 5.3.x upgrade
- Regenerated patch files with "make makepatch" - Added GPLv2 license - Bumped PORTREVISION PR: ports/147199 Submitted by: olli hauer <ohauer at gmx dot de> Approved by: rea-fbsd@codelabs.ru (maintainer - timeout; 55 days)
Diffstat (limited to 'net-mgmt/pnp')
-rw-r--r--net-mgmt/pnp/Makefile17
-rw-r--r--net-mgmt/pnp/files/extra-patch-share__pnp__include__function.inc.php (renamed from net-mgmt/pnp/files/extra-patch-share::pnp::include::function.inc.php)0
-rw-r--r--net-mgmt/pnp/files/patch-man::Makefile.in10
-rw-r--r--net-mgmt/pnp/files/patch-man__Makefile.in10
-rw-r--r--net-mgmt/pnp/files/patch-sample-config__Makefile.in (renamed from net-mgmt/pnp/files/patch-sample-config::Makefile.in)4
-rw-r--r--net-mgmt/pnp/files/patch-scripts__Makefile.in (renamed from net-mgmt/pnp/files/patch-scripts::Makefile.in)4
-rw-r--r--net-mgmt/pnp/files/patch-share__pnp__include__font__makefont__makefont.php11
-rw-r--r--net-mgmt/pnp/files/patch-share__pnp__include__fpdi.php11
-rw-r--r--net-mgmt/pnp/files/patch-share__pnp__include__fpdi_pdf_parser.php11
-rw-r--r--net-mgmt/pnp/files/patch-share__pnp__include__function.inc.php29
-rw-r--r--net-mgmt/pnp/files/patch-share__pnp__include__pdf_parser.php29
-rw-r--r--net-mgmt/pnp/files/patch-share__pnp__include__site.php11
-rw-r--r--net-mgmt/pnp/files/patch-src__Makefile.in (renamed from net-mgmt/pnp/files/patch-src::Makefile.in)8
13 files changed, 133 insertions, 22 deletions
diff --git a/net-mgmt/pnp/Makefile b/net-mgmt/pnp/Makefile
index 37e6a08c06a7..ab3b7f8ea6b8 100644
--- a/net-mgmt/pnp/Makefile
+++ b/net-mgmt/pnp/Makefile
@@ -7,8 +7,10 @@
PORTNAME= pnp
PORTVERSION= 0.4.14
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/${PORTNAME}4nagios/PNP/${PORTNAME}-${PORTVERSION}
+LICENSE= GPLv2
MAINTAINER= rea-fbsd@codelabs.ru
COMMENT= Nagios performance data collector and grapher
@@ -19,7 +21,10 @@ RUN_DEPENDS= ${LOCALBASE}/bin/rrdtool:${PORTSDIR}/databases/rrdtool \
OPTIONS= PDF "Use built-in fpdf library to produce PDF views" ON
+.include <bsd.port.options.mk>
+
USE_PHP= zlib gd xml pcre
+USE_DOS2UNIX= yes
WANT_PHP_WEB= yes
USE_RC_SUBR= npcd.sh
MAN1= pnpsender.1
@@ -33,9 +38,8 @@ PNP_RRDS= ${PNP_STATE}/rrd
PNP_SPOOL= ${PNP_STATE}/perfspool
FPDF_DIR?= share/fpdf
-.if defined(WITH_PDF)
-.else
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-share::pnp::include::function.inc.php
+.if !defined(WITH_PDF)
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-share__pnp__include__function.inc.php
.endif
GNU_CONFIGURE= yes
@@ -67,7 +71,12 @@ SUB_LIST= PNP_STATE=${PNP_STATE} \
# All files in share/pnp/include/ are installed, so if we patched something
# in that directory, we must clean the '.orig' files -- they shouldn't be
# installed.
-PNP_CLEAN_PATCHED= share/pnp/include/function.inc.php.orig
+PNP_CLEAN_PATCHED= share/pnp/include/font/makefont/makefont.php.orig \
+ share/pnp/include/fpdi.php.orig \
+ share/pnp/include/fpdi_pdf_parser.php.orig \
+ share/pnp/include/function.inc.php.orig \
+ share/pnp/include/pdf_parser.php.orig \
+ share/pnp/include/site.php.orig
.if defined(WITH_PDF)
PNP_USE_FPDF= 1
diff --git a/net-mgmt/pnp/files/extra-patch-share::pnp::include::function.inc.php b/net-mgmt/pnp/files/extra-patch-share__pnp__include__function.inc.php
index a266517489b8..a266517489b8 100644
--- a/net-mgmt/pnp/files/extra-patch-share::pnp::include::function.inc.php
+++ b/net-mgmt/pnp/files/extra-patch-share__pnp__include__function.inc.php
diff --git a/net-mgmt/pnp/files/patch-man::Makefile.in b/net-mgmt/pnp/files/patch-man::Makefile.in
deleted file mode 100644
index 376ce217d910..000000000000
--- a/net-mgmt/pnp/files/patch-man::Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- man/Makefile.in.orig 2008-08-18 18:45:56.000000000 +0400
-+++ man/Makefile.in 2008-08-18 18:48:41.000000000 +0400
-@@ -36,7 +36,6 @@
- devclean: distclean
-
- install:
-- $(MAKE) install-basic
-
- install-basic:
- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(MANDIR)/man1/
diff --git a/net-mgmt/pnp/files/patch-man__Makefile.in b/net-mgmt/pnp/files/patch-man__Makefile.in
new file mode 100644
index 000000000000..6585064f2992
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-man__Makefile.in
@@ -0,0 +1,10 @@
+--- ./man/Makefile.in.orig 2010-05-29 23:27:44.000000000 +0200
++++ ./man/Makefile.in 2010-05-29 23:27:44.000000000 +0200
+@@ -36,7 +36,6 @@
+ devclean: distclean
+
+ install:
+- $(MAKE) install-basic
+
+ install-basic:
+ $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(MANDIR)/man1/
diff --git a/net-mgmt/pnp/files/patch-sample-config::Makefile.in b/net-mgmt/pnp/files/patch-sample-config__Makefile.in
index 9d15ac804bd6..bd4fb23b2ad0 100644
--- a/net-mgmt/pnp/files/patch-sample-config::Makefile.in
+++ b/net-mgmt/pnp/files/patch-sample-config__Makefile.in
@@ -1,5 +1,5 @@
---- sample-config/Makefile.in.orig 2008-10-11 18:13:17.000000000 +0400
-+++ sample-config/Makefile.in 2008-12-24 17:33:32.000000000 +0300
+--- ./sample-config/Makefile.in.orig 2010-05-29 23:27:44.000000000 +0200
++++ ./sample-config/Makefile.in 2010-05-29 23:27:44.000000000 +0200
@@ -27,23 +27,19 @@
devclean: distclean
diff --git a/net-mgmt/pnp/files/patch-scripts::Makefile.in b/net-mgmt/pnp/files/patch-scripts__Makefile.in
index 5ddf46396dad..03f3d0d280de 100644
--- a/net-mgmt/pnp/files/patch-scripts::Makefile.in
+++ b/net-mgmt/pnp/files/patch-scripts__Makefile.in
@@ -1,5 +1,5 @@
---- scripts/Makefile.in.orig 2008-12-24 01:11:40.000000000 +0300
-+++ scripts/Makefile.in 2008-12-24 01:12:25.000000000 +0300
+--- ./scripts/Makefile.in.orig 2010-05-29 23:27:44.000000000 +0200
++++ ./scripts/Makefile.in 2010-05-29 23:27:44.000000000 +0200
@@ -25,7 +25,6 @@
devclean: distclean
diff --git a/net-mgmt/pnp/files/patch-share__pnp__include__font__makefont__makefont.php b/net-mgmt/pnp/files/patch-share__pnp__include__font__makefont__makefont.php
new file mode 100644
index 000000000000..0b9769cceacc
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-share__pnp__include__font__makefont__makefont.php
@@ -0,0 +1,11 @@
+--- ./share/pnp/include/font/makefont/makefont.php.orig 2010-05-29 23:27:44.000000000 +0200
++++ ./share/pnp/include/font/makefont/makefont.php 2010-05-29 23:30:23.000000000 +0200
+@@ -171,7 +171,7 @@
+ //StemV
+ if(isset($fm['StdVW']))
+ $stemv=$fm['StdVW'];
+- elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight']))
++ elseif(isset($fm['Weight']) and preg_match('/(bold|black)/i',$fm['Weight']))
+ $stemv=120;
+ else
+ $stemv=70;
diff --git a/net-mgmt/pnp/files/patch-share__pnp__include__fpdi.php b/net-mgmt/pnp/files/patch-share__pnp__include__fpdi.php
new file mode 100644
index 000000000000..dc3061fffca1
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-share__pnp__include__fpdi.php
@@ -0,0 +1,11 @@
+--- ./share/pnp/include/fpdi.php.orig 2010-05-29 23:27:44.000000000 +0200
++++ ./share/pnp/include/fpdi.php 2010-05-29 23:27:44.000000000 +0200
+@@ -93,7 +93,7 @@
+ $fn =& $this->current_filename;
+
+ if (!isset($this->parsers[$fn]))
+- $this->parsers[$fn] =& new fpdi_pdf_parser($fn,$this);
++ $this->parsers[$fn] = new fpdi_pdf_parser($fn,$this);
+ $this->current_parser =& $this->parsers[$fn];
+
+ return $this->parsers[$fn]->getPageCount();
diff --git a/net-mgmt/pnp/files/patch-share__pnp__include__fpdi_pdf_parser.php b/net-mgmt/pnp/files/patch-share__pnp__include__fpdi_pdf_parser.php
new file mode 100644
index 000000000000..d1ff1c1906c2
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-share__pnp__include__fpdi_pdf_parser.php
@@ -0,0 +1,11 @@
+--- ./share/pnp/include/fpdi_pdf_parser.php.orig 2010-05-29 23:27:44.000000000 +0200
++++ ./share/pnp/include/fpdi_pdf_parser.php 2010-05-29 23:27:44.000000000 +0200
+@@ -242,7 +242,7 @@
+ if (preg_match("/^\/[a-z85]*$/i", $_filter[1], $filterName) && @include_once('decoders'.$_filter[1].'.php')) {
+ $filterName = substr($_filter[1],1);
+ if (class_exists($filterName)) {
+- $decoder =& new $filterName($this->fpdi);
++ $decoder = new $filterName($this->fpdi);
+ $stream = $decoder->decode(trim($stream));
+ } else {
+ $this->fpdi->error(sprintf("Unsupported Filter: %s",$_filter[1]));
diff --git a/net-mgmt/pnp/files/patch-share__pnp__include__function.inc.php b/net-mgmt/pnp/files/patch-share__pnp__include__function.inc.php
new file mode 100644
index 000000000000..04b7b06ab07a
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-share__pnp__include__function.inc.php
@@ -0,0 +1,29 @@
+--- ./share/pnp/include/function.inc.php.orig 2010-05-29 21:26:22.000000000 +0200
++++ ./share/pnp/include/function.inc.php 2010-05-29 21:32:24.000000000 +0200
+@@ -1030,7 +1030,7 @@
+ }
+ }
+
+- $pdf =& new PDF('P', 'mm', 'A4');
++ $pdf = new PDF('P', 'mm', 'A4');
+ $pdf->AliasNbPages();
+ $pdf->SetAutoPageBreak('off');
+ $pdf->SetMargins(12.5,25,10);
+@@ -1540,7 +1540,7 @@
+ $NAGIOS['RRD'][$tag][$dsl] = urldecode($value);
+ }
+
+- if($level == 2 && $type == "complete" && eregi("^NAGIOS_",$tag)){
++ if($level == 2 && $type == "complete" && preg_match("/^NAGIOS_/i",$tag)){
+ if(isset($xml_elem['value'])){
+ $value = $xml_elem['value'];
+ }else{
+@@ -1571,7 +1571,7 @@
+ $PAGE="";
+ $allowed_tags = array("page", "graph");
+ foreach($data as $line){
+- if(ereg('(^#|^;)',$line)) {
++ if(preg_match('/(^#|^;)/',$line)) {
+ continue;
+ }
+
diff --git a/net-mgmt/pnp/files/patch-share__pnp__include__pdf_parser.php b/net-mgmt/pnp/files/patch-share__pnp__include__pdf_parser.php
new file mode 100644
index 000000000000..e622887a22fe
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-share__pnp__include__pdf_parser.php
@@ -0,0 +1,29 @@
+--- ./share/pnp/include/pdf_parser.php.orig 2010-05-29 23:27:44.000000000 +0200
++++ ./share/pnp/include/pdf_parser.php 2010-05-29 23:31:23.000000000 +0200
+@@ -91,7 +91,7 @@
+
+ $this->getPDFVersion();
+
+- $this->c =& new pdf_context($this->f);
++ $this->c = new pdf_context($this->f);
+ // Read xref-Data
+ $this->pdf_read_xref($this->xref, $this->pdf_find_xref());
+
+@@ -257,7 +257,7 @@
+ fseek($this->f, $o_pos+strlen($m[1]));
+ }
+
+- $c =& new pdf_context($this->f);
++ $c = new pdf_context($this->f);
+ $trailer = $this->pdf_read_value($c);
+
+ if (isset($trailer[1]['/Prev'])) {
+@@ -423,7 +423,7 @@
+ $e++;
+
+ if ($this->actual_obj[1][1]['/Length'][0] == PDF_TYPE_OBJREF) {
+- $tmp_c =& new pdf_context($this->f);
++ $tmp_c = new pdf_context($this->f);
+ $tmp_length = $this->pdf_resolve_object($tmp_c,$this->actual_obj[1][1]['/Length']);
+ $length = $tmp_length[1][1];
+ } else {
diff --git a/net-mgmt/pnp/files/patch-share__pnp__include__site.php b/net-mgmt/pnp/files/patch-share__pnp__include__site.php
new file mode 100644
index 000000000000..9e6be31ffd1c
--- /dev/null
+++ b/net-mgmt/pnp/files/patch-share__pnp__include__site.php
@@ -0,0 +1,11 @@
+--- ./share/pnp/include/site.php.orig 2010-05-29 23:27:44.000000000 +0200
++++ ./share/pnp/include/site.php 2010-05-29 23:27:44.000000000 +0200
+@@ -30,7 +30,7 @@
+ $a = 0;
+
+ while (isset($file[$l]) && $file[$l] != "") {
+- if(!ereg("^#",$file[$l]) && !ereg("^;",$file[$l])) {
++ if(!preg_match("/^#/",$file[$l]) && !preg_match("/^;/",$file[$l])) {
+ $defineCln = explode("{", $file[$l]);
+ $define = explode(" ",$defineCln[0]);
+ if (isset($define[1]) && in_array(trim($define[1]),$type)) {
diff --git a/net-mgmt/pnp/files/patch-src::Makefile.in b/net-mgmt/pnp/files/patch-src__Makefile.in
index 315868353d14..13b3997a8312 100644
--- a/net-mgmt/pnp/files/patch-src::Makefile.in
+++ b/net-mgmt/pnp/files/patch-src__Makefile.in
@@ -1,11 +1,11 @@
---- src/Makefile.in.orig 2008-12-24 01:12:54.000000000 +0300
-+++ src/Makefile.in 2008-12-24 01:13:31.000000000 +0300
-@@ -88,8 +88,6 @@
+--- ./src/Makefile.in.orig 2010-05-29 23:27:44.000000000 +0200
++++ ./src/Makefile.in 2010-05-29 23:27:44.000000000 +0200
+@@ -121,8 +121,6 @@
$(MAKE) install-basic
install-basic:
- $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) -m 755 $(INSTALL_OPTS) -d $(DESTDIR)$(PERFDATA_SPOOL_DIR)
$(INSTALL) -m 754 $(INSTALL_OPTS) @npcd_name@ $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 754 $(INSTALL_OPTS) npcdmod.o $(DESTDIR)$(BINDIR)
- strip-post-install: