mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
- 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)
This commit is contained in:
parent
4028024871
commit
abb1ada39c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=258117
@ -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
|
||||
|
@ -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/
|
10
net-mgmt/pnp/files/patch-man__Makefile.in
Normal file
10
net-mgmt/pnp/files/patch-man__Makefile.in
Normal file
@ -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/
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
11
net-mgmt/pnp/files/patch-share__pnp__include__fpdi.php
Normal file
11
net-mgmt/pnp/files/patch-share__pnp__include__fpdi.php
Normal file
@ -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();
|
@ -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]));
|
@ -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;
|
||||
}
|
||||
|
29
net-mgmt/pnp/files/patch-share__pnp__include__pdf_parser.php
Normal file
29
net-mgmt/pnp/files/patch-share__pnp__include__pdf_parser.php
Normal file
@ -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 {
|
11
net-mgmt/pnp/files/patch-share__pnp__include__site.php
Normal file
11
net-mgmt/pnp/files/patch-share__pnp__include__site.php
Normal file
@ -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)) {
|
@ -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:
|
Loading…
Reference in New Issue
Block a user