source "package/dstat/Config.in"
source "package/dmalloc/Config.in"
source "package/dropwatch/Config.in"
+source "package/duma/Config.in"
source "package/gdb/Config.in"
source "package/iozone/Config.in"
source "package/kexec/Config.in"
--- /dev/null
+config BR2_PACKAGE_DUMA
+ bool "duma"
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ help
+ D.U.M.A. - Detect Unintended Memory Access. A fork of the
+ Electric Fence library. Detects buffer overflow and
+ underflow, and also memory leaks.
+
+ http://duma.sourceforge.net
+
+if BR2_PACKAGE_DUMA
+
+config BR2_PACKAGE_DUMA_NO_LEAKDETECTION
+ bool "disable memory leak detection"
+
+endif # BR2_PACKAGE_DUMA
+
+comment "duma requires C++ and thread support in toolchain"
+ depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
--- /dev/null
+Allow cross compilation. Adapted from crosstool-ng.
+
+Signed-off-by: Baruch Siach <baruch at tkos.co.il>
+
+Index: b/GNUmakefile
+===================================================================
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -93,10 +93,6 @@
+ # also define 'WIN32'
+
+ # some defaults:
+-CC=gcc
+-CXX=g++
+-AR=ar
+-RANLIB=ranlib
+ INSTALL=install
+ RM=rm
+ RMFORCE=rm -f
+@@ -471,7 +467,7 @@
+
+ createconf$(EXEPOSTFIX): createconf.o
+ - $(RMFORCE) createconf$(EXEPOSTFIX)
+- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
++ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
+
+ tstheap$(EXEPOSTFIX): libduma.a tstheap.o
+ - $(RMFORCE) tstheap$(EXEPOSTFIX)
+@@ -532,7 +528,7 @@
+ # define rules how to build objects for createconf
+ #
+ createconf.o:
+- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
++ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
+
+
+ #
--- /dev/null
+################################################################################
+#
+# duma
+#
+################################################################################
+
+DUMA_VERSION = 2_5_15
+DUMA_SOURCE = duma_$(DUMA_VERSION).tar.gz
+DUMA_SITE = http://downloads.sourceforge.net/project/duma/duma/2.5.15
+DUMA_LICENSE = GPLv2+ LGPLv2.1+
+DUMA_LICENSE_FILES = COPYING-GPL COPYING-LGPL
+
+DUMA_INSTALL_STAGING = YES
+
+DUMA_OPTIONS = \
+ $(if $(BR2_PACKAGE_DUMA_NO_LEAKDETECTION),-DDUMA_LIB_NO_LEAKDETECTION)
+
+# The dependency of some source files in duma_config.h, which is generated at
+# build time, is not specified in the Makefile. Force non-parallel build.
+define DUMA_BUILD_CMDS
+ $(MAKE1) $(TARGET_CONFIGURE_OPTS) \
+ DUMA_OPTIONS="$(DUMA_OPTIONS)" \
+ $(DUMA_CPP) -C $(@D)
+endef
+
+define DUMA_INSTALL_STAGING_CMDS
+ $(MAKE) prefix=$(STAGING_DIR)/usr install -C $(@D)
+endef
+
+define DUMA_INSTALL_TARGET_CMDS
+ $(MAKE) prefix=$(TARGET_DIR)/usr install -C $(@D)
+endef
+
+$(eval $(generic-package))