This patch solves the bug https://dev.openwrt.org/ticket/9873 that prevents the use of socket (and gems) in ruby when crosscompiling. Also, it updates to latest 1.9.x version and remove unnecessary patches.
Signed-off-by: Luiz Angelo Daros de Luca <luizl...@gmail.com> Index: feeds/packages/lang/ruby/patches/0001-Add-option-which-enable-SSLv2-support.patch =================================================================== --- feeds/packages/lang/ruby/patches/0001-Add-option-which-enable-SSLv2-support.patch (revision 36739) +++ feeds/packages/lang/ruby/patches/0001-Add-option-which-enable-SSLv2-support.patch (working copy) @@ -1,53 +0,0 @@ -From b983e73adf7a7d3fd07fdf493eee51c22881a6e6 Mon Sep 17 00:00:00 2001 -From: Nobuhiro Iwamatsu <iwama...@nigauri.org> -Date: Wed, 6 Apr 2011 02:28:09 +0900 -Subject: [PATCH] Add option which enable SSLv2 support - -From openssl 1.0, SSLv2 becomes disable by default. -If you want to use SSLv2 in ruby, you need config with --enable-opensslv2. -The SSLv2 support is disable by default. - -Signed-off-by: Nobuhiro Iwamatsu <iwama...@nigauri.org> ---- - ext/openssl/extconf.rb | 8 ++++++++ - ext/openssl/ossl_ssl.c | 2 ++ - 2 files changed, 10 insertions(+), 0 deletions(-) - -diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb -index b1f2d88..89c6f19 100644 ---- a/ext/openssl/extconf.rb -+++ b/ext/openssl/extconf.rb -@@ -33,6 +33,14 @@ if with_config("debug") or enable_config("debug") - end - end - -+## -+## From openssl 1.0, SSLv2 becomes disable by default. -+## If you want to use SSLv2 in ruby, you need config with --enable-opensslv2. -+## -+if enable_config("opensslv2") -+ $defs << "-DENABLE_OPENSSLV2" -+end -+ - message "=== Checking for system dependent stuff... ===\n" - have_library("nsl", "t_open") - have_library("socket", "socket") -diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c -index d8951fb..d0c9059 100644 ---- a/ext/openssl/ossl_ssl.c -+++ b/ext/openssl/ossl_ssl.c -@@ -107,9 +107,11 @@ struct { - OSSL_SSL_METHOD_ENTRY(TLSv1), - OSSL_SSL_METHOD_ENTRY(TLSv1_server), - OSSL_SSL_METHOD_ENTRY(TLSv1_client), -+#if defined(ENABLE_OPENSSLV2) - OSSL_SSL_METHOD_ENTRY(SSLv2), - OSSL_SSL_METHOD_ENTRY(SSLv2_server), - OSSL_SSL_METHOD_ENTRY(SSLv2_client), -+#endif - OSSL_SSL_METHOD_ENTRY(SSLv3), - OSSL_SSL_METHOD_ENTRY(SSLv3_server), - OSSL_SSL_METHOD_ENTRY(SSLv3_client), --- -1.7.4.1 - Index: feeds/packages/lang/ruby/patches/000-ignore_wide_getaddrinfo_while_crosscompiling.patch =================================================================== --- feeds/packages/lang/ruby/patches/000-ignore_wide_getaddrinfo_while_crosscompiling.patch (revision 0) +++ feeds/packages/lang/ruby/patches/000-ignore_wide_getaddrinfo_while_crosscompiling.patch (working copy) @@ -0,0 +1,10 @@ +--- a/ext/socket/extconf.rb 2013-02-14 23:20:13.581918676 -0200 ++++ b/ext/socket/extconf.rb 2013-02-14 23:21:25.761918667 -0200 +@@ -125,6 +125,7 @@ + have_type("PADDRINFO", %w[ ws2tcpip.h wspiapi.h ]) + + getaddr_info_ok = (enable_config("wide-getaddrinfo") && :wide) || ++ (CROSS_COMPILING && :cross) || + (checking_for("wide getaddrinfo") {try_run(<<EOF)} && :os) + #{cpp_include(headers)} + #include <stdlib.h> Index: feeds/packages/lang/ruby/Makefile =================================================================== --- feeds/packages/lang/ruby/Makefile (revision 36739) +++ feeds/packages/lang/ruby/Makefile (working copy) @@ -15,14 +15,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ruby -PKG_VERSION:=1.9.2-p0 +PKG_VERSION:=1.9.3-p429 PKG_RELEASE:=1 PKG_LIBVER:=1.9 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/ -PKG_MD5SUM:=d8a02cadf57d2571cd4250e248ea7e4b +PKG_MD5SUM:=c2b2de5ef15ea9b1aaa3152f9112af1b PKG_BUILD_DEPENDS:=ruby/host PKG_INSTALL:=1 @@ -204,12 +204,8 @@ CONFIGURE_ARGS += \ --enable-shared \ - --enable-static \ --disable-rpath \ - --enable-ipv6 \ - --enable-wide-getaddrinfo \ - --with-ruby-version=minor \ - --with-iconv-dir=$(ICONV_PREFIX) \ + --with-ruby-version=minor TARGET_LDFLAGS += -L$(PKG_BUILD_DIR) _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel