RUBY_VERSION_MAJOR = 1.9
RUBY_VERSION = $(RUBY_VERSION_MAJOR).3-p545
+# 1.9.1 directory used for extensions
+RUBY_VERSION_EXT = 1.9.1
RUBY_SITE = ftp://ftp.ruby-lang.org/pub/ruby/$(RUBY_VERSION_MAJOR)
RUBY_DEPENDENCIES = host-pkgconf host-ruby
HOST_RUBY_DEPENDENCIES = host-pkgconf
RUBY_DEPENDENCIES += zlib
endif
+# Remove rubygems and friends, as they need extensions that aren't
+# built and a target compiler.
+RUBY_EXTENSIONS_REMOVE = rake* rdoc* rubygems*
+define RUBY_REMOVE_RUBYGEMS
+ rm -f $(addprefix $(TARGET_DIR)/usr/bin/, gem rdoc ri rake)
+ rm -rf $(TARGET_DIR)/usr/lib/ruby/gems
+ rm -rf $(addprefix $(TARGET_DIR)/usr/lib/ruby/$(RUBY_VERSION_EXT)/, \
+ $(RUBY_EXTENSIONS_REMOVE))
+endef
+RUBY_POST_INSTALL_TARGET_HOOKS += RUBY_REMOVE_RUBYGEMS
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))