Skip to content

Commit feacc29

Browse files
gustavoztpetazzoni
authored andcommitted
ruby: remove rubygems
It's currently in a non-working state since it requires a couple of extensions that don't build at the moment (they try to execute tests in configure) and also requires a target compiler. So remove it to avoid false expectations and reclaim target space back of about 1.5 MiB. [Thomas: slightly reword comments.] Signed-off-by: Gustavo Zacarias <[email protected]> Signed-off-by: Thomas Petazzoni <[email protected]>
1 parent 687e185 commit feacc29

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

package/ruby/ruby.mk

+13
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
RUBY_VERSION_MAJOR = 1.9
88
RUBY_VERSION = $(RUBY_VERSION_MAJOR).3-p545
9+
# 1.9.1 directory used for extensions
10+
RUBY_VERSION_EXT = 1.9.1
911
RUBY_SITE = ftp://ftp.ruby-lang.org/pub/ruby/$(RUBY_VERSION_MAJOR)
1012
RUBY_DEPENDENCIES = host-pkgconf host-ruby
1113
HOST_RUBY_DEPENDENCIES = host-pkgconf
@@ -49,5 +51,16 @@ ifeq ($(BR2_PACKAGE_ZLIB),y)
4951
RUBY_DEPENDENCIES += zlib
5052
endif
5153

54+
# Remove rubygems and friends, as they need extensions that aren't
55+
# built and a target compiler.
56+
RUBY_EXTENSIONS_REMOVE = rake* rdoc* rubygems*
57+
define RUBY_REMOVE_RUBYGEMS
58+
rm -f $(addprefix $(TARGET_DIR)/usr/bin/, gem rdoc ri rake)
59+
rm -rf $(TARGET_DIR)/usr/lib/ruby/gems
60+
rm -rf $(addprefix $(TARGET_DIR)/usr/lib/ruby/$(RUBY_VERSION_EXT)/, \
61+
$(RUBY_EXTENSIONS_REMOVE))
62+
endef
63+
RUBY_POST_INSTALL_TARGET_HOOKS += RUBY_REMOVE_RUBYGEMS
64+
5265
$(eval $(autotools-package))
5366
$(eval $(host-autotools-package))

0 commit comments

Comments
 (0)