From 0c35e79f90cc9d20dae4db4230fe1ed91661e23fdea1b0d0c9f283aeaecce4b4 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar Date: Tue, 8 May 2012 11:54:54 +0000 Subject: [PATCH] Accepting request 116706 from devel:languages:ruby:1.9 - make this package a wrapper around the default ruby - ruby19 for now OBS-URL: https://build.opensuse.org/request/show/116706 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby?expand=0&rev=27 --- gem_build_cleanup | 14 + gemrc | 11 + irb.1 | 488 ----- ruby-1.8.7-p357.tar.bz2 | 3 - ruby-1.8.7.p299_date_remove_privat.patch | 15 - ruby-1.8.7.p299_lib64.patch | 13 - ruby-1.8.7.p299_pedantic-headers.patch | 13 - ....7.p334_remove_zlib_test_params_test.patch | 72 - ruby-1.8.7.p72_topdir.patch | 29 - ruby-1.8.7.p72_vendor_specific.patch | 16 - ruby-1.8.x_digest_non_void_return.patch | 83 - ruby-1.8.x_openssl_branch_update.patch | 1675 ----------------- ruby-1.8.x_rubylibdir.patch | 18 - ruby-1.8.x_yaml2byte.patch | 37 - ruby-doc-bundle.tar.bz2 | 3 - ruby-rpmlintrc | 5 - ruby.changes | 5 + ruby.common-macros | 2 + ruby.macros | 34 +- ruby.spec | 491 +---- site-specific.rb | 14 - vendor-specific.rb | 14 - 22 files changed, 86 insertions(+), 2969 deletions(-) create mode 100644 gem_build_cleanup create mode 100644 gemrc delete mode 100644 irb.1 delete mode 100644 ruby-1.8.7-p357.tar.bz2 delete mode 100644 ruby-1.8.7.p299_date_remove_privat.patch delete mode 100644 ruby-1.8.7.p299_lib64.patch delete mode 100644 ruby-1.8.7.p299_pedantic-headers.patch delete mode 100644 ruby-1.8.7.p334_remove_zlib_test_params_test.patch delete mode 100644 ruby-1.8.7.p72_topdir.patch delete mode 100644 ruby-1.8.7.p72_vendor_specific.patch delete mode 100644 ruby-1.8.x_digest_non_void_return.patch delete mode 100644 ruby-1.8.x_openssl_branch_update.patch delete mode 100644 ruby-1.8.x_rubylibdir.patch delete mode 100644 ruby-1.8.x_yaml2byte.patch delete mode 100644 ruby-doc-bundle.tar.bz2 delete mode 100644 ruby-rpmlintrc create mode 100644 ruby.common-macros delete mode 100644 site-specific.rb delete mode 100644 vendor-specific.rb diff --git a/gem_build_cleanup b/gem_build_cleanup new file mode 100644 index 0000000..d3d49f3 --- /dev/null +++ b/gem_build_cleanup @@ -0,0 +1,14 @@ +#!/bin/sh +if [ ${#*} = 1 ] ; then + if [ -d "$1" ] ; then + find $1 \ + \( -name \*.o -o -name Makefile -o -name config.log -o -name config.status -o -name Makefile.html -o -name gem_make.out -o -name mkmf.log -o -name \*.bak -o -name .deps -o -name .libs -o -name CVS \) \ + -print0 | xargs -r0 rm -rv || : + else + echo "'$1' does not exists or is not a directory! Exiting." >&2 + exit 1 + fi +else + echo "Please pass exact one argument to this script! Exiting." >&2 + exit 1 +fi diff --git a/gemrc b/gemrc new file mode 100644 index 0000000..3447b53 --- /dev/null +++ b/gemrc @@ -0,0 +1,11 @@ +--- +:benchmark: false +install: --format-executable --no-user-install --no-rdoc +:backtrace: true +:update_sources: true +format_executable: true +:verbose: true +update: --format-executable --no-user-install --no-rdoc +:bulk_threshold: 1000 +:sources: +- http://rubygems.org diff --git a/irb.1 b/irb.1 deleted file mode 100644 index 93fd5e4..0000000 --- a/irb.1 +++ /dev/null @@ -1,488 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! it was generated by rd2 -.TH irb-beta 1 "May 2001" -.SH What is irb? -.PP -irb stands for `interactive ruby'. irb is a tool to execute interactively -ruby expressions read from stdin. -.SH Invoking -.PP -.nf -\& % ruby \-r irb \-e0 -\& % irb -.fi -Either of the aboves. In the former style, options can be specified -as follows: -.nf -\& % ruby \-r irb \-e0 \-\- \-v -.fi -.SH Usage -.PP -Use of irb is easy if you know ruby. Executing irb, prompts are -displayed as follows. Then, enter expression of ruby. A input is -executed when it is syntacticaly completed. -.nf -\& dim% irb -\& irb(main):001:0> 1+2 -\& 3 -\& irb(main):002:0> class Foo -\& irb(main):003:1> def foo -\& irb(main):004:2> print 1 -\& irb(main):005:2> end -\& irb(main):006:1> end -\& nil -\& irb(main):007:0> -.fi -And, Readline extesion module can be used with irb. Using Readline -is the standard default action if Readline is installed. -.SH Command line option -.PP -.nf -\& irb.rb [options] file_name opts -\& options: -\& \-f suppress read ~/.irbrc -\& \-m bc mode (fraction or matrix are available) -\& \-d set $DEBUG to true (same as `ruby \-d') -\& \-r load\-module same as `ruby \-r' -\& \-\-inspect uses `inspect' for output (the default except bc mode) -\& \-\-noinspect doesn't uses inspect for output -\& \-\-readline uses Readline extension module -\& \-\-noreadline doesn't use Readline extension module -\& \-\-prompt prompt\-mode -\& \-\-prompt\-mode prompt\-mode -.fi -.nf -\& switches prompt mode. Pre\-defined prompt modes are -\& `defalut', `simple', `xmp' and `inf\-ruby' -.fi -.nf -\& \-\-inf\-ruby\-mode uses prompt appreciate for inf\-ruby\-mode on emacs. -.fi -.nf -\& Suppresses \-\-readline. -.fi -.nf -\& \-\-simple\-prompt simple prompt mode -\& \-\-noprompt no prompt -\& \-\-tracer display trace for each execution of commands. -\& \-\-back\-trace\-limit n -.fi -.nf -\& displayes backtrace top n and tail n. The default -\& value is 16. -.fi -.nf -\& \-\-irb_debug n sets internal debug level to n (It shouldn't be used) -\& \-v, \-\-version prints the version of irb -.fi -.SH Configurations -.PP -irb reads `~/.irbrc' when it is invoked. If `~/.irbrb' doesn't exist -irb try to read in the order `.irbrc', `irb.rc', `_irbrc' then `$irbrc'. -The following is altanative to the command line option. To use them -type as follows in an irb session. -.nf -\& IRB.conf[:IRB_NAME]="irb" -\& IRB.conf[:MATH_MODE]=false -\& IRB.conf[:USE_TRACER]=false -\& IRB.conf[:USE_LOADER]=false -\& IRB.conf[:IGNORE_SIGINT]=true -\& IRB.conf[:IGNORE_EOF]=false -\& IRB.conf[:INSPECT_MODE]=nil -\& IRB.conf[:IRB_RC] = nil -\& IRB.conf[:BACK_TRACE_LIMIT]=16 -\& IRB.conf[:USE_LOADER] = false -\& IRB.conf[:USE_READLINE] = nil -\& IRB.conf[:USE_TRACER] = false -\& IRB.conf[:IGNORE_SIGINT] = true -\& IRB.conf[:IGNORE_EOF] = false -\& IRB.conf[:PROMPT_MODE] = :DEFALUT -\& IRB.conf[:PROMPT] = {...} -\& IRB.conf[:DEBUG_LEVEL]=0 -\& IRB.conf[:VERBOSE]=true -.fi -.SH Customizing prompt -.PP -To costomize the prompt you set a variable -.nf -\& IRB.conf[:PROMPT] -.fi -For example, describe as follows in `.irbrc'. -.nf -\& IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode -\& :PROMPT_I => nil, # normal prompt -\& :PROMPT_S => nil, # prompt for continuated strings -\& :PROMPT_C => nil, # prompt for continuated statement -\& :RETURN => " ==>%s\\n" # format to return value -\& } -.fi -Then, invoke irb with the above prompt mode by -.nf -\& % irb \-\-prompt my\-prompt -.fi -Or add the following in `.irbrc'. -.nf -\& IRB.conf[:PROMPT_MODE] = :MY_PROMPT -.fi -Constants PROMPT_I, PROMPT_S and PROMPT_C specifies the format. -In the prompt specification, some special strings are available. -.nf -\& %N command name which is running -\& %m to_s of main object (self) -\& %M inspect of main object (self) -\& %l type of string(", ', /, ]), `]' is inner %w[...] -\& %NNi indent level. NN is degits and means as same as printf("%NNd"). -\& It can be ommited -\& %NNn line number. -\& %% % -.fi -For instance, the default prompt mode is defined as follows: -IRB.conf[:PROMPT_MODE][:DEFAULT] = { - -.TP -.fi -.B -PROMPT_I => "%N(%m):%03n:%i> ", - - -.TP -.fi -.B -PROMPT_S => "%N(%m):%03n:%i%l ", - - -.TP -.fi -.B -PROMPT_C => "%N(%m):%03n:%i* ", - - -.TP -.fi -.B -RETURN => "%s\\n" -} -RETURN is used to printf. -.SH Configurating subirb -.PP -The command line option or IRB.conf specify the default behavior of -(sub)irb. On the other hand, each conf of in the next sction `6. Command' -is used to individually configurate (sub)irb. -If proc is set to IRB.conf[:IRB_RC], its subirb will be invoked after -execution of that proc under giving the context of irb as its -aregument. By this mechanism each subirb can be configurated. -.SH Command -.PP -For irb commands, both simple name and `irb_'\-prefixed name are prepared. - -.TP -.fi -.B -exit, quit, irb_exit -Quits (sub)irb. -if you've done cb (see below), exit from the binding mode. - - -.TP -.fi -.B -conf, irb_context -Displays current configuration. Modifing the configuration is -achieved by sending message to `conf'. - - -.TP -.fi -.B -conf.back_trace_limit -Sets display lines of backtrace as top n and tail n. -The default value is 16. - - -.TP -.fi -.B -conf.debug_level = N -Sets debug level of irb. - - -.TP -.fi -.B -conf.ignore_eof = true/false -Whether ^D (control\-d) will be ignored or not. -If false is set, ^D means quit. - - -.TP -.fi -.B -conf.ignore_sigint= true/false -Whether ^C (control\-c) will be ignored or not. -If false is set, ^D means quit. If true, - -.nf -\& during input: cancel inputing then return to top level. -\& during execute: abondon current execution. -.fi - - -.TP -.fi -.B -conf.inf_ruby_mode = true/false -Whether inf\-ruby\-mode or not. The default value is false. - - -.TP -.fi -.B -conf.inspect_mode = true/false/nil -Specifies inspect mode. -true: display inspect -false: display to_s -nil: inspect mode in non math mode, - -.nf -\& non inspect mode in math mode. -.fi - - -.TP -.fi -.B -conf.irb_level -The level of cb. - - -.TP -.fi -.B -conf.math_mode -Whether bc mode or not. - - -.TP -.fi -.B -conf.use_loader = true/false -Whether irb's own file reader method is used when load/require or not. -This mode is globaly affected (irb wide). - - -.TP -.fi -.B -conf.prompt_c -prompt for a continuating statement (e.g, immediately after of `if') - - -.TP -.fi -.B -conf.prompt_i -standard prompt - - -.TP -.fi -.B -conf.prompt_s -prompt for a continuating string - - -.TP -.fi -.B -conf.rc -Whether ~/.irbrc is read or not. - - -.TP -.fi -.B -conf.use_prompt = true/false -Prompting or not. - - -.TP -.fi -.B -conf.use_readline = true/false/nil -Whether readline is used or not. -true: uses -false: doen't use -nil: intends to use readline except for inf\-reuby\-mode (default) - - -.TP -.fi -.B -conf.verbose=T/F -Whether verbose messages are display or not. - - -.TP -.fi -.B -cb, irb_change_binding [obj] -Enter new binding which has a distinct scope of local variables. -If obj is given, obj will be self. - - -.TP -.fi -.B -irb [obj] -Invoke subirb. If obj is given, obj will be self. - - -.TP -.fi -.B -jobs, irb_jobs -List of subirb - - -.TP -.fi -.B -fg n, irb_fg n -Switch into specified subirb. The following is candidates of n: - -.nf -\& irb number -\& thhread -\& irb object -\& self(obj which is specified of irb obj) -.fi - - -.TP -.fi -.B -kill n, irb_kill n -Kill subirb. The means of n is as same as the case of irb_fg. -.SH System variable -.PP -.nf -\& _ The latest value of evaluation (it is local) -.fi -.SH Session Example -.PP -.nf -\& dim% ruby irb.rb -\& irb(main):001:0> irb # invoke subirb -\& irb#1(main):001:0> jobs # list of subirbs -\& #0\->irb on main (# : stop) -\& #1\->irb#1 on main (# : running) -\& nil -\& irb#1(main):002:0> fg 0 # switch job -\& nil -\& irb(main):002:0> class Foo;end -\& nil -\& irb(main):003:0> irb Foo # invoke subirb which has the -.fi -.nf -\& # context of Foo -.fi -.nf -\& irb#2(Foo):001:0> def foo # define Foo#foo -\& irb#2(Foo):002:1> print 1 -\& irb#2(Foo):003:1> end -\& nil -\& irb#2(Foo):004:0> fg 0 # switch job -\& nil -\& irb(main):004:0> jobs # list of job -\& #0\->irb on main (# : running) -\& #1\->irb#1 on main (# : stop) -\& #2\->irb#2 on Foo (# : stop) -\& nil -\& irb(main):005:0> Foo.instance_methods # Foo#foo is defined asurely -\& ["foo"] -\& irb(main):006:0> fg 2 # switch job -\& nil -\& irb#2(Foo):005:0> def bar # define Foo#bar -\& irb#2(Foo):006:1> print "bar" -\& irb#2(Foo):007:1> end -\& nil -\& irb#2(Foo):010:0> Foo.instance_methods -\& ["bar", "foo"] -\& irb#2(Foo):011:0> fg 0 -\& nil -\& irb(main):007:0> f = Foo.new -\& # -\& irb(main):008:0> irb f # invoke subirb which has the -.fi -.nf -\& # context of f (instance of Foo) -.fi -.nf -\& irb#3(#):001:0> jobs -\& #0\->irb on main (# : stop) -\& #1\->irb#1 on main (# : stop) -\& #2\->irb#2 on Foo (# : stop) -\& #3\->irb#3 on # (# : running) -\& nil -\& irb#3(#):002:0> foo # evaluate f.foo -\& 1nil -\& irb#3(#):003:0> bar # evaluate f.bar -\& barnil -\& irb#3(#):004:0> kill 1, 2, 3# kill job -\& nil -\& irb(main):009:0> jobs -\& #0\->irb on main (# : running) -\& nil -\& irb(main):010:0> exit # exit -\& dim% -.fi -.SH Restrictions -.PP -Because irb evaluates the inputs immediately after the imput is -syntactically completed, irb gives slight different result than -directly use ruby. Known difference is pointed out here. -.SH Declaration of the local variable -.PP -The following causes an error in ruby: -.nf -\& eval "foo = 0" -\& foo -\& \-\- -\& \-:2: undefined local variable or method `foo' for # (NameError) -\& \-\-\- -\& NameError -.fi -Though, the above will successfully done by irb. -.nf -\& >> eval "foo = 0" -.fi -.nf -\& => 0 -\& >> foo -\& => 0 -.fi -Ruby evaluates a code after reading entire of code and determination -of the scope of local variables. On the other hand, irb do -immediately. More precisely, irb evaluate at first -.nf -\& evel "foo = 0" -.fi -then foo is defined on this timing. It is because of this -incompatibility. -If you'd like to detect those differences, begin...end can be used: -.nf -\& >> begin -\& ?> eval "foo = 0" -\& >> foo -\& >> end -\& NameError: undefined local variable or method `foo' for # -\& (irb):3 -\& (irb_local_binding):1:in `eval' -.fi -.SH Here\-document -.PP -Implementation of Here\-document is incomplete. -.SH Symbol -.PP -Irb can not always recognize a symbol as to be Symbol. Concretely, an -expression have completed, however Irb regard it as continuation line. - diff --git a/ruby-1.8.7-p357.tar.bz2 b/ruby-1.8.7-p357.tar.bz2 deleted file mode 100644 index 14d903a..0000000 --- a/ruby-1.8.7-p357.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c64b63a597b4cb545887364e1fd1e0601a7aeb545e576e74a6d8e88a2765a37 -size 4208157 diff --git a/ruby-1.8.7.p299_date_remove_privat.patch b/ruby-1.8.7.p299_date_remove_privat.patch deleted file mode 100644 index 9198126..0000000 --- a/ruby-1.8.7.p299_date_remove_privat.patch +++ /dev/null @@ -1,15 +0,0 @@ -=== lib/date.rb -================================================================== -Index: lib/date.rb -=================================================================== ---- lib/date.rb.orig 2010-06-08 06:45:42.000000000 +0200 -+++ lib/date.rb 2010-07-01 14:07:25.065690840 +0200 -@@ -1648,8 +1648,6 @@ class Time - DateTime.new!(DateTime.jd_to_ajd(jd, fr, of), of, DateTime::ITALY) - end - -- private :to_date, :to_datetime -- - end - - class Date diff --git a/ruby-1.8.7.p299_lib64.patch b/ruby-1.8.7.p299_lib64.patch deleted file mode 100644 index 4049d0b..0000000 --- a/ruby-1.8.7.p299_lib64.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: configure.in -=================================================================== ---- configure.in.orig 2010-06-08 11:26:34.000000000 +0200 -+++ configure.in 2010-07-01 14:07:03.849193105 +0200 -@@ -1433,7 +1433,7 @@ rb_cv_missing_fconvert=yes, rb_cv_missin - if test "$rb_cv_missing_fconvert" = yes; then - AC_DEFINE(MISSING_FCONVERT) - fi -- AC_LIBOBJ([x68.o]) -+ AC_LIBOBJ([x68]) - CFLAGS="$CFLAGS -fansi-only" - XCFLAGS="$XCFLAGS -cc1-stack=262144 -cpp-stack=2694144" - EXEEXT=.x diff --git a/ruby-1.8.7.p299_pedantic-headers.patch b/ruby-1.8.7.p299_pedantic-headers.patch deleted file mode 100644 index 9b01a64..0000000 --- a/ruby-1.8.7.p299_pedantic-headers.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: node.h -=================================================================== ---- node.h.orig 2009-02-25 07:15:55.000000000 +0100 -+++ node.h 2010-07-01 14:07:38.645191446 +0200 -@@ -395,7 +395,7 @@ enum rb_thread_status { - THREAD_TO_KILL, - THREAD_RUNNABLE, - THREAD_STOPPED, -- THREAD_KILLED, -+ THREAD_KILLED - }; - - typedef struct rb_thread *rb_thread_t; diff --git a/ruby-1.8.7.p334_remove_zlib_test_params_test.patch b/ruby-1.8.7.p334_remove_zlib_test_params_test.patch deleted file mode 100644 index 9ca141f..0000000 --- a/ruby-1.8.7.p334_remove_zlib_test_params_test.patch +++ /dev/null @@ -1,72 +0,0 @@ -Index: test/zlib/test_zlib.rb -=================================================================== ---- test/zlib/test_zlib.rb.orig -+++ test/zlib/test_zlib.rb -@@ -113,36 +113,36 @@ if defined? Zlib - assert_equal(true, z.closed?) - end - -- def test_params -- z = Zlib::Deflate.new -- z << "foo" -- z.params(Zlib::DEFAULT_COMPRESSION, Zlib::DEFAULT_STRATEGY) -- z << "bar" -- s = z.finish -- assert_equal("foobar", Zlib::Inflate.inflate(s)) -- -- data = ('a'..'z').to_a.join -- z = Zlib::Deflate.new(Zlib::NO_COMPRESSION, Zlib::MAX_WBITS, -- Zlib::DEF_MEM_LEVEL, Zlib::DEFAULT_STRATEGY) -- z << data[0, 10] -- z.params(Zlib::BEST_COMPRESSION, Zlib::DEFAULT_STRATEGY) -- z << data[10 .. -1] -- assert_equal(data, Zlib::Inflate.inflate(z.finish)) -- -- z = Zlib::Deflate.new -- s = z.deflate("foo", Zlib::FULL_FLUSH) -- z.avail_out = 0 -- z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED) -- s << z.deflate("bar", Zlib::FULL_FLUSH) -- z.avail_out = 0 -- z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY) -- s << z.deflate("baz", Zlib::FINISH) -- assert_equal("foobarbaz", Zlib::Inflate.inflate(s)) -- -- z = Zlib::Deflate.new -- assert_raise(Zlib::StreamError) { z.params(10000, 10000) } -- z.close # without this, outputs `zlib(finalizer): the stream was freed prematurely.' -- end -+# def test_params -+# z = Zlib::Deflate.new -+# z << "foo" -+# z.params(Zlib::DEFAULT_COMPRESSION, Zlib::DEFAULT_STRATEGY) -+# z << "bar" -+# s = z.finish -+# assert_equal("foobar", Zlib::Inflate.inflate(s)) -+# -+# data = ('a'..'z').to_a.join -+# z = Zlib::Deflate.new(Zlib::NO_COMPRESSION, Zlib::MAX_WBITS, -+# Zlib::DEF_MEM_LEVEL, Zlib::DEFAULT_STRATEGY) -+# z << data[0, 10] -+# z.params(Zlib::BEST_COMPRESSION, Zlib::DEFAULT_STRATEGY) -+# z << data[10 .. -1] -+# assert_equal(data, Zlib::Inflate.inflate(z.finish)) -+# -+# z = Zlib::Deflate.new -+# s = z.deflate("foo", Zlib::FULL_FLUSH) -+# z.avail_out = 0 -+# z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED) -+# s << z.deflate("bar", Zlib::FULL_FLUSH) -+# z.avail_out = 0 -+# z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY) -+# s << z.deflate("baz", Zlib::FINISH) -+# assert_equal("foobarbaz", Zlib::Inflate.inflate(s)) -+# -+# z = Zlib::Deflate.new -+# assert_raise(Zlib::StreamError) { z.params(10000, 10000) } -+# z.close # without this, outputs `zlib(finalizer): the stream was freed prematurely.' -+# end - - def test_set_dictionary - z = Zlib::Deflate.new - diff --git a/ruby-1.8.7.p72_topdir.patch b/ruby-1.8.7.p72_topdir.patch deleted file mode 100644 index 3cd00f9..0000000 --- a/ruby-1.8.7.p72_topdir.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: mkconfig.rb -=================================================================== ---- mkconfig.rb.orig 2008-11-21 19:55:28.000000000 +0100 -+++ mkconfig.rb 2008-11-21 20:34:41.653180779 +0100 -@@ -22,6 +22,7 @@ def (config = "").write(arg) - end - $stdout = config - -+configured_prefix = "" - fast = {'prefix'=>TRUE, 'ruby_install_name'=>TRUE, 'INSTALL'=>TRUE, 'EXEEXT'=>TRUE} - print %[ - # This file was created by #{mkconfig} when ruby was built. Any -@@ -86,6 +87,7 @@ File.foreach "config.status" do |line| - val.gsub!(/ +(?!-)/, "=") if name == "configure_args" && /mswin32/ =~ RUBY_PLATFORM - val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump - if /^prefix$/ =~ name -+ configured_prefix = val - val = "(TOPDIR || DESTDIR + #{val})" - end - v = " CONFIG[\"#{name}\"] #{vars[name] ? '<< "\n"' : '='} #{val}\n" -@@ -103,7 +105,7 @@ end - drive = File::PATH_SEPARATOR == ';' - - prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM --print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" -+print " TOPDIR = #{configured_prefix}\n" - print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" - print " CONFIG = {}\n" - print " CONFIG[\"DESTDIR\"] = DESTDIR\n" diff --git a/ruby-1.8.7.p72_vendor_specific.patch b/ruby-1.8.7.p72_vendor_specific.patch deleted file mode 100644 index 70c6b1f..0000000 --- a/ruby-1.8.7.p72_vendor_specific.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: mkconfig.rb -=================================================================== ---- mkconfig.rb.orig 2008-06-06 12:39:57.000000000 +0200 -+++ mkconfig.rb 2008-09-05 19:16:10.832214101 +0200 -@@ -147,6 +147,11 @@ print < string - * -- * Returns the resulting hash value and resets the digest to the -- * initial state. -+ * Returns the resulting hash value in a hex-encoded form and resets -+ * the digest to the initial state. - */ - static VALUE - rb_digest_instance_hexdigest_bang(VALUE self) -@@ -275,7 +269,7 @@ rb_digest_instance_inspect(VALUE self) - { - VALUE str; - size_t digest_len = 32; /* about this size at least */ -- char *cname; -+ const char *cname; - - cname = rb_obj_classname(self); - diff --git a/ruby-1.8.x_openssl_branch_update.patch b/ruby-1.8.x_openssl_branch_update.patch deleted file mode 100644 index c74a19b..0000000 --- a/ruby-1.8.x_openssl_branch_update.patch +++ /dev/null @@ -1,1675 +0,0 @@ -Index: ext/openssl/ossl_pkey_dsa.c -=================================================================== ---- ext/openssl/ossl_pkey_dsa.c.orig -+++ ext/openssl/ossl_pkey_dsa.c -@@ -161,19 +161,19 @@ ossl_dsa_initialize(int argc, VALUE *arg - in = ossl_obj2bio(arg); - dsa = PEM_read_bio_DSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd); - if (!dsa) { -- BIO_reset(in); -+ (void)BIO_reset(in); - dsa = PEM_read_bio_DSAPublicKey(in, NULL, NULL, NULL); - } - if (!dsa) { -- BIO_reset(in); -+ (void)BIO_reset(in); - dsa = PEM_read_bio_DSA_PUBKEY(in, NULL, NULL, NULL); - } - if (!dsa) { -- BIO_reset(in); -+ (void)BIO_reset(in); - dsa = d2i_DSAPrivateKey_bio(in, NULL); - } - if (!dsa) { -- BIO_reset(in); -+ (void)BIO_reset(in); - dsa = d2i_DSA_PUBKEY_bio(in, NULL); - } - BIO_free(in); -@@ -289,7 +289,7 @@ ossl_dsa_to_der(VALUE self) - if((len = i2d_func(pkey->pkey.dsa, NULL)) <= 0) - ossl_raise(eDSAError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_func(pkey->pkey.dsa, &p) < 0) - ossl_raise(eDSAError, NULL); - ossl_str_adjust(str, p); -@@ -387,7 +387,7 @@ static VALUE - ossl_dsa_sign(VALUE self, VALUE data) - { - EVP_PKEY *pkey; -- int buf_len; -+ unsigned int buf_len; - VALUE str; - - GetPKeyDSA(self, pkey); -@@ -396,7 +396,8 @@ ossl_dsa_sign(VALUE self, VALUE data) - ossl_raise(eDSAError, "Private DSA key needed!"); - } - str = rb_str_new(0, ossl_dsa_buf_size(pkey)); -- if (!DSA_sign(0, RSTRING_PTR(data), RSTRING_LEN(data), RSTRING_PTR(str), -+ if (!DSA_sign(0, (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data), -+ (unsigned char *)RSTRING_PTR(str), - &buf_len, pkey->pkey.dsa)) { /* type is ignored (0) */ - ossl_raise(eDSAError, NULL); - } -@@ -420,8 +421,8 @@ ossl_dsa_verify(VALUE self, VALUE digest - StringValue(digest); - StringValue(sig); - /* type is ignored (0) */ -- ret = DSA_verify(0, RSTRING_PTR(digest), RSTRING_LEN(digest), -- RSTRING_PTR(sig), RSTRING_LEN(sig), pkey->pkey.dsa); -+ ret = DSA_verify(0, (unsigned char *)RSTRING_PTR(digest), RSTRING_LEN(digest), -+ (unsigned char *)RSTRING_PTR(sig), RSTRING_LEN(sig), pkey->pkey.dsa); - if (ret < 0) { - ossl_raise(eDSAError, NULL); - } -Index: ext/openssl/ossl_x509attr.c -=================================================================== ---- ext/openssl/ossl_x509attr.c.orig -+++ ext/openssl/ossl_x509attr.c -@@ -92,16 +92,17 @@ static VALUE - ossl_x509attr_initialize(int argc, VALUE *argv, VALUE self) - { - VALUE oid, value; -- X509_ATTRIBUTE *attr; -- unsigned char *p; -+ X509_ATTRIBUTE *attr, *x; -+ const unsigned char *p; - - GetX509Attr(self, attr); - if(rb_scan_args(argc, argv, "11", &oid, &value) == 1){ - oid = ossl_to_der_if_possible(oid); - StringValue(oid); -- p = RSTRING_PTR(oid); -- if(!d2i_X509_ATTRIBUTE((X509_ATTRIBUTE**)&DATA_PTR(self), -- &p, RSTRING_LEN(oid))){ -+ p = (unsigned char *)RSTRING_PTR(oid); -+ x = d2i_X509_ATTRIBUTE(&attr, &p, RSTRING_LEN(oid)); -+ DATA_PTR(self) = attr; -+ if(!x){ - ossl_raise(eX509AttrError, NULL); - } - return self; -@@ -212,7 +213,7 @@ ossl_x509attr_get_value(VALUE self) - if(OSSL_X509ATTR_IS_SINGLE(attr)){ - length = i2d_ASN1_TYPE(attr->value.single, NULL); - str = rb_str_new(0, length); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - i2d_ASN1_TYPE(attr->value.single, &p); - ossl_str_adjust(str, p); - } -@@ -221,7 +222,7 @@ ossl_x509attr_get_value(VALUE self) - (unsigned char **) NULL, i2d_ASN1_TYPE, - V_ASN1_SET, V_ASN1_UNIVERSAL, 0); - str = rb_str_new(0, length); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, &p, - i2d_ASN1_TYPE, V_ASN1_SET, V_ASN1_UNIVERSAL, 0); - ossl_str_adjust(str, p); -@@ -247,7 +248,7 @@ ossl_x509attr_to_der(VALUE self) - if((len = i2d_X509_ATTRIBUTE(attr, NULL)) <= 0) - ossl_raise(eX509AttrError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_X509_ATTRIBUTE(attr, &p) <= 0) - ossl_raise(eX509AttrError, NULL); - rb_str_set_len(str, p - (unsigned char*)RSTRING_PTR(str)); -Index: ext/openssl/ossl_ssl.c -=================================================================== ---- ext/openssl/ossl_ssl.c.orig -+++ ext/openssl/ossl_ssl.c -@@ -69,6 +69,9 @@ static const char *ossl_sslctx_attrs[] = - "verify_callback", "options", "cert_store", "extra_chain_cert", - "client_cert_cb", "tmp_dh_callback", "session_id_context", - "session_get_cb", "session_new_cb", "session_remove_cb", -+#ifdef HAVE_SSL_SET_TLSEXT_HOST_NAME -+ "servername_cb", -+#endif - }; - - #define ossl_ssl_get_io(o) rb_iv_get((o),"@io") -@@ -86,7 +89,12 @@ static const char *ossl_sslctx_attrs[] = - #define ossl_ssl_set_tmp_dh(o,v) rb_iv_set((o),"@tmp_dh",(v)) - - static const char *ossl_ssl_attr_readers[] = { "io", "context", }; --static const char *ossl_ssl_attrs[] = { "sync_close", }; -+static const char *ossl_ssl_attrs[] = { -+#ifdef HAVE_SSL_SET_TLSEXT_HOST_NAME -+ "hostname", -+#endif -+ "sync_close", -+}; - - ID ID_callback_state; - -@@ -297,7 +305,7 @@ ossl_ssl_verify_callback(int preverify_o - static VALUE - ossl_call_session_get_cb(VALUE ary) - { -- VALUE ssl_obj, sslctx_obj, cb, ret; -+ VALUE ssl_obj, sslctx_obj, cb; - - Check_Type(ary, T_ARRAY); - ssl_obj = rb_ary_entry(ary, 0); -@@ -325,7 +333,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, uns - ssl_obj = (VALUE)ptr; - ary = rb_ary_new2(2); - rb_ary_push(ary, ssl_obj); -- rb_ary_push(ary, rb_str_new(buf, len)); -+ rb_ary_push(ary, rb_str_new((const char *)buf, len)); - - ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_session_get_cb, ary, &state); - if (state) { -@@ -344,7 +352,7 @@ ossl_sslctx_session_get_cb(SSL *ssl, uns - static VALUE - ossl_call_session_new_cb(VALUE ary) - { -- VALUE ssl_obj, sslctx_obj, cb, ret; -+ VALUE ssl_obj, sslctx_obj, cb; - - Check_Type(ary, T_ARRAY); - ssl_obj = rb_ary_entry(ary, 0); -@@ -387,10 +395,11 @@ ossl_sslctx_session_new_cb(SSL *ssl, SSL - return RTEST(ret_obj) ? 1 : 0; - } - -+#if 0 /* unused */ - static VALUE - ossl_call_session_remove_cb(VALUE ary) - { -- VALUE sslctx_obj, cb, ret; -+ VALUE sslctx_obj, cb; - - Check_Type(ary, T_ARRAY); - sslctx_obj = rb_ary_entry(ary, 0); -@@ -400,6 +409,7 @@ ossl_call_session_remove_cb(VALUE ary) - - return rb_funcall(cb, rb_intern("call"), 1, ary); - } -+#endif - - static void - ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess) -@@ -446,6 +456,66 @@ ossl_sslctx_add_extra_chain_cert_i(VALUE - return i; - } - -+static VALUE ossl_sslctx_setup(VALUE self); -+ -+#ifdef HAVE_SSL_SET_TLSEXT_HOST_NAME -+static VALUE -+ossl_call_servername_cb(VALUE ary) -+{ -+ VALUE ssl_obj, sslctx_obj, cb, ret_obj; -+ -+ Check_Type(ary, T_ARRAY); -+ ssl_obj = rb_ary_entry(ary, 0); -+ -+ sslctx_obj = rb_iv_get(ssl_obj, "@context"); -+ if (NIL_P(sslctx_obj)) return Qnil; -+ cb = rb_iv_get(sslctx_obj, "@servername_cb"); -+ if (NIL_P(cb)) return Qnil; -+ -+ ret_obj = rb_funcall(cb, rb_intern("call"), 1, ary); -+ if (rb_obj_is_kind_of(ret_obj, cSSLContext)) { -+ SSL *ssl; -+ SSL_CTX *ctx2; -+ -+ ossl_sslctx_setup(ret_obj); -+ Data_Get_Struct(ssl_obj, SSL, ssl); -+ Data_Get_Struct(ret_obj, SSL_CTX, ctx2); -+ SSL_set_SSL_CTX(ssl, ctx2); -+ } else if (!NIL_P(ret_obj)) { -+ rb_raise(rb_eArgError, "servername_cb must return an OpenSSL::SSL::SSLContext object or nil"); -+ } -+ -+ return ret_obj; -+} -+ -+static int -+ssl_servername_cb(SSL *ssl, int *ad, void *arg) -+{ -+ VALUE ary, ssl_obj, ret_obj; -+ void *ptr; -+ int state = 0; -+ const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); -+ -+ if (!servername) -+ return SSL_TLSEXT_ERR_OK; -+ -+ if ((ptr = SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx)) == NULL) -+ return SSL_TLSEXT_ERR_ALERT_FATAL; -+ ssl_obj = (VALUE)ptr; -+ ary = rb_ary_new2(2); -+ rb_ary_push(ary, ssl_obj); -+ rb_ary_push(ary, rb_str_new2(servername)); -+ -+ ret_obj = rb_protect((VALUE(*)_((VALUE)))ossl_call_servername_cb, ary, &state); -+ if (state) { -+ rb_ivar_set(ssl_obj, ID_callback_state, INT2NUM(state)); -+ return SSL_TLSEXT_ERR_ALERT_FATAL; -+ } -+ -+ return SSL_TLSEXT_ERR_OK; -+} -+#endif -+ - /* - * call-seq: - * ctx.setup => Qtrue # first time -@@ -563,7 +633,7 @@ ossl_sslctx_setup(VALUE self) - val = ossl_sslctx_get_sess_id_ctx(self); - if (!NIL_P(val)){ - StringValue(val); -- if (!SSL_CTX_set_session_id_context(ctx, RSTRING_PTR(val), -+ if (!SSL_CTX_set_session_id_context(ctx, (unsigned char *)RSTRING_PTR(val), - RSTRING_LEN(val))){ - ossl_raise(eSSLError, "SSL_CTX_set_session_id_context:"); - } -@@ -581,6 +651,15 @@ ossl_sslctx_setup(VALUE self) - SSL_CTX_sess_set_remove_cb(ctx, ossl_sslctx_session_remove_cb); - OSSL_Debug("SSL SESSION remove callback added"); - } -+ -+#ifdef HAVE_SSL_SET_TLSEXT_HOST_NAME -+ val = rb_iv_get(self, "@servername_cb"); -+ if (!NIL_P(val)) { -+ SSL_CTX_set_tlsext_servername_callback(ctx, ssl_servername_cb); -+ OSSL_Debug("SSL TLSEXT servername callback added"); -+ } -+#endif -+ - return Qtrue; - } - -@@ -815,7 +894,6 @@ ossl_sslctx_flush_sessions(int argc, VAL - VALUE arg1; - SSL_CTX *ctx; - time_t tm = 0; -- int cb_state; - - rb_scan_args(argc, argv, "01", &arg1); - -@@ -887,6 +965,9 @@ ossl_ssl_initialize(int argc, VALUE *arg - ossl_ssl_set_ctx(self, ctx); - ossl_ssl_set_sync_close(self, Qfalse); - ossl_sslctx_setup(ctx); -+ -+ rb_iv_set(self, "@hostname", Qnil); -+ - rb_call_super(0, 0); - - return self; -@@ -902,6 +983,10 @@ ossl_ssl_setup(VALUE self) - - Data_Get_Struct(self, SSL, ssl); - if(!ssl){ -+#ifdef HAVE_SSL_SET_TLSEXT_HOST_NAME -+ VALUE hostname = rb_iv_get(self, "@hostname"); -+#endif -+ - v_ctx = ossl_ssl_get_ctx(self); - Data_Get_Struct(v_ctx, SSL_CTX, ctx); - -@@ -911,6 +996,12 @@ ossl_ssl_setup(VALUE self) - } - DATA_PTR(self) = ssl; - -+#ifdef HAVE_SSL_SET_TLSEXT_HOST_NAME -+ if (!NIL_P(hostname)) { -+ if (SSL_set_tlsext_host_name(ssl, StringValuePtr(hostname)) != 1) -+ ossl_raise(eSSLError, "SSL_set_tlsext_host_name:"); -+ } -+#endif - io = ossl_ssl_get_io(self); - GetOpenFile(io, fptr); - rb_io_check_readable(fptr); -@@ -947,7 +1038,15 @@ ossl_start_ssl(VALUE self, int (*func)() - Data_Get_Struct(self, SSL, ssl); - GetOpenFile(ossl_ssl_get_io(self), fptr); - for(;;){ -- if((ret = func(ssl)) > 0) break; -+ ret = func(ssl); -+ -+ cb_state = rb_ivar_get(self, ID_callback_state); -+ if (!NIL_P(cb_state)) -+ rb_jump_tag(NUM2INT(cb_state)); -+ -+ if (ret > 0) -+ break; -+ - switch((ret2 = ssl_get_error(ssl, ret))){ - case SSL_ERROR_WANT_WRITE: - rb_io_wait_writable(FPTR_TO_FD(fptr)); -@@ -963,10 +1062,6 @@ ossl_start_ssl(VALUE self, int (*func)() - } - } - -- cb_state = rb_ivar_get(self, ID_callback_state); -- if (!NIL_P(cb_state)) -- rb_jump_tag(NUM2INT(cb_state)); -- - return self; - } - -@@ -1344,13 +1439,13 @@ Init_ossl_ssl() - - ID_callback_state = rb_intern("@callback_state"); - -- ossl_ssl_ex_vcb_idx = SSL_get_ex_new_index(0,"ossl_ssl_ex_vcb_idx",0,0,0); -- ossl_ssl_ex_store_p = SSL_get_ex_new_index(0,"ossl_ssl_ex_store_p",0,0,0); -- ossl_ssl_ex_ptr_idx = SSL_get_ex_new_index(0,"ossl_ssl_ex_ptr_idx",0,0,0); -+ ossl_ssl_ex_vcb_idx = SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_vcb_idx",0,0,0); -+ ossl_ssl_ex_store_p = SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_store_p",0,0,0); -+ ossl_ssl_ex_ptr_idx = SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_ptr_idx",0,0,0); - ossl_ssl_ex_client_cert_cb_idx = -- SSL_get_ex_new_index(0,"ossl_ssl_ex_client_cert_cb_idx",0,0,0); -+ SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_client_cert_cb_idx",0,0,0); - ossl_ssl_ex_tmp_dh_callback_idx = -- SSL_get_ex_new_index(0,"ossl_ssl_ex_tmp_dh_callback_idx",0,0,0); -+ SSL_get_ex_new_index(0,(void *)"ossl_ssl_ex_tmp_dh_callback_idx",0,0,0); - - mSSL = rb_define_module_under(mOSSL, "SSL"); - eSSLError = rb_define_class_under(mSSL, "SSLError", eOSSLError); -Index: ext/openssl/ossl_ocsp.c -=================================================================== ---- ext/openssl/ossl_ocsp.c.orig -+++ ext/openssl/ossl_ocsp.c -@@ -103,15 +103,17 @@ static VALUE - ossl_ocspreq_initialize(int argc, VALUE *argv, VALUE self) - { - VALUE arg; -- unsigned char *p; -+ const unsigned char *p; - - rb_scan_args(argc, argv, "01", &arg); - if(!NIL_P(arg)){ -+ OCSP_REQUEST *req = DATA_PTR(self), *x; - arg = ossl_to_der_if_possible(arg); - StringValue(arg); - p = (unsigned char*)RSTRING_PTR(arg); -- if(!d2i_OCSP_REQUEST((OCSP_REQUEST**)&DATA_PTR(self), &p, -- RSTRING_LEN(arg))){ -+ x = d2i_OCSP_REQUEST(&req, &p, RSTRING_LEN(arg)); -+ DATA_PTR(self) = req; -+ if(!x){ - ossl_raise(eOCSPError, "cannot load DER encoded request"); - } - } -@@ -134,7 +136,7 @@ ossl_ocspreq_add_nonce(int argc, VALUE * - else{ - StringValue(val); - GetOCSPReq(self, req); -- ret = OCSP_request_add1_nonce(req, RSTRING_PTR(val), RSTRING_LEN(val)); -+ ret = OCSP_request_add1_nonce(req, (unsigned char *)RSTRING_PTR(val), RSTRING_LEN(val)); - } - if(!ret) ossl_raise(eOCSPError, NULL); - -@@ -265,7 +267,7 @@ ossl_ocspreq_to_der(VALUE self) - if((len = i2d_OCSP_REQUEST(req, NULL)) <= 0) - ossl_raise(eOCSPError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_OCSP_REQUEST(req, &p) <= 0) - ossl_raise(eOCSPError, NULL); - ossl_str_adjust(str, p); -@@ -310,15 +312,17 @@ static VALUE - ossl_ocspres_initialize(int argc, VALUE *argv, VALUE self) - { - VALUE arg; -- unsigned char *p; -+ const unsigned char *p; - - rb_scan_args(argc, argv, "01", &arg); - if(!NIL_P(arg)){ -+ OCSP_RESPONSE *res = DATA_PTR(self), *x; - arg = ossl_to_der_if_possible(arg); - StringValue(arg); -- p = RSTRING_PTR(arg); -- if(!d2i_OCSP_RESPONSE((OCSP_RESPONSE**)&DATA_PTR(self), &p, -- RSTRING_LEN(arg))){ -+ p = (unsigned char *)RSTRING_PTR(arg); -+ x = d2i_OCSP_RESPONSE(&res, &p, RSTRING_LEN(arg)); -+ DATA_PTR(self) = res; -+ if(!x){ - ossl_raise(eOCSPError, "cannot load DER encoded response"); - } - } -@@ -377,7 +381,7 @@ ossl_ocspres_to_der(VALUE self) - if((len = i2d_OCSP_RESPONSE(res, NULL)) <= 0) - ossl_raise(eOCSPError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_OCSP_RESPONSE(res, &p) <= 0) - ossl_raise(eOCSPError, NULL); - ossl_str_adjust(str, p); -@@ -436,7 +440,7 @@ ossl_ocspbres_add_nonce(int argc, VALUE - else{ - StringValue(val); - GetOCSPBasicRes(self, bs); -- ret = OCSP_basic_add1_nonce(bs, RSTRING_PTR(val), RSTRING_LEN(val)); -+ ret = OCSP_basic_add1_nonce(bs, (unsigned char *)RSTRING_PTR(val), RSTRING_LEN(val)); - } - if(!ret) ossl_raise(eOCSPError, NULL); - -Index: ext/openssl/ossl_engine.c -=================================================================== ---- ext/openssl/ossl_engine.c.orig -+++ ext/openssl/ossl_engine.c -@@ -344,7 +344,7 @@ static VALUE - ossl_engine_inspect(VALUE self) - { - VALUE str; -- char *cname = rb_class2name(rb_obj_class(self)); -+ const char *cname = rb_class2name(rb_obj_class(self)); - - str = rb_str_new2("#<"); - rb_str_cat2(str, cname); -Index: ext/openssl/ossl_hmac.c -=================================================================== ---- ext/openssl/ossl_hmac.c.orig -+++ ext/openssl/ossl_hmac.c -@@ -103,13 +103,13 @@ ossl_hmac_update(VALUE self, VALUE data) - - StringValue(data); - GetHMAC(self, ctx); -- HMAC_Update(ctx, RSTRING_PTR(data), RSTRING_LEN(data)); -+ HMAC_Update(ctx, (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data)); - - return self; - } - - static void --hmac_final(HMAC_CTX *ctx, char **buf, int *buf_len) -+hmac_final(HMAC_CTX *ctx, unsigned char **buf, unsigned int *buf_len) - { - HMAC_CTX final; - -@@ -132,13 +132,13 @@ static VALUE - ossl_hmac_digest(VALUE self) - { - HMAC_CTX *ctx; -- char *buf; -- int buf_len; -+ unsigned char *buf; -+ unsigned int buf_len; - VALUE digest; - - GetHMAC(self, ctx); - hmac_final(ctx, &buf, &buf_len); -- digest = ossl_buf2str(buf, buf_len); -+ digest = ossl_buf2str((char *)buf, buf_len); - - return digest; - } -@@ -152,8 +152,9 @@ static VALUE - ossl_hmac_hexdigest(VALUE self) - { - HMAC_CTX *ctx; -- char *buf, *hexbuf; -- int buf_len; -+ unsigned char *buf; -+ char *hexbuf; -+ unsigned int buf_len; - VALUE hexdigest; - - GetHMAC(self, ctx); -@@ -192,15 +193,15 @@ ossl_hmac_reset(VALUE self) - static VALUE - ossl_hmac_s_digest(VALUE klass, VALUE digest, VALUE key, VALUE data) - { -- char *buf; -- int buf_len; -+ unsigned char *buf; -+ unsigned int buf_len; - - StringValue(key); - StringValue(data); - buf = HMAC(GetDigestPtr(digest), RSTRING_PTR(key), RSTRING_LEN(key), -- RSTRING_PTR(data), RSTRING_LEN(data), NULL, &buf_len); -+ (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data), NULL, &buf_len); - -- return rb_str_new(buf, buf_len); -+ return rb_str_new((const char *)buf, buf_len); - } - - /* -@@ -211,15 +212,16 @@ ossl_hmac_s_digest(VALUE klass, VALUE di - static VALUE - ossl_hmac_s_hexdigest(VALUE klass, VALUE digest, VALUE key, VALUE data) - { -- char *buf, *hexbuf; -- int buf_len; -+ unsigned char *buf; -+ char *hexbuf; -+ unsigned int buf_len; - VALUE hexdigest; - - StringValue(key); - StringValue(data); - - buf = HMAC(GetDigestPtr(digest), RSTRING_PTR(key), RSTRING_LEN(key), -- RSTRING_PTR(data), RSTRING_LEN(data), NULL, &buf_len); -+ (unsigned char *)RSTRING_PTR(data), RSTRING_LEN(data), NULL, &buf_len); - if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) { - ossl_raise(eHMACError, "Cannot convert buf to hexbuf"); - } -Index: ext/openssl/ossl_cipher.c -=================================================================== ---- ext/openssl/ossl_cipher.c.orig -+++ ext/openssl/ossl_cipher.c -@@ -188,7 +188,7 @@ ossl_cipher_init(int argc, VALUE *argv, - * We deprecated the arguments for this method, but we decided - * keeping this behaviour for backward compatibility. - */ -- char *cname = rb_class2name(rb_obj_class(self)); -+ const char *cname = rb_class2name(rb_obj_class(self)); - rb_warn("argumtents for %s#encrypt and %s#decrypt were deprecated; " - "use %s#pkcs5_keyivgen to derive key and IV", - cname, cname, cname); -@@ -204,7 +204,7 @@ ossl_cipher_init(int argc, VALUE *argv, - else memcpy(iv, RSTRING_PTR(init_v), sizeof(iv)); - } - EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), EVP_md5(), iv, -- RSTRING_PTR(pass), RSTRING_LEN(pass), 1, key, NULL); -+ (unsigned char *)RSTRING_PTR(pass), RSTRING_LEN(pass), 1, key, NULL); - p_key = key; - p_iv = iv; - } -@@ -281,13 +281,13 @@ ossl_cipher_pkcs5_keyivgen(int argc, VAL - StringValue(vsalt); - if(RSTRING_LEN(vsalt) != PKCS5_SALT_LEN) - rb_raise(eCipherError, "salt must be an 8-octet string"); -- salt = RSTRING_PTR(vsalt); -+ salt = (unsigned char *)RSTRING_PTR(vsalt); - } - iter = NIL_P(viter) ? 2048 : NUM2INT(viter); - digest = NIL_P(vdigest) ? EVP_md5() : GetDigestPtr(vdigest); - GetCipher(self, ctx); - EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), digest, salt, -- RSTRING_PTR(vpass), RSTRING_LEN(vpass), iter, key, iv); -+ (unsigned char *)RSTRING_PTR(vpass), RSTRING_LEN(vpass), iter, key, iv); - if (EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, -1) != 1) - ossl_raise(eCipherError, NULL); - OPENSSL_cleanse(key, sizeof key); -@@ -299,26 +299,6 @@ ossl_cipher_pkcs5_keyivgen(int argc, VAL - - /* - * call-seq: -- * cipher << data -> string -- * -- * === Parameters -- * +data+ is a nonempty string. -- * -- * This method is deprecated and not available in 1.9.x or later. -- */ --static VALUE --ossl_cipher_update_deprecated(VALUE self, VALUE data) --{ -- char *cname; -- -- cname = rb_class2name(rb_obj_class(self)); -- rb_warning("%s#<< is deprecated; use %s#update instead", cname, cname); -- return rb_funcall(self, rb_intern("update"), 1, data); --} -- -- --/* -- * call-seq: - * cipher.update(data [, buffer]) -> string or buffer - * - * === Parameters -@@ -329,14 +309,14 @@ static VALUE - ossl_cipher_update(int argc, VALUE *argv, VALUE self) - { - EVP_CIPHER_CTX *ctx; -- char *in; -+ unsigned char *in; - int in_len, out_len; - VALUE data, str; - - rb_scan_args(argc, argv, "11", &data, &str); - - StringValue(data); -- in = RSTRING_PTR(data); -+ in = (unsigned char *)RSTRING_PTR(data); - if ((in_len = RSTRING_LEN(data)) == 0) - rb_raise(rb_eArgError, "data must not be empty"); - GetCipher(self, ctx); -@@ -349,7 +329,7 @@ ossl_cipher_update(int argc, VALUE *argv - rb_str_resize(str, out_len); - } - -- if (!EVP_CipherUpdate(ctx, RSTRING_PTR(str), &out_len, in, in_len)) -+ if (!EVP_CipherUpdate(ctx, (unsigned char *)RSTRING_PTR(str), &out_len, in, in_len)) - ossl_raise(eCipherError, NULL); - assert(out_len < RSTRING_LEN(str)); - rb_str_set_len(str, out_len); -@@ -374,7 +354,7 @@ ossl_cipher_final(VALUE self) - - GetCipher(self, ctx); - str = rb_str_new(0, EVP_CIPHER_CTX_block_size(ctx)); -- if (!EVP_CipherFinal_ex(ctx, RSTRING_PTR(str), &out_len)) -+ if (!EVP_CipherFinal_ex(ctx, (unsigned char *)RSTRING_PTR(str), &out_len)) - ossl_raise(eCipherError, NULL); - assert(out_len <= RSTRING_LEN(str)); - rb_str_set_len(str, out_len); -@@ -417,7 +397,7 @@ ossl_cipher_set_key(VALUE self, VALUE ke - if (RSTRING_LEN(key) < EVP_CIPHER_CTX_key_length(ctx)) - ossl_raise(eCipherError, "key length too short"); - -- if (EVP_CipherInit_ex(ctx, NULL, NULL, RSTRING_PTR(key), NULL, -1) != 1) -+ if (EVP_CipherInit_ex(ctx, NULL, NULL, (unsigned char *)RSTRING_PTR(key), NULL, -1) != 1) - ossl_raise(eCipherError, NULL); - - return key; -@@ -442,7 +422,7 @@ ossl_cipher_set_iv(VALUE self, VALUE iv) - if (RSTRING_LEN(iv) < EVP_CIPHER_CTX_iv_length(ctx)) - ossl_raise(eCipherError, "iv length too short"); - -- if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, RSTRING_PTR(iv), -1) != 1) -+ if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, (unsigned char *)RSTRING_PTR(iv), -1) != 1) - ossl_raise(eCipherError, NULL); - - return iv; -@@ -553,9 +533,6 @@ Init_ossl_cipher(void) - rb_define_method(cCipher, "decrypt", ossl_cipher_decrypt, -1); - rb_define_method(cCipher, "pkcs5_keyivgen", ossl_cipher_pkcs5_keyivgen, -1); - rb_define_method(cCipher, "update", ossl_cipher_update, -1); --#if RUBY_VERSION_CODE < 190 -- rb_define_method(cCipher, "<<", ossl_cipher_update_deprecated, 1); --#endif - rb_define_method(cCipher, "final", ossl_cipher_final, 0); - rb_define_method(cCipher, "name", ossl_cipher_name, 0); - rb_define_method(cCipher, "key=", ossl_cipher_set_key, 1); -Index: ext/openssl/ossl_pkey_rsa.c -=================================================================== ---- ext/openssl/ossl_pkey_rsa.c.orig -+++ ext/openssl/ossl_pkey_rsa.c -@@ -151,23 +151,23 @@ ossl_rsa_initialize(int argc, VALUE *arg - in = ossl_obj2bio(arg); - rsa = PEM_read_bio_RSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd); - if (!rsa) { -- BIO_reset(in); -+ (void)BIO_reset(in); - rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL); - } - if (!rsa) { -- BIO_reset(in); -+ (void)BIO_reset(in); - rsa = PEM_read_bio_RSA_PUBKEY(in, NULL, NULL, NULL); - } - if (!rsa) { -- BIO_reset(in); -+ (void)BIO_reset(in); - rsa = d2i_RSAPrivateKey_bio(in, NULL); - } - if (!rsa) { -- BIO_reset(in); -+ (void)BIO_reset(in); - rsa = d2i_RSAPublicKey_bio(in, NULL); - } - if (!rsa) { -- BIO_reset(in); -+ (void)BIO_reset(in); - rsa = d2i_RSA_PUBKEY_bio(in, NULL); - } - BIO_free(in); -@@ -288,7 +288,7 @@ ossl_rsa_to_der(VALUE self) - if((len = i2d_func(pkey->pkey.rsa, NULL)) <= 0) - ossl_raise(eRSAError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_func(pkey->pkey.rsa, &p) < 0) - ossl_raise(eRSAError, NULL); - ossl_str_adjust(str, p); -@@ -315,8 +315,8 @@ ossl_rsa_public_encrypt(int argc, VALUE - pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); - StringValue(buffer); - str = rb_str_new(0, ossl_rsa_buf_size(pkey)); -- buf_len = RSA_public_encrypt(RSTRING_LEN(buffer), RSTRING_PTR(buffer), -- RSTRING_PTR(str), pkey->pkey.rsa, -+ buf_len = RSA_public_encrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), -+ (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, - pad); - if (buf_len < 0) ossl_raise(eRSAError, NULL); - rb_str_set_len(str, buf_len); -@@ -341,8 +341,8 @@ ossl_rsa_public_decrypt(int argc, VALUE - pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); - StringValue(buffer); - str = rb_str_new(0, ossl_rsa_buf_size(pkey)); -- buf_len = RSA_public_decrypt(RSTRING_LEN(buffer), RSTRING_PTR(buffer), -- RSTRING_PTR(str), pkey->pkey.rsa, -+ buf_len = RSA_public_decrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), -+ (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, - pad); - if (buf_len < 0) ossl_raise(eRSAError, NULL); - rb_str_set_len(str, buf_len); -@@ -370,8 +370,8 @@ ossl_rsa_private_encrypt(int argc, VALUE - pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); - StringValue(buffer); - str = rb_str_new(0, ossl_rsa_buf_size(pkey)); -- buf_len = RSA_private_encrypt(RSTRING_LEN(buffer), RSTRING_PTR(buffer), -- RSTRING_PTR(str), pkey->pkey.rsa, -+ buf_len = RSA_private_encrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), -+ (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, - pad); - if (buf_len < 0) ossl_raise(eRSAError, NULL); - rb_str_set_len(str, buf_len); -@@ -400,8 +400,8 @@ ossl_rsa_private_decrypt(int argc, VALUE - pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding); - StringValue(buffer); - str = rb_str_new(0, ossl_rsa_buf_size(pkey)); -- buf_len = RSA_private_decrypt(RSTRING_LEN(buffer), RSTRING_PTR(buffer), -- RSTRING_PTR(str), pkey->pkey.rsa, -+ buf_len = RSA_private_decrypt(RSTRING_LEN(buffer), (unsigned char *)RSTRING_PTR(buffer), -+ (unsigned char *)RSTRING_PTR(str), pkey->pkey.rsa, - pad); - if (buf_len < 0) ossl_raise(eRSAError, NULL); - rb_str_set_len(str, buf_len); -Index: ext/openssl/ossl_x509req.c -=================================================================== ---- ext/openssl/ossl_x509req.c.orig -+++ ext/openssl/ossl_x509req.c -@@ -99,7 +99,7 @@ static VALUE - ossl_x509req_initialize(int argc, VALUE *argv, VALUE self) - { - BIO *in; -- X509_REQ *req; -+ X509_REQ *req, *x = DATA_PTR(self); - VALUE arg; - - if (rb_scan_args(argc, argv, "01", &arg) == 0) { -@@ -107,10 +107,12 @@ ossl_x509req_initialize(int argc, VALUE - } - arg = ossl_to_der_if_possible(arg); - in = ossl_obj2bio(arg); -- req = PEM_read_bio_X509_REQ(in, (X509_REQ **)&DATA_PTR(self), NULL, NULL); -+ req = PEM_read_bio_X509_REQ(in, &x, NULL, NULL); -+ DATA_PTR(self) = x; - if (!req) { -- BIO_reset(in); -- req = d2i_X509_REQ_bio(in, (X509_REQ **)&DATA_PTR(self)); -+ (void)BIO_reset(in); -+ req = d2i_X509_REQ_bio(in, &x); -+ DATA_PTR(self) = x; - } - BIO_free(in); - if (!req) ossl_raise(eX509ReqError, NULL); -@@ -171,7 +173,7 @@ ossl_x509req_to_der(VALUE self) - if ((len = i2d_X509_REQ(req, NULL)) <= 0) - ossl_raise(eX509CertError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if (i2d_X509_REQ(req, &p) <= 0) - ossl_raise(eX509ReqError, NULL); - ossl_str_adjust(str, p); -Index: ext/openssl/ossl_pkey_ec.c -=================================================================== ---- ext/openssl/ossl_pkey_ec.c.orig -+++ ext/openssl/ossl_pkey_ec.c -@@ -186,22 +186,22 @@ static VALUE ossl_ec_key_initialize(int - - ec = PEM_read_bio_ECPrivateKey(in, NULL, NULL, NULL); - if (!ec) { -- BIO_reset(in); -+ (void)BIO_reset(in); - ec = PEM_read_bio_EC_PUBKEY(in, NULL, NULL, NULL); - } - if (!ec) { -- BIO_reset(in); -+ (void)BIO_reset(in); - ec = d2i_ECPrivateKey_bio(in, NULL); - } - if (!ec) { -- BIO_reset(in); -+ (void)BIO_reset(in); - ec = d2i_EC_PUBKEY_bio(in, NULL); - } - - BIO_free(in); - - if (ec == NULL) { -- const char *name = STR2CSTR(arg); -+ const char *name = StringValueCStr(arg); - int nid = OBJ_sn2nid(name); - - if (nid == NID_undef) -@@ -778,14 +778,14 @@ static VALUE ossl_ec_group_initialize(in - - group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL); - if (!group) { -- BIO_reset(in); -+ (void)BIO_reset(in); - group = d2i_ECPKParameters_bio(in, NULL); - } - - BIO_free(in); - - if (!group) { -- const char *name = STR2CSTR(arg1); -+ const char *name = StringValueCStr(arg1); - int nid = OBJ_sn2nid(name); - - if (nid == NID_undef) -@@ -1092,7 +1092,7 @@ static VALUE ossl_ec_group_get_seed(VALU - if (seed_len == 0) - return Qnil; - -- return rb_str_new(EC_GROUP_get0_seed(group), seed_len); -+ return rb_str_new((const char *)EC_GROUP_get0_seed(group), seed_len); - } - - /* call-seq: -@@ -1107,7 +1107,7 @@ static VALUE ossl_ec_group_set_seed(VALU - Require_EC_GROUP(self, group); - StringValue(seed); - -- if (EC_GROUP_set_seed(group, RSTRING_PTR(seed), RSTRING_LEN(seed)) != RSTRING_LEN(seed)) -+ if (EC_GROUP_set_seed(group, (unsigned char *)RSTRING_PTR(seed), RSTRING_LEN(seed)) != RSTRING_LEN(seed)) - ossl_raise(eEC_GROUP, "EC_GROUP_set_seed"); - - return seed; -Index: ext/openssl/ossl_digest.c -=================================================================== ---- ext/openssl/ossl_digest.c.orig -+++ ext/openssl/ossl_digest.c -@@ -38,7 +38,7 @@ GetDigestPtr(VALUE obj) - const EVP_MD *md; - - if (TYPE(obj) == T_STRING) { -- const char *name = STR2CSTR(obj); -+ const char *name = StringValueCStr(obj); - - md = EVP_get_digestbyname(name); - if (!md) -@@ -96,7 +96,6 @@ ossl_digest_initialize(int argc, VALUE * - { - EVP_MD_CTX *ctx; - const EVP_MD *md; -- char *name; - VALUE type, data; - - rb_scan_args(argc, argv, "11", &type, &data); -@@ -182,7 +181,7 @@ ossl_digest_finish(int argc, VALUE *argv - rb_str_resize(str, EVP_MD_CTX_size(ctx)); - } - -- EVP_DigestFinal_ex(ctx, RSTRING_PTR(str), NULL); -+ EVP_DigestFinal_ex(ctx, (unsigned char *)RSTRING_PTR(str), NULL); - - return str; - } -@@ -234,7 +233,6 @@ ossl_digest_block_length(VALUE self) - void - Init_ossl_digest() - { -- rb_require("openssl"); - rb_require("digest"); - - #if 0 /* let rdoc know about mOSSL */ -Index: ext/openssl/ossl.c -=================================================================== ---- ext/openssl/ossl.c.orig -+++ ext/openssl/ossl.c -@@ -15,7 +15,7 @@ - * String to HEXString conversion - */ - int --string2hex(char *buf, int buf_len, char **hexbuf, int *hexbuf_len) -+string2hex(const unsigned char *buf, int buf_len, char **hexbuf, int *hexbuf_len) - { - static const char hex[]="0123456789abcdef"; - int i, len = 2 * buf_len; -@@ -464,7 +464,7 @@ Init_openssl() - /* - * Verify callback Proc index for ext-data - */ -- if ((ossl_verify_cb_idx = X509_STORE_CTX_get_ex_new_index(0, "ossl_verify_cb_idx", 0, 0, 0)) < 0) -+ if ((ossl_verify_cb_idx = X509_STORE_CTX_get_ex_new_index(0, (void *)"ossl_verify_cb_idx", 0, 0, 0)) < 0) - ossl_raise(eOSSLError, "X509_STORE_CTX_get_ex_new_index"); - - /* -@@ -506,7 +506,7 @@ Init_openssl() - * Check if all symbols are OK with 'make LDSHARED=gcc all' - */ - int --main(int argc, char *argv[], char *env[]) -+main(int argc, char *argv[]) - { - return 0; - } -Index: ext/openssl/ossl_x509store.c -=================================================================== ---- ext/openssl/ossl_x509store.c.orig -+++ ext/openssl/ossl_x509store.c -@@ -212,7 +212,7 @@ ossl_x509store_add_file(VALUE self, VALU - char *path = NULL; - - if(file != Qnil){ -- Check_SafeStr(file); -+ SafeStringValue(file); - path = RSTRING_PTR(file); - } - GetX509Store(self, store); -@@ -233,7 +233,7 @@ ossl_x509store_add_path(VALUE self, VALU - char *path = NULL; - - if(dir != Qnil){ -- Check_SafeStr(dir); -+ SafeStringValue(dir); - path = RSTRING_PTR(dir); - } - GetX509Store(self, store); -Index: ext/openssl/ossl.h -=================================================================== ---- ext/openssl/ossl.h.orig -+++ ext/openssl/ossl.h -@@ -117,7 +117,7 @@ extern VALUE eOSSLError; - /* - * String to HEXString conversion - */ --int string2hex(char *, int, char **, int *); -+int string2hex(const unsigned char *, int, char **, int *); - - /* - * Data Conversion -Index: ext/openssl/lib/net/telnets.rb -=================================================================== ---- ext/openssl/lib/net/telnets.rb.orig -+++ ext/openssl/lib/net/telnets.rb -@@ -145,7 +145,7 @@ module Net - end - end - end # preprocess -- -+ - alias waitfor_org waitfor - - def waitfor(options) -@@ -181,7 +181,7 @@ module Net - begin - c = @rest + @sock.sysread(1024 * 1024) - @dumplog.log_dump('<', c) if @options.has_key?("Dump_log") -- if @options["Telnetmode"] -+ if @options["Telnetmode"] - pos = 0 - catch(:next){ - while true -@@ -213,11 +213,11 @@ module Net - end - @log.print(buf) if @options.has_key?("Output_log") - line.concat(buf) -- yield buf if block_given? -+ yield buf if block_given? - rescue EOFError # End of file reached - if line == '' - line = nil -- yield nil if block_given? -+ yield nil if block_given? - end - break - end -Index: ext/openssl/ossl_bn.c -=================================================================== ---- ext/openssl/ossl_bn.c.orig -+++ ext/openssl/ossl_bn.c -@@ -131,12 +131,12 @@ ossl_bn_initialize(int argc, VALUE *argv - - switch (base) { - case 0: -- if (!BN_mpi2bn(RSTRING_PTR(str), RSTRING_LEN(str), bn)) { -+ if (!BN_mpi2bn((unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str), bn)) { - ossl_raise(eBNError, NULL); - } - break; - case 2: -- if (!BN_bin2bn(RSTRING_PTR(str), RSTRING_LEN(str), bn)) { -+ if (!BN_bin2bn((unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str), bn)) { - ossl_raise(eBNError, NULL); - } - break; -@@ -185,13 +185,13 @@ ossl_bn_to_s(int argc, VALUE *argv, VALU - case 0: - len = BN_bn2mpi(bn, NULL); - str = rb_str_new(0, len); -- if (BN_bn2mpi(bn, RSTRING_PTR(str)) != len) -+ if (BN_bn2mpi(bn, (unsigned char *)RSTRING_PTR(str)) != len) - ossl_raise(eBNError, NULL); - break; - case 2: - len = BN_num_bytes(bn); - str = rb_str_new(0, len); -- if (BN_bn2bin(bn, RSTRING_PTR(str)) != len) -+ if (BN_bn2bin(bn, (unsigned char *)RSTRING_PTR(str)) != len) - ossl_raise(eBNError, NULL); - break; - case 10: -Index: ext/openssl/ossl_asn1.c -=================================================================== ---- ext/openssl/ossl_asn1.c.orig -+++ ext/openssl/ossl_asn1.c -@@ -33,7 +33,7 @@ asn1time_to_time(ASN1_TIME *time) - - switch (time->type) { - case V_ASN1_UTCTIME: -- if (sscanf(time->data, "%2d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon, -+ if (sscanf((const char *)time->data, "%2d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon, - &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { - ossl_raise(rb_eTypeError, "bad UTCTIME format"); - } -@@ -44,7 +44,7 @@ asn1time_to_time(ASN1_TIME *time) - } - break; - case V_ASN1_GENERALIZEDTIME: -- if (sscanf(time->data, "%4d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon, -+ if (sscanf((const char *)time->data, "%4d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon, - &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) { - ossl_raise(rb_eTypeError, "bad GENERALIZEDTIME format" ); - } -@@ -80,7 +80,7 @@ time_to_time_t(VALUE time) - VALUE - asn1str_to_str(ASN1_STRING *str) - { -- return rb_str_new(str->data, str->length); -+ return rb_str_new((const char *)str->data, str->length); - } - - /* -@@ -218,7 +218,7 @@ obj_to_asn1bstr(VALUE obj, long unused_b - StringValue(obj); - if(!(bstr = ASN1_BIT_STRING_new())) - ossl_raise(eASN1Error, NULL); -- ASN1_BIT_STRING_set(bstr, RSTRING_PTR(obj), RSTRING_LEN(obj)); -+ ASN1_BIT_STRING_set(bstr, (unsigned char *)RSTRING_PTR(obj), RSTRING_LEN(obj)); - bstr->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear */ - bstr->flags |= ASN1_STRING_FLAG_BITS_LEFT|(unused_bits&0x07); - -@@ -311,7 +311,7 @@ static VALUE - decode_bool(unsigned char* der, int length) - { - int val; -- unsigned char *p; -+ const unsigned char *p; - - p = der; - if((val = d2i_ASN1_BOOLEAN(NULL, &p, length)) < 0) -@@ -324,7 +324,7 @@ static VALUE - decode_int(unsigned char* der, int length) - { - ASN1_INTEGER *ai; -- unsigned char *p; -+ const unsigned char *p; - VALUE ret; - int status = 0; - -@@ -364,7 +364,7 @@ static VALUE - decode_enum(unsigned char* der, int length) - { - ASN1_ENUMERATED *ai; -- unsigned char *p; -+ const unsigned char *p; - VALUE ret; - int status = 0; - -@@ -383,7 +383,7 @@ static VALUE - decode_null(unsigned char* der, int length) - { - ASN1_NULL *null; -- unsigned char *p; -+ const unsigned char *p; - - p = der; - if(!(null = d2i_ASN1_NULL(NULL, &p, length))) -@@ -397,7 +397,7 @@ static VALUE - decode_obj(unsigned char* der, int length) - { - ASN1_OBJECT *obj; -- unsigned char *p; -+ const unsigned char *p; - VALUE ret; - int nid; - BIO *bio; -@@ -426,7 +426,7 @@ static VALUE - decode_time(unsigned char* der, int length) - { - ASN1_TIME *time; -- unsigned char *p; -+ const unsigned char *p; - VALUE ret; - int status = 0; - -@@ -701,7 +701,7 @@ ossl_asn1data_to_der(VALUE self) - if((length = ASN1_object_size(1, RSTRING_LEN(value), tag)) <= 0) - ossl_raise(eASN1Error, NULL); - der = rb_str_new(0, length); -- p = RSTRING_PTR(der); -+ p = (unsigned char *)RSTRING_PTR(der); - ASN1_put_object(&p, is_cons, RSTRING_LEN(value), tag, tag_class); - memcpy(p, RSTRING_PTR(value), RSTRING_LEN(value)); - p += RSTRING_LEN(value); -@@ -715,6 +715,7 @@ ossl_asn1_decode0(unsigned char **pp, lo - int once, int yield) - { - unsigned char *start, *p; -+ const unsigned char *p0; - long len, off = *offset; - int hlen, tag, tc, j; - VALUE ary, asn1data, value, tag_class; -@@ -723,7 +724,9 @@ ossl_asn1_decode0(unsigned char **pp, lo - p = *pp; - while(length > 0){ - start = p; -- j = ASN1_get_object(&p, &len, &tag, &tc, length); -+ p0 = p; -+ j = ASN1_get_object(&p0, &len, &tag, &tc, length); -+ p = (unsigned char *)p0; - if(j & 0x80) ossl_raise(eASN1Error, NULL); - hlen = p - start; - if(yield){ -@@ -758,7 +761,7 @@ ossl_asn1_decode0(unsigned char **pp, lo - else value = ossl_asn1_decode0(&p, len, &off, depth+1, 0, yield); - } - else{ -- value = rb_str_new(p, len); -+ value = rb_str_new((const char *)p, len); - p += len; - off += len; - } -@@ -823,7 +826,7 @@ ossl_asn1_traverse(VALUE self, VALUE obj - - obj = ossl_to_der_if_possible(obj); - tmp = rb_str_new4(StringValue(obj)); -- p = RSTRING_PTR(tmp); -+ p = (unsigned char *)RSTRING_PTR(tmp); - ossl_asn1_decode0(&p, RSTRING_LEN(tmp), &offset, 0, 0, 1); - - return Qnil; -@@ -839,7 +842,7 @@ ossl_asn1_decode(VALUE self, VALUE obj) - - obj = ossl_to_der_if_possible(obj); - tmp = rb_str_new4(StringValue(obj)); -- p = RSTRING_PTR(tmp); -+ p = (unsigned char *)RSTRING_PTR(tmp); - ary = ossl_asn1_decode0(&p, RSTRING_LEN(tmp), &offset, 0, 1, 0); - ret = rb_ary_entry(ary, 0); - -@@ -856,7 +859,7 @@ ossl_asn1_decode_all(VALUE self, VALUE o - - obj = ossl_to_der_if_possible(obj); - tmp = rb_str_new4(StringValue(obj)); -- p = RSTRING_PTR(tmp); -+ p = (unsigned char *)RSTRING_PTR(tmp); - ret = ossl_asn1_decode0(&p, RSTRING_LEN(tmp), &offset, 0, 0, 0); - - return ret; -@@ -951,7 +954,7 @@ ossl_asn1prim_to_der(VALUE self) - ossl_ASN1_TYPE_free(asn1); - reallen = p - buf; - assert(reallen <= len); -- str = ossl_buf2str(buf, reallen); /* buf will be free in ossl_buf2str */ -+ str = ossl_buf2str((char *)buf, reallen); /* buf will be free in ossl_buf2str */ - - return str; - } -@@ -973,7 +976,7 @@ ossl_asn1cons_to_der(VALUE self) - seq_len = ASN1_object_size(1, RSTRING_LEN(value), tag); - length = ASN1_object_size(1, seq_len, tn); - str = rb_str_new(0, length); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(tc == V_ASN1_UNIVERSAL) - ASN1_put_object(&p, 1, RSTRING_LEN(value), tn, tc); - else{ -Index: ext/openssl/ossl_pkcs12.c -=================================================================== ---- ext/openssl/ossl_pkcs12.c.orig -+++ ext/openssl/ossl_pkcs12.c -@@ -137,15 +137,17 @@ ossl_pkcs12_initialize(int argc, VALUE * - X509 *x509; - STACK_OF(X509) *x509s = NULL; - int st = 0; -+ PKCS12 *pkcs = DATA_PTR(self); - - if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) return self; - passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass); - in = ossl_obj2bio(arg); -- d2i_PKCS12_bio(in, (PKCS12 **)&DATA_PTR(self)); -+ d2i_PKCS12_bio(in, &pkcs); -+ DATA_PTR(self) = pkcs; - BIO_free(in); - - pkey = cert = ca = Qnil; -- if(!PKCS12_parse((PKCS12*)DATA_PTR(self), passphrase, &key, &x509, &x509s)) -+ if(!PKCS12_parse(pkcs, passphrase, &key, &x509, &x509s)) - ossl_raise(ePKCS12Error, "PKCS12_parse"); - pkey = rb_protect((VALUE(*)_((VALUE)))ossl_pkey_new, (VALUE)key, - &st); /* NO DUP */ -@@ -181,7 +183,7 @@ ossl_pkcs12_to_der(VALUE self) - if((len = i2d_PKCS12(p12, NULL)) <= 0) - ossl_raise(ePKCS12Error, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_PKCS12(p12, &p) <= 0) - ossl_raise(ePKCS12Error, NULL); - ossl_str_adjust(str, p); -Index: ext/openssl/ossl_ssl_session.c -=================================================================== ---- ext/openssl/ossl_ssl_session.c.orig -+++ ext/openssl/ossl_ssl_session.c -@@ -36,8 +36,6 @@ static VALUE ossl_ssl_session_alloc(VALU - static VALUE ossl_ssl_session_initialize(VALUE self, VALUE arg1) - { - SSL_SESSION *ctx = NULL; -- VALUE obj; -- unsigned char *p; - - if (RDATA(self)->data) - ossl_raise(eSSLSession, "SSL Session already initialized"); -@@ -55,7 +53,7 @@ static VALUE ossl_ssl_session_initialize - ctx = PEM_read_bio_SSL_SESSION(in, NULL, NULL, NULL); - - if (!ctx) { -- BIO_reset(in); -+ (void)BIO_reset(in); - ctx = d2i_SSL_SESSION_bio(in, NULL); - } - -Index: ext/openssl/ossl_ns_spki.c -=================================================================== ---- ext/openssl/ossl_ns_spki.c.orig -+++ ext/openssl/ossl_ns_spki.c -@@ -56,14 +56,14 @@ ossl_spki_initialize(int argc, VALUE *ar - { - NETSCAPE_SPKI *spki; - VALUE buffer; -- unsigned char *p; -+ const unsigned char *p; - - if (rb_scan_args(argc, argv, "01", &buffer) == 0) { - return self; - } - StringValue(buffer); - if (!(spki = NETSCAPE_SPKI_b64_decode(RSTRING_PTR(buffer), -1))) { -- p = RSTRING_PTR(buffer); -+ p = (unsigned char *)RSTRING_PTR(buffer); - if (!(spki = d2i_NETSCAPE_SPKI(NULL, &p, RSTRING_LEN(buffer)))) { - ossl_raise(eSPKIError, NULL); - } -@@ -87,7 +87,7 @@ ossl_spki_to_der(VALUE self) - if ((len = i2d_NETSCAPE_SPKI(spki, NULL)) <= 0) - ossl_raise(eX509CertError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if (i2d_NETSCAPE_SPKI(spki, &p) <= 0) - ossl_raise(eX509CertError, NULL); - ossl_str_adjust(str, p); -@@ -172,7 +172,7 @@ ossl_spki_get_challenge(VALUE self) - return rb_str_new(0, 0); - } - -- return rb_str_new(spki->spkac->challenge->data, -+ return rb_str_new((const char *)spki->spkac->challenge->data, - spki->spkac->challenge->length); - } - -Index: ext/openssl/ossl_x509crl.c -=================================================================== ---- ext/openssl/ossl_x509crl.c.orig -+++ ext/openssl/ossl_x509crl.c -@@ -91,7 +91,7 @@ static VALUE - ossl_x509crl_initialize(int argc, VALUE *argv, VALUE self) - { - BIO *in; -- X509_CRL *crl; -+ X509_CRL *crl, *x = DATA_PTR(self); - VALUE arg; - - if (rb_scan_args(argc, argv, "01", &arg) == 0) { -@@ -99,10 +99,12 @@ ossl_x509crl_initialize(int argc, VALUE - } - arg = ossl_to_der_if_possible(arg); - in = ossl_obj2bio(arg); -- crl = PEM_read_bio_X509_CRL(in, (X509_CRL **)&DATA_PTR(self), NULL, NULL); -+ crl = PEM_read_bio_X509_CRL(in, &x, NULL, NULL); -+ DATA_PTR(self) = x; - if (!crl) { -- BIO_reset(in); -- crl = d2i_X509_CRL_bio(in, (X509_CRL **)&DATA_PTR(self)); -+ (void)BIO_reset(in); -+ crl = d2i_X509_CRL_bio(in, &x); -+ DATA_PTR(self) = x; - } - BIO_free(in); - if (!crl) ossl_raise(eX509CRLError, NULL); -Index: ext/openssl/ossl_x509name.c -=================================================================== ---- ext/openssl/ossl_x509name.c.orig -+++ ext/openssl/ossl_x509name.c -@@ -135,7 +135,7 @@ ossl_x509name_initialize(int argc, VALUE - rb_block_call(tmp, rb_intern("each"), 0, 0, ossl_x509name_init_i, args); - } - else{ -- unsigned char *p; -+ const unsigned char *p; - VALUE str = ossl_to_der_if_possible(arg); - X509_NAME *x; - StringValue(str); -@@ -167,7 +167,7 @@ VALUE ossl_x509name_add_entry(int argc, - if(NIL_P(type)) type = rb_aref(OBJECT_TYPE_TEMPLATE, oid); - GetX509Name(self, name); - if (!X509_NAME_add_entry_by_txt(name, RSTRING_PTR(oid), NUM2INT(type), -- RSTRING_PTR(value), RSTRING_LEN(value), -1, 0)) { -+ (const unsigned char *)RSTRING_PTR(value), RSTRING_LEN(value), -1, 0)) { - ossl_raise(eX509NameError, NULL); - } - -@@ -248,7 +248,7 @@ ossl_x509name_to_a(VALUE self) - } - short_name = OBJ_nid2sn(OBJ_ln2nid(long_name)); - ary = rb_ary_new3(3, rb_str_new2(short_name), -- rb_str_new(entry->value->data, entry->value->length), -+ rb_str_new((const char *)entry->value->data, entry->value->length), - INT2FIX(entry->value->type)); - rb_ary_push(ret, ary); - } -@@ -343,7 +343,7 @@ ossl_x509name_to_der(VALUE self) - if((len = i2d_X509_NAME(name, NULL)) <= 0) - ossl_raise(eX509NameError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_X509_NAME(name, &p) <= 0) - ossl_raise(eX509NameError, NULL); - ossl_str_adjust(str, p); -Index: ext/openssl/ossl_pkey.c -=================================================================== ---- ext/openssl/ossl_pkey.c.orig -+++ ext/openssl/ossl_pkey.c -@@ -164,7 +164,7 @@ ossl_pkey_sign(VALUE self, VALUE digest, - { - EVP_PKEY *pkey; - EVP_MD_CTX ctx; -- int buf_len; -+ unsigned int buf_len; - VALUE str; - - if (rb_funcall(self, id_private_q, 0, NULL) != Qtrue) { -@@ -175,7 +175,7 @@ ossl_pkey_sign(VALUE self, VALUE digest, - StringValue(data); - EVP_SignUpdate(&ctx, RSTRING_PTR(data), RSTRING_LEN(data)); - str = rb_str_new(0, EVP_PKEY_size(pkey)+16); -- if (!EVP_SignFinal(&ctx, RSTRING_PTR(str), &buf_len, pkey)) -+ if (!EVP_SignFinal(&ctx, (unsigned char *)RSTRING_PTR(str), &buf_len, pkey)) - ossl_raise(ePKeyError, NULL); - assert((long)buf_len <= RSTRING_LEN(str)); - rb_str_set_len(str, buf_len); -@@ -194,7 +194,7 @@ ossl_pkey_verify(VALUE self, VALUE diges - StringValue(sig); - StringValue(data); - EVP_VerifyUpdate(&ctx, RSTRING_PTR(data), RSTRING_LEN(data)); -- switch (EVP_VerifyFinal(&ctx, RSTRING_PTR(sig), RSTRING_LEN(sig), pkey)) { -+ switch (EVP_VerifyFinal(&ctx, (unsigned char *)RSTRING_PTR(sig), RSTRING_LEN(sig), pkey)) { - case 0: - return Qfalse; - case 1: -Index: ext/openssl/openssl_missing.h -=================================================================== ---- ext/openssl/openssl_missing.h.orig -+++ ext/openssl/openssl_missing.h -@@ -28,7 +28,7 @@ typedef int i2d_of_void(); - - #if !defined(PEM_read_bio_DSAPublicKey) - # define PEM_read_bio_DSAPublicKey(bp,x,cb,u) (DSA *)PEM_ASN1_read_bio( \ -- (char *(*)())d2i_DSAPublicKey,PEM_STRING_DSA_PUBLIC,bp,(char **)x,cb,u) -+ (d2i_of_void *)d2i_DSAPublicKey,PEM_STRING_DSA_PUBLIC,bp,(void **)x,cb,u) - #endif - - #if !defined(PEM_write_bio_DSAPublicKey) -@@ -40,27 +40,27 @@ typedef int i2d_of_void(); - - #if !defined(DSAPrivateKey_dup) - # define DSAPrivateKey_dup(dsa) (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPrivateKey, \ -- (char *(*)())d2i_DSAPrivateKey,(char *)dsa) -+ (d2i_of_void *)d2i_DSAPrivateKey,(char *)dsa) - #endif - - #if !defined(DSAPublicKey_dup) - # define DSAPublicKey_dup(dsa) (DSA *)ASN1_dup((i2d_of_void *)i2d_DSAPublicKey, \ -- (char *(*)())d2i_DSAPublicKey,(char *)dsa) -+ (d2i_of_void *)d2i_DSAPublicKey,(char *)dsa) - #endif - - #if !defined(X509_REVOKED_dup) - # define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((i2d_of_void *)i2d_X509_REVOKED, \ -- (char *(*)())d2i_X509_REVOKED, (char *)rev) -+ (d2i_of_void *)d2i_X509_REVOKED, (char *)rev) - #endif - - #if !defined(PKCS7_SIGNER_INFO_dup) - # define PKCS7_SIGNER_INFO_dup(si) (PKCS7_SIGNER_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_SIGNER_INFO, \ -- (char *(*)())d2i_PKCS7_SIGNER_INFO, (char *)si) -+ (d2i_of_void *)d2i_PKCS7_SIGNER_INFO, (char *)si) - #endif - - #if !defined(PKCS7_RECIP_INFO_dup) - # define PKCS7_RECIP_INFO_dup(ri) (PKCS7_RECIP_INFO *)ASN1_dup((i2d_of_void *)i2d_PKCS7_RECIP_INFO, \ -- (char *(*)())d2i_PKCS7_RECIP_INFO, (char *)ri) -+ (d2i_of_void *)d2i_PKCS7_RECIP_INFO, (char *)ri) - #endif - - #if !defined(HAVE_EVP_MD_CTX_INIT) -Index: ext/openssl/ossl_pkey_dh.c -=================================================================== ---- ext/openssl/ossl_pkey_dh.c.orig -+++ ext/openssl/ossl_pkey_dh.c -@@ -169,7 +169,7 @@ ossl_dh_initialize(int argc, VALUE *argv - in = ossl_obj2bio(arg); - dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL); - if (!dh){ -- BIO_reset(in); -+ (void)BIO_reset(in); - dh = d2i_DHparams_bio(in, NULL); - } - BIO_free(in); -@@ -254,7 +254,7 @@ ossl_dh_to_der(VALUE self) - if((len = i2d_DHparams(pkey->pkey.dh, NULL)) <= 0) - ossl_raise(eDHError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_DHparams(pkey->pkey.dh, &p) < 0) - ossl_raise(eDHError, NULL); - ossl_str_adjust(str, p); -@@ -407,7 +407,7 @@ ossl_dh_compute_key(VALUE self, VALUE pu - pub_key = GetBNPtr(pub); - len = DH_size(dh); - str = rb_str_new(0, len); -- if ((len = DH_compute_key(RSTRING_PTR(str), pub_key, dh)) < 0) { -+ if ((len = DH_compute_key((unsigned char *)RSTRING_PTR(str), pub_key, dh)) < 0) { - ossl_raise(eDHError, NULL); - } - rb_str_set_len(str, len); -Index: ext/openssl/ossl_x509cert.c -=================================================================== ---- ext/openssl/ossl_x509cert.c.orig -+++ ext/openssl/ossl_x509cert.c -@@ -134,7 +134,7 @@ static VALUE - ossl_x509_initialize(int argc, VALUE *argv, VALUE self) - { - BIO *in; -- X509 *x509; -+ X509 *x509, *x = DATA_PTR(self); - VALUE arg; - - if (rb_scan_args(argc, argv, "01", &arg) == 0) { -@@ -143,10 +143,12 @@ ossl_x509_initialize(int argc, VALUE *ar - } - arg = ossl_to_der_if_possible(arg); - in = ossl_obj2bio(arg); -- x509 = PEM_read_bio_X509(in, (X509 **)&DATA_PTR(self), NULL, NULL); -+ x509 = PEM_read_bio_X509(in, &x, NULL, NULL); -+ DATA_PTR(self) = x; - if (!x509) { -- BIO_reset(in); -- x509 = d2i_X509_bio(in, (X509 **)&DATA_PTR(self)); -+ (void)BIO_reset(in); -+ x509 = d2i_X509_bio(in, &x); -+ DATA_PTR(self) = x; - } - BIO_free(in); - if (!x509) ossl_raise(eX509CertError, NULL); -@@ -190,7 +192,7 @@ ossl_x509_to_der(VALUE self) - if ((len = i2d_X509(x509, NULL)) <= 0) - ossl_raise(eX509CertError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if (i2d_X509(x509, &p) <= 0) - ossl_raise(eX509CertError, NULL); - ossl_str_adjust(str, p); -@@ -690,7 +692,7 @@ static VALUE - ossl_x509_inspect(VALUE self) - { - VALUE str; -- char *cname = rb_class2name(rb_obj_class(self)); -+ const char *cname = rb_class2name(rb_obj_class(self)); - - str = rb_str_new2("#<"); - rb_str_cat2(str, cname); -Index: ext/openssl/ossl_rand.c -=================================================================== ---- ext/openssl/ossl_rand.c.orig -+++ ext/openssl/ossl_rand.c -@@ -99,7 +99,7 @@ ossl_rand_bytes(VALUE self, VALUE len) - int n = NUM2INT(len); - - str = rb_str_new(0, n); -- if (!RAND_bytes(RSTRING_PTR(str), n)) { -+ if (!RAND_bytes((unsigned char *)RSTRING_PTR(str), n)) { - ossl_raise(eRandomError, NULL); - } - -@@ -118,7 +118,7 @@ ossl_rand_pseudo_bytes(VALUE self, VALUE - int n = NUM2INT(len); - - str = rb_str_new(0, n); -- if (!RAND_pseudo_bytes(RSTRING_PTR(str), n)) { -+ if (!RAND_pseudo_bytes((unsigned char *)RSTRING_PTR(str), n)) { - ossl_raise(eRandomError, NULL); - } - -Index: ext/openssl/ossl_pkcs5.c -=================================================================== ---- ext/openssl/ossl_pkcs5.c.orig -+++ ext/openssl/ossl_pkcs5.c -@@ -75,7 +75,9 @@ ossl_pkcs5_pbkdf2_hmac_sha1(VALUE self, - - str = rb_str_new(0, len); - -- if (PKCS5_PBKDF2_HMAC_SHA1(RSTRING_PTR(pass), RSTRING_LEN(pass), RSTRING_PTR(salt), RSTRING_LEN(salt), NUM2INT(iter), len, RSTRING_PTR(str)) != 1) -+ if (PKCS5_PBKDF2_HMAC_SHA1(RSTRING_PTR(pass), RSTRING_LEN(pass), -+ (const unsigned char *)RSTRING_PTR(salt), RSTRING_LEN(salt), NUM2INT(iter), -+ len, (unsigned char *)RSTRING_PTR(str)) != 1) - ossl_raise(ePKCS5, "PKCS5_PBKDF2_HMAC_SHA1"); - - return str; -Index: ext/openssl/ossl_x509ext.c -=================================================================== ---- ext/openssl/ossl_x509ext.c.orig -+++ ext/openssl/ossl_x509ext.c -@@ -274,16 +274,17 @@ static VALUE - ossl_x509ext_initialize(int argc, VALUE *argv, VALUE self) - { - VALUE oid, value, critical; -- unsigned char *p; -- X509_EXTENSION *ext; -+ const unsigned char *p; -+ X509_EXTENSION *ext, *x; - - GetX509Ext(self, ext); - if(rb_scan_args(argc, argv, "12", &oid, &value, &critical) == 1){ - oid = ossl_to_der_if_possible(oid); - StringValue(oid); -- p = RSTRING_PTR(oid); -- if(!d2i_X509_EXTENSION((X509_EXTENSION**)&DATA_PTR(self), -- &p, RSTRING_LEN(oid))) -+ p = (unsigned char *)RSTRING_PTR(oid); -+ x = d2i_X509_EXTENSION(&ext, &p, RSTRING_LEN(oid)); -+ DATA_PTR(self) = ext; -+ if(!x) - ossl_raise(eX509ExtError, NULL); - return self; - } -@@ -411,7 +412,7 @@ ossl_x509ext_to_der(VALUE obj) - if((len = i2d_X509_EXTENSION(ext, NULL)) <= 0) - ossl_raise(eX509ExtError, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_X509_EXTENSION(ext, &p) < 0) - ossl_raise(eX509ExtError, NULL); - ossl_str_adjust(str, p); -Index: ext/openssl/ossl_pkcs7.c -=================================================================== ---- ext/openssl/ossl_pkcs7.c.orig -+++ ext/openssl/ossl_pkcs7.c -@@ -309,7 +309,7 @@ ossl_pkcs7_alloc(VALUE klass) - static VALUE - ossl_pkcs7_initialize(int argc, VALUE *argv, VALUE self) - { -- PKCS7 *p7; -+ PKCS7 *p7, *pkcs = DATA_PTR(self); - BIO *in; - VALUE arg; - -@@ -317,10 +317,12 @@ ossl_pkcs7_initialize(int argc, VALUE *a - return self; - arg = ossl_to_der_if_possible(arg); - in = ossl_obj2bio(arg); -- p7 = PEM_read_bio_PKCS7(in, (PKCS7 **)&DATA_PTR(self), NULL, NULL); -+ p7 = PEM_read_bio_PKCS7(in, &pkcs, NULL, NULL); -+ DATA_PTR(self) = pkcs; - if (!p7) { -- BIO_reset(in); -- p7 = d2i_PKCS7_bio(in, (PKCS7 **)&DATA_PTR(self)); -+ (void)BIO_reset(in); -+ p7 = d2i_PKCS7_bio(in, &pkcs); -+ DATA_PTR(self) = pkcs; - } - BIO_free(in); - ossl_pkcs7_set_data(self, Qnil); -@@ -798,7 +800,7 @@ ossl_pkcs7_to_der(VALUE self) - if((len = i2d_PKCS7(pkcs7, NULL)) <= 0) - ossl_raise(ePKCS7Error, NULL); - str = rb_str_new(0, len); -- p = RSTRING_PTR(str); -+ p = (unsigned char *)RSTRING_PTR(str); - if(i2d_PKCS7(pkcs7, &p) <= 0) - ossl_raise(ePKCS7Error, NULL); - ossl_str_adjust(str, p); -Index: ext/openssl/extconf.rb -=================================================================== ---- ext/openssl/extconf.rb.orig -+++ ext/openssl/extconf.rb -@@ -97,6 +97,9 @@ have_func("X509_STORE_set_ex_data") - have_func("OBJ_NAME_do_all_sorted") - have_func("SSL_SESSION_get_id") - have_func("OPENSSL_cleanse") -+unless have_func("SSL_set_tlsext_host_name", ['openssl/ssl.h']) -+ have_macro("SSL_set_tlsext_host_name", ['openssl/ssl.h']) && $defs.push("-DHAVE_SSL_SET_TLSEXT_HOST_NAME") -+end - if try_compile("#define FOO(...) foo(__VA_ARGS__)\n int x(){FOO(1);FOO(1,2);FOO(1,2,3);}\n") - $defs.push("-DHAVE_VA_ARGS_MACRO") - end diff --git a/ruby-1.8.x_rubylibdir.patch b/ruby-1.8.x_rubylibdir.patch deleted file mode 100644 index 0d7ad33..0000000 --- a/ruby-1.8.x_rubylibdir.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: configure.in -=================================================================== ---- configure.in.orig -+++ configure.in -@@ -1757,7 +1757,12 @@ case "$target_os" in - rubyw_install_name="$RUBYW_INSTALL_NAME" - ;; - esac --RUBY_LIB_PREFIX=`eval echo \\"${libdir}/ruby\\"` -+ -+AC_ARG_WITH(rubylibdir, -+ [ --with-rubylibdir=DIR stdlib libraries in DIR [[LIBDIR/ruby]]], -+ [rubylibdir=$withval], -+ [rubylibdir='${libdir}/ruby']) -+RUBY_LIB_PREFIX=`eval echo \\"${rubylibdir}\\"` - - AC_ARG_WITH(sitedir, - [ --with-sitedir=DIR site libraries in DIR [[LIBDIR/ruby/site_ruby]]], diff --git a/ruby-1.8.x_yaml2byte.patch b/ruby-1.8.x_yaml2byte.patch deleted file mode 100644 index da62f26..0000000 --- a/ruby-1.8.x_yaml2byte.patch +++ /dev/null @@ -1,37 +0,0 @@ -I: Program causes undefined operation - (likely same variable used twiceand post/pre incremented in the same expression). - e.g. x = x++; Split it in two operations. -W: ruby sequence-point yaml2byte.c:67, 104 - -yaml2byte.c: In function 'bytestring_append': -yaml2byte.c:67:21: warning: operation on 'str->buffer' may be undefined -yaml2byte.c: In function 'bytestring_extend': -yaml2byte.c:104:25: warning: operation on 'str->buffer' may be undefined - -#define S_REALLOC_N(var,type,n) (var)=(type*)realloc((char*)(var),sizeof(type)*(n)) - -so the old code expanded to: -str->buffer = str->buffer = (char*)realloc((char*)str->buffer, sizeof(char)*str->length + 1) - -Index: ext/syck/yaml2byte.c -=================================================================== ---- ext/syck/yaml2byte.c (revision 27446) -+++ ext/syck/yaml2byte.c (working copy) -@@ -64,7 +64,7 @@ - grow = (length - str->remaining) + CHUNKSIZE; - str->remaining += grow; - str->length += grow; -- str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 ); -+ S_REALLOC_N( str->buffer, char, str->length + 1 ); - assert(str->buffer); - } - curr = str->buffer + (str->length - str->remaining); -@@ -101,7 +101,7 @@ - grow = (length - str->remaining) + CHUNKSIZE; - str->remaining += grow; - str->length += grow; -- str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 ); -+ S_REALLOC_N( str->buffer, char, str->length + 1 ); - } - curr = str->buffer + (str->length - str->remaining); - from = ext->buffer; diff --git a/ruby-doc-bundle.tar.bz2 b/ruby-doc-bundle.tar.bz2 deleted file mode 100644 index 556ac39..0000000 --- a/ruby-doc-bundle.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f81e90bea97aa533b8eb6e2776149e5afe1e0a2978cc030cd4a21b347afb22b -size 769451 diff --git a/ruby-rpmlintrc b/ruby-rpmlintrc deleted file mode 100644 index 3f5175f..0000000 --- a/ruby-rpmlintrc +++ /dev/null @@ -1,5 +0,0 @@ -addFilter("spurious-executable-perm.*/usr/share/doc/packages/ruby-test-suite/runruby.rb") -addFilter("non-executable-script /usr/lib.*/ruby/.*") -addFilter("wrong-file-end-of-line-encoding /usr/share/doc/packages/ruby/.*") -addFilter("zero-length /usr/share/doc/packages/ruby-test-suite/.*") -addFilter("unexpanded-macro.*/usr/share/ri/.*") diff --git a/ruby.changes b/ruby.changes index 7a63878..4fc4ffc 100644 --- a/ruby.changes +++ b/ruby.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 8 09:46:38 UTC 2012 - coolo@suse.com + +- make this package a wrapper around the default ruby - ruby19 for now + ------------------------------------------------------------------- Mon Feb 13 10:54:34 UTC 2012 - coolo@suse.com diff --git a/ruby.common-macros b/ruby.common-macros new file mode 100644 index 0000000..0176d9e --- /dev/null +++ b/ruby.common-macros @@ -0,0 +1,2 @@ +%gem_cleanup /usr/bin/gem_build_cleanup %{buildroot}%{_libdir}/ruby/gems/ + diff --git a/ruby.macros b/ruby.macros index fef345f..0818db2 100644 --- a/ruby.macros +++ b/ruby.macros @@ -1,14 +1,20 @@ -%rb_arch %(/usr/bin/ruby -e 'print RUBY_PLATFORM') -%rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")') -# -%rb_dir %{_libdir}/ruby/ -%rb_libdir %{_libdir}/ruby/%{rb_ver}/ -%rb_archdir %{_libdir}/ruby/%{rb_ver}/%{rb_arch} -# -%rb_sitedir %{_libdir}/ruby/site_ruby -%rb_sitelib %{rb_sitedir}/%{rb_ver} -%rb_sitearch %{rb_sitedir}/%{rb_ver}/%{rb_arch} -# -%rb_vendordir %{_libdir}/ruby/vendor_ruby -%rb_vendorlib %{rb_vendordir}/%{rb_ver} -%rb_vendorarch %{rb_vendordir}/%{rb_ver}/%{rb_arch} +%gem_install %{gem19_install} +%gem_cleanup /usr/bin/gem_build_cleanup %{buildroot}%{_libdir}/ruby/gems/%{rb_ver} +%rubygems_requires %{rubygems19_requires} + +%rb_binary %{rb19_binary} +%rb_arch %{rb19_arch} +%rb_ver %{rb19_ver} + +%rb_dir %{rb19_dir} +%rb_libdir %{rb19_libdir} +%rb_archdir %{rb19_archdir} + +%rb_sitedir %rb19_sitedir +%rb_sitelibdir %rb19_sitelibdir +%rb_sitearchdir %rb19_sitearchdir + +%rb_vendordir %rb19_vendordir +%rb_vendorlibdir %rb19_vendorlibdir +%rb_vendorarchdir %rb19_vendorarchdir + diff --git a/ruby.spec b/ruby.spec index 39ed53a..963ff33 100644 --- a/ruby.spec +++ b/ruby.spec @@ -15,71 +15,25 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: ruby -Version: 1.8.7.p357 +Version: 1.9.3 Release: 0 # -%define pkg_version 1.8.7 -%define patch_level p357 -%define rb_arch %(echo %{_target_cpu}-linux | sed -e "s/i686/i586/" -e "s/hppa2.0/hppa/" -e "s/ppc/powerpc/") -%define rb_ver %(echo %{pkg_version} | sed -e 's/\\\.[0-9]\\\+$//') -# -License: GPL-2.0+ +License: MIT Group: Development/Languages/Ruby # BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: bison gdbm-devel gperf graphviz libjpeg-devel openssl-devel readline-devel tk-devel automake -# for openssl testsuite -BuildRequires: openssl -#define with_bleak_house 1 -%if 0%{suse_version} >= 1030 -%define use_fdupes 1 -%endif -%if 0%{?use_fdupes} -BuildRequires: fdupes -%endif -%if 0%{?suse_version} < 930 -BuildRequires: XFree86-devel XFree86-fonts-scalable -%else -BuildRequires: xorg-x11-devel xorg-x11-fonts-scalable -%endif -# +Source0: ruby.macros +Source1: gem_build_cleanup +Source2: gemrc +Source3: ruby.common-macros Provides: /usr/bin/ruby -%if 0%{?with_bleak_house} -%define bleak_house_version 4.0 -Provides: ruby_with_bleak_house = %{bleak_house_version}-%{release} -%endif -Provides: ruby(abi) = %{rb_ver} -# Url: http://www.ruby-lang.org/ -Source: ftp://ftp.ruby-lang.org/pub/ruby/ruby-%{pkg_version}-%{patch_level}.tar.bz2 -Source1: irb.1 -Source2: ruby-doc-bundle.tar.bz2 -Patch1: ruby-1.8.7.p299_lib64.patch -Patch5: ruby-1.8.7.p299_date_remove_privat.patch -Patch6: ruby-1.8.7.p299_pedantic-headers.patch -Patch7: ruby-1.8.7.p72_vendor_specific.patch -Patch8: ruby-1.8.7.p72_topdir.patch -Patch9: ruby-1.8.x_digest_non_void_return.patch -# can be removed on next version update. pulled from svn -Patch10: ruby-1.8.x_openssl_branch_update.patch -Patch11: ruby-1.8.x_yaml2byte.patch -Patch13: ruby-1.8.7.p334_remove_zlib_test_params_test.patch -Patch14: ruby-1.8.x_rubylibdir.patch -# vendor ruby files taken from: -# http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ -Source3: site-specific.rb -Source4: vendor-specific.rb -# -Source5: ruby-rpmlintrc -Source6: ruby.macros -%if 0%{?with_bleak_house} -#Source6: bleak_house-%{bleak_house_version}.tar.bz2 -%endif -# Summary: An Interpreted Object-Oriented Scripting Language +Requires: ruby19 +Provides: rubygems = 1.8.15 +Obsoletes: rubygems < 1.8.15 + %description Ruby is an interpreted scripting language for quick and easy object-oriented programming. It has many features for processing text @@ -109,428 +63,51 @@ simple, straight-forward, and extensible. - Highly Portable (works on many UNIX machines; DOS, Windows, Mac, BeOS, and more) - - -Authors: --------- - Yukihiro Matsumoto - %package devel -License: GPL-2.0+ Group: Development/Languages/Ruby Summary: Development files to link against Ruby -Requires: %{name} = %{version} -%if 0%{?with_bleak_house} -Requires: ruby_with_bleak_house = %{bleak_house_version} -Provides: ruby-devel_with_bleak_house = %{bleak_house_version}-%{release} -%endif +Requires: ruby19-devel %{name} +Provides: rubygems_with_buildroot_patch + %description devel Development files to link against Ruby. - - -Authors: --------- - Yukihiro Matsumoto - -%package tk -License: GPL-2.0+ +%package common Group: Development/Languages/Ruby -Summary: TCL/TK bindings for Ruby -Requires: %{name} = %{version} -%description tk -TCL/TK bindings for Ruby +Summary: Files needed by all ruby versions - - -Authors: --------- - Yukihiro Matsumoto - -%package doc-ri -License: GPL-2.0+ -Group: Development/Languages/Ruby -Summary: Ruby Interactive Documentation -Requires: %{name} = %{version} -%if 0%{?suse_version} >= 1120 -BuildArch: noarch -%endif -%description doc-ri -This package contains the RI docs for ruby - - - -Authors: --------- - Yukihiro Matsumoto - -%package doc-html -License: GPL-2.0+ -Group: Development/Languages/Ruby -Summary: This package contains the HTML docs for ruby -Requires: %{name} = %{version} -%if 0%{?suse_version} >= 1120 -BuildArch: noarch -%endif -%description doc-html -This package contains the HTML docs for ruby - - - -Authors: --------- - Yukihiro Matsumoto - -%package examples -License: GPL-2.0+ -Group: Development/Languages/Ruby -Requires: %{name} = %{version} -Summary: Example scripts for ruby -%description examples -Example scripts for ruby - - - -Authors: --------- - Yukihiro Matsumoto - -%package test-suite -License: GPL-2.0+ -Group: Development/Languages/Ruby -Requires: %{name} = %{version} -Summary: An Interpreted Object-Oriented Scripting Language -%description test-suite -Ruby is an interpreted scripting language for quick and easy -object-oriented programming. It has many features for processing text -files and performing system management tasks (as in Perl). It is -simple, straight-forward, and extensible. - -* Ruby features: - -- Simple Syntax - -- *Normal* Object-Oriented features (class, method calls, for - example) - -- *Advanced* Object-Oriented features(Mix-in, Singleton-method, for - example) - -- Operator Overloading - -- Exception Handling - -- Iterators and Closures - -- Garbage Collection - -- Dynamic Loading of Object Files (on some architectures) - -- Highly Portable (works on many UNIX machines; DOS, Windows, Mac, -BeOS, and more) - - - -Authors: --------- - Yukihiro Matsumoto +%description common +Development files to link against Ruby. %prep -%setup -q -n ruby-%{pkg_version}-%{patch_level} -a2 %{?with_bleak_house:-a6} -%patch1 -%patch5 -%patch6 -%patch7 -%patch8 -%patch9 -%patch10 -%patch11 -%patch13 -%patch14 -%if 0%{?with_bleak_house} - for patch in valgrind configure gc ; do - patch -p0 < bleak_house-%{bleak_house_version}/ruby/${patch}.patch - done -%endif -find . -type f | xargs -n 1 sed -i "s@#!\s*/usr/local/bin/ruby@#!/usr/bin/ruby@" -# make sure it _really_ rebuilds parse.c for us -old parse.c - %build -autoreconf -fi -export CFLAGS="%{optflags} -g -fno-strict-aliasing" -%configure \ - --target=%{_target_platform} \ - --with-default-kcode=none \ - --with-mantype=man \ - --enable-shared \ - --disable-static -%{__make} all -%{__make} -C ext/tk/ all -# -# TODO: patch the .document files to include all needed modules. -# -export LD_LIBRARY_PATH="$PWD/" -export RUBYLIB="$PWD:$PWD/lib:$(find $PWD/.ext $PWD/ext/ -type d |tr '\n' ':')." -./ruby bin/rdoc \ - --all --line-numbers --ri-system \ - --op=ri/%{rb_ver}/system . -./ruby bin/rdoc \ - --all --line-numbers --charset=UTF-8 \ - --fmt=html -p --inline-source \ - --op=rdoc/html . - -%check -# -# move the tests out of the way that require an installed ruby -# we dont have that in our build environment. -# -%{__mkdir} unused.test -%{__mv} test/{drb,soap,webrick} unused.test/ -%ifarch ppc64 s390x -%{__mv} test/openssl/ unused.test/ -%endif -# -# -> LD_LIBRARY_PATH => we need to find libruby.so.%{rb_ver} -# the test suite uses LD_PRELOAD=./libruby.so.%{rb_ver} -# -> RUBYLIB => find needed modules during documentation generation -# -export LD_LIBRARY_PATH="$PWD/" -export RUBYLIB="$PWD:$PWD/lib:$(find $PWD/.ext $PWD/ext/ -type d |tr '\n' ':')." -# -# run the test suites -# -%{__make} check ||: -# -# TODO: -# the big test suite fails with some weird openssl errors on ppc -# to be reinvestigated -# -# %{__make} check -# -# restore the tests -# -%{__mv} unused.test/{drb,soap,webrick} test/ -%ifarch ppc64 s390x -%{__mv} unused.test/openssl/ test/ -%endif %install -%makeinstall -%makeinstall -C ext/tk/ -%{__install} -d -m 0755 \ - %{buildroot}%{_docdir}/%{name}{,-test-suite} \ - %{buildroot}%{_datadir}/emacs/site-lisp \ - %{buildroot}%{_datadir}/ri/%{rb_ver}/system/ \ - %{buildroot}%{_libdir}/%{name}/vendor_%{name}/%{rb_ver} -# -%{__install} -m 0644 misc/*.el %{buildroot}%{_datadir}/emacs/site-lisp/ -%{__install} -m 0644 %{S:1} %{buildroot}%{_mandir}/man1/irb.1 -# -%{__install} -m 0644 %{S:3} %{buildroot}%{_libdir}/%{name}/site_%{name}/%{rb_ver} -%{__install} -m 0644 %{S:4} %{buildroot}%{_libdir}/%{name}/vendor_%{name}/%{rb_ver} -# -%{__cp} -rv \ - ri/ %{buildroot}%{_datadir}/ -#mv %{buildroot}%{_datadir}{,/ri/%{rb_ver}}/created.rid -%{__cp} -rv \ - COPYING COPYING.ja ChangeLog GPL LEGAL \ - LGPL README README.EXT README.EXT.ja \ - README.ja ToDo NEWS \ - %{buildroot}%{_docdir}/%{name} -%if 0%{?with_bleak_house} -%{__cp} -v bleak_house-%{bleak_house_version}/LICENSE %{buildroot}%{_docdir}/%{name}/LICENSE_AFL_for_bleak_house -%{__cp} -v bleak_house-%{bleak_house_version}/LICENSE_BSD %{buildroot}%{_docdir}/%{name}/LICENSE_BSD_for_bleak_house -%endif -%{__cp} -rv \ - ruby-doc-bundle %{buildroot}%{_docdir}/%{name} -%{__cp} -rv \ - rdoc/html %{buildroot}%{_docdir}/%{name}/ruby-library-docs -%{__cp} -rv \ - sample %{buildroot}%{_docdir}/%{name}/examples -sed -i "s@#!\s*\./miniruby@#!/usr/bin/ruby@" runruby.rb -%{__cp} -r test/ runruby.rb %{buildroot}%{_docdir}/%{name}-test-suite/ -%{__ln_s} -f %{_bindir}/%{name} %{buildroot}%{_docdir}/%{name}-test-suite/%{name} -%if 0%{?use_fdupes} -%fdupes %{buildroot} -%endif -chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h -%{__install} -D -m 0644 %{S:6} %{buildroot}/etc/rpm/macros.ruby - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +install -D -m 0755 %{S:1} $RPM_BUILD_ROOT%_bindir/gem_build_cleanup +for bin in erb gem irb rake rdoc ri ruby testrb; do + ln -s %_bindir/"$bin"1.9 $RPM_BUILD_ROOT%_bindir/$bin +done +mkdir -p $RPM_BUILD_ROOT%_libdir +ln -s %_libdir/libruby1.9.so $RPM_BUILD_ROOT%_libdir/libruby.so +install -D -m 0644 %{S:0} $RPM_BUILD_ROOT/etc/rpm/macros.ruby +install -D -m 0644 %{S:3} $RPM_BUILD_ROOT/etc/rpm/macros.common-ruby +install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/gemrc +export NO_BRP_STALE_LINK_ERROR=yes %files %defattr(-,root,root) -%config(noreplace) /etc/rpm/macros.ruby +/etc/rpm/macros.ruby +%exclude %_bindir/gem_build_cleanup %{_bindir}/* -%dir %{_libdir}/%{name} -%dir %{_libdir}/%{name}/%{rb_ver} -%{_libdir}/lib%{name}.so.%{rb_ver}* -%dir %{_datadir}/emacs -%dir %{_datadir}/emacs/site-lisp -%{_datadir}/emacs/site-lisp/* -%{_mandir}/man1/* -%dir %{_libdir}/%{name}/site_%{name} -%dir %{_libdir}/%{name}/site_%{name}/%{rb_ver} -%dir %{_libdir}/%{name}/site_%{name}/%{rb_ver}/%{rb_arch} -%dir %{_libdir}/%{name}/vendor_%{name} -%dir %{_libdir}/%{name}/vendor_%{name}/%{rb_ver} -%dir %{_libdir}/%{name}/vendor_%{name}/%{rb_ver}/%{rb_arch} -%{_libdir}/%{name}/site_%{name}/%{rb_ver}/site-specific.rb -%{_libdir}/%{name}/vendor_%{name}/%{rb_ver}/vendor-specific.rb -%{_libdir}/%{name}/%{rb_ver}/English.rb -%{_libdir}/%{name}/%{rb_ver}/Env.rb -%{_libdir}/%{name}/%{rb_ver}/abbrev.rb -%{_libdir}/%{name}/%{rb_ver}/base64.rb -%{_libdir}/%{name}/%{rb_ver}/benchmark.rb -%{_libdir}/%{name}/%{rb_ver}/cgi* -%{_libdir}/%{name}/%{rb_ver}/complex.rb -%{_libdir}/%{name}/%{rb_ver}/csv.rb -%{_libdir}/%{name}/%{rb_ver}/date.rb -%dir %{_libdir}/%{name}/%{rb_ver}/date -%{_libdir}/%{name}/%{rb_ver}/date/format.rb -%{_libdir}/%{name}/%{rb_ver}/date2.rb -%{_libdir}/%{name}/%{rb_ver}/debug.rb -%{_libdir}/%{name}/%{rb_ver}/delegate.rb -%{_libdir}/%{name}/%{rb_ver}/bigdecimal/ -%{_libdir}/%{name}/%{rb_ver}/digest.rb -%dir %{_libdir}/%{name}/%{rb_ver}/digest/ -%{_libdir}/%{name}/%{rb_ver}/digest/sha2.rb -%{_libdir}/%{name}/%{rb_ver}/dl/ -%{_libdir}/%{name}/%{rb_ver}/drb* -%{_libdir}/%{name}/%{rb_ver}/e2mmap.rb -%{_libdir}/%{name}/%{rb_ver}/erb.rb -%{_libdir}/%{name}/%{rb_ver}/eregex.rb -%{_libdir}/%{name}/%{rb_ver}/expect.rb -%{_libdir}/%{name}/%{rb_ver}/fileutils.rb -%{_libdir}/%{name}/%{rb_ver}/finalize.rb -%{_libdir}/%{name}/%{rb_ver}/find.rb -%{_libdir}/%{name}/%{rb_ver}/forwardable.rb -%{_libdir}/%{name}/%{rb_ver}/ftools.rb -%{_libdir}/%{name}/%{rb_ver}/generator.rb -%{_libdir}/%{name}/%{rb_ver}/getoptlong.rb -%{_libdir}/%{name}/%{rb_ver}/getopts.rb -%{_libdir}/%{name}/%{rb_ver}/gserver.rb -%{_libdir}/%{name}/%{rb_ver}/importenv.rb -%{_libdir}/%{name}/%{rb_ver}/io/ -%{_libdir}/%{name}/%{rb_ver}/ipaddr.rb -%{_libdir}/%{name}/%{rb_ver}/irb* -%{_libdir}/%{name}/%{rb_ver}/jcode.rb -%{_libdir}/%{name}/%{rb_ver}/kconv.rb -%{_libdir}/%{name}/%{rb_ver}/logger.rb -%{_libdir}/%{name}/%{rb_ver}/mailread.rb -%{_libdir}/%{name}/%{rb_ver}/mathn.rb -%{_libdir}/%{name}/%{rb_ver}/matrix.rb -%{_libdir}/%{name}/%{rb_ver}/md5.rb -%{_libdir}/%{name}/%{rb_ver}/mkmf.rb -%{_libdir}/%{name}/%{rb_ver}/monitor.rb -%{_libdir}/%{name}/%{rb_ver}/mutex_m.rb -%{_libdir}/%{name}/%{rb_ver}/net/ -%{_libdir}/%{name}/%{rb_ver}/observer.rb -%{_libdir}/%{name}/%{rb_ver}/open-uri.rb -%{_libdir}/%{name}/%{rb_ver}/open3.rb -%{_libdir}/%{name}/%{rb_ver}/openssl* -%{_libdir}/%{name}/%{rb_ver}/optparse* -%{_libdir}/%{name}/%{rb_ver}/ostruct.rb -%{_libdir}/%{name}/%{rb_ver}/parsearg.rb -%{_libdir}/%{name}/%{rb_ver}/parsedate.rb -%{_libdir}/%{name}/%{rb_ver}/pathname.rb -%{_libdir}/%{name}/%{rb_ver}/ping.rb -%{_libdir}/%{name}/%{rb_ver}/pp.rb -%{_libdir}/%{name}/%{rb_ver}/prettyprint.rb -%{_libdir}/%{name}/%{rb_ver}/profile.rb -%{_libdir}/%{name}/%{rb_ver}/profiler.rb -%{_libdir}/%{name}/%{rb_ver}/pstore.rb -%dir %{_libdir}/%{name}/%{rb_ver}/racc -%{_libdir}/%{name}/%{rb_ver}/racc/parser.rb -%{_libdir}/%{name}/%{rb_ver}/rational.rb -%{_libdir}/%{name}/%{rb_ver}/rdoc/ -%{_libdir}/%{name}/%{rb_ver}/readbytes.rb -%{_libdir}/%{name}/%{rb_ver}/resolv-replace.rb -%{_libdir}/%{name}/%{rb_ver}/resolv.rb -%{_libdir}/%{name}/%{rb_ver}/rexml/ -%{_libdir}/%{name}/%{rb_ver}/rinda/ -%{_libdir}/%{name}/%{rb_ver}/rss* -%{_libdir}/%{name}/%{rb_ver}/rubyunit.rb -%{_libdir}/%{name}/%{rb_ver}/runit/ -%{_libdir}/%{name}/%{rb_ver}/scanf.rb -%{_libdir}/%{name}/%{rb_ver}/set.rb -%{_libdir}/%{name}/%{rb_ver}/securerandom.rb -%{_libdir}/%{name}/%{rb_ver}/sha1.rb -%{_libdir}/%{name}/%{rb_ver}/shell* -%{_libdir}/%{name}/%{rb_ver}/singleton.rb -%{_libdir}/%{name}/%{rb_ver}/soap/ -%{_libdir}/%{name}/%{rb_ver}/sync.rb -%{_libdir}/%{name}/%{rb_ver}/tempfile.rb -%{_libdir}/%{name}/%{rb_ver}/test/ -%{_libdir}/%{name}/%{rb_ver}/thread.rb -%{_libdir}/%{name}/%{rb_ver}/thwait.rb -%{_libdir}/%{name}/%{rb_ver}/time.rb -%{_libdir}/%{name}/%{rb_ver}/timeout.rb -%{_libdir}/%{name}/%{rb_ver}/tmpdir.rb -%{_libdir}/%{name}/%{rb_ver}/tracer.rb -%{_libdir}/%{name}/%{rb_ver}/tsort.rb -%{_libdir}/%{name}/%{rb_ver}/un.rb -%{_libdir}/%{name}/%{rb_ver}/uri* -%{_libdir}/%{name}/%{rb_ver}/weakref.rb -%{_libdir}/%{name}/%{rb_ver}/webrick* -%{_libdir}/%{name}/%{rb_ver}/wsdl/ -%{_libdir}/%{name}/%{rb_ver}/xmlrpc/ -%{_libdir}/%{name}/%{rb_ver}/xsd/ -%{_libdir}/%{name}/%{rb_ver}/yaml* -%dir %{_libdir}/%{name}/%{rb_ver}/%{rb_arch} -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/rbconfig.rb -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/[a-sA-s]*.so -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/[u-zU-Z]*.so -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/thread.so -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/digest/ -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/io/ -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/racc/ -%dir %{_docdir}/%{name} -%doc %{_docdir}/%{name}/COPYING* -%doc %{_docdir}/%{name}/ChangeLog -%doc %{_docdir}/%{name}/LEGAL -%doc %{_docdir}/%{name}/*GPL -%doc %{_docdir}/%{name}/NEWS -%doc %{_docdir}/%{name}/README* -%doc %{_docdir}/%{name}/ToDo -%if 0%{?with_bleak_house} -%doc %{_docdir}/%{name}/LICENSE_*_for_bleak_house -%endif %files devel %defattr(-,root,root) -%{_libdir}/lib%{name}.so -%{_libdir}/lib%{name}-static.a -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/*.h +%_libdir/libruby.so -%files test-suite +%files common %defattr(-,root,root) -%{_docdir}/%{name}-test-suite +/etc/gemrc +/etc/rpm/macros.common-ruby +%_bindir/gem_build_cleanup -%files tk -%defattr(-,root,root) -%{_libdir}/%{name}/%{rb_ver}/tcltk.rb -%{_libdir}/%{name}/%{rb_ver}/tk* -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/tcltklib.so -%{_libdir}/%{name}/%{rb_ver}/%{rb_arch}/tkutil.so -%{_libdir}/%{name}/%{rb_ver}/remote-tk.rb -%{_libdir}/%{name}/%{rb_ver}/multi-tk.rb - -%files doc-html -%defattr(-,root,root) -%doc %{_docdir}/%{name}/ruby-library-docs -%doc %{_docdir}/%{name}/ruby-doc-bundle - -%files doc-ri -%defattr(-,root,root) -%doc %{_datadir}/ri - -%files examples -%defattr(-,root,root) -%doc %{_docdir}/%{name}/examples - -%changelog diff --git a/site-specific.rb b/site-specific.rb deleted file mode 100644 index 43be5e3..0000000 --- a/site-specific.rb +++ /dev/null @@ -1,14 +0,0 @@ -# $Id: site-specific.rb,v 1.1 2004/04/02 04:47:43 rshaw Exp $ -# Default site_ruby install library setting for normal module -# installation. You can force site installation with the following: -# -# ruby -rsite-specific extconf.rb -# or -# ruby -rsite-specific install.rb -# -# This is not required for normal user module installation as they will -# default to site_ruby, it is only provided for consistency. Developers -# creating packages/ports should use the vendor-specific option. -# -VENDOR_SPECIFIC=false - diff --git a/vendor-specific.rb b/vendor-specific.rb deleted file mode 100644 index d777fa2..0000000 --- a/vendor-specific.rb +++ /dev/null @@ -1,14 +0,0 @@ -# $Id: vendor-specific.rb,v 1.1 2004/04/02 04:47:43 rshaw Exp $ -# Custom vendor_ruby install library setting for DarwinPorts module -# installation. You can force vendor installation with the following: -# -# ruby -rvendor-specific extconf.rb -# or -# ruby -rvendor-specific install.rb -# -# This causes vendor-specific installation mode. The default without -# this is to do a site-specific installation, which is recommended for -# general user installation of modules. -# -VENDOR_SPECIFIC=true -