Skip to content

Commit

Permalink
ruby: update to 2.2.0
Browse files Browse the repository at this point in the history
For ruby changes since 2.1.x:

 https://github.com/ruby/ruby/blob/v2_2_0/NEWS

Relevant changes for OpenWRT:

* all patches for ruby-core where merged upstream and
  they are not needed anymore (only rdoc patch remains)
 - PR for the rdoc github project was added to the patch header
   (https://github.com/rdoc/rdoc/pull/340)
* new package ruby-powerassert for introduced new bundled gem power_assert
* new package ruby-unicodenormalize for Unicode normalization files
* removed ruby-dl as DL was removed after being deprecated
* ruby-{minitest,testunit} where removed from ruby library. Now they
  are bundled gems
* test and sample files where removed from gems in order to save resources
  and reduce pkgs dependencies
* script ruby_find_pkgsdeps was updated to match upstream changes

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
  • Loading branch information
luizluca committed Jan 16, 2015
1 parent a9981d0 commit 2ffaee3
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 201 deletions.
130 changes: 82 additions & 48 deletions lang/ruby/Makefile
Expand Up @@ -10,14 +10,14 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=ruby
PKG_VERSION:=2.1.5
PKG_VERSION:=2.2.0
PKG_RELEASE:=1

PKG_LIBVER:=2.1
PKG_LIBVER:=2.2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
PKG_MD5SUM:=a7c3e5fec47eff23091b566e9e1dac1b
PKG_MD5SUM:=d03cd4690fec1fff81d096d1c1255fde
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
Expand Down Expand Up @@ -70,12 +70,13 @@ define Package/ruby-stdlib
$(call Package/ruby/Default)
TITLE:=Ruby standard libraries (metadata for all stdlib subsets)
DEPENDS:=ruby +ruby-misc +ruby-bigdecimal +ruby-cgi +ruby-csv +ruby-datetime +ruby-dbm +ruby-debuglib\
+ruby-digest +ruby-dl +ruby-drb +ruby-enc +ruby-enc-extra +ruby-erb +ruby-gdbm +ruby-gems \
+ruby-digest +ruby-drb +ruby-enc +ruby-enc-extra +ruby-erb +ruby-gdbm +ruby-gems \
+ruby-json +ruby-io-console +ruby-irb +ruby-fiddle +ruby-filelib +ruby-logger +ruby-math \
+ruby-minitest +ruby-mkmf +ruby-multithread +ruby-nkf +ruby-net +ruby-openssl +ruby-optparse \
+ruby-patterns +ruby-prettyprint +ruby-pstore +ruby-psych +ruby-racc +ruby-rake +ruby-rbconfig \
+ruby-rdoc +ruby-readline +ruby-rexml +ruby-rinda +ruby-ripper +ruby-rss +ruby-sdbm +ruby-shell \
+ruby-socket +ruby-testunit +ruby-uri +ruby-webrick +ruby-xmlrpc +ruby-yaml +ruby-zlib
+ruby-patterns +ruby-powerassert +ruby-prettyprint +ruby-pstore +ruby-psych +ruby-racc +ruby-rake \
+ruby-rbconfig +ruby-rdoc +ruby-readline +ruby-rexml +ruby-rinda +ruby-ripper +ruby-rss +ruby-sdbm \
+ruby-shell +ruby-socket +ruby-testunit +ruby-unicodenormalize +ruby-uri +ruby-webrick +ruby-xmlrpc \
+ruby-yaml +ruby-zlib
endef

define Package/ruby-stdlib/description
Expand Down Expand Up @@ -182,17 +183,6 @@ define Package/ruby-digest/config

endef

define Package/ruby-dl
$(call Package/ruby/Default)
TITLE+= (dynamic linker support)
DEPENDS:=ruby +ruby-fiddle +ruby-multithread
endef

define Package/ruby-dl/description
Provides dl* files. This is deprecated, use fiddle.

endef

define Package/ruby-drb
$(call Package/ruby/Default)
TITLE:=Ruby distributed object system
Expand Down Expand Up @@ -306,7 +296,7 @@ endef
define Package/ruby-filelib
$(call Package/ruby/Default)
TITLE+= File utils library
DEPENDS:=ruby +ruby-multithread +ruby-enc
DEPENDS:=ruby +ruby-enc +ruby-misc
endef

define Package/ruby-filelib/description
Expand Down Expand Up @@ -335,7 +325,7 @@ endef
define Package/ruby-gems
$(call Package/ruby/Default)
TITLE:=Ruby gems packet management
DEPENDS:=ruby +ruby-net +ruby-rdoc +ruby-zlib
DEPENDS:=ruby +ruby-net +ruby-rdoc
endef

define Package/ruby-gems/description
Expand Down Expand Up @@ -413,12 +403,12 @@ endef

define Package/ruby-minitest
$(call Package/ruby/Default)
TITLE+= minitest bundled with Ruby
DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-prettyprint +ruby-rbconfig
TITLE:=Gem minitest shipped with Ruby
DEPENDS:=ruby +ruby-gems
endef

define Package/ruby-minitest/description
Provides minitest* files
Provides minitest gem

endef

Expand Down Expand Up @@ -545,6 +535,19 @@ define Package/ruby-patterns/description

endef

define Package/ruby-powerassert
$(call Package/ruby/Default)
TITLE:=Gem power_assert shipped with Ruby
DEPENDS:=ruby +ruby-ripper
endef

define Package/ruby-powerassert/description
Power Assert gem for Ruby. Power Assert shows each value of variables
and method calls in the expression. It is useful for testing, providing
which value wasn't correct when the condition is not satisfied

endef

define Package/ruby-prettyprint
$(call Package/ruby/Default)
TITLE:=Ruby PrettyPrint librart
Expand Down Expand Up @@ -616,7 +619,7 @@ endef
define Package/ruby-rdoc
$(call Package/ruby/Default)
TITLE+= (documentation generator)
DEPENDS:=ruby +ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml
DEPENDS:=ruby +ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib
endef

define Package/ruby-rdoc/description
Expand Down Expand Up @@ -720,15 +723,26 @@ endef

define Package/ruby-testunit
$(call Package/ruby/Default)
TITLE:=Ruby Test Unit toolkit
DEPENDS:=ruby +ruby-minitest
TITLE:=Gem test-unit shipped with Ruby
DEPENDS:=ruby +ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml
endef

define Package/ruby-testunit/description
Provides test/unit* files

endef

define Package/ruby-unicodenormalize
$(call Package/ruby/Default)
TITLE:=Ruby String additions for Unicode normalization
DEPENDS:=ruby +ruby-enc +ruby-enc-extra
endef

define Package/ruby-unicodenormalize/description
Additions to class String for Unicode normalization

endef

define Package/ruby-uri
$(call Package/ruby/Default)
TITLE:=Ruby library to handle URI
Expand Down Expand Up @@ -822,6 +836,8 @@ define Package/ruby/install
$(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
$(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
sed -i -e "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
sed -i -e "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
endef
Expand Down Expand Up @@ -889,15 +905,6 @@ define Package/ruby-digest/install
) | ( cd $(1); $(TAR) -xf - )
endef

define Package/ruby-dl/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/dl.rb \
usr/lib/ruby/$(PKG_LIBVER)/dl \
usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \
usr/lib/ruby/$(PKG_LIBVER)/*/dl/ \
) | ( cd $(1); $(TAR) -xf - )
endef

define Package/ruby-drb/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/drb.rb \
Expand Down Expand Up @@ -963,6 +970,10 @@ define Package/ruby-gems/install
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
# Remove tests (avoids extra deps)
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
Expand Down Expand Up @@ -1012,19 +1023,19 @@ define Package/ruby-math/install
usr/lib/ruby/$(PKG_LIBVER)/prime.rb \
usr/lib/ruby/$(PKG_LIBVER)/mathn.rb \
usr/lib/ruby/$(PKG_LIBVER)/cmath.rb \
usr/lib/ruby/$(PKG_LIBVER)/complex.rb \
usr/lib/ruby/$(PKG_LIBVER)/rational.rb \
usr/lib/ruby/$(PKG_LIBVER)/*/mathn \
usr/lib/ruby/$(PKG_LIBVER)/matrix.rb \
usr/lib/ruby/$(PKG_LIBVER)/matrix \
) | ( cd $(1); $(TAR) -xf - )
endef

define Package/ruby-minitest/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/minitest/ \
usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/minitest-*.gemspec \
) | ( cd $(1); $(TAR) -xf - )
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
# Remove tests (avoids extra deps)
$(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
endef

define Package/ruby-misc/install
Expand Down Expand Up @@ -1103,6 +1114,7 @@ endef
define Package/ruby-optparse/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/optparse.rb \
usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb \
usr/lib/ruby/$(PKG_LIBVER)/optparse \
) | ( cd $(1); $(TAR) -xf - )
endef
Expand All @@ -1115,6 +1127,15 @@ define Package/ruby-patterns/install
) | ( cd $(1); $(TAR) -xf - )
endef

