summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfhajny <fhajny>2012-07-25 12:01:54 +0000
committerfhajny <fhajny>2012-07-25 12:01:54 +0000
commit75a007b155173157cee4e1a167f8bec052db168d (patch)
tree117611abe00e886c67a51a1095c8256e832f9e4b
parentcc7760e4c4cde8f6d740bbfd22e88704e663cecf (diff)
downloadpkgsrc-75a007b155173157cee4e1a167f8bec052db168d.tar.gz
Fix build on SunOS:
- Add pst3 to PLIST. - Make sure dig/nslookup are found on SunOS. - Use MACHINE_ARCH to avoid 64bit builds with ABI=32 on SunOS. - Disable large file support on SunOS and ABI=32 (fixes swap plugin).
-rw-r--r--net/nagios-plugins/Makefile9
-rw-r--r--net/nagios-plugins/Makefile.common4
-rw-r--r--net/nagios-plugins/PLIST3
-rw-r--r--net/nagios-plugins/distinfo5
-rw-r--r--net/nagios-plugins/patches/patch-ab81
-rw-r--r--net/nagios-plugins/patches/patch-plugins__check_swap.c16
6 files changed, 108 insertions, 10 deletions
diff --git a/net/nagios-plugins/Makefile b/net/nagios-plugins/Makefile
index 17f42a4de3f..ae7c9288e59 100644
--- a/net/nagios-plugins/Makefile
+++ b/net/nagios-plugins/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2012/05/24 15:20:25 marino Exp $
+# $NetBSD: Makefile,v 1.28 2012/07/25 12:01:54 fhajny Exp $
#
PKGREVISION= 2
@@ -27,9 +27,11 @@ CONFIGURE_ARGS+= --without-pgsql --without-mysql \
SPECIAL_PERMS+= ${PREFIX}/libexec/nagios/check_icmp ${SETUID_ROOT_PERMS}
SPECIAL_PERMS+= ${PREFIX}/libexec/nagios/check_dhcp ${SETUID_ROOT_PERMS}
-PLIST_VARS+= linux
+PLIST_VARS+= linux sunos
.if ${OPSYS} == "Linux"
PLIST.linux= yes
+.elif ${OPSYS} == "SunOS"
+PLIST.sunos= yes
.endif
.if ${OPSYS} == "NetBSD"
@@ -49,7 +51,8 @@ DEPENDS+= nagios-base-*:../../net/nagios-base
DEPENDS+= {ssh{,6}-[0-9]*,openssh-[0-9]*}:../../security/openssh
.endif
-.if !exists(/usr/bin/dig) || !exists(/usr/bin/nslookup)
+.if (!exists(/usr/bin/dig) && !exists(/usr/sbin/dig)) || \
+ (!exists(/usr/bin/nslookup) && !exists(/usr/sbin/nslookup))
DEPENDS+= bind-[0-9]*:../../net/bind96
.endif
diff --git a/net/nagios-plugins/Makefile.common b/net/nagios-plugins/Makefile.common
index fc32e553b25..21de39375a7 100644
--- a/net/nagios-plugins/Makefile.common
+++ b/net/nagios-plugins/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.9 2011/08/02 14:03:18 bouyer Exp $
+# $NetBSD: Makefile.common,v 1.10 2012/07/25 12:01:54 fhajny Exp $
#
# used by net/nagios-plugin-mysql/Makefile
# used by net/nagios-plugin-pgsql/Makefile
@@ -21,3 +21,5 @@ CONFIGURE_ARGS+= fu_cv_sys_stat_statvfs=no
CONFIGURE_ARGS+= --with-nagios-user=${NAGIOS_USER:Q}
CONFIGURE_ARGS+= --with-nagios-group=${NAGIOS_GROUP:Q}
CONFIGURE_ARGS+= --datarootdir=${PREFIX}/share/nagios
+
+CONFIGURE_ENV+= MACHINE_ARCH=${MACHINE_ARCH}
diff --git a/net/nagios-plugins/PLIST b/net/nagios-plugins/PLIST
index be6741126d1..d5a484c2e07 100644
--- a/net/nagios-plugins/PLIST
+++ b/net/nagios-plugins/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2011/04/08 22:56:12 morr Exp $
+@comment $NetBSD: PLIST,v 1.8 2012/07/25 12:01:54 fhajny Exp $
libexec/nagios/check_by_ssh
libexec/nagios/check_clamd
libexec/nagios/check_dhcp
@@ -44,6 +44,7 @@ libexec/nagios/check_udp
libexec/nagios/check_ups
libexec/nagios/check_users
libexec/nagios/negate
+${PLIST.sunos}libexec/nagios/pst3
libexec/nagios/urlize
libexec/nagios/utils.pm
libexec/nagios/utils.sh
diff --git a/net/nagios-plugins/distinfo b/net/nagios-plugins/distinfo
index bc504714d7d..e203084c43f 100644
--- a/net/nagios-plugins/distinfo
+++ b/net/nagios-plugins/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.11 2011/04/08 22:56:12 morr Exp $
+$NetBSD: distinfo,v 1.12 2012/07/25 12:01:54 fhajny Exp $
SHA1 (nagios-plugins-1.4.15.tar.gz) = 1faab309c06d37e559490fd852ecb0dc8a8ab610
RMD160 (nagios-plugins-1.4.15.tar.gz) = c2780a3523cf4eaaed34a94c07f5f6bd6fb1f736
Size (nagios-plugins-1.4.15.tar.gz) = 2095419 bytes
-SHA1 (patch-ab) = fa8dded3e0274fcc40839d6459bd709ad1a4fb47
+SHA1 (patch-ab) = fdde9e8e98f222ab7e24adea205ce402bd64342d
SHA1 (patch-ad) = 1418682ff599f91aa01a1eeb90f11c9e571212c8
SHA1 (patch-ae) = 9975dfe9e7a1e448fe273ccb8427dcf3a74e195f
SHA1 (patch-af) = c63176a78c7f73730c9f2ef3877b274f99be5dfa
@@ -13,3 +13,4 @@ SHA1 (patch-ak) = dd9aba7a0930a6448e372b581ba04d62018a973b
SHA1 (patch-al) = 63e28ae36d671e773acfe6aeb45ab7603c112594
SHA1 (patch-am) = adc95ba1037a7d7caab6dde6ca1e27e47754db62
SHA1 (patch-an) = 372a111ed040114479e363e42d66e2281d0d629f
+SHA1 (patch-plugins__check_swap.c) = d7557d1e6823e8bfeb02706ba914685c564bfdea
diff --git a/net/nagios-plugins/patches/patch-ab b/net/nagios-plugins/patches/patch-ab
index 62800adbb70..3c213aaa33e 100644
--- a/net/nagios-plugins/patches/patch-ab
+++ b/net/nagios-plugins/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.7 2011/04/08 22:56:12 morr Exp $
+$NetBSD: patch-ab,v 1.8 2012/07/25 12:01:55 fhajny Exp $
--- configure.orig 2010-07-27 20:48:13.000000000 +0000
+++ configure
@@ -20,6 +20,15 @@ $NetBSD: patch-ab,v 1.7 2011/04/08 22:56:12 morr Exp $
LDAPLIBS="-lldap -llber"\
LDAPINCLUDE="-I/usr/include/ldap"
+@@ -18068,7 +18068,7 @@ elif test "$ac_cv_uname_s" = "SunOS"; th
+ ac_cv_ps_cols=9
+ { echo "$as_me:$LINENO: result: using nagios-plugins internal ps command (pst3) for solaris" >&5
+ echo "${ECHO_T}using nagios-plugins internal ps command (pst3) for solaris" >&6; }
+- if test `isainfo -b` = 64 ; then
++ if test "$MACHINE_ARCH" = "x86_64" ; then
+ pst3_use_64bit=1
+ { echo "$as_me:$LINENO: using 64bit pst3" >&5
+ echo "$as_me: using 64bit pst3" >&6;}
@@ -19037,7 +19037,7 @@ fi
then
{ echo "$as_me:$LINENO: checking for nslookup syntax" >&5
@@ -38,7 +47,7 @@ $NetBSD: patch-ab,v 1.7 2011/04/08 22:56:12 morr Exp $
then
cat >>confdefs.h <<_ACEOF
-@@ -19431,7 +19431,7 @@ if test "${with_snmpget_command+set}" =
+@@ -19431,7 +19431,7 @@ if test "${with_snmpget_command+set}" =
withval=$with_snmpget_command; PATH_TO_SNMPGET=$withval
fi
@@ -74,7 +83,73 @@ $NetBSD: patch-ab,v 1.7 2011/04/08 22:56:12 morr Exp $
then
cat >>confdefs.h <<_ACEOF
-@@ -20882,7 +20882,7 @@ if test -n "$PATH_TO_APTGET" ; then
+@@ -20200,6 +20200,10 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++#if defined(__sun) && !defined(_LP64) && _FILE_OFFSET_BITS == 64
++#undef _FILE_OFFSET_BITS
++#endif
++
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+@@ -20258,6 +20262,10 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++#if defined(__sun) && !defined(_LP64) && _FILE_OFFSET_BITS == 64
++#undef _FILE_OFFSET_BITS
++#endif
++
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+@@ -20333,6 +20341,10 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++#if defined(__sun) && !defined(_LP64) && _FILE_OFFSET_BITS == 64
++#undef _FILE_OFFSET_BITS
++#endif
++
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
+@@ -20400,6 +20412,10 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++#if defined(__sun) && !defined(_LP64) && _FILE_OFFSET_BITS == 64
++#undef _FILE_OFFSET_BITS
++#endif
++
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
+@@ -20468,6 +20484,10 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++#if defined(__sun) && !defined(_LP64) && _FILE_OFFSET_BITS == 64
++#undef _FILE_OFFSET_BITS
++#endif
++
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+@@ -20514,6 +20534,10 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
++#if defined(__sun) && !defined(_LP64) && _FILE_OFFSET_BITS == 64
++#undef _FILE_OFFSET_BITS
++#endif
++
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/param.h>
+@@ -20882,7 +20906,7 @@ if test -n "$PATH_TO_APTGET" ; then
fi
diff --git a/net/nagios-plugins/patches/patch-plugins__check_swap.c b/net/nagios-plugins/patches/patch-plugins__check_swap.c
new file mode 100644
index 00000000000..c6fbdcfb29d
--- /dev/null
+++ b/net/nagios-plugins/patches/patch-plugins__check_swap.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-plugins__check_swap.c,v 1.1 2012/07/25 12:01:55 fhajny Exp $
+
+Disable large file support when building 32bit on SunOS.
+--- plugins/check_swap.c.orig 2010-07-27 20:47:16.000000000 +0000
++++ plugins/check_swap.c
+@@ -35,6 +35,10 @@ const char *email = "nagiosplug-devel@li
+ #include "popen.h"
+ #include "utils.h"
+
++#if defined(__sun) && !defined(_LP64) && _FILE_OFFSET_BITS == 64
++#undef _FILE_OFFSET_BITS
++#endif
++
+ #ifdef HAVE_DECL_SWAPCTL
+ # ifdef HAVE_SYS_PARAM_H
+ # include <sys/param.h>