aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nagios
diff options
context:
space:
mode:
authorwxs <wxs@FreeBSD.org>2009-05-04 23:36:05 +0800
committerwxs <wxs@FreeBSD.org>2009-05-04 23:36:05 +0800
commit68ea460da59614bcc82b80b7517ee85d518af07d (patch)
tree97b8b5b8dcab48abe4a15229e935bed6d72781bb /net-mgmt/nagios
parentd867adf8b0f1cc53e46cd5c7f2a19f98608d3b64 (diff)
downloadfreebsd-ports-gnome-68ea460da59614bcc82b80b7517ee85d518af07d.tar.gz
freebsd-ports-gnome-68ea460da59614bcc82b80b7517ee85d518af07d.tar.zst
freebsd-ports-gnome-68ea460da59614bcc82b80b7517ee85d518af07d.zip
- Fix runtime problem with embedded perl.
- Mark as MAKE_JOBS_UNSAFE. - Stop using DISTVERSION and use PORTVERSION in net-mgmt/nagios. PR: ports/134175 Submitted by: Jarrod Sayers <jarrod@netleader.com.au> (maintainer)
Diffstat (limited to 'net-mgmt/nagios')
-rw-r--r--net-mgmt/nagios/Makefile9
-rw-r--r--net-mgmt/nagios/files/patch-base-utils.c38
2 files changed, 43 insertions, 4 deletions
diff --git a/net-mgmt/nagios/Makefile b/net-mgmt/nagios/Makefile
index 6821be1bd620..f091c61ec841 100644
--- a/net-mgmt/nagios/Makefile
+++ b/net-mgmt/nagios/Makefile
@@ -6,7 +6,8 @@
#
PORTNAME= nagios
-DISTVERSION= 3.0.6
+PORTVERSION= 3.0.6
+PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF
@@ -16,8 +17,6 @@ COMMENT= Extremely powerful network monitoring system
LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd
RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
-MAKE_JOBS_UNSAFE= yes
-
USE_ICONV= yes
USE_PERL5_BUILD= yes
USE_AUTOTOOLS= autoconf:262 libltdl:15
@@ -68,6 +67,8 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LIBS="-L${LOCALBASE}/lib" \
PERL=${PERL}
+MAKE_JOBS_UNSAFE= yes
+
INSTALL_TARGET= install install-commandmode install-config
PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \
@@ -86,7 +87,7 @@ SUB_FILES= pkg-install \
### XXX: Subtle bug with removing PREFIX from here
SUB_LIST= PREFIX=${PREFIX} \
- ${PLIST_SUB}
+ ${PLIST_SUB}
.if defined(WITH_EMBEDDED_PERL)
USE_PERL5= 5.8.0+
diff --git a/net-mgmt/nagios/files/patch-base-utils.c b/net-mgmt/nagios/files/patch-base-utils.c
new file mode 100644
index 000000000000..e4aa4a489b82
--- /dev/null
+++ b/net-mgmt/nagios/files/patch-base-utils.c
@@ -0,0 +1,38 @@
+--- base/utils.c.orig 2008-12-01 03:52:58.000000000 +1030
++++ base/utils.c 2009-05-03 11:51:19.000000000 +0930
+@@ -3597,7 +3597,7 @@
+ /* initializes embedded perl interpreter */
+ int init_embedded_perl(char **env){
+ #ifdef EMBEDDEDPERL
+- char *embedding[]={ "", "" };
++ char **embedding = NULL;
+ int exitstatus=0;
+ char *temp_buffer=NULL;
+ int argc=2;
+@@ -3613,6 +3613,17 @@
+
+ else{
+
++ embedding = malloc(argc * sizeof(char *));
++ if (embedding == NULL) {
++ use_embedded_perl = FALSE;
++ logit(NSLOG_RUNTIME_ERROR, TRUE, "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n");
++ } else {
++ embedding[0] = malloc(sizeof(char));
++ if (embedding[0] == NULL) {
++ use_embedded_perl = FALSE;
++ logit(NSLOG_RUNTIME_ERROR, TRUE, "Error: Unable to allocate memory for embedded Perl interpreter! (see ports/131993)\n");
++ } else {
++ *embedding[0] = '\0';
+ embedding[1]=p1_file;
+
+ use_embedded_perl=TRUE;
+@@ -3624,6 +3635,8 @@
+ logit(NSLOG_RUNTIME_ERROR,TRUE,"Error: Could not allocate memory for embedded Perl interpreter!\n");
+ }
+ }
++ }
++ }
+
+ /* a fatal error occurred... */
+ if(use_embedded_perl==FALSE){