collectd: Enable parallel build
[openwrt/svn-archive/archive.git] / utils / collectd / Makefile
index 0a2200e39206c90c0ac87728208d096f41158f68..da25abcb6114d921dd2e6a6a2cfbca685d92ab08 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
 PKG_VERSION:=4.9.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://collectd.org/files/
@@ -17,6 +17,7 @@ PKG_MD5SUM:=5753496651c8c84afaea1fe290876bfc
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 COLLECTD_PLUGINS_DISABLED:= \
        apple_sensors \
@@ -112,7 +113,7 @@ COLLECTD_PLUGINS_SELECTED:= \
        write_http \
 
 PKG_CONFIG_DEPENDS:= \
-       $(patsubst %,CONFIG_PACKAGE_collectd-mod-%,$(COLLECTD_PLUGINS_SELECTED)) \
+       $(patsubst %,CONFIG_PACKAGE_collectd-mod-%,$(subst _,-,$(COLLECTD_PLUGINS_SELECTED))) \
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/kernel.mk
@@ -135,13 +136,16 @@ define Package/collectd/description
  and provides mechanismns to store the values in a variety of ways.
 endef
 
+ifneq ($(CONFIG_avr32),)
+  TARGET_CFLAGS += -fsigned-char
+endif
+
 # common configure args
 CONFIGURE_ARGS+= \
        --disable-debug \
        --enable-daemon \
        --enable-getifaddrs \
        --with-nan-emulation \
-       --with-fp-layout=nothing
 
 CONFIGURE_VARS+= \
        CFLAGS="$$$$CFLAGS $(FPIC)" \
@@ -150,7 +154,7 @@ CONFIGURE_VARS+= \
 
 CONFIGURE_PLUGIN= \
        $(foreach m, $(1), \
-               $(if $(CONFIG_PACKAGE_collectd-mod-$(m)),--enable-$(m),--disable-$(m)) \
+               $(if $(CONFIG_PACKAGE_collectd-mod-$(subst _,-,$(m))),--enable-$(m),--disable-$(m)) \
        )
 
 CONFIGURE_ARGS+= \
@@ -163,6 +167,20 @@ ifneq ($(CONFIG_PACKAGE_collectd-mod-ascent),)
        CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2"
 endif
 
+ifneq ($(CONFIG_BIG_ENDIAN),)
+  CONFIGURE_ARGS+= --with-fp-layout=endianflip
+else
+  CONFIGURE_ARGS+= --with-fp-layout=nothing
+endif
+
+ifneq ($(CONFIG_PACKAGE_collectd-mod-postgresql),)
+  CONFIGURE_ARGS+= --with-libpq="$(STAGING_DIR)/usr/"
+endif
+
+ifneq ($(CONFIG_PACKAGE_collectd-mod-mysql),)
+  CONFIGURE_ARGS+= --with-libmysql="$(STAGING_DIR)/usr/"
+endif
+
 # exception: mod-netlink needs libnetlink from iproute
 ifneq ($(CONFIG_PACKAGE_collectd-mod-netlink),)
   CONFIGURE_ARGS+= --with-libnetlink="$(STAGING_DIR)/usr"
@@ -268,7 +286,7 @@ $(eval $(call BuildPlugin,syslog,syslog output,syslog,))
 $(eval $(call BuildPlugin,tail,tail input,tail,))
 $(eval $(call BuildPlugin,table,table-like structured file input,table,))
 $(eval $(call BuildPlugin,teamspeak2,TeamSpeak2 input,teamspeak2,))
-$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,))
+$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,@((!TARGET_avr32)||BROKEN))) # fails on avr32 because of warnings treated as errors
 $(eval $(call BuildPlugin,tcpconns,TCP connection tracking input,tcpconns,))
 $(eval $(call BuildPlugin,thermal,system temperatures input,thermal,))
 $(eval $(call BuildPlugin,unixsock,unix socket output,unixsock,))