[94823] trunk/dports/lang/ruby
kimuraw at macports.org
kimuraw at macports.org
Sat Jun 30 09:36:09 PDT 2012
Revision: 94823
https://trac.macports.org/changeset/94823
Author: kimuraw at macports.org
Date: 2012-06-30 09:36:07 -0700 (Sat, 30 Jun 2012)
Log Message:
-----------
lang/ruby: upgrade to 1.8.7-p370.
- remove variant "thread_hooks". not maitained.
- fix error drbssl with openssl-1.0.1.
Modified Paths:
--------------
trunk/dports/lang/ruby/Portfile
Added Paths:
-----------
trunk/dports/lang/ruby/files/patch-lib-drb-ssl.rb.diff
Removed Paths:
-------------
trunk/dports/lang/ruby/files/patch-thread-hooks.diff
Modified: trunk/dports/lang/ruby/Portfile
===================================================================
--- trunk/dports/lang/ruby/Portfile 2012-06-30 15:39:57 UTC (rev 94822)
+++ trunk/dports/lang/ruby/Portfile 2012-06-30 16:36:07 UTC (rev 94823)
@@ -4,7 +4,7 @@
PortGroup muniversal 1.0
name ruby
-version 1.8.7-p358
+version 1.8.7-p370
revision 0
categories lang ruby
@@ -21,9 +21,9 @@
master_sites ruby:1.8
dist_subdir ruby
-checksums md5 de35f00997f4ccee3e22dff0f2d01b8a \
- rmd160 7196a000d39e4cd24e7911839c828642d54377bd \
- sha1 2b78dc421cfbca81ef1375a1c3da9f0f70c548fa
+checksums md5 1e4c3194537dd8ff92e756993e55a29d \
+ rmd160 0c35ed92e4e77c6e6859d39244489c93f4efad50 \
+ sha1 92770a8159cd9049ffc5bc3ce4777b701eb19d7b
use_bzip2 yes
@@ -43,26 +43,32 @@
# like "getaddrinfo: nodename nor servname provided, or not
# known (SocketError)"
# c99: gperf generates code that doesn't work with clang (https://trac.macports.org/ticket/29974)
+# lib-drb-ssl.rb: 512bits rsa key is too small for openssl-1.0.1.
+# (http://bugs.ruby-lang.org/issues/6221)
patchfiles patch-vendordir.diff \
patch-bug3604.diff \
patch-bug19050.diff \
patch-bug15528.diff \
- patch-c99.diff
+ patch-c99.diff \
+ patch-lib-drb-ssl.rb.diff
# ignore getcontext() and setcontext()
-# on 10.5, these functions have some problems (SEGV on ppc, slower than 1.8.6)
+# on 10.5 or later, these functions have some problems (SEGV on ppc, slower than 1.8.6)
# http://chopine.be/lrz/ruby-osx-patches/ignore-gsetcontext.diff
patchfiles-append patch-node.h.diff
use_parallel_build no
-# #30275: ruby built with clang or llvm-gcc does not work
-# see list "MacPorts on Lion (common issues, fixes, and workarounds)"
-# http://lists.macosforge.org/pipermail/macports-dev/2011-July/015263.html
+# [OK] apple-gcc-4.2
+# clang (Xcode 4.2 or later) with CFLAGS="-std=c89 -O0"
+# [NG] llvm-gcc-4.2
+# clang (Xcode 4.1 or earlier)
+# clang (Xcode 4.2 or later) with CFLAGS=-O[12s]
if {${configure.compiler} == "llvm-gcc-4.2"} {
configure.compiler gcc-4.2
} elseif {${configure.compiler} == "clang"} {
depends_build-append port:apple-gcc42
+ depends_skip_archcheck-append apple-gcc42
configure.compiler apple-gcc-4.2
# base (as of 2.0.3) doesn't set cxx for apple-gcc-4.2
configure.cxx ${prefix}/bin/g++-apple-4.2
@@ -142,10 +148,6 @@
configure.args-append --enable-tcltk-framework
}
-variant thread_hooks description "apply Apple's thread_hooks patch" {
- patchfiles-append patch-thread-hooks.diff
-}
-
variant no_doc description "do not install rdoc documents" {
destroot.target-delete install-doc
}
@@ -159,8 +161,6 @@
}
}
-default_variants +thread_hooks
-
livecheck.type regex
livecheck.url http://ftp.ruby-lang.org/pub/ruby/1.8/
livecheck.regex {ruby-(\d+(?:\.\d+)*(?:-p\d+))}
Added: trunk/dports/lang/ruby/files/patch-lib-drb-ssl.rb.diff
===================================================================
--- trunk/dports/lang/ruby/files/patch-lib-drb-ssl.rb.diff (rev 0)
+++ trunk/dports/lang/ruby/files/patch-lib-drb-ssl.rb.diff 2012-06-30 16:36:07 UTC (rev 94823)
@@ -0,0 +1,13 @@
+Index: lib/drb/ssl.rb
+===================================================================
+--- lib/drb/ssl.rb (revision 36225)
++++ lib/drb/ssl.rb (working copy)
+@@ -54,7 +54,7 @@
+ return
+ end
+
+- rsa = OpenSSL::PKey::RSA.new(512){|p, n|
++ rsa = OpenSSL::PKey::RSA.new(1024){|p, n|
+ next unless self[:verbose]
+ case p
+ when 0; $stderr.putc "." # BN_generate_prime
Deleted: trunk/dports/lang/ruby/files/patch-thread-hooks.diff
===================================================================
--- trunk/dports/lang/ruby/files/patch-thread-hooks.diff 2012-06-30 15:39:57 UTC (rev 94822)
+++ trunk/dports/lang/ruby/files/patch-thread-hooks.diff 2012-06-30 16:36:07 UTC (rev 94823)
@@ -1,130 +0,0 @@
-diff -ur ../ruby-1.8.7-p160.mp_patched/eval.c ./eval.c
---- ../ruby-1.8.7-p160.mp_patched/eval.c 2009-03-23 18:28:31.000000000 +0900
-+++ ./eval.c 2009-04-18 00:19:27.000000000 +0900
-@@ -217,6 +217,25 @@
-
- #include <sys/stat.h>
-
-+
-+typedef struct threadswitch_hook {
-+ rb_threadswitch_hook_func_t func;
-+ struct threadswitch_hook *next;
-+} rb_threadswitch_hook_t;
-+
-+static rb_threadswitch_hook_t *threadswitch_hooks;
-+
-+#define EXEC_THREADSWITCH_HOOK(event, thread) \
-+ do { \
-+ rb_threadswitch_hook_t *hook = threadswitch_hooks; \
-+ \
-+ while (hook) { \
-+ (*hook->func)(event, thread); \
-+ hook = hook->next; \
-+ } \
-+ } while (0)
-+
-+
- VALUE rb_cProc;
- VALUE rb_cBinding;
- static VALUE proc_invoke _((VALUE,VALUE,VALUE,VALUE));
-@@ -10515,6 +10534,8 @@
- stack_free(th)
- rb_thread_t th;
- {
-+ EXEC_THREADSWITCH_HOOK(RUBY_THREADSWITCH_FREE,th->thread);
-+
- if (th->stk_ptr) free(th->stk_ptr);
- th->stk_ptr = 0;
- #ifdef __ia64
-@@ -10574,6 +10595,8 @@
- VALUE *pos;
- size_t len;
- static VALUE tval;
-+
-+ EXEC_THREADSWITCH_HOOK(RUBY_THREADSWITCH_SAVE,th->thread);
-
- len = ruby_stack_length(&pos);
- th->stk_len = 0;
-@@ -10768,6 +10791,8 @@
- #define STACK_PAD_SIZE 1024
- volatile VALUE space[STACK_PAD_SIZE], *sp = space;
-
-+ EXEC_THREADSWITCH_HOOK(RUBY_THREADSWITCH_RESTORE,th->thread);
-+
- #if !STACK_GROW_DIRECTION
- if (space < rb_gc_stack_start) {
- /* Stack grows downward */
-@@ -10897,6 +10922,41 @@
- rb_thread_main_jump(e, RESTORE_RAISE);
- }
-
-+void *
-+rb_add_threadswitch_hook(func)
-+ rb_threadswitch_hook_func_t func;
-+{
-+ rb_threadswitch_hook_t *hook;
-+ rb_thread_t th;
-+
-+ hook = ALLOC(rb_threadswitch_hook_t);
-+ hook->func = func;
-+ hook->next = threadswitch_hooks;
-+ threadswitch_hooks = hook;
-+
-+ FOREACH_THREAD(th) {
-+ (*func)(RUBY_THREADSWITCH_INIT, th->thread);
-+ } END_FOREACH(th);
-+
-+ return hook;
-+}
-+
-+void
-+rb_remove_threadswitch_hook(handle)
-+ void *handle;
-+{
-+ rb_threadswitch_hook_t **hook_p, *hook;
-+
-+ for (hook_p = &threadswitch_hooks; *hook_p; hook_p = &hook->next) {
-+ hook = *hook_p;
-+ if (hook == (rb_threadswitch_hook_t*)handle) {
-+ *hook_p = hook->next;
-+ xfree(hook);
-+ return;
-+ }
-+ }
-+}
-+
- static void
- copy_fds(dst, src, max)
- fd_set *dst, *src;
-@@ -12143,6 +12203,8 @@
- THREAD_ALLOC(th);
- th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);
-
-+ EXEC_THREADSWITCH_HOOK(RUBY_THREADSWITCH_INIT,th->thread);
-+
- for (vars = th->dyna_vars; vars; vars = vars->next) {
- if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
- FL_SET(vars, DVAR_DONT_RECYCLE);
-diff -ur ../ruby-1.8.7-p160.mp_patched/ruby.h ./ruby.h
---- ../ruby-1.8.7-p160.mp_patched/ruby.h 2008-07-10 13:54:53.000000000 +0900
-+++ ./ruby.h 2009-04-18 00:16:34.000000000 +0900
-@@ -766,6 +766,19 @@
- void ruby_native_thread_kill _((int));
- #endif
-
-+
-+typedef unsigned int rb_threadswitch_event_t;
-+
-+#define RUBY_THREADSWITCH_INIT 0x01
-+#define RUBY_THREADSWITCH_FREE 0x02
-+#define RUBY_THREADSWITCH_SAVE 0x04
-+#define RUBY_THREADSWITCH_RESTORE 0x08
-+
-+typedef void (*rb_threadswitch_hook_func_t) _((rb_threadswitch_event_t,VALUE));
-+
-+void *rb_add_threadswitch_hook _((rb_threadswitch_hook_func_t func));
-+void rb_remove_threadswitch_hook _((void *handle));
-+
- #if defined(__cplusplus)
- #if 0
- { /* satisfy cc-mode */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120630/d45f2d89/attachment-0001.html>
More information about the macports-changes
mailing list