config BR2_PACKAGE_RNG_TOOLS
bool "rng-tools"
select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC
+ # For rdrand ligcrypt is required and it's not obvious to users
+ select BR2_PACKAGE_LIBGCRYPT if BR2_i386 || BR2_x86_64
help
Daemon to use hardware random number generators.
--- /dev/null
+# From http://sourceforge.net/projects/gkernel/files/rng-tools/5/
+md5 6726cdc6fae1f5122463f24ae980dd68 rng-tools-5.tar.gz
+sha1 3092768ac45315a5dcc0170d05566d1d00dbad96 rng-tools-5.tar.gz
#
################################################################################
-RNG_TOOLS_VERSION = 4
+RNG_TOOLS_VERSION = 5
RNG_TOOLS_SITE = http://downloads.sourceforge.net/project/gkernel/rng-tools/$(RNG_TOOLS_VERSION)
-ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
-RNG_TOOLS_CONF_ENV = LIBS="-largp"
-RNG_TOOLS_DEPENDENCIES = argp-standalone
-endif
RNG_TOOLS_LICENSE = GPLv2
RNG_TOOLS_LICENSE_FILES = COPYING
+# Work around for uClibc's lack of argp_*() functions
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+RNG_TOOLS_CONF_ENV += LIBS="-largp"
+RNG_TOOLS_DEPENDENCIES += argp-standalone
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
+RNG_TOOLS_DEPENDENCIES += libgcrypt
+else
+RNG_TOOLS_CONF_OPTS += --without-libgcrypt
+endif
+
$(eval $(autotools-package))