From 117b18bbd6fd874c249fc22a6e0b3ce98a9ed080 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 16:33:22 -0300 Subject: [PATCH 01/16] ruby: remove ruby-ncurses ruby-ncurses where removed from ruby upstream (ruby commit 9c5b2fd8aa0fd343ad094d47a638cfd3f6ae0a81) and become solely a gem now. OpenWRT subpackage removed. Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index be2a669ed..7e3a792c4 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LIBVER:=2.1 @@ -127,12 +127,6 @@ $(call Package/ruby/Default) DEPENDS:=ruby endef -define Package/ruby-ncurses -$(call Package/ruby/Default) - TITLE:=Ruby support for ncurses - DEPENDS:=ruby +libncurses +libncursesw -endef - define Package/ruby-nkf $(call Package/ruby/Default) TITLE:=Ruby Network Kanji Filter @@ -361,12 +355,6 @@ define Package/ruby-json/install ) | ( cd $(1); $(TAR) -xf - ) endef -define Package/ruby-ncurses/install - ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ - usr/lib/ruby/$(PKG_LIBVER)/*/curses.so \ - ) | ( cd $(1); $(TAR) -xf - ) -endef - define Package/ruby-nkf/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \ @@ -471,7 +459,6 @@ $(eval $(call BuildPackage,ruby-gdbm)) $(eval $(call BuildPackage,ruby-gems)) $(eval $(call BuildPackage,ruby-json)) $(eval $(call BuildPackage,ruby-irb)) -$(eval $(call BuildPackage,ruby-ncurses)) $(eval $(call BuildPackage,ruby-nkf)) $(eval $(call BuildPackage,ruby-openssl)) $(eval $(call BuildPackage,ruby-rake)) From 205becb6e8557810f6759372b679b49a96c9a66e Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 16:38:53 -0300 Subject: [PATCH 02/16] ruby: Disable doc generation Docs are not currently packaged. So, there is no need to install them. Also, doxygen have some problem with the usaged of git in build_dir as it takes ages running git commands on every file. Disabling the docs reduces the compilation time. Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index 7e3a792c4..c540e7792 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LIBVER:=2.1 @@ -210,6 +210,8 @@ CONFIGURE_ARGS += \ --enable-static \ --disable-rpath \ --enable-ipv6 \ + --disable-install-doc \ + --disable-install-capi \ --with-ruby-version=minor \ --with-iconv-dir=$(ICONV_PREFIX) \ From a0e65256e93dac17d221bf788507285ba0eca632 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 16:54:24 -0300 Subject: [PATCH 03/16] ruby: wrap script to disable gems if not installed ruby, by default, try to load gems on start. If not present, it fails. As gems brings many deps, this make ruby unsuitable for routers limited resources. ruby can avoid to load gems with the option "--disable-gems". So, a wrap script in the place of /usr/bin/ruby adds this option if gems are not found. Also add vendor/site directories Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 10 ++++++++-- lang/ruby/files/ruby | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 lang/ruby/files/ruby diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index c540e7792..66d58e33a 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_LIBVER:=2.1 @@ -223,7 +223,13 @@ MAKE_FLAGS += \ define Package/ruby/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(INSTALL_DIR) $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER) + $(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 + 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 define Package/libruby/install diff --git a/lang/ruby/files/ruby b/lang/ruby/files/ruby new file mode 100644 index 000000000..e4904fc2f --- /dev/null +++ b/lang/ruby/files/ruby @@ -0,0 +1,5 @@ +#!/bin/sh +if ! [ -r "@RUBY_LIBPATH@/rubygems.rb" ]; then + exec @RUBY_BINPATH@ --disable-gems "$@" +fi +exec @RUBY_BINPATH@ "$@" From c90a4cb178a26924efc33131c5bcf925310f5d9e Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 17:19:54 -0300 Subject: [PATCH 04/16] ruby: rdoc can run without gems (with patch) rdoc seems to be written to run without gem. However, some internal code still does not check for gems presence. With a small patch, rdoc can run without gems. Ref: https://bugs.ruby-lang.org/issues/10196 Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 2 +- .../patches/001-rdoc-remove_gems_dep.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 lang/ruby/patches/001-rdoc-remove_gems_dep.patch diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index 66d58e33a..dfdac6f91 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_LIBVER:=2.1 diff --git a/lang/ruby/patches/001-rdoc-remove_gems_dep.patch b/lang/ruby/patches/001-rdoc-remove_gems_dep.patch new file mode 100644 index 000000000..afe81e83b --- /dev/null +++ b/lang/ruby/patches/001-rdoc-remove_gems_dep.patch @@ -0,0 +1,32 @@ +--- 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 @@ + def self.load_yaml + begin + gem 'psych' ++ rescue NameError => e # --disable-gems ++ raise unless e.name == :gem + rescue Gem::LoadError + end + +--- ruby-2.1.2.orig/lib/rdoc/markdown.rb 2014-09-02 17:14:28.761223918 -0300 ++++ ruby-2.1.2/lib/rdoc/markdown.rb 2014-09-02 17:14:28.805223607 -0300 +@@ -525,7 +525,6 @@ + + + +- require 'rubygems' + require 'rdoc' + require 'rdoc/markup/to_joined_paragraph' + require 'rdoc/markdown/entities' +--- ruby-2.1.2.orig/lib/rdoc/text.rb 2014-09-02 17:14:28.721224201 -0300 ++++ ruby-2.1.2/lib/rdoc/text.rb 2014-09-02 17:14:28.764223897 -0300 +@@ -10,6 +10,8 @@ + + begin + gem 'json' ++rescue NameError => e # --disable-gems ++ raise unless e.name == :gem + rescue Gem::LoadError + end + From 7fda1869e361196913518675a6421ff2ddae0ea3 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 17:35:11 -0300 Subject: [PATCH 05/16] ruby: remove minitest deps on gems minitest can live without gems. Just a minor fix to solve a require that fails when gem is missing Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 2 +- .../ruby/patches/002-minitest-remove_gems_dep.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 lang/ruby/patches/002-minitest-remove_gems_dep.patch diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index dfdac6f91..ce622084b 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_LIBVER:=2.1 diff --git a/lang/ruby/patches/002-minitest-remove_gems_dep.patch b/lang/ruby/patches/002-minitest-remove_gems_dep.patch new file mode 100644 index 000000000..f53490eee --- /dev/null +++ b/lang/ruby/patches/002-minitest-remove_gems_dep.patch @@ -0,0 +1,13 @@ +--- ruby-2.1.2.orig/lib/minitest/autorun.rb 2014-09-03 02:22:29.769909573 -0300 ++++ ruby-2.1.2/lib/minitest/autorun.rb 2014-09-03 02:22:29.768909580 -0300 +@@ -6,8 +6,9 @@ + ###################################################################### + + begin +- require 'rubygems' + gem 'minitest' ++rescue NameError => e # --disable-gems ++ raise unless e.name == :gem + rescue Gem::LoadError + # do nothing + end From cfcd564d9c78e85447b781fdaa5d4de5229efb2a Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 17:51:56 -0300 Subject: [PATCH 06/16] ruby: link ext/digest/* to openssl only when needed, fix rmd160 name ext/digest/rmd160 was referencing a function that never existed in openssl. The name was simply mistyped. Now it can use openssl. openssl was always linked to ext/digest when library is avaiable, even when it was disable by configure option and not used by code. upstream refs: https://bugs.ruby-lang.org/issues/10252 upstream refs: https://bugs.ruby-lang.org/issues/10324 Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 2 +- .../003-digest_rmd160_wrong_name_fix.patch | 12 ++ ...4-digest_dont-link-ssl-if-not-needed.patch | 117 ++++++++++++++++++ 3 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 lang/ruby/patches/003-digest_rmd160_wrong_name_fix.patch create mode 100644 lang/ruby/patches/004-digest_dont-link-ssl-if-not-needed.patch diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index ce622084b..cb52d9b88 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_LIBVER:=2.1 diff --git a/lang/ruby/patches/003-digest_rmd160_wrong_name_fix.patch b/lang/ruby/patches/003-digest_rmd160_wrong_name_fix.patch new file mode 100644 index 000000000..2dc49f647 --- /dev/null +++ b/lang/ruby/patches/003-digest_rmd160_wrong_name_fix.patch @@ -0,0 +1,12 @@ +diff -r -u ruby-2.1.2.old/ext/digest/rmd160/extconf.rb ruby-2.1.2/ext/digest/rmd160/extconf.rb +--- ruby-2.1.2.old/ext/digest/rmd160/extconf.rb 2012-11-26 22:58:52.000000000 -0200 ++++ ruby-2.1.2/ext/digest/rmd160/extconf.rb 2014-09-17 14:20:57.537367488 -0300 +@@ -14,7 +14,7 @@ + require File.expand_path('../../../openssl/deprecation', __FILE__) + + if !with_config("bundled-rmd160") && +- have_library("crypto") && OpenSSL.check_func("RMD160_Transform", "openssl/ripemd.h") ++ have_library("crypto") && OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h") + $objs << "rmd160ossl.#{$OBJEXT}" + else + $objs << "rmd160.#{$OBJEXT}" diff --git a/lang/ruby/patches/004-digest_dont-link-ssl-if-not-needed.patch b/lang/ruby/patches/004-digest_dont-link-ssl-if-not-needed.patch new file mode 100644 index 000000000..792f76c8c --- /dev/null +++ b/lang/ruby/patches/004-digest_dont-link-ssl-if-not-needed.patch @@ -0,0 +1,117 @@ +--- ruby-2.1.2/ext/digest/md5/extconf.rb 2012-11-26 22:58:52.000000000 -0200 ++++ ruby-2.1.2/ext/digest/md5/extconf.rb 2014-09-16 19:25:21.120457409 -0300 +@@ -9,14 +9,21 @@ + + $objs = [ "md5init.#{$OBJEXT}" ] + +-dir_config("openssl") +-pkg_config("openssl") +-require File.expand_path('../../../openssl/deprecation', __FILE__) ++if !with_config("bundled-md5") ++ dir_config("openssl") ++ pkg_config("openssl") ++ require File.expand_path('../../../openssl/deprecation', __FILE__) ++ if have_library("crypto") && OpenSSL.check_func("MD5_Transform", "openssl/md5.h") ++ $use_bundled=false ++ else ++ $use_bundled=true ++ end ++else ++ $use_bundled=true ++end + +-if !with_config("bundled-md5") && +- have_library("crypto") && OpenSSL.check_func("MD5_Transform", "openssl/md5.h") ++if !$use_bundled + $objs << "md5ossl.#{$OBJEXT}" +- + else + $objs << "md5.#{$OBJEXT}" + end +--- ruby-2.1.2/ext/digest/rmd160/extconf.rb 2012-11-26 22:58:52.000000000 -0200 ++++ ruby-2.1.2/ext/digest/rmd160/extconf.rb 2014-09-16 19:29:11.425628541 -0300 +@@ -9,12 +9,20 @@ + + $objs = [ "rmd160init.#{$OBJEXT}" ] + +-dir_config("openssl") +-pkg_config("openssl") +-require File.expand_path('../../../openssl/deprecation', __FILE__) ++if !with_config("bundled-rmd160") ++ dir_config("openssl") ++ pkg_config("openssl") ++ require File.expand_path('../../../openssl/deprecation', __FILE__) ++ if have_library("crypto") && OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h") ++ $use_bundled=false ++ else ++ $use_bundled=true ++ end ++else ++ $use_bundled=true ++end + +-if !with_config("bundled-rmd160") && +- have_library("crypto") && OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h") ++if !$use_bundled + $objs << "rmd160ossl.#{$OBJEXT}" + else + $objs << "rmd160.#{$OBJEXT}" +--- ruby-2.1.2/ext/digest/sha1/extconf.rb 2012-11-26 22:58:52.000000000 -0200 ++++ ruby-2.1.2/ext/digest/sha1/extconf.rb 2014-09-16 19:30:09.359168494 -0300 +@@ -9,12 +9,20 @@ + + $objs = [ "sha1init.#{$OBJEXT}" ] + +-dir_config("openssl") +-pkg_config("openssl") +-require File.expand_path('../../../openssl/deprecation', __FILE__) ++if !with_config("bundled-sha1") ++ dir_config("openssl") ++ pkg_config("openssl") ++ require File.expand_path('../../../openssl/deprecation', __FILE__) ++ if have_library("crypto") && OpenSSL.check_func("SHA1_Transform", "openssl/sha.h") ++ $use_bundled=false ++ else ++ $use_bundled=true ++ end ++else ++ $use_bundled=true ++end + +-if !with_config("bundled-sha1") && +- have_library("crypto") && OpenSSL.check_func("SHA1_Transform", "openssl/sha.h") ++if !$use_bundled + $objs << "sha1ossl.#{$OBJEXT}" + else + $objs << "sha1.#{$OBJEXT}" +--- ruby-2.1.2/ext/digest/sha2/extconf.rb 2012-11-26 22:58:52.000000000 -0200 ++++ ruby-2.1.2/ext/digest/sha2/extconf.rb 2014-09-16 19:31:31.833513570 -0300 +@@ -9,14 +9,22 @@ + + $objs = [ "sha2init.#{$OBJEXT}" ] + +-dir_config("openssl") +-pkg_config("openssl") +-require File.expand_path('../../../openssl/deprecation', __FILE__) +- +-if !with_config("bundled-sha2") && +- have_library("crypto") && ++if !with_config("bundled-sha2") ++ dir_config("openssl") ++ pkg_config("openssl") ++ require File.expand_path('../../../openssl/deprecation', __FILE__) ++ if have_library("crypto") && + %w[SHA256 SHA512].all? {|d| OpenSSL.check_func("#{d}_Transform", "openssl/sha.h")} && + %w[SHA256 SHA512].all? {|d| have_type("#{d}_CTX", "openssl/sha.h")} ++ $use_bundled=false ++ else ++ $use_bundled=true ++ end ++else ++ $use_bundled=true ++end ++ ++if !$use_bundled + $objs << "sha2ossl.#{$OBJEXT}" + $defs << "-DSHA2_USE_OPENSSL" + else From 52ba3a112202d364d7cec5b79710ec4c07fb0dac Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 18:48:47 -0300 Subject: [PATCH 07/16] ruby: move gems out of core Some ruby gems where still in ruby-core pkg. These files where moved outside ruby-core into ruby-gems or their own subpkg. ruby-unit renamed to ruby-testunit as its gem is named test-unit. ruby-rdoc left a file in ruby-core. Psych is a gem and deserves its own subpkg. It replaces syck (used by yaml) on recent ruby version (ref: https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/36786) Also, some psych files where packed incorrecly into ruby-json. The asterisk in */json was intend to match /json/ and not psych/json. Files where derived from ruby-core and a lost file in ruby-json. New subpkgs: - ruby-bigdecimal - ruby-io-console - ruby-minitest - ruby-psych Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 111 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 106 insertions(+), 5 deletions(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index cb52d9b88..0b1ba8d96 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_LIBVER:=2.1 @@ -79,6 +79,12 @@ $(call Package/ruby/Default) DEPENDS:=ruby +libdb47 +libffi endef +define Package/ruby-bigdecimal +$(call Package/ruby/Default) + TITLE+= Arbitrary-precision decimal floating-point library + DEPENDS:=ruby +endef + define Package/ruby-cgi $(call Package/ruby/Default) TITLE:=Ruby CGI support toolkit @@ -115,6 +121,12 @@ $(call Package/ruby/Default) DEPENDS:=ruby +ruby-yaml +ruby-zlib +ruby-openssl +ruby-webrick +ruby-erb endef +define Package/ruby-io-console +$(call Package/ruby/Default) + TITLE+= Console interface + DEPENDS:=ruby +endef + define Package/ruby-irb $(call Package/ruby/Default) TITLE+= (interactive shell) @@ -127,6 +139,12 @@ $(call Package/ruby/Default) DEPENDS:=ruby endef +define Package/ruby-minitest +$(call Package/ruby/Default) + TITLE+= minitest bundled with Ruby + DEPENDS:=ruby +endef + define Package/ruby-nkf $(call Package/ruby/Default) TITLE:=Ruby Network Kanji Filter @@ -139,6 +157,12 @@ $(call Package/ruby/Default) DEPENDS:=ruby +libopenssl endef +define Package/ruby-psych +$(call Package/ruby/Default) + TITLE+=YAML parser and emitter + DEPENDS:=ruby +endef + define Package/ruby-rdoc $(call Package/ruby/Default) TITLE+= (documentation generator) @@ -169,9 +193,9 @@ $(call Package/ruby/Default) DEPENDS:=ruby endef -define Package/ruby-unit +define Package/ruby-testunit $(call Package/ruby/Default) - TITLE:=Ruby unit testing toolkit + TITLE:=Ruby Test Unit toolkit DEPENDS:=ruby endef @@ -248,6 +272,9 @@ define Package/ruby-core/install $(1)/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \ \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/ \ + \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/digest \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/digest.rb \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/digest \ @@ -267,6 +294,9 @@ define Package/ruby-core/install $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/completion.rb \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/ext/save-history.rb \ \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/io/console/ \ + \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \ \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb \ @@ -278,13 +308,22 @@ define Package/ruby-core/install $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb \ \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/minitest/ \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/psych.so \ + \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rdoc \ \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rake \ \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems \ + $(1)/usr/lib/ruby/gems \ \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi \ @@ -308,6 +347,14 @@ define Package/ruby-core/install find $(1) -name '*.h' | xargs rm -f endef +define Package/ruby-bigdecimal/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so \ + usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/ \ + usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/bigdecimal-*.gemspec \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-cgi/install $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/ @@ -343,8 +390,23 @@ define Package/ruby-gems/install $(INSTALL_DIR) $(1)/usr/bin $(CP) $(PKG_INSTALL_DIR)/usr/bin/gem $(1)/usr/bin/ $(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)/ $(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 + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/doc + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/cache + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/extensions + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/build_info +endef + +define Package/ruby-io-console/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so \ + usr/lib/ruby/$(PKG_LIBVER)/io/console/ \ + usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/io-console-*.gemspec \ + ) | ( cd $(1); $(TAR) -xf - ) endef define Package/ruby-irb/install @@ -360,6 +422,16 @@ define Package/ruby-json/install usr/lib/ruby/$(PKG_LIBVER)/json.rb \ usr/lib/ruby/$(PKG_LIBVER)/json \ usr/lib/ruby/$(PKG_LIBVER)/*/json \ + usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/json-*.gemspec \ + ) | ( cd $(1); $(TAR) -xf - ) + rm -rf \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych/json +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 - ) endef @@ -384,12 +456,28 @@ define Package/ruby-openssl/install ) | ( cd $(1); $(TAR) -xf - ) endef +define Package/ruby-psych/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/psych \ + usr/lib/ruby/$(PKG_LIBVER)/psych.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/psych.so \ + usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-rdoc/install $(INSTALL_DIR) $(1)/usr/bin $(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) + $(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 + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec \ + $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-* \ + $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/ endef define Package/ruby-rake/install @@ -398,6 +486,11 @@ define Package/ruby-rake/install $(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)/ $(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 + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rake-*.gemspec \ + $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/ endef define Package/ruby-readline/install @@ -418,11 +511,15 @@ define Package/ruby-rss/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ endef -define Package/ruby-unit/install +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)/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)/gems/test-unit-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/ endef define Package/ruby-webrick/install @@ -459,6 +556,7 @@ endef $(eval $(call BuildPackage,ruby)) $(eval $(call BuildPackage,libruby)) $(eval $(call BuildPackage,ruby-core)) +$(eval $(call BuildPackage,ruby-bigdecimal)) $(eval $(call BuildPackage,ruby-cgi)) $(eval $(call BuildPackage,ruby-dl)) $(eval $(call BuildPackage,ruby-enc)) @@ -466,15 +564,18 @@ $(eval $(call BuildPackage,ruby-erb)) $(eval $(call BuildPackage,ruby-gdbm)) $(eval $(call BuildPackage,ruby-gems)) $(eval $(call BuildPackage,ruby-json)) +$(eval $(call BuildPackage,ruby-io-console)) $(eval $(call BuildPackage,ruby-irb)) +$(eval $(call BuildPackage,ruby-minitest)) $(eval $(call BuildPackage,ruby-nkf)) $(eval $(call BuildPackage,ruby-openssl)) +$(eval $(call BuildPackage,ruby-psych)) $(eval $(call BuildPackage,ruby-rake)) $(eval $(call BuildPackage,ruby-rdoc)) $(eval $(call BuildPackage,ruby-readline)) $(eval $(call BuildPackage,ruby-rexml)) $(eval $(call BuildPackage,ruby-rss)) -$(eval $(call BuildPackage,ruby-unit)) +$(eval $(call BuildPackage,ruby-testunit)) $(eval $(call BuildPackage,ruby-webrick)) $(eval $(call BuildPackage,ruby-xmlrpc)) $(eval $(call BuildPackage,ruby-yaml)) From 8d46e8a453aedc761dcd6fb3b7ae86f4cbe44aed Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 19:02:52 -0300 Subject: [PATCH 08/16] ruby: remove refs from dropped syck syck was replaced by psych in yaml. (ref: https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/36786) Also add ruby-psych to ruby-yaml deps Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index 0b1ba8d96..be390bfa3 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=8 +PKG_RELEASE:=9 PKG_LIBVER:=2.1 @@ -214,7 +214,7 @@ endef define Package/ruby-yaml $(call Package/ruby/Default) TITLE:=Ruby YAML toolkit - DEPENDS:=ruby + DEPENDS:=ruby +ruby-psych endef define Package/ruby-zlib @@ -342,7 +342,6 @@ define Package/ruby-core/install \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/syck.so \ find $(1) -name '*.h' | xargs rm -f endef @@ -537,7 +536,6 @@ define Package/ruby-yaml/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/yaml \ usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \ - usr/lib/ruby/$(PKG_LIBVER)/*/syck.so \ ) | ( cd $(1); $(TAR) -xf - ) endef From c755b298c373c55003bddd5bc2abc393cccbc6c2 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 19:16:40 -0300 Subject: [PATCH 09/16] ruby: spin-off ruby-digest from ruby-openssl Digest can use OpenSSL or ruby internal implementation of hash functions. The first uses less disk space but requires openssl, that is relatively big. As internal hash implementations are not too much bigger than openssl version, it is compiled by default. A new config option can change it to use OpenSSL instead. As digest is independent from openssl, ruby-digest was created as a new pkgs. Adds pkgs: - ruby-digest (from ruby-openssl) Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 43 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index be390bfa3..38a243f54 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -91,6 +91,26 @@ $(call Package/ruby/Default) DEPENDS:=ruby endef +define Package/ruby-digest +$(call Package/ruby/Default) + TITLE:=Ruby Digest Library + DEPENDS:=ruby +RUBY_DIGEST_USE_OPENSSL:libopenssl +endef + +define Package/ruby-digest/config + + config RUBY_DIGEST_USE_OPENSSL + bool "Use OpenSSL functions for ruby digest hash functions" + depends on PACKAGE_ruby-digest + help + Ruby can use OpenSSL hash functions or compile alternative implementations. Using + OpenSSL saves about 30KBytes (less when compressed) but requires OpenSSL (that + is way bigger than that). However, if OpenSSL is already needed by another usage, + as ruby-openssl or any other non ruby package, it is better to mark this option. + default n + +endef + define Package/ruby-dl $(call Package/ruby/Default) TITLE+= (dynamic linker support) (adds 5MB+) @@ -239,6 +259,15 @@ CONFIGURE_ARGS += \ --with-ruby-version=minor \ --with-iconv-dir=$(ICONV_PREFIX) \ +ifndef CONFIG_RUBY_DIGEST_USE_OPENSSL +CONFIGURE_ARGS += \ + --with-bundled-sha1\ + --with-bundled-md5\ + --with-bundled-rmd160\ + --with-bundled-sha2 \ + +endif + TARGET_LDFLAGS += -L$(PKG_BUILD_DIR) MAKE_FLAGS += \ @@ -360,6 +389,15 @@ define Package/ruby-cgi/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ endef +define Package/ruby-digest/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/digest \ + usr/lib/ruby/$(PKG_LIBVER)/digest.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/digest/* \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-dl/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \ @@ -443,10 +481,6 @@ endef define Package/ruby-openssl/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ - usr/lib/ruby/$(PKG_LIBVER)/digest \ - usr/lib/ruby/$(PKG_LIBVER)/digest.rb \ - usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \ - usr/lib/ruby/$(PKG_LIBVER)/*/digest/*.so \ usr/lib/ruby/$(PKG_LIBVER)/openssl \ usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \ usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \ @@ -556,6 +590,7 @@ $(eval $(call BuildPackage,libruby)) $(eval $(call BuildPackage,ruby-core)) $(eval $(call BuildPackage,ruby-bigdecimal)) $(eval $(call BuildPackage,ruby-cgi)) +$(eval $(call BuildPackage,ruby-digest)) $(eval $(call BuildPackage,ruby-dl)) $(eval $(call BuildPackage,ruby-enc)) $(eval $(call BuildPackage,ruby-erb)) From e707020e183d67ecf6684302c5d22e00cccfa4de Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 19:25:31 -0300 Subject: [PATCH 10/16] ruby: add auxiliar scripts in order to help tests ruby_find_pkgsdeps: look for file dependencies (checks require and Encoding references) and extrapolate it to pkgs deps. Also checks whether a dep is redundant or missing in pkgs. Must run inside an OpenWRT with all ruby* pkgs installed. ruby_missingfiles: list files in staging/target and from files comparing side by side its contents. It helps to easly visualize which file is not packaged in an ipk. Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/ruby_find_pkgsdeps | 265 +++++++++++++++++++++++++++++++++++ lang/ruby/ruby_missingfiles | 20 +++ 2 files changed, 285 insertions(+) create mode 100644 lang/ruby/ruby_find_pkgsdeps create mode 100644 lang/ruby/ruby_missingfiles diff --git a/lang/ruby/ruby_find_pkgsdeps b/lang/ruby/ruby_find_pkgsdeps new file mode 100644 index 000000000..06587ec0e --- /dev/null +++ b/lang/ruby/ruby_find_pkgsdeps @@ -0,0 +1,265 @@ +#!/usr/bin/ruby -Eutf-8 +# encoding: utf-8 +# +# Find dependencies between ruby packages +# +# Must run inside a openwrt with all *ruby* packages installed +# + +failed = false + +puts "Looking for installed ruby packages..." +packages=`opkg list-installed '*ruby*' | cut -d' ' -f 1`.split("\n") + +puts "Looking for packages files..." +package_files=Hash.new([]) +packages.each do + |pkg| + files=`opkg files "#{pkg}" | sed -e 1d`.split("\n") + package_files[pkg]=files if files +end + +require_regex=/^require ["']([^"']+)["'].*/ +require_regex_ignore=/^require ([a-zA-Z\$]|["']$|.*\/$)/ +require_ignore=%w{drb/invokemethod16 foo rubygems/defaults/operating_system win32console java Win32API + builder/xchar json/pure simplecov win32/sspi rdoc/markdown/literals_1_8 enumerator win32/resolv rbtree + nqxml/streamingparser nqxml/treeparser xmlscan/parser xmlscan/scanner xmltreebuilder xml/parser xmlparser xml/encoding-ja xmlencoding-ja + iconv uconv} + +builtin_enc=[ + Encoding.find("ASCII-8BIT"), + Encoding.find("UTF-8"), + Encoding.find("UTF-7"), + Encoding.find("US-ASCII"), +] + +puts "Looking for requires in files..." +files_requires=Hash.new([]) +packages.each do + |pkg| + package_files[pkg].each do + |file| + next if not File.file?(file) + + if not file =~ /.rb$/ + if File.executable?(file) + magic=`head -c50 '#{file}' | head -1` + begin + if not magic =~ /ruby/ + next + end + rescue + next + end + else + next + end + end + #puts "Checking #{file}..." + File.open(file, "r") do + |f| + lineno=0 + while line=f.gets() do + lineno+=1; encs=[]; requires=[]; need_encdb=false + + line=line.chomp.gsub!(/^[[:blank:]]*/,"") + + case line + when /^#.*coding *:/ + if lineno <= 2 + enc=line.sub(/.*coding *: */,"").sub(/ .*/,"") + encs << Encoding.find(enc) + end + end + line.gsub!(/#.*/,"") + case line + when "__END__" + break + when /^require / + #puts "#{file}:#{line}" + if require_regex_ignore =~ line + #puts "Ignoring #{line} at #{file}:#{lineno} (REGEX)..." + next + end + if not require_regex =~ line + $stderr.puts "Unknown require: '#{line}' at file #{file}:#{lineno}" + failed=true + end + require=line.gsub(require_regex,"\\1") + require.gsub!(/\.(so|rb)$/,"") + + if require_ignore.include?(require) + #puts "Ignoring #{line} at #{file}:#{lineno} (STR)..." + next + end + + files_requires[file]=files_requires[file] + [require] + + when /Encoding::/ + encs=line.scan(/Encoding::[[:alnum:]_]+/).collect {|enc| eval(enc) }.select {|enc| enc.kind_of? Encoding } + need_encdb=true + end + + next if encs.empty? + required_encs = (encs - builtin_enc).collect {|enc| "enc/#{enc.name.downcase.gsub("-","_")}" } + required_encs << "enc/encdb" if need_encdb + + files_requires[file] = files_requires[file] + required_encs + end + end + end +end +exit(1) if failed + +# Add deps from .so +package_files.each do |(pkg,files)| files.each do |file| + case file + when /\/nkf\.so$/ + files_requires[file]= files_requires[file] + ["enc/encdb"] + end +end; end + +puts "Merging requirements into packages..." +package_requires = Hash[packages.collect { |pkg| [pkg, package_files[pkg].collect {|file| files_requires[file] }.inject([],:+).uniq] }] + +weak_dependency=Hash.new([]) +weak_dependency.merge!({ +"ruby-misc"=>["ruby-openssl"], #securerandom.rb +"ruby-debuglib"=>["ruby-readline"], #debug.rb +"ruby-drb"=>["ruby-openssl"], #drb/ssl.rb +"ruby-irb"=>["ruby-rdoc", "ruby-readline"], #irb/cmd/help.rb +"ruby-gems"=>["ruby-openssl","ruby-io-console", #rubygems/commands/cert_command.rb rubygems/user_interaction.rb + "ruby-minitest", "ruby-webrick"], #rubygems/test_case.rb rubygems/server.rb +"ruby-mkmf"=>["ruby-webrick"], #un.rb +"ruby-net"=>["ruby-openssl","ruby-io-console","ruby-zlib"], #net/*.rb +"ruby-optparse"=>["ruby-uri","ruby-datetime"], #optparse/date.rb optparse/uri.rb +"ruby-rake"=>["ruby-net","ruby-testunit","ruby-gems"], #rake/contrib/ftptools.rb rake/runtest.rb /usr/bin/rake +"ruby-rdoc"=>["ruby-gems","ruby-readline","ruby-webrick", + "ruby-minitest"], #/usr/bin/rdoc and others +"ruby-testunit"=>["ruby-gems", "ruby-io-console"], #test/unit/parallel.rb test/unit.rb +"ruby-webrick"=>["ruby-openssl"], #webrick/ssl.rb +}) + +puts "Looking for package dependencies..." +package_provides = {} +package_dependencies = Hash.new([]) +package_requires.each do + |(pkg,requires)| + + requires.each do + |require| + if package_provides.include?(require) + found = package_provides[require] + else + found = package_files.detect {|(pkg,files)| files.detect {|file| $:.detect {|path| "#{path}/#{require}" == file.gsub(/\.(so|rb)$/,"") } } } + if not found + $stderr.puts "#{pkg}: Nobody provides #{require}" + failed = true + next + end + found = found.first + package_provides[require]=found + end + if weak_dependency[pkg].include?(found) + puts "#{pkg}: #{found} provides #{require} (ignored WEAK dep)" + else + puts "#{pkg}: #{found} provides #{require}" + package_dependencies[pkg]=package_dependencies[pkg] + [found] + end + end +end +exit(1) if failed + +package_dependencies.each do + |(pkg,deps)| + package_dependencies[pkg]=deps.uniq.sort - [pkg] +end + +puts "Expanding dependencies..." +begin + changed=false + package_dependencies.each do + |(pkg,deps)| + + next if deps.empty? + + deps_new = deps.collect {|dep| [dep] + package_dependencies[dep] }.inject([],:+).uniq.sort + if not deps == deps_new + puts "#{pkg}: #{deps.join(",")}" + puts "#{pkg}: #{deps_new.join(",")}" + package_dependencies[pkg]=deps_new + changed=true + end + end +end if not changed + +puts "Checking for mutual dependencies..." +package_dependencies.each do + |(pkg,deps)| + if deps.include? pkg + $stderr.puts "#{pkg}: Cycle dependency detected! " + failed = true + end +end +exit(1) if failed + +puts "Removing redundant dependencies..." +package_dependencies.each do + |(pkg,deps)| + package_dependencies[pkg]=deps.uniq - [pkg] +end + +package_dependencies2=package_dependencies.dup +package_dependencies.each do + |(pkg,deps)| + + # Ignore dependencies that are aready required by another dependency + deps_clean = deps.reject {|dep_suspect| deps.detect {|dep_provider| + if package_dependencies[dep_provider].include?(dep_suspect) + puts "#{pkg}: #{dep_suspect} is already required by #{dep_provider}" + true + end + } } + + if not deps==deps_clean + puts "before: #{deps.join(",")}" + puts "after: #{deps_clean.join(",")}" + package_dependencies2[pkg]=deps_clean + end +end +package_dependencies=package_dependencies2 + +puts "Checking current packages dependencies..." +ok=true +package_dependencies.each do + |(pkg,deps)| + current_deps=`opkg depends #{pkg} | sed -r -e '1d;s/^[[:blank:]]*//'`.split("\n") + current_deps.reject!{|dep| dep =~ /^lib/ } + current_deps -= ["ruby"] + + extra_dep = current_deps - deps + $stderr.puts "Package #{pkg} does not need to depend on #{extra_dep.join(" ")} " if not extra_dep.empty? + missing_dep = deps - current_deps + $stderr.puts "Package #{pkg} need to depend on #{missing_dep.join(" ")} " if not missing_dep.empty? + + if not extra_dep.empty? or not missing_dep.empty? + $stderr.puts "define Package/#{pkg}" + $stderr.puts " DEPENDS:=ruby#{([""] +deps).join(" +")}" + ok=false + end +end + +puts "All dependencies are OK." if ok + + +__END__ + +puts RUBY_VERSION, RUBY_PLATFORM +puts 123 + +puts Object.contants + +#RUBY_VER=2.1 +#RUBY_ARCH=i486-linux-gnu +#RUBYLIB=/usr/lib/ruby/$RUBY_VER/ +#RUBYLIB_A=/usr/lib/ruby/$RUBY_ARCH/$RUBY_VER/ diff --git a/lang/ruby/ruby_missingfiles b/lang/ruby/ruby_missingfiles new file mode 100644 index 000000000..f05e9feb8 --- /dev/null +++ b/lang/ruby/ruby_missingfiles @@ -0,0 +1,20 @@ +#!/bin/bash +# + +function list_staging_files { + cd staging_dir/target-*/; find \ + \( \( -name "root-x86" -or -name "packages" -or -name "stamp" -or -name "pkginfo" \) -prune \) -or -true \ + \( -path "*ruby*" -or -name "erb" -or -name "gem" -or -name "irb" -or -name "rake" -or -name "rdoc" -or -name "ri" -or -name "testrb" \) \ + -print | sort +} + +function list_ipkg_files { + for OPKG in bin/*/packages/packages/*ruby*; do + tar --to-stdout -xzf "$OPKG" ./data.tar.gz | tar tz | sed -e 's%/$%%' + done | sort -u +} + + +echo " Staging Packages" +diff -y <(list_staging_files) <(list_ipkg_files) + From e6541de61d607d3ae8dbdb48e3043236e9db3111 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 19:31:20 -0300 Subject: [PATCH 11/16] ruby: create subpkgs ruby-enc-extra from ruby-enc Ruby encoding library was too big and bring unecessary encodings for a simple ruby usage. All not directly required encodings from stdlib where moved to ruby-enc-extra. Created pkg from ruby-enc - ruby-enc-extra (from ruby-enc) Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index 38a243f54..06d1b1987 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -7,7 +7,6 @@ # # To Do: -# - split up encodings # - allow selection of either native or pure version of a library where supported # +-> some native libraries are probably only supported if ruby-dl is enabled # anything else? @@ -119,10 +118,16 @@ endef define Package/ruby-enc $(call Package/ruby/Default) - TITLE+= (character re-coding library) (adds 2MB+) + TITLE:=Ruby character re-coding library charset (small subset) DEPENDS:=ruby endef +define Package/ruby-enc-extra +$(call Package/ruby/Default) + TITLE:=Ruby character re-coding library charset (extra subset) + DEPENDS:=ruby +ruby-enc +endef + define Package/ruby-erb $(call Package/ruby/Default) TITLE+= (embedded interpreter) @@ -406,6 +411,20 @@ endef define Package/ruby-enc/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \ + usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-enc-extra/install + ( cd $(PKG_INSTALL_DIR); $(TAR) \ + --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \ + --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/iso_8859_1.so \ + --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/utf_* \ + --exclude=usr/lib/ruby/$(PKG_LIBVER)/*/enc/euc_jp.so \ + -cf - \ usr/lib/ruby/$(PKG_LIBVER)/*/enc \ ) | ( cd $(1); $(TAR) -xf - ) endef @@ -593,6 +612,7 @@ $(eval $(call BuildPackage,ruby-cgi)) $(eval $(call BuildPackage,ruby-digest)) $(eval $(call BuildPackage,ruby-dl)) $(eval $(call BuildPackage,ruby-enc)) +$(eval $(call BuildPackage,ruby-enc-extra)) $(eval $(call BuildPackage,ruby-erb)) $(eval $(call BuildPackage,ruby-gdbm)) $(eval $(call BuildPackage,ruby-gems)) From a30e571680e481c7c6c072be77e3f3e7e5c242c5 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 19:38:08 -0300 Subject: [PATCH 12/16] ruby: move files to ruby-xmlrpc,ruby-dl left in ruby-core Some files that belong to other subpkgs where still in ruby-core. Just moved them to the correct place. Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index 06d1b1987..22056cb1e 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -15,7 +15,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_LIBVER:=2.1 @@ -321,6 +321,9 @@ define Package/ruby-core/install $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick/ssl.rb \ \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/dl.rb \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/dl \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/dl/ \ \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/enc \ \ @@ -373,6 +376,7 @@ define Package/ruby-core/install $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb \ \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc \ + $(1)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb \ \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml \ $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \ @@ -405,7 +409,10 @@ 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 @@ -583,6 +590,7 @@ endef define Package/ruby-xmlrpc/install $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc $(1)/usr/lib/ruby/$(PKG_LIBVER)/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ endef define Package/ruby-yaml/install From abfa610a1c8507d4506e992c0aa93aefbbb804a4 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 20:06:14 -0300 Subject: [PATCH 13/16] ruby: explode ruby-core into subpkgs ruby-core is problematic as it is too big. It is impossible to fix pkgs dependencies as ruby-core would generate multiple cycled dependencies between packages. Also, "core" in ruby context means "classes that does not need a 'require'". This is not the case of ruby-core classes. They are, actually, a subset of Ruby Standard Library. In every detected case where a portion of ruby-core could be isolated and save another pkgs from requiring all ruby-core where spin-off into a new subset. Also, big portions of ruby-core, not require by current ruby-* pkgs where spin-off in new pkgs. The remaining of ruby-core was put into a new ruby-misc. ruby-stdlib was created as a meta package that requires all ruby packages that are part of Ruby Standard Library. For a full Ruby Standard Library, just install ruby-stdlib and its deps. Created pkgs from ruby-stdlib: - ruby-misc - ruby-csv - ruby-datetime - ruby-dbm - ruby-debuglib - ruby-drb - ruby-fiddle - ruby-filelib - ruby-logger - ruby-math - ruby-multithread - ruby-mkmf - ruby-net - ruby-optparse - ruby-patterns - ruby-prettyprint - ruby-pstore - ruby-racc - ruby-rbconfig - ruby-rinda - ruby-ripper - ruby-sdbm - ruby-shell - ruby-socket - ruby-uri Some files from ruby-openssl where moved to new subpkgs (as ruby-net and ruby-drb). All dependencies where redefined based on auxiliar script ruby_find_pkgsdeps Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 560 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 443 insertions(+), 117 deletions(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index 22056cb1e..90d337d2c 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -3,19 +3,15 @@ # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. -# - # # To Do: -# - allow selection of either native or pure version of a library where supported -# +-> some native libraries are probably only supported if ruby-dl is enabled -# anything else? - +# - dirs not removed when uninstalling! +# - update to 2.1.3! include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.2 -PKG_RELEASE:=10 +PKG_RELEASE:=11 PKG_LIBVER:=2.1 @@ -69,13 +65,32 @@ $(call Package/ruby/Default) DEPENDS+= +libpthread +librt +libgmp endef -# Ongoing work to break up ruby's standard library into coherent pieces -# with minimal dependencies between them +define Package/ruby-misc +$(call Package/ruby/Default) + TITLE:=Ruby standard libraries (miscelaneous subset) + DEPENDS:=ruby +endef -define Package/ruby-core +define Package/ruby-misc/Description + This package contains miscellaneous files from stdlib + not splitted in other ruby packages like stringio +endef + +define Package/ruby-stdlib $(call Package/ruby/Default) - TITLE:=Ruby standard libraries - DEPENDS:=ruby +libdb47 +libffi + 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-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 +endef + +define Package/ruby-stdlib/Description + This metapackage install all ruby-* packages, providing all + Ruby Standard Library files endef define Package/ruby-bigdecimal @@ -87,9 +102,42 @@ endef define Package/ruby-cgi $(call Package/ruby/Default) TITLE:=Ruby CGI support toolkit + DEPENDS:=ruby +ruby-filelib +ruby-pstore +endef + +define Package/ruby-csv +$(call Package/ruby/Default) + TITLE+=CSV library + DEPENDS:=ruby +ruby-patterns +ruby-datetime +ruby-enc +endef + +define Package/ruby-datetime +$(call Package/ruby/Default) + TITLE+= date library DEPENDS:=ruby endef +define Package/ruby-datetime/Description + Provides date.rb and time.rb +endef + +define Package/ruby-dbm +$(call Package/ruby/Default) + TITLE:=Ruby support for dbm + DEPENDS:=ruby +libdb47 +endef + +define Package/ruby-debuglib +$(call Package/ruby/Default) + TITLE+= debug library + DEPENDS:=ruby +ruby-multithread +ruby-prettyprint +endef + +define Package/ruby-debuglib/Description + Provides files for debugging as tracer.rb, profile.rb, + debug.rb and benchmark.rb +endef + define Package/ruby-digest $(call Package/ruby/Default) TITLE:=Ruby Digest Library @@ -110,10 +158,16 @@ define Package/ruby-digest/config endef +define Package/ruby-drb +$(call Package/ruby/Default) + TITLE:=Ruby distributed object system + DEPENDS:=ruby +ruby-filelib +ruby-patterns +ruby-socket +endef + define Package/ruby-dl $(call Package/ruby/Default) - TITLE+= (dynamic linker support) (adds 5MB+) - DEPENDS:=ruby + TITLE+= (dynamic linker support) + DEPENDS:=ruby +ruby-fiddle +ruby-multithread endef define Package/ruby-enc @@ -131,7 +185,19 @@ endef define Package/ruby-erb $(call Package/ruby/Default) TITLE+= (embedded interpreter) - DEPENDS:=ruby + DEPENDS:=ruby +ruby-cgi +endef + +define Package/ruby-fiddle +$(call Package/ruby/Default) + TITLE:=A libffi wrapper for Ruby + DEPENDS:=ruby +libffi +endef + +define Package/ruby-filelib +$(call Package/ruby/Default) + TITLE+= File utils library + DEPENDS:=ruby +ruby-multithread +ruby-enc endef define Package/ruby-gdbm @@ -143,7 +209,7 @@ endef define Package/ruby-gems $(call Package/ruby/Default) TITLE:=Ruby gems packet management - DEPENDS:=ruby +ruby-yaml +ruby-zlib +ruby-openssl +ruby-webrick +ruby-erb + DEPENDS:=ruby +ruby-net +ruby-rdoc +ruby-zlib endef define Package/ruby-io-console @@ -155,51 +221,117 @@ endef define Package/ruby-irb $(call Package/ruby/Default) TITLE+= (interactive shell) - DEPENDS:=ruby +ruby-core + DEPENDS:=ruby +ruby-debuglib +ruby-filelib +ruby-math endef define Package/ruby-json $(call Package/ruby/Default) TITLE:=Ruby support for JSON - DEPENDS:=ruby + DEPENDS:=ruby +ruby-datetime +ruby-misc +endef + +define Package/ruby-logger +$(call Package/ruby/Default) + TITLE+= logger and syslog library + DEPENDS:=ruby +ruby-multithread +endef + +define Package/ruby-math +$(call Package/ruby/Default) + TITLE+= math library + DEPENDS:=ruby +ruby-patterns endef define Package/ruby-minitest $(call Package/ruby/Default) TITLE+= minitest bundled with Ruby - DEPENDS:=ruby + DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-prettyprint +ruby-rbconfig +endef + +define Package/ruby-multithread +$(call Package/ruby/Default) + TITLE+= multithread library + DEPENDS:=ruby +ruby-misc +endef + +define Package/ruby-mkmf +$(call Package/ruby/Default) + TITLE+= makefile library + DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-rbconfig +endef + +define Package/ruby-net +$(call Package/ruby/Default) + TITLE:=Ruby Network Protocols Library + DEPENDS:=ruby +ruby-datetime +ruby-digest +ruby-filelib +ruby-uri endef define Package/ruby-nkf $(call Package/ruby/Default) TITLE:=Ruby Network Kanji Filter - DEPENDS:=ruby + DEPENDS:=ruby +ruby-enc endef define Package/ruby-openssl $(call Package/ruby/Default) TITLE:=Ruby support for openssl - DEPENDS:=ruby +libopenssl + DEPENDS:=ruby +ruby-enc +libopenssl +ruby-misc +endef + +define Package/ruby-optparse +$(call Package/ruby/Default) + TITLE:=Ruby command-line option analysis + DEPENDS:=ruby +ruby-misc +endef + +define Package/ruby-patterns +$(call Package/ruby/Default) + TITLE:=Ruby design patterns implementation + DEPENDS:=ruby +ruby-multithread +endef + +define Package/ruby-prettyprint +$(call Package/ruby/Default) + TITLE:=Ruby PrettyPrint librart + DEPENDS:=ruby +ruby-misc +endef + +define Package/ruby-pstore +$(call Package/ruby/Default) + TITLE+=file based persistence + DEPENDS:=ruby +ruby-digest +ruby-enc endef define Package/ruby-psych $(call Package/ruby/Default) TITLE+=YAML parser and emitter - DEPENDS:=ruby + DEPENDS:=ruby +ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc endef -define Package/ruby-rdoc +define Package/ruby-racc $(call Package/ruby/Default) - TITLE+= (documentation generator) + TITLE:=LALR parser generator in Ruby DEPENDS:=ruby endef define Package/ruby-rake $(call Package/ruby/Default) TITLE+=Ruby Rake (make replacement) + DEPENDS:=ruby +ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig +endef + +define Package/ruby-rbconfig +$(call Package/ruby/Default) + TITLE+=Ruby RbConfig DEPENDS:=ruby 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 +endef + define Package/ruby-readline $(call Package/ruby/Default) TITLE:=Ruby support for readline @@ -209,37 +341,73 @@ endef define Package/ruby-rexml $(call Package/ruby/Default) TITLE:=Ruby XML toolkit + DEPENDS:=ruby +ruby-patterns +ruby-enc +endef + +define Package/ruby-rinda +$(call Package/ruby/Default) + TITLE:=Ruby Linda paradigm implementation + DEPENDS:=ruby +ruby-drb +endef + +define Package/ruby-ripper +$(call Package/ruby/Default) + TITLE:=Ruby script parser DEPENDS:=ruby endef define Package/ruby-rss $(call Package/ruby/Default) TITLE:=Ruby RSS toolkit + DEPENDS:=ruby +ruby-net +ruby-nkf +ruby-rexml +endef + +define Package/ruby-sdbm +$(call Package/ruby/Default) + TITLE:=Ruby simple file-based key-value dbm implementation DEPENDS:=ruby endef +define Package/ruby-shell +$(call Package/ruby/Default) + TITLE:=Ruby idiomatic Ruby interface + DEPENDS:=ruby +ruby-patterns +endef + +define Package/ruby-socket +$(call Package/ruby/Default) + TITLE+= socket support + DEPENDS:=ruby +ruby-multithread +endef + define Package/ruby-testunit $(call Package/ruby/Default) TITLE:=Ruby Test Unit toolkit - DEPENDS:=ruby + DEPENDS:=ruby +ruby-minitest +endef + +define Package/ruby-uri +$(call Package/ruby/Default) + TITLE:=Ruby library to handle URI + DEPENDS:=ruby +ruby-socket +ruby-enc endef define Package/ruby-webrick $(call Package/ruby/Default) TITLE:=Ruby Web server toolkit - DEPENDS:=ruby + DEPENDS:=ruby +ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig endef define Package/ruby-xmlrpc $(call Package/ruby/Default) TITLE:=Ruby XML-RPC toolkit - DEPENDS:=ruby + DEPENDS:=ruby +ruby-rexml +ruby-webrick endef define Package/ruby-yaml $(call Package/ruby/Default) TITLE:=Ruby YAML toolkit - DEPENDS:=ruby +ruby-psych + DEPENDS:=ruby +ruby-dbm +ruby-pstore +ruby-psych endef define Package/ruby-zlib @@ -295,93 +463,37 @@ define Package/libruby/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libruby.so.* $(1)/usr/lib/ endef -define Package/ruby-core/install +define Package/ruby-stdlib/install + # nothing to do +endef + +define Package/ruby-misc/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby $(1)/usr/lib/ - rm -rf \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/curses.so \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/bigdecimal/ \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/digest \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/digest.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/digest \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/digest.so \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/openssl \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/drb/ssl.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/net/https.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick/ssl.rb \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/dl.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/dl \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/dl/ \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/enc \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/completion.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb/ext/save-history.rb \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/io/console.so \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/io/console/ \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/zlib.so \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/json.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/json \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/json \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/irb \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/minitest/ \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/*/psych.so \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/rdoc \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/rake \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/rubygems \ - $(1)/usr/lib/ruby/gems \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/cgi \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/rexml \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/rss \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/test \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/webrick.rb \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/xmlrpc.rb \ - \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml \ - $(1)/usr/lib/ruby/$(PKG_LIBVER)/yaml.rb \ - - find $(1) -name '*.h' | xargs rm -f + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/English.rb \ + usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb \ + usr/lib/ruby/$(PKG_LIBVER)/base64.rb \ + usr/lib/ruby/$(PKG_LIBVER)/delegate.rb \ + usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb \ + usr/lib/ruby/$(PKG_LIBVER)/expect.rb \ + usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb \ + usr/lib/ruby/$(PKG_LIBVER)/open3.rb \ + usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb \ + usr/lib/ruby/$(PKG_LIBVER)/scanf.rb \ + usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb \ + usr/lib/ruby/$(PKG_LIBVER)/set.rb \ + usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb \ + usr/lib/ruby/$(PKG_LIBVER)/tsort.rb \ + usr/lib/ruby/$(PKG_LIBVER)/weakref.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/etc.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/pty.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so \ + ) | ( cd $(1); $(TAR) -xf - ) endef define Package/ruby-bigdecimal/install @@ -392,12 +504,43 @@ define Package/ruby-bigdecimal/install ) | ( cd $(1); $(TAR) -xf - ) endef +define Package/ruby-csv/install + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/csv.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + define Package/ruby-cgi/install $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ endef +define Package/ruby-datetime/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/time.rb \ + usr/lib/ruby/$(PKG_LIBVER)/date.rb \ + usr/lib/ruby/$(PKG_LIBVER)/date/ \ + usr/lib/ruby/$(PKG_LIBVER)/*/date_core.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-dbm/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/dbm.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-debuglib/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/profile.rb \ + usr/lib/ruby/$(PKG_LIBVER)/profiler.rb \ + usr/lib/ruby/$(PKG_LIBVER)/debug.rb \ + usr/lib/ruby/$(PKG_LIBVER)/tracer.rb \ + usr/lib/ruby/$(PKG_LIBVER)/benchmark.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-digest/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/digest \ @@ -416,6 +559,13 @@ define Package/ruby-dl/install ) | ( cd $(1); $(TAR) -xf - ) endef +define Package/ruby-drb/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/drb.rb \ + usr/lib/ruby/$(PKG_LIBVER)/drb \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-enc/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/*/enc/encdb.so \ @@ -443,6 +593,25 @@ define Package/ruby-erb/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/erb.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ endef +define Package/ruby-fiddle/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/fiddle.rb \ + usr/lib/ruby/$(PKG_LIBVER)/fiddle/ \ + usr/lib/ruby/$(PKG_LIBVER)/*/fiddle.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-filelib/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/tmpdir.rb \ + usr/lib/ruby/$(PKG_LIBVER)/tempfile.rb \ + usr/lib/ruby/$(PKG_LIBVER)/pathname.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/pathname.so \ + usr/lib/ruby/$(PKG_LIBVER)/find.rb \ + usr/lib/ruby/$(PKG_LIBVER)/fileutils.rb \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-gdbm/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/*/gdbm.so \ @@ -491,6 +660,27 @@ define Package/ruby-json/install $(1)/usr/lib/ruby/$(PKG_LIBVER)/psych/json endef +define Package/ruby-logger/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/logger.rb \ + usr/lib/ruby/$(PKG_LIBVER)/syslog/logger.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/syslog.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-math/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + 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/ \ @@ -498,6 +688,33 @@ define Package/ruby-minitest/install ) | ( cd $(1); $(TAR) -xf - ) endef +define Package/ruby-mkmf/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb \ + usr/lib/ruby/$(PKG_LIBVER)/un.rb \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-multithread/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/monitor.rb \ + usr/lib/ruby/$(PKG_LIBVER)/timeout.rb \ + usr/lib/ruby/$(PKG_LIBVER)/thwait.rb \ + usr/lib/ruby/$(PKG_LIBVER)/mutex_m.rb \ + usr/lib/ruby/$(PKG_LIBVER)/sync.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/thread.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/io/wait.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/io/nonblock.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-net/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/open-uri.rb \ + usr/lib/ruby/$(PKG_LIBVER)/net/* \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-nkf/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/kconv.rb \ @@ -510,11 +727,36 @@ define Package/ruby-openssl/install usr/lib/ruby/$(PKG_LIBVER)/openssl \ usr/lib/ruby/$(PKG_LIBVER)/openssl.rb \ usr/lib/ruby/$(PKG_LIBVER)/*/openssl.so \ - usr/lib/ruby/$(PKG_LIBVER)/drb/ssl.rb \ - usr/lib/ruby/$(PKG_LIBVER)/net/https.rb \ ) | ( cd $(1); $(TAR) -xf - ) endef +define Package/ruby-optparse/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/optparse.rb \ + usr/lib/ruby/$(PKG_LIBVER)/optparse \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-patterns/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/observer.rb \ + usr/lib/ruby/$(PKG_LIBVER)/singleton.rb \ + usr/lib/ruby/$(PKG_LIBVER)/forwardable.rb \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-prettyprint/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/pp.rb \ + usr/lib/ruby/$(PKG_LIBVER)/prettyprint.rb \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-pstore/install + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/pstore.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + define Package/ruby-psych/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/psych \ @@ -539,6 +781,13 @@ define Package/ruby-rdoc/install $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/ endef +define Package/ruby-racc/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/racc \ + usr/lib/ruby/$(PKG_LIBVER)/*/racc/*.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-rake/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/ @@ -552,6 +801,14 @@ define Package/ruby-rake/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/ endef +define Package/ruby-rbconfig/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb \ + usr/lib/ruby/$(PKG_LIBVER)/rbconfig/* \ + usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig/*.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-readline/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \ @@ -563,6 +820,19 @@ define Package/ruby-rexml/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rexml $(1)/usr/lib/ruby/$(PKG_LIBVER)/ endef +define Package/ruby-rinda/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/rinda \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-ripper/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/ripper.rb \ + usr/lib/ruby/$(PKG_LIBVER)/ripper \ + usr/lib/ruby/$(PKG_LIBVER)/*/ripper.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef define Package/ruby-rss/install $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) @@ -570,6 +840,30 @@ define Package/ruby-rss/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rss.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ endef +define Package/ruby-sdbm/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/*/sdbm.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-shell/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/shell.rb \ + usr/lib/ruby/$(PKG_LIBVER)/shell \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + +define Package/ruby-socket/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/gserver.rb \ + usr/lib/ruby/$(PKG_LIBVER)/ipaddr.rb \ + usr/lib/ruby/$(PKG_LIBVER)/resolv-replace.rb \ + usr/lib/ruby/$(PKG_LIBVER)/resolv.rb \ + usr/lib/ruby/$(PKG_LIBVER)/socket.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/socket.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-testunit/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/testrb $(1)/usr/bin/ @@ -581,6 +875,13 @@ define Package/ruby-testunit/install $(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-uri/install + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/uri.rb \ + usr/lib/ruby/$(PKG_LIBVER)/uri \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + define Package/ruby-webrick/install $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/webrick $(1)/usr/lib/ruby/$(PKG_LIBVER)/ @@ -614,11 +915,17 @@ endef $(eval $(call BuildPackage,ruby)) $(eval $(call BuildPackage,libruby)) -$(eval $(call BuildPackage,ruby-core)) +$(eval $(call BuildPackage,ruby-stdlib)) +$(eval $(call BuildPackage,ruby-misc)) $(eval $(call BuildPackage,ruby-bigdecimal)) $(eval $(call BuildPackage,ruby-cgi)) +$(eval $(call BuildPackage,ruby-csv)) +$(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)) $(eval $(call BuildPackage,ruby-erb)) @@ -627,16 +934,35 @@ $(eval $(call BuildPackage,ruby-gems)) $(eval $(call BuildPackage,ruby-json)) $(eval $(call BuildPackage,ruby-io-console)) $(eval $(call BuildPackage,ruby-irb)) +$(eval $(call BuildPackage,ruby-fiddle)) +$(eval $(call BuildPackage,ruby-filelib)) +$(eval $(call BuildPackage,ruby-logger)) +$(eval $(call BuildPackage,ruby-math)) $(eval $(call BuildPackage,ruby-minitest)) +$(eval $(call BuildPackage,ruby-mkmf)) +$(eval $(call BuildPackage,ruby-multithread)) $(eval $(call BuildPackage,ruby-nkf)) +$(eval $(call BuildPackage,ruby-net)) $(eval $(call BuildPackage,ruby-openssl)) +$(eval $(call BuildPackage,ruby-optparse)) +$(eval $(call BuildPackage,ruby-patterns)) +$(eval $(call BuildPackage,ruby-prettyprint)) +$(eval $(call BuildPackage,ruby-pstore)) $(eval $(call BuildPackage,ruby-psych)) +$(eval $(call BuildPackage,ruby-racc)) $(eval $(call BuildPackage,ruby-rake)) +$(eval $(call BuildPackage,ruby-rbconfig)) $(eval $(call BuildPackage,ruby-rdoc)) $(eval $(call BuildPackage,ruby-readline)) $(eval $(call BuildPackage,ruby-rexml)) +$(eval $(call BuildPackage,ruby-rinda)) +$(eval $(call BuildPackage,ruby-ripper)) $(eval $(call BuildPackage,ruby-rss)) +$(eval $(call BuildPackage,ruby-sdbm)) +$(eval $(call BuildPackage,ruby-shell)) +$(eval $(call BuildPackage,ruby-socket)) $(eval $(call BuildPackage,ruby-testunit)) +$(eval $(call BuildPackage,ruby-uri)) $(eval $(call BuildPackage,ruby-webrick)) $(eval $(call BuildPackage,ruby-xmlrpc)) $(eval $(call BuildPackage,ruby-yaml)) From d372bf0eba9faece6aa151268e91d0abaf49c5b5 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Sat, 4 Oct 2014 20:09:20 -0300 Subject: [PATCH 14/16] ruby: update to 2.1.3 Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index 90d337d2c..0b6d2c301 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -6,18 +6,18 @@ # # To Do: # - dirs not removed when uninstalling! -# - update to 2.1.3! +# -- sort pkgs locations include $(TOPDIR)/rules.mk PKG_NAME:=ruby -PKG_VERSION:=2.1.2 -PKG_RELEASE:=11 +PKG_VERSION:=2.1.3 +PKG_RELEASE:=1 PKG_LIBVER:=2.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/ -PKG_MD5SUM:=ed9b8565bdeccb401d628ec8d54a0774 +PKG_MD5SUM:=02b7da3bb06037c777ca52e1194efccb PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILE:=COPYING @@ -40,7 +40,7 @@ define Package/ruby/Default endef define Package/ruby/Default/description - Ruby is the interpreted scripting language for quick and easy + Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in perl). It is simple, straight-forward, and extensible. From ae90aca0ca08025d9bef9bb3153449c148ea5d83 Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Mon, 6 Oct 2014 18:15:01 -0300 Subject: [PATCH 15/16] ruby: adds help text for pkgs Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 398 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 383 insertions(+), 15 deletions(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index 0b6d2c301..f03d61b9a 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby PKG_VERSION:=2.1.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LIBVER:=2.1 @@ -44,6 +44,7 @@ define Package/ruby/Default/description object-oriented programming. It has many features to process text files and to do system management tasks (as in perl). It is simple, straight-forward, and extensible. + endef define Package/ruby @@ -67,13 +68,37 @@ endef define Package/ruby-misc $(call Package/ruby/Default) - TITLE:=Ruby standard libraries (miscelaneous subset) + TITLE:=Ruby standard libraries subset (miscelaneous files) DEPENDS:=ruby endef -define Package/ruby-misc/Description - This package contains miscellaneous files from stdlib - not splitted in other ruby packages like stringio +define Package/ruby-misc/description + This package contains miscellaneous files from stdlib + not splitted in other ruby packages like stringio: + - English.rb + - abbrev.rb + - base64.rb + - continuation.so + - coverage.so + - delegate.rb + - e2mmap.rb + - etc.so + - expect.rb + - fcntl.so + - fiber.so + - getoptlong.rb + - open3.rb + - ostruct.rb + - pty.so + - scanf.rb + - securerandom.rb + - set.rb + - shellwords.rb + - stringio.so + - strscan.so + - tsort.rb + - weakref.rb + endef define Package/ruby-stdlib @@ -88,37 +113,53 @@ $(call Package/ruby/Default) +ruby-socket +ruby-testunit +ruby-uri +ruby-webrick +ruby-xmlrpc +ruby-yaml +ruby-zlib endef -define Package/ruby-stdlib/Description - This metapackage install all ruby-* packages, providing all - Ruby Standard Library files +define Package/ruby-stdlib/description + This metapackage currently install all ruby-* packages, + providing a complete Ruby Standard Library. + endef define Package/ruby-bigdecimal $(call Package/ruby/Default) - TITLE+= Arbitrary-precision decimal floating-point library + TITLE:=Arbitrary-precision decimal floating-point library for Ruby DEPENDS:=ruby endef +define Package/ruby-bigdecimal/description + Provides bigdecimal* files +endef + define Package/ruby-cgi $(call Package/ruby/Default) TITLE:=Ruby CGI support toolkit DEPENDS:=ruby +ruby-filelib +ruby-pstore endef +define Package/ruby-bigdecimal/description + Provides bigdecimal* files + +endef + define Package/ruby-csv $(call Package/ruby/Default) TITLE+=CSV library DEPENDS:=ruby +ruby-patterns +ruby-datetime +ruby-enc endef +define Package/ruby-csv/description + Provides csv.rb file + +endef + define Package/ruby-datetime $(call Package/ruby/Default) TITLE+= date library DEPENDS:=ruby endef -define Package/ruby-datetime/Description - Provides date.rb and time.rb +define Package/ruby-datetime/description + Provides date.rb and time.rb + endef define Package/ruby-dbm @@ -127,15 +168,27 @@ $(call Package/ruby/Default) DEPENDS:=ruby +libdb47 endef +define Package/ruby-dbm/description + The DBM class provides a wrapper to a Unix-style dbm or Database Manager library. + This package provides dbm.so file. + +endef + define Package/ruby-debuglib $(call Package/ruby/Default) TITLE+= debug library DEPENDS:=ruby +ruby-multithread +ruby-prettyprint endef -define Package/ruby-debuglib/Description - Provides files for debugging as tracer.rb, profile.rb, - debug.rb and benchmark.rb +define Package/ruby-debuglib/description + Provides files for debugging: + - benchmark.rb + - debug.rb + - objspace.so + - profile.rb + - profiler.rb + - tracer.rb + endef define Package/ruby-digest @@ -144,9 +197,15 @@ $(call Package/ruby/Default) DEPENDS:=ruby +RUBY_DIGEST_USE_OPENSSL:libopenssl endef +define Package/ruby-digest/description + Provides digest* files. Can be configured to use OpenSSL or + bundled hash functions. + +endef + define Package/ruby-digest/config - config RUBY_DIGEST_USE_OPENSSL + config RUBY_DIGEST_USE_OPENSSL bool "Use OpenSSL functions for ruby digest hash functions" depends on PACKAGE_ruby-digest help @@ -164,258 +223,567 @@ $(call Package/ruby/Default) DEPENDS:=ruby +ruby-filelib +ruby-patterns +ruby-socket endef +define Package/ruby-drb/description + Provides drb* files + +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-enc $(call Package/ruby/Default) TITLE:=Ruby character re-coding library charset (small subset) DEPENDS:=ruby endef +define Package/ruby-enc/description + Provides ruby encoding library for encodings used directly by + libraries in Ruby Standard Library: + - enc/encdb.so + - enc/euc_jp.so + - enc/iso_8859_1.so + - enc/utf_16be.so + - enc/utf_16le.so + - enc/utf_32be.so + - enc/utf_32le.so + FYI: ASCII-8BIT, UTF-7, UTF-8 and US-ASCII are already in Core. + +endef + define Package/ruby-enc-extra $(call Package/ruby/Default) TITLE:=Ruby character re-coding library charset (extra subset) DEPENDS:=ruby +ruby-enc endef +define Package/ruby-enc-extra/description + Provides extra encodings not provided by ruby-enc: + - enc/big5.so + - enc/cp949.so + - enc/emacs_mule.so + - enc/euc_kr.so + - enc/euc_tw.so + - enc/gb18030.so + - enc/gb2312.so + - enc/gbk.so + - enc/iso_8859_10.so + - enc/iso_8859_11.so + - enc/iso_8859_13.so + - enc/iso_8859_14.so + - enc/iso_8859_15.so + - enc/iso_8859_16.so + - enc/iso_8859_2.so + - enc/iso_8859_3.so + - enc/iso_8859_4.so + - enc/iso_8859_5.so + - enc/iso_8859_6.so + - enc/iso_8859_7.so + - enc/iso_8859_8.so + - enc/iso_8859_9.so + - enc/koi8_r.so + - enc/koi8_u.so + - enc/shift_jis.so + - enc/trans/big5.so + - enc/trans/chinese.so + - enc/trans/emoji.so + - enc/trans/emoji_iso2022_kddi.so + - enc/trans/emoji_sjis_docomo.so + - enc/trans/emoji_sjis_kddi.so + - enc/trans/emoji_sjis_softbank.so + - enc/trans/escape.so + - enc/trans/gb18030.so + - enc/trans/gbk.so + - enc/trans/iso2022.so + - enc/trans/japanese.so + - enc/trans/japanese_euc.so + - enc/trans/japanese_sjis.so + - enc/trans/korean.so + - enc/trans/single_byte.so + - enc/trans/transdb.so + - enc/trans/utf8_mac.so + - enc/trans/utf_16_32.so + - enc/windows_1251.so + - enc/windows_31j.so + +endef + define Package/ruby-erb $(call Package/ruby/Default) TITLE+= (embedded interpreter) DEPENDS:=ruby +ruby-cgi endef +define Package/ruby-erb/description + Provides erb* files + +endef + define Package/ruby-fiddle $(call Package/ruby/Default) TITLE:=A libffi wrapper for Ruby DEPENDS:=ruby +libffi endef +define Package/ruby-fiddle/description + Provides fiddle* files + +endef + define Package/ruby-filelib $(call Package/ruby/Default) TITLE+= File utils library DEPENDS:=ruby +ruby-multithread +ruby-enc endef +define Package/ruby-filelib/description + Provides filesystem interaction files, including + path and temp: + - fileutils.rb + - find.rb + - pathname.rb + - pathname.so + - tempfile.rb + - tmpdir.rb + +endef + define Package/ruby-gdbm $(call Package/ruby/Default) TITLE:=Ruby support for gdbm DEPENDS:=ruby +libgdbm endef +define Package/ruby-gdbm/description + Provides gdbm* files + +endef + define Package/ruby-gems $(call Package/ruby/Default) TITLE:=Ruby gems packet management DEPENDS:=ruby +ruby-net +ruby-rdoc +ruby-zlib endef +define Package/ruby-gems/description + Provides rubygems for gems usage, download and installation + +endef + define Package/ruby-io-console $(call Package/ruby/Default) TITLE+= Console interface DEPENDS:=ruby endef +define Package/ruby-io-console/description + Provides io-console* files + +endef + define Package/ruby-irb $(call Package/ruby/Default) TITLE+= (interactive shell) DEPENDS:=ruby +ruby-debuglib +ruby-filelib +ruby-math endef +define Package/ruby-irb/description + Provides irb* files + +endef + define Package/ruby-json $(call Package/ruby/Default) TITLE:=Ruby support for JSON DEPENDS:=ruby +ruby-datetime +ruby-misc endef +define Package/ruby-json/description + Provides json* files + +endef + define Package/ruby-logger $(call Package/ruby/Default) TITLE+= logger and syslog library DEPENDS:=ruby +ruby-multithread endef +define Package/ruby-logger/description + Provides log library, including syslog: + - logger.rb + - syslog.so + - syslog/logger.rb + +endef + define Package/ruby-math $(call Package/ruby/Default) TITLE+= math library DEPENDS:=ruby +ruby-patterns endef +define Package/ruby-math/description + Provides math related files: + - cmath.rb + - complex.rb + - mathn.rb + - mathn/complex.so + - mathn/rational.so + - matrix.rb + - matrix/eigenvalue_decomposition.rb + - matrix/lup_decomposition.rb + - prime.rb + - rational.rb + +endef + define Package/ruby-minitest $(call Package/ruby/Default) TITLE+= minitest bundled with Ruby DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-prettyprint +ruby-rbconfig endef +define Package/ruby-minitest/description + Provides minitest* files + +endef + define Package/ruby-multithread $(call Package/ruby/Default) TITLE+= multithread library DEPENDS:=ruby +ruby-misc endef +define Package/ruby-multithread/description + Provides files for multithread usage: + - io/nonblock.so + - io/wait.so + - thread.so (FYI, Thread is a core class) + - monitor.rb + - mutex_m.rb + - sync.rb + - thwait.rb + - timeout.rb + +endef + define Package/ruby-mkmf $(call Package/ruby/Default) TITLE+= makefile library DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-rbconfig endef +define Package/ruby-mkmf/description + Provides mkmf* files + +endef + define Package/ruby-net $(call Package/ruby/Default) TITLE:=Ruby Network Protocols Library DEPENDS:=ruby +ruby-datetime +ruby-digest +ruby-filelib +ruby-uri endef +define Package/ruby-net/description + Provides net* files + +endef + define Package/ruby-nkf $(call Package/ruby/Default) TITLE:=Ruby Network Kanji Filter DEPENDS:=ruby +ruby-enc endef +define Package/ruby-nkf/description + Provides nkf* files + +endef + define Package/ruby-openssl $(call Package/ruby/Default) TITLE:=Ruby support for openssl DEPENDS:=ruby +ruby-enc +libopenssl +ruby-misc endef +define Package/ruby-openssl/description + Provides openssl* files + +endef + define Package/ruby-optparse $(call Package/ruby/Default) TITLE:=Ruby command-line option analysis DEPENDS:=ruby +ruby-misc endef +define Package/ruby-optparse/description + Provides optparse* files + +endef + define Package/ruby-patterns $(call Package/ruby/Default) TITLE:=Ruby design patterns implementation DEPENDS:=ruby +ruby-multithread endef +define Package/ruby-patterns/description + Provides design patterns helpers files: + - forwardable.rb + - observer.rb + - singleton.rb + +endef + define Package/ruby-prettyprint $(call Package/ruby/Default) TITLE:=Ruby PrettyPrint librart DEPENDS:=ruby +ruby-misc endef +define Package/ruby-prettyprint/description + Provides Pretty Print library: + - pp.rb + - prettyprint.rb + +endef + define Package/ruby-pstore $(call Package/ruby/Default) TITLE+=file based persistence DEPENDS:=ruby +ruby-digest +ruby-enc endef +define Package/ruby-pstore/description + Provides pstore.rb file + +endef + define Package/ruby-psych $(call Package/ruby/Default) TITLE+=YAML parser and emitter DEPENDS:=ruby +ruby-bigdecimal +ruby-datetime +ruby-misc +ruby-enc endef +define Package/ruby-psych/description + Provides psych* files + +endef + define Package/ruby-racc $(call Package/ruby/Default) TITLE:=LALR parser generator in Ruby DEPENDS:=ruby endef +define Package/ruby-racc/description + Provides racc* files + +endef + define Package/ruby-rake $(call Package/ruby/Default) TITLE+=Ruby Rake (make replacement) DEPENDS:=ruby +ruby-datetime +ruby-filelib +ruby-optparse +ruby-patterns +ruby-rbconfig endef +define Package/ruby-rake/description + Provides rake* files + +endef + define Package/ruby-rbconfig $(call Package/ruby/Default) TITLE+=Ruby RbConfig DEPENDS:=ruby endef +define Package/ruby-rbconfig/description + Provides rbconfig file + +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 endef +define Package/ruby-rdoc/description + Provides rdoc* and ri files + +endef + define Package/ruby-readline $(call Package/ruby/Default) TITLE:=Ruby support for readline DEPENDS:=ruby +libncurses +libreadline endef +define Package/ruby-readline/description + Provides readline* files + +endef + define Package/ruby-rexml $(call Package/ruby/Default) TITLE:=Ruby XML toolkit DEPENDS:=ruby +ruby-patterns +ruby-enc endef +define Package/ruby-rexml/description + Provides rexml* files + +endef + define Package/ruby-rinda $(call Package/ruby/Default) TITLE:=Ruby Linda paradigm implementation DEPENDS:=ruby +ruby-drb endef +define Package/ruby-rinda/description + Provides rinda* files + +endef + define Package/ruby-ripper $(call Package/ruby/Default) TITLE:=Ruby script parser DEPENDS:=ruby endef +define Package/ruby-ripper/description + Provides ripper* files + +endef + define Package/ruby-rss $(call Package/ruby/Default) TITLE:=Ruby RSS toolkit DEPENDS:=ruby +ruby-net +ruby-nkf +ruby-rexml endef +define Package/ruby-rss/description + Provides rss* files + +endef + define Package/ruby-sdbm $(call Package/ruby/Default) TITLE:=Ruby simple file-based key-value dbm implementation DEPENDS:=ruby endef +define Package/ruby-sdbm/description + Provides sdbm* files + +endef + define Package/ruby-shell $(call Package/ruby/Default) TITLE:=Ruby idiomatic Ruby interface DEPENDS:=ruby +ruby-patterns endef +define Package/ruby-shell/description + Provides shell* files + +endef + define Package/ruby-socket $(call Package/ruby/Default) TITLE+= socket support DEPENDS:=ruby +ruby-multithread endef +define Package/ruby-socket/description + Provides socket-related files: + - gserver.rb + - ipaddr.rb + - resolv-replace.rb + - resolv.rb + - socket.rb + - socket.so + +endef + define Package/ruby-testunit $(call Package/ruby/Default) TITLE:=Ruby Test Unit toolkit DEPENDS:=ruby +ruby-minitest endef +define Package/ruby-testunit/description + Provides test/unit* files + +endef + define Package/ruby-uri $(call Package/ruby/Default) TITLE:=Ruby library to handle URI DEPENDS:=ruby +ruby-socket +ruby-enc endef +define Package/ruby-uri/description + Provides uri* files + +endef + define Package/ruby-webrick $(call Package/ruby/Default) TITLE:=Ruby Web server toolkit DEPENDS:=ruby +ruby-erb +ruby-net +ruby-patterns +ruby-rbconfig endef +define Package/ruby-webrick/description + Provides webrick* files + +endef + define Package/ruby-xmlrpc $(call Package/ruby/Default) TITLE:=Ruby XML-RPC toolkit DEPENDS:=ruby +ruby-rexml +ruby-webrick endef +define Package/ruby-xmlrpc/description + Provides xmlrpc* files + +endef + define Package/ruby-yaml $(call Package/ruby/Default) TITLE:=Ruby YAML toolkit DEPENDS:=ruby +ruby-dbm +ruby-pstore +ruby-psych endef +define Package/ruby-yaml/description + Provides yaml* files + +endef + define Package/ruby-zlib $(call Package/ruby/Default) TITLE:=Ruby support for zlib DEPENDS:=ruby +zlib endef +define Package/ruby-zlib/description + Provides zlib* files + +endef + HOST_CONFIGURE_ARGS += \ --disable-install-doc \ --disable-install-rdoc \ From 201bb841acb6a7f2e82ef1fa2007cc956d41ce3d Mon Sep 17 00:00:00 2001 From: Luiz Angelo Daros de Luca Date: Tue, 7 Oct 2014 14:32:07 -0300 Subject: [PATCH 16/16] ruby: reorder subpackages (alphabetical order) Signed-off-by: Luiz Angelo Daros de Luca --- lang/ruby/Makefile | 224 +++++++++++++++++++++++---------------------- 1 file changed, 113 insertions(+), 111 deletions(-) diff --git a/lang/ruby/Makefile b/lang/ruby/Makefile index f03d61b9a..8b81daa99 100644 --- a/lang/ruby/Makefile +++ b/lang/ruby/Makefile @@ -6,7 +6,7 @@ # # To Do: # - dirs not removed when uninstalling! -# -- sort pkgs locations +# include $(TOPDIR)/rules.mk PKG_NAME:=ruby @@ -66,41 +66,6 @@ $(call Package/ruby/Default) DEPENDS+= +libpthread +librt +libgmp endef -define Package/ruby-misc -$(call Package/ruby/Default) - TITLE:=Ruby standard libraries subset (miscelaneous files) - DEPENDS:=ruby -endef - -define Package/ruby-misc/description - This package contains miscellaneous files from stdlib - not splitted in other ruby packages like stringio: - - English.rb - - abbrev.rb - - base64.rb - - continuation.so - - coverage.so - - delegate.rb - - e2mmap.rb - - etc.so - - expect.rb - - fcntl.so - - fiber.so - - getoptlong.rb - - open3.rb - - ostruct.rb - - pty.so - - scanf.rb - - securerandom.rb - - set.rb - - shellwords.rb - - stringio.so - - strscan.so - - tsort.rb - - weakref.rb - -endef - define Package/ruby-stdlib $(call Package/ruby/Default) TITLE:=Ruby standard libraries (metadata for all stdlib subsets) @@ -217,25 +182,25 @@ define Package/ruby-digest/config endef -define Package/ruby-drb +define Package/ruby-dl $(call Package/ruby/Default) - TITLE:=Ruby distributed object system - DEPENDS:=ruby +ruby-filelib +ruby-patterns +ruby-socket + TITLE+= (dynamic linker support) + DEPENDS:=ruby +ruby-fiddle +ruby-multithread endef -define Package/ruby-drb/description - Provides drb* files +define Package/ruby-dl/description + Provides dl* files. This is deprecated, use fiddle. endef -define Package/ruby-dl +define Package/ruby-drb $(call Package/ruby/Default) - TITLE+= (dynamic linker support) - DEPENDS:=ruby +ruby-fiddle +ruby-multithread + TITLE:=Ruby distributed object system + DEPENDS:=ruby +ruby-filelib +ruby-patterns +ruby-socket endef -define Package/ruby-dl/description - Provides dl* files. This is deprecated, use fiddle. +define Package/ruby-drb/description + Provides drb* files endef @@ -457,6 +422,52 @@ define Package/ruby-minitest/description endef +define Package/ruby-misc +$(call Package/ruby/Default) + TITLE:=Ruby standard libraries subset (miscelaneous files) + DEPENDS:=ruby +endef + +define Package/ruby-misc/description + This package contains miscellaneous files from stdlib + not splitted in other ruby packages like stringio: + - English.rb + - abbrev.rb + - base64.rb + - continuation.so + - coverage.so + - delegate.rb + - e2mmap.rb + - etc.so + - expect.rb + - fcntl.so + - fiber.so + - getoptlong.rb + - open3.rb + - ostruct.rb + - pty.so + - scanf.rb + - securerandom.rb + - set.rb + - shellwords.rb + - stringio.so + - strscan.so + - tsort.rb + - weakref.rb + +endef + +define Package/ruby-mkmf +$(call Package/ruby/Default) + TITLE+= makefile library + DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-rbconfig +endef + +define Package/ruby-mkmf/description + Provides mkmf* files + +endef + define Package/ruby-multithread $(call Package/ruby/Default) TITLE+= multithread library @@ -476,17 +487,6 @@ define Package/ruby-multithread/description endef -define Package/ruby-mkmf -$(call Package/ruby/Default) - TITLE+= makefile library - DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-rbconfig -endef - -define Package/ruby-mkmf/description - Provides mkmf* files - -endef - define Package/ruby-net $(call Package/ruby/Default) TITLE:=Ruby Network Protocols Library @@ -835,35 +835,6 @@ define Package/ruby-stdlib/install # nothing to do endef -define Package/ruby-misc/install - $(INSTALL_DIR) $(1)/usr/lib - ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ - usr/lib/ruby/$(PKG_LIBVER)/English.rb \ - usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb \ - usr/lib/ruby/$(PKG_LIBVER)/base64.rb \ - usr/lib/ruby/$(PKG_LIBVER)/delegate.rb \ - usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb \ - usr/lib/ruby/$(PKG_LIBVER)/expect.rb \ - usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb \ - usr/lib/ruby/$(PKG_LIBVER)/open3.rb \ - usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb \ - usr/lib/ruby/$(PKG_LIBVER)/scanf.rb \ - usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb \ - usr/lib/ruby/$(PKG_LIBVER)/set.rb \ - usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb \ - usr/lib/ruby/$(PKG_LIBVER)/tsort.rb \ - usr/lib/ruby/$(PKG_LIBVER)/weakref.rb \ - usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so \ - usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so \ - usr/lib/ruby/$(PKG_LIBVER)/*/etc.so \ - usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so \ - usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so \ - usr/lib/ruby/$(PKG_LIBVER)/*/pty.so \ - usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so \ - usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so \ - ) | ( cd $(1); $(TAR) -xf - ) -endef - define Package/ruby-bigdecimal/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/*/bigdecimal.so \ @@ -872,17 +843,17 @@ define Package/ruby-bigdecimal/install ) | ( cd $(1); $(TAR) -xf - ) endef -define Package/ruby-csv/install - $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/csv.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ -endef - define Package/ruby-cgi/install $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi $(1)/usr/lib/ruby/$(PKG_LIBVER)/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ endef +define Package/ruby-csv/install + $(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER) + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/csv.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/ +endef + define Package/ruby-datetime/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/time.rb \ @@ -1056,6 +1027,37 @@ define Package/ruby-minitest/install ) | ( cd $(1); $(TAR) -xf - ) endef +define Package/ruby-misc/install + $(INSTALL_DIR) $(1)/usr/lib + ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ + usr/lib/ruby/$(PKG_LIBVER)/English.rb \ + usr/lib/ruby/$(PKG_LIBVER)/abbrev.rb \ + usr/lib/ruby/$(PKG_LIBVER)/base64.rb \ + usr/lib/ruby/$(PKG_LIBVER)/delegate.rb \ + usr/lib/ruby/$(PKG_LIBVER)/e2mmap.rb \ + usr/lib/ruby/$(PKG_LIBVER)/expect.rb \ + usr/lib/ruby/$(PKG_LIBVER)/getoptlong.rb \ + usr/lib/ruby/$(PKG_LIBVER)/open3.rb \ + usr/lib/ruby/$(PKG_LIBVER)/ostruct.rb \ + usr/lib/ruby/$(PKG_LIBVER)/scanf.rb \ + usr/lib/ruby/$(PKG_LIBVER)/securerandom.rb \ + usr/lib/ruby/$(PKG_LIBVER)/set.rb \ + usr/lib/ruby/$(PKG_LIBVER)/shellwords.rb \ + usr/lib/ruby/$(PKG_LIBVER)/tsort.rb \ + usr/lib/ruby/$(PKG_LIBVER)/weakref.rb \ + usr/lib/ruby/$(PKG_LIBVER)/*/continuation.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/coverage.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/etc.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/fcntl.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/fiber.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/pty.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/stringio.so \ + usr/lib/ruby/$(PKG_LIBVER)/*/strscan.so \ + ) | ( cd $(1); $(TAR) -xf - ) +endef + + + define Package/ruby-mkmf/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/mkmf.rb \ @@ -1134,21 +1136,6 @@ define Package/ruby-psych/install ) | ( cd $(1); $(TAR) -xf - ) endef -define Package/ruby-rdoc/install - $(INSTALL_DIR) $(1)/usr/bin - $(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) - $(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 - $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec \ - $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-* \ - $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/ -endef - define Package/ruby-racc/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/racc \ @@ -1177,6 +1164,21 @@ define Package/ruby-rbconfig/install ) | ( cd $(1); $(TAR) -xf - ) endef +define Package/ruby-rdoc/install + $(INSTALL_DIR) $(1)/usr/bin + $(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) + $(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 + $(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rdoc-*.gemspec \ + $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rdoc-* \ + $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/ +endef + define Package/ruby-readline/install ( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \ usr/lib/ruby/$(PKG_LIBVER)/*/readline.so \ @@ -1284,7 +1286,6 @@ endef $(eval $(call BuildPackage,ruby)) $(eval $(call BuildPackage,libruby)) $(eval $(call BuildPackage,ruby-stdlib)) -$(eval $(call BuildPackage,ruby-misc)) $(eval $(call BuildPackage,ruby-bigdecimal)) $(eval $(call BuildPackage,ruby-cgi)) $(eval $(call BuildPackage,ruby-csv)) @@ -1297,20 +1298,21 @@ $(eval $(call BuildPackage,ruby-drb)) $(eval $(call BuildPackage,ruby-enc)) $(eval $(call BuildPackage,ruby-enc-extra)) $(eval $(call BuildPackage,ruby-erb)) +$(eval $(call BuildPackage,ruby-fiddle)) +$(eval $(call BuildPackage,ruby-filelib)) $(eval $(call BuildPackage,ruby-gdbm)) $(eval $(call BuildPackage,ruby-gems)) -$(eval $(call BuildPackage,ruby-json)) $(eval $(call BuildPackage,ruby-io-console)) $(eval $(call BuildPackage,ruby-irb)) -$(eval $(call BuildPackage,ruby-fiddle)) -$(eval $(call BuildPackage,ruby-filelib)) +$(eval $(call BuildPackage,ruby-json)) $(eval $(call BuildPackage,ruby-logger)) $(eval $(call BuildPackage,ruby-math)) $(eval $(call BuildPackage,ruby-minitest)) +$(eval $(call BuildPackage,ruby-misc)) $(eval $(call BuildPackage,ruby-mkmf)) $(eval $(call BuildPackage,ruby-multithread)) -$(eval $(call BuildPackage,ruby-nkf)) $(eval $(call BuildPackage,ruby-net)) +$(eval $(call BuildPackage,ruby-nkf)) $(eval $(call BuildPackage,ruby-openssl)) $(eval $(call BuildPackage,ruby-optparse)) $(eval $(call BuildPackage,ruby-patterns))