diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-08-15 18:29:21 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-08-15 18:29:21 +0000 |
commit | eb99fee68180b5c3ac309e1889c0423734cac40a (patch) | |
tree | ee0d66203497142d383570406a258d7a10de5ad9 /net-analyzer | |
parent | drop openxcom since it's never been keyworded, incomplete upstream, and not a... (diff) | |
download | gentoo-2-eb99fee68180b5c3ac309e1889c0423734cac40a.tar.gz gentoo-2-eb99fee68180b5c3ac309e1889c0423734cac40a.tar.bz2 gentoo-2-eb99fee68180b5c3ac309e1889c0423734cac40a.zip |
Fix building in parallel (tested on 32-way system).
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer')
3 files changed, 207 insertions, 7 deletions
diff --git a/net-analyzer/nagios-plugins/ChangeLog b/net-analyzer/nagios-plugins/ChangeLog index 068f601a781f..3f7f8933cece 100644 --- a/net-analyzer/nagios-plugins/ChangeLog +++ b/net-analyzer/nagios-plugins/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-analyzer/nagios-plugins # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins/ChangeLog,v 1.146 2012/08/15 16:38:19 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins/ChangeLog,v 1.147 2012/08/15 18:29:21 flameeyes Exp $ + + 15 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> + +files/nagios-plugins-1.4.16-parallelmake.patch, nagios-plugins-1.4.16.ebuild: + Fix building in parallel (tested on 32-way system). 15 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> nagios-plugins-1.4.16.ebuild: diff --git a/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.16-parallelmake.patch b/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.16-parallelmake.patch new file mode 100644 index 000000000000..da87556fc7fa --- /dev/null +++ b/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.16-parallelmake.patch @@ -0,0 +1,200 @@ +Index: nagios-plugins-1.4.16/plugins/Makefile.am +=================================================================== +--- nagios-plugins-1.4.16.orig/plugins/Makefile.am ++++ nagios-plugins-1.4.16/plugins/Makefile.am +@@ -39,15 +39,19 @@ EXTRA_PROGRAMS = check_mysql check_radiu + check_nagios check_by_ssh check_dns check_nt check_ide_smart \ + check_procs check_mysql_query check_apt + +-EXTRA_DIST = t tests utils.c netutils.c sslutils.c popen.c utils.h netutils.h \ +- popen.h common.h runcmd.c runcmd.h ++EXTRA_DIST = t tests + + PLUGINHDRS = common.h + +-BASEOBJS = utils.o ../lib/libnagiosplug.a ../gl/libgnu.a +-NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS) +-SSLOBJS = sslutils.o ++noinst_LIBRARIES = libnpcommon.a ++ ++libnpcommon_a_SOURCES = utils.c netutils.c sslutils.c runcmd.c \ ++ popen.c utils.h netutils.h popen.h common.h runcmd.c runcmd.h ++ ++BASEOBJS = libnpcommon.a ../lib/libnagiosplug.a ../gl/libgnu.a ++NETOBJS = $(BASEOBJS) $(EXTRA_NETOBLS) + NETLIBS = $(NETOBJS) $(SOCKETLIBS) ++SSLOBJS = $(BASEOBJS) $(NETLIBS) $(SSLLIBS) + + TESTS_ENVIRONMENT = perl -I $(top_builddir) -I $(top_srcdir) + +@@ -62,18 +66,18 @@ test-debug: + ############################################################################## + # the actual targets + +-check_apt_LDADD = $(BASEOBJS) runcmd.o ++check_apt_LDADD = $(BASEOBJS) + check_cluster_LDADD = $(BASEOBJS) +-check_dig_LDADD = $(NETLIBS) runcmd.o +-check_disk_LDADD = $(BASEOBJS) popen.o +-check_dns_LDADD = $(NETLIBS) runcmd.o ++check_dig_LDADD = $(NETLIBS) ++check_disk_LDADD = $(BASEOBJS) ++check_dns_LDADD = $(NETLIBS) + check_dummy_LDADD = $(BASEOBJS) +-check_fping_LDADD = $(NETLIBS) popen.o +-check_game_LDADD = $(BASEOBJS) runcmd.o +-check_http_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS) +-check_hpjd_LDADD = $(NETLIBS) popen.o ++check_fping_LDADD = $(NETLIBS) ++check_game_LDADD = $(BASEOBJS) ++check_http_LDADD = $(SSLOBJS) ++check_hpjd_LDADD = $(NETLIBS) + check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) +-check_load_LDADD = $(BASEOBJS) popen.o ++check_load_LDADD = $(BASEOBJS) + check_mrtg_LDADD = $(BASEOBJS) + check_mrtgtraf_LDADD = $(BASEOBJS) + check_mysql_CFLAGS = $(MYSQLCFLAGS) -DNP_VERSION='"$(NP_VERSION)"' +@@ -82,22 +86,22 @@ check_mysql_LDADD = $(NETLIBS) $(MYSQLLI + check_mysql_query_CFLAGS = $(MYSQLCFLAGS) -DNP_VERSION='"$(NP_VERSION)"' + check_mysql_query_CPPFLAGS = $(MYSQLINCLUDE) + check_mysql_query_LDADD = $(NETLIBS) $(MYSQLLIBS) +-check_nagios_LDADD = $(BASEOBJS) runcmd.o ++check_nagios_LDADD = $(BASEOBJS) + check_nt_LDADD = $(NETLIBS) + check_ntp_LDADD = $(NETLIBS) $(MATHLIBS) + check_ntp_peer_LDADD = $(NETLIBS) $(MATHLIBS) + check_nwstat_LDADD = $(NETLIBS) + check_overcr_LDADD = $(NETLIBS) + check_pgsql_LDADD = $(NETLIBS) $(PGLIBS) +-check_ping_LDADD = $(NETLIBS) popen.o ++check_ping_LDADD = $(NETLIBS) + check_procs_LDADD = $(BASEOBJS) + check_radius_LDADD = $(NETLIBS) $(RADIUSLIBS) + check_real_LDADD = $(NETLIBS) + check_snmp_LDADD = $(BASEOBJS) +-check_smtp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS) ++check_smtp_LDADD = $(SSLOBJS) + check_ssh_LDADD = $(NETLIBS) +-check_swap_LDADD = $(MATHLIBS) $(BASEOBJS) popen.o +-check_tcp_LDADD = $(SSLOBJS) $(NETLIBS) $(SSLLIBS) ++check_swap_LDADD = $(MATHLIBS) $(BASEOBJS) ++check_tcp_LDADD = $(SSLOBJS) + check_time_LDADD = $(NETLIBS) + check_ntp_time_LDADD = $(NETLIBS) $(MATHLIBS) + check_ups_LDADD = $(NETLIBS) +@@ -105,61 +109,11 @@ check_users_LDADD = $(BASEOBJS) + check_by_ssh_LDADD = $(NETLIBS) + check_ide_smart_LDADD = $(BASEOBJS) + negate_LDADD = $(BASEOBJS) +-urlize_LDADD = $(BASEOBJS) popen.o +- +-check_apt_DEPENDENCIES = check_apt.c $(BASEOBJS) runcmd.o $(DEPLIBS) +-check_cluster_DEPENDENCIES = check_cluster.c $(BASEOBJS) $(DEPLIBS) +-check_dig_DEPENDENCIES = check_dig.c $(NETOBJS) runcmd.o $(DEPLIBS) +-check_disk_DEPENDENCIES = check_disk.c $(BASEOBJS) popen.o $(DEPLIBS) +-check_dns_DEPENDENCIES = check_dns.c $(NETOBJS) runcmd.o $(DEPLIBS) +-check_dummy_DEPENDENCIES = check_dummy.c $(DEPLIBS) +-check_fping_DEPENDENCIES = check_fping.c $(NETOBJS) popen.o $(DEPLIBS) +-check_game_DEPENDENCIES = check_game.c $(DEPLIBS) runcmd.o +-check_http_DEPENDENCIES = check_http.c $(SSLOBJS) $(NETOBJS) $(DEPLIBS) +-check_hpjd_DEPENDENCIES = check_hpjd.c $(NETOBJS) popen.o $(DEPLIBS) +-check_ide_smart_DEPENDENCIES = check_ide_smart.c $(BASEOBJS) $(DEPLIBS) +-check_ldap_DEPENDENCIES = check_ldap.c $(NETOBJS) $(DEPLIBS) +-check_load_DEPENDENCIES = check_load.c $(BASEOBJS) popen.o $(DEPLIBS) +-check_mrtg_DEPENDENCIES = check_mrtg.c $(DEPLIBS) +-check_mrtgtraf_DEPENDENCIES = check_mrtgtraf.c $(DEPLIBS) +-check_mysql_DEPENDENCIES = check_mysql.c $(NETOBJS) $(DEPLIBS) +-check_mysql_query_DEPENDENCIES = check_mysql_query.c $(NETOBJS) $(DEPLIBS) +-check_nagios_DEPENDENCIES = check_nagios.c $(BASEOBJS) runcmd.o $(DEPLIBS) +-check_nt_DEPENDENCIES = check_nt.c $(NETOBJS) $(DEPLIBS) +-check_ntp_DEPENDENCIES = check_ntp.c $(NETOBJS) $(DEPLIBS) +-check_ntp_peer_DEPENDENCIES = check_ntp_peer.c $(NETOBJS) $(DEPLIBS) +-check_nwstat_DEPENDENCIES = check_nwstat.c $(NETOBJS) $(DEPLIBS) +-check_overcr_DEPENDENCIES = check_overcr.c $(NETOBJS) $(DEPLIBS) +-check_pgsql_DEPENDENCIES = check_pgsql.c $(NETOBJS) $(DEPLIBS) +-check_ping_DEPENDENCIES = check_ping.c $(NETOBJS) popen.o $(DEPLIBS) +-check_procs_DEPENDENCIES = check_procs.c $(BASEOBJS) popen.o $(DEPLIBS) +-check_radius_DEPENDENCIES = check_radius.c $(NETOBJS) $(DEPLIBS) +-check_real_DEPENDENCIES = check_real.c $(NETOBJS) $(DEPLIBS) +-check_snmp_DEPENDENCIES = check_snmp.c $(BASEOBJS) $(DEPLIBS) +-check_smtp_DEPENDENCIES = check_smtp.c $(SSLOBJS) $(NETOBJS) $(DEPLIBS) +-check_ssh_DEPENDENCIES = check_ssh.c $(NETOBJS) $(DEPLIBS) +-check_swap_DEPENDENCIES = check_swap.c $(BASEOBJS) popen.o $(DEPLIBS) +-check_tcp_DEPENDENCIES = check_tcp.c $(SSLOBJS) $(NETOBJS) $(DEPLIBS) +-check_time_DEPENDENCIES = check_time.c $(NETOBJS) $(DEPLIBS) +-check_ntp_time_DEPENDENCIES = check_ntp_time.c $(NETOBJS) $(DEPLIBS) +-check_ups_DEPENDENCIES = check_ups.c $(NETOBJS) $(DEPLIBS) +-check_users_DEPENDENCIES = check_users.c $(BASEOBJS) popen.o $(DEPLIBS) +-check_by_ssh_DEPENDENCIES = check_by_ssh.c $(NETOBJS) $(DEPLIBS) +-negate_DEPENDENCIES = negate.c $(BASEOBJS) $(DEPLIBS) +-urlize_DEPENDENCIES = urlize.c $(BASEOBJS) popen.o $(DEPLIBS) ++urlize_LDADD = $(BASEOBJS) + + ############################################################################## + # secondary dependencies + +-popen.o: popen.c popen.h $(PLUGINHDRS) +- +-runcmd.o: runcmd.c runcmd.h $(PLUGINHDRS) +- +-utils.o: utils.c utils.h $(PLUGINHDRS) +- +-netutils.o: netutils.c netutils.h $(PLUGINHDRS) +-sslutils.o: sslutils.c netutils.h $(PLUGINHDRS) +- + all-local: $(check_tcp_programs) + + $(check_tcp_programs): check_tcp +Index: nagios-plugins-1.4.16/plugins/check_dig.c +=================================================================== +--- nagios-plugins-1.4.16.orig/plugins/check_dig.c ++++ nagios-plugins-1.4.16/plugins/check_dig.c +@@ -77,7 +77,7 @@ main (int argc, char **argv) + textdomain (PACKAGE); + + /* Set signal handling and alarm */ +- if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) ++ if (signal (SIGALRM, runcmd_timeout_alarm_handler) == SIG_ERR) + usage_va(_("Cannot catch SIGALRM")); + + /* Parse extra opts if any */ +Index: nagios-plugins-1.4.16/plugins/check_dns.c +=================================================================== +--- nagios-plugins-1.4.16.orig/plugins/check_dns.c ++++ nagios-plugins-1.4.16/plugins/check_dns.c +@@ -91,7 +91,7 @@ main (int argc, char **argv) + textdomain (PACKAGE); + + /* Set signal handling and alarm */ +- if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) { ++ if (signal (SIGALRM, runcmd_timeout_alarm_handler) == SIG_ERR) { + usage_va(_("Cannot catch SIGALRM")); + } + +Index: nagios-plugins-1.4.16/plugins/runcmd.c +=================================================================== +--- nagios-plugins-1.4.16.orig/plugins/runcmd.c ++++ nagios-plugins-1.4.16/plugins/runcmd.c +@@ -256,7 +256,7 @@ np_runcmd_close(int fd) + + + void +-popen_timeout_alarm_handler (int signo) ++runcmd_timeout_alarm_handler (int signo) + { + size_t i; + +Index: nagios-plugins-1.4.16/plugins/runcmd.h +=================================================================== +--- nagios-plugins-1.4.16.orig/plugins/runcmd.h ++++ nagios-plugins-1.4.16/plugins/runcmd.h +@@ -39,7 +39,7 @@ typedef struct output output; + + /** prototypes **/ + int np_runcmd(const char *, output *, output *, int); +-void popen_timeout_alarm_handler(int) ++void runcmd_timeout_alarm_handler(int) + __attribute__((__noreturn__)); + + /* only multi-threaded plugins need to bother with this */ diff --git a/net-analyzer/nagios-plugins/nagios-plugins-1.4.16.ebuild b/net-analyzer/nagios-plugins/nagios-plugins-1.4.16.ebuild index 6728b193868d..ef011d9a3e90 100644 --- a/net-analyzer/nagios-plugins/nagios-plugins-1.4.16.ebuild +++ b/net-analyzer/nagios-plugins/nagios-plugins-1.4.16.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins/nagios-plugins-1.4.16.ebuild,v 1.2 2012/08/15 16:38:19 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins/nagios-plugins-1.4.16.ebuild,v 1.3 2012/08/15 18:29:21 flameeyes Exp $ EAPI=4 @@ -56,6 +56,7 @@ src_prepare() { epatch "${FILESDIR}"/${PN}-1.4.12-pgsqlconfigure.patch epatch "${FILESDIR}"/${PN}-1.4.15-vserver.patch epatch "${FILESDIR}"/${PN}-1.4.15-openldap.patch + epatch "${FILESDIR}"/${P}-parallelmake.patch eautoreconf } @@ -86,11 +87,6 @@ src_configure() { sed -i -e 's:/bin/ps -axwo:/bin/ps axwo:g' config.h || die "sed failed" } -src_compile() { - # fails parallel build, fix is non-trivial - emake -j1 -} - src_install() { mv "${S}"/contrib/check_compaq_insight.pl "${S}"/contrib/check_compaq_insight.pl.msg chmod +x "${S}"/contrib/*.pl |