Browse Source

Merge pull request #2461 from luizluca/ruby-2.3.0

ruby: bump to 2.3.0
lilik-openwrt-22.03
Luiz Angelo Daros de Luca 9 years ago
parent
commit
441dd131d0
3 changed files with 203 additions and 48 deletions
  1. +51
    -12
      lang/ruby/Makefile
  2. +152
    -0
      lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch
  3. +0
    -36
      lang/ruby/patches/001-rdoc-remove_gems_dep.patch

+ 51
- 12
lang/ruby/Makefile View File

@ -10,14 +10,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ruby
PKG_VERSION:=2.2.4
PKG_RELEASE:=2
PKG_VERSION:=2.3.0
PKG_RELEASE:=1
PKG_LIBVER:=2.2
PKG_LIBVER:=2.3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
PKG_MD5SUM:=c3d65f6d2ebe90dda81a37885ea244f5
PKG_MD5SUM:=f0d9f9bbdc87372ca98988a571875819
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
@ -35,9 +35,13 @@ HOST_CONFIGURE_ARGS += \
--disable-install-doc \
--disable-install-rdoc \
--disable-install-capi \
--with-static-linked-ext \
--without-gmp \
--with-out-ext=tk,tk/tkutil,win32,win32ole,dbm,gdbm,readline \
# Does not compile with this. Workaround is --without-gmp
# https://bugs.ruby-lang.org/issues/11940
#--with-static-linked-ext \
# even not used, host build with restricted exts results in gems not being
# compiled for target (probably some cross compiling problem like checking
# host for selecting target features)
@ -83,6 +87,13 @@ define Build/InstallDev
) | ( cd $(1); $(TAR) -xf - )
endef
define Host/Install
# When ruby version is updated, make install asks in some cases before replace
# an existing different file. Remove them before install and avoid the interaction
rm -f $(HOST_BUILD_PREFIX)/bin/rake
$(call Host/Install/Default)
endef
define Package/ruby/Default
SUBMENU:=Ruby
SECTION:=lang
@ -196,6 +207,7 @@ endef
define Package/ruby-cgi/files
/usr/lib/ruby/$(PKG_LIBVER)/cgi
/usr/lib/ruby/$(PKG_LIBVER)/cgi.rb
/usr/lib/ruby/$(PKG_LIBVER)/*/cgi/escape.so
endef
define Package/ruby-csv/files
@ -226,6 +238,18 @@ define Package/ruby-debuglib/files
/usr/lib/ruby/$(PKG_LIBVER)/*/objspace.so
endef
define Package/ruby-did-you-mean/files
/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/did_you_mean-*.gemspec
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/
endef
define Package/ruby-did-you-mean/files-excluded
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/benchmark
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/doc
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/evaluation
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/test
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/did_you_mean-*/*.md
endef
define Package/ruby-digest/description
Provides digest* files. Can be configured to use OpenSSL or
bundled hash functions.
@ -363,6 +387,7 @@ define Package/ruby-minitest/files
endef
define Package/ruby-minitest/files-excluded
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.rdoc
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/*.txt
endef
@ -413,6 +438,15 @@ define Package/ruby-net/files
/usr/lib/ruby/$(PKG_LIBVER)/net/*
endef
define Package/ruby-net-telnet/files
/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/net-telnet-*.gemspec
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/
endef
define Package/ruby-net-telnet/files-excluded
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.md
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/net-telnet-*/*.txt
endef
define Package/ruby-nkf/files
/usr/lib/ruby/$(PKG_LIBVER)/kconv.rb
/usr/lib/ruby/$(PKG_LIBVER)/*/nkf.so
@ -456,6 +490,7 @@ endef
define Package/ruby-psych/files
/usr/lib/ruby/$(PKG_LIBVER)/psych
/usr/lib/ruby/$(PKG_LIBVER)/psych.rb
/usr/lib/ruby/$(PKG_LIBVER)/psych_jars.rb
/usr/lib/ruby/$(PKG_LIBVER)/*/psych.so
/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/psych-*.gemspec
endef
@ -466,19 +501,21 @@ define Package/ruby-racc/files
endef
define Package/ruby-rake/files
/usr/lib/ruby/$(PKG_LIBVER)/rake/
/usr/lib/ruby/$(PKG_LIBVER)/rake.rb
/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/rake-*.gemspec
/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/rake-*.gemspec
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/
endef
define Package/ruby-rake/files-excluded
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/doc
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/test
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/*.rdoc
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-*/*.txt
/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/rake-10.4.2/lib/rake/runtest.rb
endef
define Package/ruby-rake/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/;
$(call RubyBuildPackage/install,rake,$(1))
endef
define Package/ruby-rake/files-excluded
/usr/lib/ruby/$(PKG_LIBVER)/rake/runtest.rb
endef
define Package/ruby-rbconfig/files
/usr/lib/ruby/$(PKG_LIBVER)/*/rbconfig.rb
@ -660,6 +697,7 @@ $(eval $(call RubyBuildPackage,csv,CSV library,+ruby-patterns +ruby-datetime +ru
$(eval $(call RubyBuildPackage,datetime,date library))
$(eval $(call RubyBuildPackage,dbm,support for dbm,+libdb47))
$(eval $(call RubyBuildPackage,debuglib,debug library,+ruby-multithread +ruby-prettyprint))
$(eval $(call RubyBuildPackage,did-you-mean,did you mean? experience,+ruby-misc))
$(eval $(call RubyBuildPackage,digest,Digest Library,+RUBY_DIGEST_USE_OPENSSL:libopenssl))
$(eval $(call RubyBuildPackage,drb,distributed object system,+ruby-filelib +ruby-patterns +ruby-socket))
$(eval $(call RubyBuildPackage,enc,character re-coding library charset (small subset),))
@ -679,8 +717,9 @@ $(eval $(call RubyBuildPackage,misc,standard libraries subset (miscelaneous file
$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse +ruby-rbconfig))
$(eval $(call RubyBuildPackage,multithread,multithread library,+ruby-misc))
$(eval $(call RubyBuildPackage,net,Network Protocols Library,+ruby-datetime +ruby-digest +ruby-filelib +ruby-uri))
$(eval $(call RubyBuildPackage,net-telnet,telnet client,+ruby-net))
$(eval $(call RubyBuildPackage,nkf,Network Kanji Filter,+ruby-enc))
$(eval $(call RubyBuildPackage,openssl,support for openssl,+ruby-enc +ruby-misc +libopenssl))
$(eval $(call RubyBuildPackage,openssl,support for openssl,+ruby-enc +ruby-multithread +libopenssl))
$(eval $(call RubyBuildPackage,optparse,command-line option analysis,+ruby-misc))
$(eval $(call RubyBuildPackage,patterns,design patterns implementation,+ruby-multithread))
$(eval $(call RubyBuildPackage,powerassert,Gem power_assert,+ruby-ripper))


+ 152
- 0
lang/ruby/patches/001-acinclude.m4_rename_aclocal.m4.patch View File

@ -0,0 +1,152 @@
https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/53414
Fixes:
https://bugs.ruby-lang.org/issues/11941
It might be incorporated in the following release
Index: aclocal.m4
===================================================================
--- a/aclocal.m4 (revision 53413)
+++ b/aclocal.m4 (revision 53414)
@@ -1,46 +0,0 @@
-# -*- autoconf -*-
-
-AC_DEFUN([_COLORIZE_RESULT_PREPARE], [
- msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset=
- AS_IF([test "x${CONFIGURE_TTY}" = xyes -o -t 1], [
- msg_begin="`tput smso 2>/dev/null`"
- AS_CASE(["$msg_begin"], ['@<:@'*m],
- [msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`"
- msg_checking="${msg_begin}33m"
- AS_IF([test ${TEST_COLORS:+set}], [
- msg_result_yes=[`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"`]
- msg_result_no=[`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"`]
- msg_result_other=[`expr ":$TEST_COLORS:" : ".*:skip=\([^:]*\):"`]
- ])
- msg_result_yes="${msg_begin}${msg_result_yes:-32;1}m"
- msg_result_no="${msg_begin}${msg_result_no:-31;1}m"
- msg_result_other="${msg_begin}${msg_result_other:-33;1}m"
- msg_reset="${msg_begin}m"
- ])
- AS_UNSET(msg_begin)
- ])
- AS_REQUIRE_SHELL_FN([colorize_result],
- [AS_FUNCTION_DESCRIBE([colorize_result], [MSG], [Colorize result])],
- [AS_CASE(["$[]1"],
- [yes], [AS_ECHO(["${msg_result_yes}$[]1${msg_reset}]")],
- [no], [AS_ECHO(["${msg_result_no}$[]1${msg_reset}]")],
- [AS_ECHO(["${msg_result_other}$[]1${msg_reset}]")])])
-])
-
-AC_DEFUN([COLORIZE_RESULT], [AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
- AS_LITERAL_IF([$1],
- [m4_case([$1],
- [yes], [AS_ECHO(["${msg_result_yes}$1${msg_reset}"])],
- [no], [AS_ECHO(["${msg_result_no}$1${msg_reset}"])],
- [AS_ECHO(["${msg_result_other}$1${msg_reset}"])])],
- [colorize_result "$1"]) dnl
-])
-
-AC_DEFUN([AC_CHECKING],[dnl
-AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
-AS_MESSAGE([checking ${msg_checking}$1${msg_reset}...])])
-
-AC_DEFUN([AC_MSG_RESULT], [dnl
-{ _AS_ECHO_LOG([result: $1])
-COLORIZE_RESULT([$1]); dnl
-}])
Index: acinclude.m4
===================================================================
--- a/acinclude.m4 (revision 0)
+++ b/acinclude.m4 (revision 53414)
@@ -0,0 +1,46 @@
+# -*- autoconf -*-
+
+AC_DEFUN([_COLORIZE_RESULT_PREPARE], [
+ msg_checking= msg_result_yes= msg_result_no= msg_result_other= msg_reset=
+ AS_IF([test "x${CONFIGURE_TTY}" = xyes -o -t 1], [
+ msg_begin="`tput smso 2>/dev/null`"
+ AS_CASE(["$msg_begin"], ['@<:@'*m],
+ [msg_begin="`echo "$msg_begin" | sed ['s/[0-9]*m$//']`"
+ msg_checking="${msg_begin}33m"
+ AS_IF([test ${TEST_COLORS:+set}], [
+ msg_result_yes=[`expr ":$TEST_COLORS:" : ".*:pass=\([^:]*\):"`]
+ msg_result_no=[`expr ":$TEST_COLORS:" : ".*:fail=\([^:]*\):"`]
+ msg_result_other=[`expr ":$TEST_COLORS:" : ".*:skip=\([^:]*\):"`]
+ ])
+ msg_result_yes="${msg_begin}${msg_result_yes:-32;1}m"
+ msg_result_no="${msg_begin}${msg_result_no:-31;1}m"
+ msg_result_other="${msg_begin}${msg_result_other:-33;1}m"
+ msg_reset="${msg_begin}m"
+ ])
+ AS_UNSET(msg_begin)
+ ])
+ AS_REQUIRE_SHELL_FN([colorize_result],
+ [AS_FUNCTION_DESCRIBE([colorize_result], [MSG], [Colorize result])],
+ [AS_CASE(["$[]1"],
+ [yes], [AS_ECHO(["${msg_result_yes}$[]1${msg_reset}]")],
+ [no], [AS_ECHO(["${msg_result_no}$[]1${msg_reset}]")],
+ [AS_ECHO(["${msg_result_other}$[]1${msg_reset}]")])])
+])
+
+AC_DEFUN([COLORIZE_RESULT], [AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
+ AS_LITERAL_IF([$1],
+ [m4_case([$1],
+ [yes], [AS_ECHO(["${msg_result_yes}$1${msg_reset}"])],
+ [no], [AS_ECHO(["${msg_result_no}$1${msg_reset}"])],
+ [AS_ECHO(["${msg_result_other}$1${msg_reset}"])])],
+ [colorize_result "$1"]) dnl
+])
+
+AC_DEFUN([AC_CHECKING],[dnl
+AC_REQUIRE([_COLORIZE_RESULT_PREPARE])dnl
+AS_MESSAGE([checking ${msg_checking}$1${msg_reset}...])])
+
+AC_DEFUN([AC_MSG_RESULT], [dnl
+{ _AS_ECHO_LOG([result: $1])
+COLORIZE_RESULT([$1]); dnl
+}])
Property changes on: acinclude.m4
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Index: common.mk
===================================================================
--- a/common.mk (revision 53413)
+++ b/common.mk (revision 53414)
@@ -518,7 +518,7 @@
$(Q)$(RM) id.c id.h probes.dmyh
$(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) parse.c parse.h lex.c enc/trans/newline.c $(PRELUDES) revision.h
$(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) id.c id.h probes.dmyh
- $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure tool/config.guess tool/config.sub gems/*.gem
+ $(Q)$(CHDIR) $(srcdir) && $(exec) $(RM) configure aclocal.m4 tool/config.guess tool/config.sub gems/*.gem
realclean-ext:: PHONY
realclean-golf: distclean-golf
$(Q)$(RM) $(GOLFPRELUDES)
Index: Makefile.in
===================================================================
--- a/Makefile.in (revision 53413)
+++ b/Makefile.in (revision 53414)
@@ -22,6 +22,7 @@
YACC = bison
PURIFY =
AUTOCONF = autoconf
+ACLOCAL = aclocal
CONFIGURE = @CONFIGURE@
@SET_MAKE@
MKFILES = @MAKEFILES@
@@ -310,6 +311,9 @@
$(srcdir)/$(CONFIGURE): $(srcdir)/configure.in $(srcdir)/aclocal.m4
$(CHDIR) $(srcdir) && exec $(AUTOCONF) -o $(@F)
+$(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4
+ $(CHDIR) $(srcdir) && exec $(ACLOCAL)
+
incs: id.h
all-incs: probes.h

+ 0
- 36
lang/ruby/patches/001-rdoc-remove_gems_dep.patch View File

@ -1,36 +0,0 @@
References:
https://github.com/rdoc/rdoc/pull/340
--- ruby-2.1.2.orig/lib/rdoc.rb 2014-09-02 17:14:28.719224215 -0300
+++ ruby-2.1.2/lib/rdoc.rb 2014-09-02 17:14:28.762223911 -0300
@@ -109,6 +109,8 @@
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

Loading…
Cancel
Save