Skip to contentSkip to conversation

ruby: add psych/libyaml support

PATCH New Gustavo Zacarias 2 participants 4 messages May 20, 2014 – Jun 9, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ruby: add psych/libyaml support

---
 package/ruby/ruby.mk | 3 +++
 1 file changed, 3 insertions(+)
package/ruby/ruby.mk +3 -0
index 0ea352d..1185323 100644
@@ -29,6 +29,9 @@ RUBY_CONF_ENV = CFLAGS="$(RUBY_CFLAGS)"
 ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
 	RUBY_DEPENDENCIES += berkeleydb
 endif
+ifeq ($(BR2_PACKAGE_LIBYAML),y)
+	RUBY_DEPENDENCIES += libyaml
+endif
 ifeq ($(BR2_PACKAGE_NCURSES),y)
 	RUBY_DEPENDENCIES += ncurses
 endif
Signature · 1 line
1.8.5.5
#1 lore raw

PATCH 2/3 ruby: add gdbm support

---
 package/ruby/ruby.mk | 3 +++
 1 file changed, 3 insertions(+)
package/ruby/ruby.mk +3 -0
index 1185323..86d0089 100644
@@ -29,6 +29,9 @@ RUBY_CONF_ENV = CFLAGS="$(RUBY_CFLAGS)"
 ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
 	RUBY_DEPENDENCIES += berkeleydb
 endif
+ifeq ($(BR2_PACKAGE_GDBM),y)
+	RUBY_DEPENDENCIES += gdbm
+endif
 ifeq ($(BR2_PACKAGE_LIBYAML),y)
 	RUBY_DEPENDENCIES += libyaml
 endif
Signature · 1 line
1.8.5.5
#2 lore raw

PATCH 3/3 ruby: remove rubygems

In reply to Gustavo Zacarias

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.

---
 package/ruby/ruby.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
package/ruby/ruby.mk +13 -0
index 86d0089..7359cf1 100644
@@ -6,6 +6,8 @@
 
 RUBY_VERSION_MAJOR = 1.9
 RUBY_VERSION = $(RUBY_VERSION_MAJOR).3-p545
+# 1.9.1 directory used for exts
+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
@@ -48,5 +50,16 @@ ifeq ($(BR2_PACKAGE_ZLIB),y)
 	RUBY_DEPENDENCIES += zlib
 endif
 
+# Remove rubygems & friends
+# Needs exts 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))
Signature · 1 line
1.8.5.5
#3 lore raw

PATCH 1/3 ruby: add psych/libyaml support

In reply to Gustavo Zacarias

Dear Gustavo Zacarias,

Quoted 4 lines · Gustavo Zacarias
---
 package/ruby/ruby.mk | 3 +++
 1 file changed, 3 insertions(+)

All three patches applied, with a few minor fixes in the comments of PATCH 3/3.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com