ruby: add support for gmp as an optional dependency
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 6 Sep 2014 13:59:27 +0000 (15:59 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 6 Sep 2014 20:12:37 +0000 (22:12 +0200)
Ruby can now use gmp optionally, so make sure that if the gmp package
for the target is enabled, it gets built before the ruby package, and
the appropriate configure options are passed to Ruby.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/ruby/ruby.mk

index 384cc88d55dc1fce505abeca220e05bf6e645cc2..8c094b5ccfb0a1c687f7a82e01d574c5c1c06cd6 100644 (file)
@@ -54,6 +54,12 @@ endif
 ifeq ($(BR2_PACKAGE_ZLIB),y)
        RUBY_DEPENDENCIES += zlib
 endif
+ifeq ($(BR2_PACKAGE_GMP),y)
+       RUBY_DEPENDENCIES += gmp
+       RUBY_CONF_OPT += --with-gmp
+else
+       RUBY_CONF_OPT += --without-gmp
+endif
 
 # Remove rubygems and friends, as they need extensions that aren't
 # built and a target compiler.