define Package/ruby-powerassert/install
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
# Remove tests (avoids extra deps)
$(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
endef

define Package/ruby-prettyprint/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/pp.rb \
Expand Down Expand Up @@ -1148,6 +1169,8 @@ define Package/ruby-rake/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
# Remove tests (avoids extra deps)
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake/runtest.rb
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
Expand All @@ -1169,6 +1192,10 @@ define Package/ruby-rdoc/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
# Remove tests (avoids extra deps)
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
Expand Down Expand Up @@ -1235,16 +1262,22 @@ define Package/ruby-socket/install
endef

define Package/ruby-testunit/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/testrb $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/test $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/test-unit-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
# Remove tests (avoids extra deps)
$(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
$(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
endef

define Package/ruby-unicodenormalize/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb \
usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize \
) | ( cd $(1); $(TAR) -xf - )
endef

define Package/ruby-uri/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/uri.rb \
Expand Down Expand Up @@ -1293,7 +1326,6 @@ $(eval $(call BuildPackage,ruby-datetime))
$(eval $(call BuildPackage,ruby-dbm))
$(eval $(call BuildPackage,ruby-debuglib))
$(eval $(call BuildPackage,ruby-digest))
$(eval $(call BuildPackage,ruby-dl))
$(eval $(call BuildPackage,ruby-drb))
$(eval $(call BuildPackage,ruby-enc))
$(eval $(call BuildPackage,ruby-enc-extra))
Expand All @@ -1316,6 +1348,7 @@ $(eval $(call BuildPackage,ruby-nkf))
$(eval $(call BuildPackage,ruby-openssl))
$(eval $(call BuildPackage,ruby-optparse))
$(eval $(call BuildPackage,ruby-patterns))
$(eval $(call BuildPackage,ruby-powerassert))
$(eval $(call BuildPackage,ruby-prettyprint))
$(eval $(call BuildPackage,ruby-pstore))
$(eval $(call BuildPackage,ruby-psych))
Expand All @@ -1332,6 +1365,7 @@ $(eval $(call BuildPackage,ruby-sdbm))
$(eval $(call BuildPackage,ruby-shell))
$(eval $(call BuildPackage,ruby-socket))
$(eval $(call BuildPackage,ruby-testunit))
$(eval $(call BuildPackage,ruby-unicodenormalize))
$(eval $(call BuildPackage,ruby-uri))
$(eval $(call BuildPackage,ruby-webrick))
$(eval $(call BuildPackage,ruby-xmlrpc))
Expand Down
4 changes: 4 additions & 0 deletions lang/ruby/patches/001-rdoc-remove_gems_dep.patch
@@ -1,3 +1,7 @@
References:

https://github.com/rdoc/rdoc/pull/340

--- ruby-2.1.2.orig/lib/rdoc.rb 2014-09-02 17:14:28.719224215 -0300
+++ ruby-2.1.2/lib/rdoc.rb 2014-09-02 17:14:28.762223911 -0300
@@ -109,6 +109,8 @@
Expand Down
13 changes: 0 additions & 13 deletions lang/ruby/patches/002-minitest-remove_gems_dep.patch

This file was deleted.

12 changes: 0 additions & 12 deletions lang/ruby/patches/003-digest_rmd160_wrong_name_fix.patch

This file was deleted.

0 comments on commit 2ffaee3

Please sign in to comment.