]> TLD Linux GIT Repositories - packages/ruby.git/commitdiff
- from PLD
authorMarcin Krol <hawk@tld-linux.org>
Tue, 2 Jul 2013 16:13:07 +0000 (16:13 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 2 Jul 2013 16:13:07 +0000 (16:13 +0000)
arch-specific-dir.patch [new file with mode: 0644]
disable-versioned-paths.patch [new file with mode: 0644]
fix-bison-invocation.patch [new file with mode: 0644]
mkmf-verbose.patch [new file with mode: 0644]
rdoc.1 [new file with mode: 0644]
ruby-ffs.patch [new file with mode: 0644]
ruby-lib64.patch [new file with mode: 0644]
ruby.spec [new file with mode: 0644]
site-and-vendor-arch-flags.patch [new file with mode: 0644]
testrb.1 [new file with mode: 0644]

diff --git a/arch-specific-dir.patch b/arch-specific-dir.patch
new file mode 100644 (file)
index 0000000..8440ea7
--- /dev/null
@@ -0,0 +1,132 @@
+From df4253a5b79b63f16f215f2c19f1b9666c4ca01e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
+Date: Thu, 8 Sep 2011 15:30:05 +0200
+Subject: [PATCH] Add configuration arch specific dir flag.
+
+---
+ Makefile.in      |    1 +
+ configure.in     |   20 ++++++++++++++++++++
+ tool/mkconfig.rb |    4 +++-
+ version.c        |    2 ++
+ 4 files changed, 26 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index bcdaf5f..d61b2ee 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -31,6 +31,7 @@ libexecdir = @libexecdir@
+ datarootdir = @datarootdir@
+ datadir = @datadir@
+ arch = @arch@
++archdir = @archdir@
+ sitearch = @sitearch@
+ sitedir = @sitedir@
+ ruby_version = @ruby_version@
+diff --git a/configure.in b/configure.in
+index 83e5d76..e6dc38c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2793,6 +2793,15 @@ else
+     RUBY_LIB_VERSION="\"${ruby_version}\""
+ fi
+ 
++AC_ARG_WITH(archdir,
++          AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]),
++            [archdir=$withval],
++            [archdir='${rubylibprefix}/${arch}'])
++dir="${archdir}"
++until ARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${ARCH_DIR}"; do
++    dir="${ARCH_DIR}"
++done
++
+ AC_ARG_WITH(sitedir,
+           AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]),
+             [sitedir=$withval],
+@@ -2815,16 +2824,25 @@ if test "${LOAD_RELATIVE+set}"; then
+     AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
+     RUBY_EXEC_PREFIX=""
+     RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
++    RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+     RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+     RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+ else
+     RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
+     RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
++    RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+     RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+     RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+ fi
+ 
+ pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
++AS_CASE(["$RUBY_ARCH_LIB_PATH"],
++  ["$RUBY_LIB_PREFIX/"*], [
++    RUBY_ARCH_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_ARCH_LIB_PATH\" : \"$pat\"`"'"'
++    ],
++  [
++    RUBY_ARCH_LIB_PATH="\"${RUBY_ARCH_LIB_PATH}\""
++    ])
+ AS_CASE(["$RUBY_SITE_LIB_PATH"],
+   ["$RUBY_LIB_PREFIX/"*], [
+     RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"'
+@@ -2855,6 +2873,7 @@ else
+ fi
+ AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}")
+ AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX})
++AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, ${RUBY_ARCH_LIB_PATH})
+ if test "x$SITE_DIR" = xno; then
+     AC_DEFINE(NO_RUBY_SITE_LIB)
+ else
+@@ -2869,6 +2888,7 @@ fi
+ AC_SUBST(arch)dnl
+ AC_SUBST(sitearch)dnl
+ AC_SUBST(ruby_version)dnl
++AC_SUBST(archdir)dnl
+ AC_SUBST(sitedir)dnl
+ AC_SUBST(vendordir)dnl
+ 
+diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
+index b707c4b..9780ef2 100755
+--- a/tool/mkconfig.rb
++++ b/tool/mkconfig.rb
+@@ -43,6 +43,7 @@ v_others = []
+ continued_name = nil
+ continued_line = nil
+ path_version = "/$(ruby_version)"
++archdir_override = "$(vendorlibdir)/$(sitearch)"
+ File.foreach "config.status" do |line|
+   next if /^#/ =~ line
+   name = nil
+@@ -77,6 +78,7 @@ File.foreach "config.status" do |line|
+     when /^RUBY_INSTALL_NAME$/; next if $install_name
+     when /^RUBY_SO_NAME$/; next if $so_name
+     when /^arch$/; if val.empty? then val = arch else arch = val end
++    when /^archdir$/; archdir_override = val; next
+     when /^sitearch/; val = '$(arch)' if val.empty?
+     end
+     case val
+@@ -207,7 +209,7 @@ print(*v_fast)
+ print(*v_others)
+ print <<EOS
+   CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
+-  CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
++  CONFIG["archdir"] = "#{archdir_override}"
+ EOS
+ print <<EOS unless v_disabled["sitedir"]
+   CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
+diff --git a/version.c b/version.c
+index 59d4e5e..915a0a2 100644
+--- a/version.c
++++ b/version.c
+@@ -47,7 +47,9 @@
+ #define RUBY_SITE_LIB2              RUBY_SITE_LIB    "/"RUBY_LIB_VERSION
+ #define RUBY_VENDOR_LIB2            RUBY_VENDOR_LIB  "/"RUBY_LIB_VERSION
+ #endif
++#ifndef RUBY_ARCHLIB
+ #define RUBY_ARCHLIB                RUBY_LIB         "/"RUBY_ARCH
++#endif
+ #define RUBY_SITE_ARCHLIB           RUBY_SITE_LIB2   "/"RUBY_SITEARCH
+ #define RUBY_VENDOR_ARCHLIB         RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
+ #ifdef  RUBY_THINARCH
+-- 
+1.7.6.1
+
diff --git a/disable-versioned-paths.patch b/disable-versioned-paths.patch
new file mode 100644 (file)
index 0000000..1d0bfea
--- /dev/null
@@ -0,0 +1,149 @@
+From fa1a50ad10814f724b8713865dc222724cb955ab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
+Date: Thu, 25 Aug 2011 14:33:51 +0200
+Subject: [PATCH] Allow to disable versioned paths.
+
+---
+ configure.in     |   11 +++++++++++
+ tool/mkconfig.rb |    9 ++++++---
+ version.c        |   10 ++++++++++
+ 3 files changed, 27 insertions(+), 3 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index e742e74..86cb68f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2963,6 +2963,17 @@ else
+ fi
+ AC_SUBST(USE_RUBYGEMS)
+ 
++AC_ARG_ENABLE(versioned-paths,
++      AS_HELP_STRING([--disable-versioned-paths], [disable paths with version number]),
++      [enable_versioned_paths="$enableval"], [enable_versioned_paths=yes])
++if test x"$enable_versioned_paths" = xno; then
++    AC_DEFINE(DISABLE_VERSIONED_PATHS, 1)
++    USE_VERSIONED_PATHS=NO
++else
++    USE_VERSIONED_PATHS=YES
++fi
++AC_SUBST(USE_VERSIONED_PATHS)
++
+ arch_hdrdir="${EXTOUT}/include/${arch}/ruby"
+ AS_MKDIR_P("${arch_hdrdir}")
+ config_h="${arch_hdrdir}/config.h"
+diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
+index a2221f0..47d8c8f 100755
+--- a/tool/mkconfig.rb
++++ b/tool/mkconfig.rb
+@@ -42,6 +42,7 @@ v_others = []
+ vars = {}
+ continued_name = nil
+ continued_line = nil
++path_version = "/$(ruby_version)"
+ File.foreach "config.status" do |line|
+   next if /^#/ =~ line
+   name = nil
+@@ -138,6 +139,8 @@ File.foreach "config.status" do |line|
+     case name
+     when "ruby_version"
+       version = val[/\A"(.*)"\z/, 1]
++    when /^USE_VERSIONED_PATHS$/
++      path_version = nil if /NO/ =~ val
+     end
+   end
+ #  break if /^CEOF/
+@@ -203,15 +206,15 @@ end
+ print(*v_fast)
+ print(*v_others)
+ print <<EOS
+-  CONFIG["rubylibdir"] = "$(rubylibprefix)/$(ruby_version)"
++  CONFIG["rubylibdir"] = "$(rubylibprefix)#{path_version}"
+   CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
+ EOS
+ print <<EOS unless v_disabled["sitedir"]
+-  CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
++  CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
+   CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
+ EOS
+ print <<EOS unless v_disabled["vendordir"]
+-  CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
++  CONFIG["vendorlibdir"] = "$(vendordir)#{path_version}"
+   CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
+ EOS
+ print <<EOS
+diff --git a/version.c b/version.c
+index 59d4e5e..641dc33 100644
+--- a/version.c
++++ b/version.c
+@@ -38,9 +38,15 @@
+ #define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
+ #endif
+ 
++#ifdef DISABLE_VERSIONED_PATHS
++#define RUBY_LIB                    RUBY_LIB_PREFIX
++#define RUBY_SITE_LIB2              RUBY_SITE_LIB
++#define RUBY_VENDOR_LIB2            RUBY_VENDOR_LIB
++#else
+ #define RUBY_LIB                    RUBY_LIB_PREFIX  "/"RUBY_LIB_VERSION
+ #define RUBY_SITE_LIB2              RUBY_SITE_LIB    "/"RUBY_LIB_VERSION
+ #define RUBY_VENDOR_LIB2            RUBY_VENDOR_LIB  "/"RUBY_LIB_VERSION
++#endif
+ #define RUBY_ARCHLIB                RUBY_LIB         "/"RUBY_ARCH
+ #define RUBY_SITE_ARCHLIB           RUBY_SITE_LIB2   "/"RUBY_SITEARCH
+ #define RUBY_VENDOR_ARCHLIB         RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
+@@ -75,8 +81,10 @@ const char ruby_initial_load_paths[] =
+     RUBY_SITE_THIN_ARCHLIB "\0"
+ #endif
+     RUBY_SITE_ARCHLIB "\0"
++#ifndef DISABLE_VERSIONED_PATHS
+     RUBY_SITE_LIB "\0"
+ #endif
++#endif
+ 
+ #ifndef NO_RUBY_VENDOR_LIB
+     RUBY_VENDOR_LIB2 "\0"
+@@ -84,8 +92,10 @@ const char ruby_initial_load_paths[] =
+     RUBY_VENDOR_THIN_ARCHLIB "\0"
+ #endif
+     RUBY_VENDOR_ARCHLIB "\0"
++#ifndef DISABLE_VERSIONED_PATHS
+     RUBY_VENDOR_LIB "\0"
+ #endif
++#endif
+ 
+     RUBY_LIB "\0"
+ #ifdef RUBY_THIN_ARCHLIB
+-- 
+1.7.7.3
+diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb
+index a3c65bf..0575730 100644
+--- a/lib/rdoc/ri/paths.rb
++++ b/lib/rdoc/ri/paths.rb
+@@ -11,9 +11,9 @@ module RDoc::RI::Paths
+   version = RbConfig::CONFIG['ruby_version']
+ 
+   base    = if RbConfig::CONFIG.key? 'ridir' then
+-              File.join RbConfig::CONFIG['ridir'], version
++              File.join [RbConfig::CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
+             else
+-              File.join RbConfig::CONFIG['datadir'], 'ri', version
++              File.join [RbConfig::CONFIG['datadir'], 'ri', RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact
+             end
+ 
+   SYSDIR  = File.join base, "system"
+diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
+index cec8c9f..fed14d2 100755
+--- a/tool/rbinstall.rb
++++ b/tool/rbinstall.rb
+@@ -379,7 +379,7 @@ end
+ 
+ install?(:doc, :rdoc) do
+   if $rdocdir
+-    ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system")
++    ridatadir = File.join([CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? RbConfig::CONFIG['ruby_version'] : nil, "system"].compact)
+     prepare "rdoc", ridatadir
+     install_recursive($rdocdir, ridatadir, :mode => $data_mode)
+   end
+-- 
+1.7.6
+
diff --git a/fix-bison-invocation.patch b/fix-bison-invocation.patch
new file mode 100644 (file)
index 0000000..5b960f3
--- /dev/null
@@ -0,0 +1,11 @@
+--- ruby-1.9.3-p194/ext/ripper/depend~ 2010-12-26 14:25:10.000000000 +0100
++++ ruby-1.9.3-p194/ext/ripper/depend  2012-09-06 19:56:49.041137189 +0200
+@@ -16,7 +16,7 @@
+ 
+ .y.c:
+       $(ECHO) compiling compiler $<
+-      $(Q) $(BISON) -t -v -oy.tab.c $<
++      $(Q) $(BISON) -d -t -v -oy.tab.c $<
+       $(Q) sed -f $(top_srcdir)/tool/ytab.sed -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@
+       @$(RM) y.tab.c
+ 
diff --git a/mkmf-verbose.patch b/mkmf-verbose.patch
new file mode 100644 (file)
index 0000000..7da66c8
--- /dev/null
@@ -0,0 +1,11 @@
+--- ruby-1.9.3-p0/lib/mkmf.rb.debug    2011-08-11 15:07:37.000000000 +0900
++++ ruby-1.9.3-p0/lib/mkmf.rb  2012-01-29 21:34:17.000000000 +0900
+@@ -1638,7 +1638,7 @@
+ SHELL = /bin/sh
+ 
+ # V=0 quiet, V=1 verbose.  other values don't work.
+-V = 0
++V = 1
+ Q1 = $(V:1=)
+ Q = $(Q1:0=@)
+ n=$(NULLCMD)
diff --git a/rdoc.1 b/rdoc.1
new file mode 100644 (file)
index 0000000..6297e53
--- /dev/null
+++ b/rdoc.1
@@ -0,0 +1,252 @@
+.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "RDOC 1"
+.TH RDOC 1 "2003-08-19" "perl v5.8.0" "User Contributed Perl Documentation"
+.SH "NAME"
+rdoc \- Generate documentation from ruby source files
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+Usage:
+.PP
+.Vb 1
+\&  rdoc [options]  [names...]
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Files are parsed, and the information they contain
+collected, before any output is produced. This allows cross
+references between all files to be resolved. If a name is a
+directory, it is traversed. If no names are specified, all
+Ruby files in the current directory (and subdirectories) are
+processed.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+Options:
+.IP "\fB\-a\fR, \fB\-\-all\fR" 8
+.IX Item "-a, --all"
+include all methods (not just public) in the output
+.IP "\fB\-c\fR \fIcharset\fR, \fB\-\-charset\fR \fIcharset\fR" 8
+.IX Item "-c charset, --charset charset"
+specifies \s-1HTML\s0 character-set
+.IP "\fB\-D\fR, \fB\-\-debug\fR" 8
+.IX Item "-D, --debug"
+displays lots on internal stuff
+.IP "\fB\-d\fR, \fB\-\-diagram\fR" 8
+.IX Item "-d, --diagram"
+Generate diagrams showing modules and classes.
+You need dot V1.8.6 or later to use the \-\-diagram
+option correctly. Dot is available from
+http://www.research.att.com/sw/tools/graphviz/
+.IP "\fB\-x\fR \fIpattern\fR, \fB\-\-exclude\fR \fIpattern\fR" 8
+.IX Item "-x pattern, --exclude pattern"
+do not process files or directories matching
+pattern. Files given explicitly on the command
+line will never be excluded.
+.IP "\fB\-F\fR, \fB\-\-fileboxes\fR" 8
+.IX Item "-F, --fileboxes"
+classes are put in boxes which represents
+files, where these classes reside. Classes
+shared between more than one file are
+shown with list of files that sharing them.
+Silently discarded if \-\-diagram is not given
+Experimental.
+.IP "\fB\-f\fR \fIformat_name\fR, \fB\-\-fmt\fR \fIformat_name\fR" 8
+.IX Item "-f format_name, --fmt format_name"
+set the output formatter (see below)
+.IP "\fB\-h\fR, \fB\-\-help\fR" 8
+.IX Item "-h, --help"
+print out a brief help summary
+.IP "\fB\-O\fR, \fB\-\-help\-output\fR" 8
+.IX Item "-O, --help-output"
+explain the various output options
+.IP "\fB\-I\fR \fIgif|jpg|jpg|jpeg\fR, \fB\-\-image\-format\fR \fIgif|png|jpg|jpeg\fR" 8
+.IX Item "-I gif|jpg|jpg|jpeg, --image-format gif|png|jpg|jpeg"
+Sets output image format for diagrams. Can
+be png, gif, jpeg, jpg. If this option is
+omitted, png is used. Requires \-\-diagram.
+.IP "\fB\-i\fR \fIdir[,dir,...]\fR, \fB\-\-include\fR \fIdir[,dir,...]\fR" 8
+.IX Item "-i dir[,dir,...], --include dir[,dir,...]"
+set (or add to) the list of directories
+to be searched when satisfying :include:
+requests. Can be used more than once.
+.IP "\fB\-S\fR, \fB\-\-inline\-source\fR" 8
+.IX Item "-S, --inline-source"
+Show method source code inline, rather
+than via a popup link
+.IP "\fB\-N\fR, \fB\-\-line\-numbers\fR" 8
+.IX Item "-N, --line-numbers"
+Include line numbers in the source code
+.IP "\fB\-m\fR \fIname\fR, \fB\-\-main\fR \fIname\fR" 8
+.IX Item "-m name, --main name"
+\&'name' will be the initial page displayed
+.IP "\fB\-1\fR, \fB\-\-one\-file\fR" 8
+.IX Item "-1, --one-file"
+put all the output into a single file
+.IP "\fB\-o\fR \fIdir\fR, \fB\-\-op\fR \fIdir\fR" 8
+.IX Item "-o dir, --op dir"
+set the output directory
+.IP "\fB\-n\fR \fIname\fR, \fB\-\-opname\fR \fIname\fR" 8
+.IX Item "-n name, --opname name"
+Set the 'name' of the output. Has no
+effect for \s-1HTML\s0.
+.IP "\fB\-q\fR, \fB\-\-quiet\fR" 8
+.IX Item "-q, --quiet"
+don't show progress as we parse
+.IP "\fB\-H\fR, \fB\-\-show\-hash\fR" 8
+.IX Item "-H, --show-hash"
+A name of the form #name in a comment
+is a possible hyperlink to an instance
+method name. When displayed, the '#' is
+removed unless this option is specified
+.IP "\fB\-w\fR \fIwidth\fR, \fB\-\-tab\-width\fR \fIwidth\fR" 8
+.IX Item "-w width, --tab-width width"
+Set the width of tab characters (default 8)
+.IP "\fB\-T\fR \fItemplate_name\fR, \fB\-\-template\fR \fItemplate_name\fR" 8
+.IX Item "-T template_name, --template template_name"
+Set the template used when generating output
+.IP "\fB\-t\fR \fItext\fR, \fB\-\-title\fR \fItext\fR" 8
+.IX Item "-t text, --title text"
+Set 'txt' as the title for the output
+.IP "\fB\-v\fR, \fB\-\-version\fR" 8
+.IX Item "-v, --version"
+display  RDoc's version
+.SH "NOTES"
+.IX Header "NOTES"
+Available output formatters: chm, html, xml
+.PP
+For information on where the output goes, use
+.PP
+.Vb 1
+\&   rdoc --help-output
+.Ve
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+This manpage was contributed by Brian Almeida <bma@debian.org>
diff --git a/ruby-ffs.patch b/ruby-ffs.patch
new file mode 100644 (file)
index 0000000..73e9b9d
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ur ruby-1.9.2-p290-o//configure.in ruby-1.9.2-p290/configure.in
+--- ruby-1.9.2-p290-o//configure.in    2011-08-27 20:31:47.000000000 -0600
++++ ruby-1.9.2-p290/configure.in       2011-08-27 20:35:03.000000000 -0600
+@@ -1184,7 +1184,7 @@
+ else
+   AC_LIBOBJ([signbit])
+ fi
+-AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall __syscall chroot getcwd eaccess\
++AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall __syscall chroot getcwd eaccess ffs\
+             truncate ftruncate ftello chsize times utimes utimensat fcntl lockf lstat\
+             truncate64 ftruncate64 ftello64 fseeko fseeko64 \
+             link symlink readlink readdir_r fsync fdatasync fchown\
diff --git a/ruby-lib64.patch b/ruby-lib64.patch
new file mode 100644 (file)
index 0000000..44de4b0
--- /dev/null
@@ -0,0 +1,32 @@
+diff -ur ruby-1.9.2-p0-o//configure.in ruby-1.9.2-p0/configure.in
+--- ruby-1.9.2-p0-o//configure.in      2010-08-14 02:11:59.000000000 -0600
++++ ruby-1.9.2-p0/configure.in 2010-09-16 17:16:23.000000000 -0600
+@@ -2222,7 +2222,7 @@
+       RUBY_APPEND_OPTION(CFLAGS, -pipe)
+       ],
+     [human*], [
+-      AC_LIBOBJ([x68.o])
++      AC_LIBOBJ([x68])
+       CFLAGS="$CFLAGS -fansi-only"
+       XCFLAGS="$XCFLAGS -cc1-stack=262144 -cpp-stack=2694144"
+       EXEEXT=.x
+Only in ruby-1.9.2-p0: configure.in.orig
+Only in ruby-1.9.2-p0: configure.in.rej
+Only in ruby-1.9.2-p0: configure.in.rej~
+Only in ruby-1.9.2-p0: configure.in~
+diff -ur ruby-1.9.2-p0-o//ext/tk/extconf.rb ruby-1.9.2-p0/ext/tk/extconf.rb
+--- ruby-1.9.2-p0-o//ext/tk/extconf.rb 2010-08-08 09:01:15.000000000 -0600
++++ ruby-1.9.2-p0/ext/tk/extconf.rb    2010-09-16 17:17:25.000000000 -0600
+@@ -1188,7 +1188,7 @@
+ 
+ def find_X11(*opt_paths)
+   defaults =
+-    [ "/usr/X11*/lib", "/usr/lib/X11*", "/usr/local/X11*", "/usr/openwin/lib" ]
++    [ "/usr/X11*/lib", "/usr/X11*/lib64", "/usr/lib/X11*", "/usr/lib64/X11*", "/usr/local/X11*", "/usr/openwin/lib" ]
+   paths = []
+   opt_paths.compact.each{|path| paths.concat(Dir.glob(path.strip.chomp('/'), File::FNM_CASEFOLD))}
+   defaults.compact.each{|path| paths.concat(Dir.glob(path.strip.chomp('/'), File::FNM_CASEFOLD))}
+Only in ruby-1.9.2-p0/ext/tk: extconf.rb.orig
+Only in ruby-1.9.2-p0/ext/tk: extconf.rb.rej
+Only in ruby-1.9.2-p0/ext/tk: extconf.rb.rej~
+Only in ruby-1.9.2-p0/ext/tk: extconf.rb~
diff --git a/ruby.spec b/ruby.spec
new file mode 100644 (file)
index 0000000..ebe8427
--- /dev/null
+++ b/ruby.spec
@@ -0,0 +1,684 @@
+# TODO:
+#      - include ext/ in docs
+#      - replace ri with fastri
+#      - patch ri to search multiple indexes (one per package), so RPMs can install ri docs
+#   - fix inconsistencies with versioned vs not-versioned dirs (see dirname hacks in configure)
+#   - custom-rubygems-location.patch
+#
+# Conditional build:
+%bcond_without doc             # skip (time-consuming) docs generating; intended for speed up test builds
+%bcond_without tk              # skip building package with Tk bindings
+%bcond_without batteries       # Don't include rubygems, json, rake, minitest
+%bcond_with    bootstrap       # build bootstrap version
+
+%define                rel                     4
+%define                ruby_version    1.9
+%define                basever         1.9.3
+%define                patchlevel      429
+%define                doc_version     1_9_3
+%define                json_ver        1.5.5
+%define                rake_ver        0.9.2.2
+# when increasing rubygems_ver, please remove "11." prefix in rubygems package release
+%define                rubygems_ver    1.8.11
+%define                minitest_ver    2.5.1
+# when increasing rdoc_ver, please remove "11." prefix in rdoc package release
+%define                rdoc_ver        3.9.5
+%define                bigdecimal_ver  1.1.0
+%define                io_console_ver  0.3
+Summary:       Ruby - interpreted scripting language
+Summary(ja.UTF-8):     オブジェクト指向言語Rubyインタプリタ
+Summary(pl.UTF-8):     Ruby - interpretowany język skryptowy
+Summary(pt_BR.UTF-8):  Linguagem de script orientada a objeto
+Summary(zh_CN.UTF-8):  ruby - 一种快速高效的面向对象脚本编程语言
+Name:          ruby
+Version:       %{basever}.%{patchlevel}
+Release:       %{rel}
+Epoch:         1
+# Public Domain for example for: include/ruby/st.h, strftime.c, ...
+License:       (Ruby or BSD) and Public Domain
+Group:         Development/Languages
+Source0:       ftp://ftp.ruby-lang.org/pub/ruby/1.9/%{name}-%{basever}-p%{patchlevel}.tar.bz2
+# Source0-md5: c2b2de5ef15ea9b1aaa3152f9112af1b
+Source1:       http://www.ruby-doc.org/download/%{name}-doc-bundle.tar.gz
+# Source1-md5: ad1af0043be98ba1a4f6d0185df63876
+Source2:       http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_stdlib_rdocs.tgz
+# Source2-md5: ec622612428672c432b6f65dd31a84b5
+Source3:       http://www.ruby-doc.org/downloads/%{name}_%{doc_version}_core_rdocs.tgz
+# Source3-md5: 1892aadde51d36106c513bced2193dff
+Source100:     ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{name}-1.8.7-p330.tar.gz
+# Source100-md5:       50a49edb787211598d08e756e733e42e
+Source4:       rdoc.1
+Source5:       testrb.1
+Patch0:                %{name}-lib64.patch
+Patch1:                %{name}-ffs.patch
+Patch2:                fix-bison-invocation.patch
+# http://redmine.ruby-lang.org/issues/5231
+Patch3:                disable-versioned-paths.patch
+# TODO: Should be submitted upstream?
+Patch4:                arch-specific-dir.patch
+# http://redmine.ruby-lang.org/issues/5281
+Patch5:                site-and-vendor-arch-flags.patch
+# Make mkmf verbose by default
+Patch6:                mkmf-verbose.patch
+URL:           http://www.ruby-lang.org/
+BuildRequires: autoconf >= 2.60
+BuildRequires: automake
+BuildRequires: bison
+BuildRequires: db-devel
+BuildRequires: gdbm-devel >= 1.8.3
+BuildRequires: libffi-devel
+BuildRequires: ncurses-devel
+BuildRequires: openssl-devel
+BuildRequires: pkgconfig
+BuildRequires: readline-devel >= 4.2
+BuildRequires: rpm-build >= 5.4.10-49
+# boostrap needs ruby binary, erb module
+%{!?with_bootstrap:BuildRequires:      ruby-modules}
+%{!?with_bootstrap:BuildRequires:      ruby}
+BuildRequires: sed >= 4.0
+BuildRequires: yaml-devel
+%if %{with tk}
+BuildRequires: tk-devel
+%endif
+Requires(post,postun): /sbin/ldconfig
+Provides:      ruby(ver) = %{ruby_version}
+Obsoletes:     ruby-REXML <= 2.4.0-2
+Obsoletes:     ruby-doc < 1.8.4
+Obsoletes:     ruby-fastthread <= 0.6.3
+Conflicts:     ruby-activesupport < 2.3.11-2
+Conflicts:     ruby-activesupport2 < 2.3.11-2
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define        ruby_ridir              %{_datadir}/ri/%{ruby_version}/system
+%define        gem_dir                 %{_datadir}/%{name}/gems/%{ruby_version}
+
+# The RubyGems library has to stay out of Ruby directory three, since the
+# RubyGems should be share by all Ruby implementations.
+%define        rubygems_dir            %{_datadir}/rubygems
+
+%define        ruby_archdir            %{_libdir}/%{name}/%{ruby_version}
+%define        ruby_libdir             %{_datadir}/%{name}/%{ruby_version}
+
+# This is the local lib/arch and should not be used for packaging.
+%define        sitedir                 site_ruby
+%define        ruby_sitedir            %{_prefix}/local/share/%{name}/%{sitedir}
+%define        ruby_sitearchdir        %{_prefix}/local/%{_lib}/%{name}/%{sitedir}/%{ruby_version}
+%define        ruby_sitelibdir         %{_prefix}/local/share/%{name}/%{sitedir}/%{ruby_version}
+
+# This is the general location for libs/archs compatible with all
+# or most of the Ruby versions available in the PLD repositories.
+%define        vendordir               vendor_ruby
+%define        ruby_vendordir          %{_datadir}/%{name}/%{vendordir}
+%define        ruby_vendorarchdir      %{_libdir}/%{name}/%{vendordir}/%{ruby_version}
+%define        ruby_vendorlibdir       %{_datadir}/%{name}/%{vendordir}/%{ruby_version}
+
+# TODO: drop legacy loadpaths after all ruby modules rebuilt in Th
+%define        legacy_libdir           %{_libdir}/%{name}/%{ruby_version}
+%define        legacy_archdir          %{_libdir}/%{name}/%{ruby_version}/%{_target_cpu}-linux
+%define        legacy_sitedir          %{_libdir}/%{name}/%{sitedir}
+%define        legacy_sitelibdir       %{_libdir}/%{name}/%{sitedir}/%{ruby_version}
+%define        legacy_sitearchdir      %{_libdir}/%{name}/%{sitedir}/%{ruby_version}/%{_target_cpu}-linux
+%define        legacy_vendordir        %{_libdir}/%{name}/%{vendordir}
+%define        legacy_vendorlibdir     %{_libdir}/%{name}/%{vendordir}/%{ruby_version}
+%define        legacy_vendorarchdir    %{_libdir}/%{name}/%{vendordir}/%{ruby_version}/%{_target_cpu}-linux
+
+%define        legacy_siteloadpath     %{legacy_sitelibdir}\\0%{legacy_sitearchdir}\\0%{legacy_sitedir}
+%define        legacy_vendorloadpath   %{legacy_vendorarchdir}
+%define        legacy_loadpath         %{legacy_archdir}
+%define        legacy_loadpaths        %{legacy_siteloadpath}\\0%{legacy_vendorloadpath}\\0%{legacy_loadpath}
+
+# bleh, some nasty (gcc or ruby) bug still not fixed
+# (SEGV or "unexpected break" on miniruby run during build)
+%define                specflags_ia64  -O0
+
+# ruby needs frame pointers for correct exception handling
+%define                specflags_ia32  -fno-omit-frame-pointer
+
+%description
+Ruby is the interpreted scripting language for quick and easy
+object-oriented programming. It has many features to process text
+files and to do system management tasks (as in Perl). It is simple,
+straight-forward, extensible, and portable.
+
+This package contains only shared library and ruby interpreter. To get
+full-functional ruby environment install ruby-modules package.
+
+%description -l ja.UTF-8
+Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です.Rubyは最初
+から純粋なオブジェクト指向言語として設計されていますから,オブジェクト
+指向プログラミングを手軽に行う事が出来ます.もちろん通常の手続き型のプ ログラミングも可能です.
+
+%description -l pl.UTF-8
+Ruby to interpretowany język skryptowy, w sam raz dla łatwego i
+szybkiego pisania zorientowanych obiektowo programów. Ma wiele funkcji
+ułatwiających przetwarzanie plików tekstowych i wykonywanie prac
+związanych z zarządzaniem systemu (podobnie jak Perl). Jest prosty,
+rozszerzalny i przenośny.
+
+Ten pakiet zawiera tylko bibliotekę dzieloną i interpreter ruby.
+Zainstaluj pakiet ruby-modules, jeżeli potrzebujesz w pełni
+funkcjonalnego środowiska ruby.
+
+%description -l pt_BR.UTF-8
+Ruby é uma linguagem de script interpretada de programação orientada a
+objeto. Possui diversas características para processamento de texto. É
+simples, extensível e direta.
+
+%package modules
+Summary:       Ruby standard modules and utilities
+Summary(pl.UTF-8):     Standardowe moduły i narzędzia dla języka Ruby
+Group:         Development/Languages
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Suggests:      ruby-rubygems
+Provides:      ruby-bigdecimal = %{bigdecimal_ver}
+Provides:      ruby-io-console = %{io_console_ver}
+# ruby-modules deprecated, rpm5 generates ruby(abi) itself
+Provides:      ruby-modules(ver) = %{ruby_version}
+%if %{with batteries}
+Provides:      ruby-minitest = %{minitest_ver}
+Obsoletes:     ruby-minitest <= 1.5.0
+%endif
+
+%description modules
+Ruby standard modules and utilities:
+- erb - Tiny eRuby
+- irb - interactive Ruby
+- testrb - automatic runner for Test::Unit of Ruby
+
+%description modules -l pl.UTF-8
+Standardowe moduły i narzędzia Ruby:
+- erb - mały eRuby
+- irb - interaktywny Ruby
+- testrb - automatyczny runner dla Ruby Test::Unit
+
+%package tk
+Summary:       Ruby/Tk bindings
+Summary(pl.UTF-8):     Wiązania Ruby/Tk
+Group:         Development/Languages
+Requires:      %{name}-modules = %{epoch}:%{version}-%{release}
+
+%description tk
+This pachage contains Ruby/Tk bindings.
+
+%description tk -l pl.UTF-8
+Ten pakiet zawiera wiązania Ruby/Tk.
+
+%package devel
+Summary:       Ruby development libraries
+Summary(pl.UTF-8):     Biblioteki programistyczne interpretera języka Ruby
+Group:         Development/Languages
+Requires:      %{name}-modules = %{epoch}:%{version}-%{release}
+Requires:      gcc
+Requires:      glibc-devel
+Requires:      pkgconfig
+
+%description devel
+Ruby development libraries.
+
+%description devel -l pl.UTF-8
+Biblioteki programistyczne interpretera języka Ruby.
+
+%package static
+Summary:       Ruby static libraries
+Summary(pl.UTF-8):     Biblioteki statyczne Ruby
+Group:         Development/Languages
+Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
+
+%description static
+Ruby static libraries.
+
+%description static -l pl.UTF-8
+Biblioteki statyczne Ruby.
+
+%package doc
+Summary:       Ruby HTML documentation
+Summary(pl.UTF-8):     Dokumentacja HTML do Ruby
+Group:         Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description doc
+Ruby HTML documentation: FAQ, guide, core and standard library.
+
+%description doc -l pl.UTF-8
+Dokumentacja HTML do Ruby: FAQ, przewodnik, dokumentacja dla core i
+stdlib.
+
+%package doc-ri
+Summary:       Ruby ri documentation
+Summary(pl.UTF-8):     Dokumentacja Ruby w formacie ri
+Group:         Documentation
+Requires:      %{name}-modules = %{epoch}:%{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description doc-ri
+Ruby ri documentation.
+
+%description doc-ri -l pl.UTF-8
+Dokumentacja Ruby w formacie ri.
+
+%package examples
+Summary:       Ruby examples
+Summary(pl.UTF-8):     Przykłady dla języka Ruby
+Group:         Development/Languages
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description examples
+Ruby examples.
+
+%description examples -l pl.UTF-8
+Przykłady programów w języku Ruby.
+
+# IMPORTANT: keep rdoc, rubygems, rake, json as last packages as we reset epoch/version/release
+# and %{version},%{release} macros may not be used directly as they take last
+# subpackage value not main package one what you intend to use
+
+%package rdoc
+Summary:       A tool to generate HTML and command-line documentation for Ruby projects
+Summary(pl.UTF-8):     Narzędzie do generowania dokumentacji HTML i linii poleceń dla projektów w Rubym
+Version:       %{rdoc_ver}
+# remove "11." when rdoc_ver is increased
+Release:       11.%{basever}.%{patchlevel}.%{rel}
+Epoch:         0
+License:       GPL v2 and Ruby and MIT
+Group:         Development/Libraries
+Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel}
+Obsoletes:     rdoc <= 0.9.0
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description rdoc
+RDoc produces HTML and command-line documentation for Ruby projects.
+RDoc includes the 'rdoc' and 'ri' tools for generating and displaying
+online documentation.
+
+%description rdoc -l pl.UTF-8
+RDoc tworzy dokumentację HTML i linii poleceń dla projektów w języku
+Ruby. RDoc zawiera narzędzia 'rdoc' i 'ri' do generowania i
+wyświetlania dokumentacji online.
+
+%package rubygems
+Summary:       RubyGems - the Ruby standard for packaging Ruby libraries
+Summary(pl.UTF-8):     RubyGems - standard Ruby'ego pakietowania bibliotek
+Version:       %{rubygems_ver}
+# remove "11." when rubygems_ver is increased
+Release:       11.%{basever}.%{patchlevel}.%{rel}
+Epoch:         0
+License:       Ruby or MIT
+Group:         Development/Libraries
+Requires:      %{name}-modules = 1:%{basever}.%{patchlevel}-%{rel}
+Requires:      %{name}-rdoc >= %{rdoc_ver}
+Suggests:      %{name}-devel
+Provides:      rubygems = %{rubygems_ver}
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description rubygems
+RubyGems is the Ruby standard for publishing and managing third party
+libraries.
+
+%description rubygems -l pl.UTF-8
+RubyGems to standardowe narzędzie języka Ruby do publikowania i
+zarządzania zewnętrznymi bibliotekami.
+
+%package rake
+Summary:       Rake is a Make-like program implemented in Ruby
+Summary(pl.UTF-8):     Program typu Make dla języka Ruby
+Version:       %{rake_ver}
+Release:       %{basever}.%{patchlevel}.%{rel}
+Epoch:         0
+License:       MIT
+Group:         Development/Languages
+Provides:      rake = %{rake_ver}
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description rake
+Rake is a simple Ruby build program with capabilities similar to make.
+
+It has the following features:
+- Rakefiles (rake's version of Makefiles) are completely defined in
+  standard Ruby syntax. No XML files to edit. No quirky Makefile syntax
+  to worry about (is that a tab or a space?)
+- Users can specify tasks with prerequisites.
+- Rake supports rule patterns to synthesize implicit tasks.
+- Rake is lightweight. It can be distributed with other projects as a
+  single file. Projects that depend upon rake do not require that rake
+  be installed on target systems.
+
+%description rake -l pl.UTF-8
+Rake to prosty program do budowania w języku Ruby o możliwościach
+podobnych do make.
+
+Ma następujące cechy:
+- Pliki Rakefile (rake'owa odmiana plików Makefile) są definiowane
+  całkowicie w standardowej składni języka Ruby. Nie trzeba modyfikować
+  plików XML. Nie trzeba martwić się kaprysami składni Makefile (czy to
+  tabulacja czy spacja?).
+- Użytkownicy mogą określać zadania z ich zależnościami.
+- Rake obsługuje wzorce reguł do tworzenia z nich wynikowych zadań.
+- Rake jest lekki. Może być rozpowszechniany z innymi projektami jako
+  pojedynczy plik. Projekty używające rake'a nie wymagają go
+  zainstalowanego na systemach docelowych.
+
+%package json
+Summary:       JSON library for Ruby
+Summary(pl.UTF-8):     Biblioteka JSON dla języka Ruby
+Version:       %{json_ver}
+Release:       %{basever}.%{patchlevel}.%{rel}
+Epoch:         0
+License:       MIT
+Group:         Development/Languages
+Obsoletes:     ruby-json-rubyforge
+
+%description json
+This is a JSON implementation as a Ruby extension in C.
+
+%description json -l pl.UTF-8
+Biblioteka JSON dla języka Ruby.
+
+%prep
+%if %{with bootstrap}
+%setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3 -a100
+%else
+%setup -q -n %{name}-%{basever}-p%{patchlevel} -a1 -a2 -a3
+%endif
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+
+# must be regenerated with new bison
+%{__rm} parse.{c,h}
+
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
+
+find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \
+       -o -name 'ruby.1' -o -name '*.html' -o -name '*.tcl' ')' \
+       | xargs %{__sed} -i 's,/usr/local/bin/,%{_bindir}/,'
+
+%build
+cp -f /usr/share/automake/config.sub .
+
+# build ruby-1.8.7 first
+%if %{with bootstrap}
+cd %{name}-1.8.7-p330
+%configure
+%{__make}
+cd ..
+%endif
+
+%{__autoconf}
+%configure \
+       %{?with_bootstrap:--with-baseruby=%{name}-1.8.7-p330/miniruby} \
+       --with-rubylibprefix=%(dirname %{ruby_libdir}) \
+       --with-archdir=%{ruby_archdir} \
+       --with-sitedir=%(dirname %{ruby_sitelibdir}) \
+       --with-sitearchdir=%{ruby_sitearchdir} \
+       --with-vendordir=%(dirname %{ruby_vendorlibdir}) \
+       --with-vendorarchdir=%{ruby_vendorarchdir} \
+       --with-rubygemsdir=%{rubygems_dir} \
+       --with-search-path="%{legacy_loadpaths}" \
+       --enable-shared \
+       --enable-pthread \
+       --disable-rubygems \
+       --disable-install-doc \
+       --with-ruby-version=minor
+
+%{__make} -j1 main \
+       COPY="cp -p" Q= \
+       %{?with_bootstrap:BASERUBY="ruby-1.8.7-p330/miniruby -I./ruby-1.8.7-p330/lib"}
+
+%if %{with doc}
+%{__make} -j1 rdoc
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{_examplesdir}/%{name}-%{version}} \
+       $RPM_BUILD_ROOT{%{ruby_vendorarchdir},%{ruby_ridir}} \
+       $RPM_BUILD_ROOT%{ruby_vendorlibdir}/net \
+       $RPM_BUILD_ROOT{%{legacy_archdir}/racc,%{legacy_sitelibdir},%{legacy_sitearchdir},%{legacy_vendorarchdir},%{legacy_libdir}/tasks} \
+
+%{__make} install %{?with_doc:install-doc} \
+       DESTDIR=$RPM_BUILD_ROOT
+
+cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1
+
+%{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/html
+
+ln -sf %{gem_dir}/gems/rake-%{rake_ver}/bin/rake $RPM_BUILD_ROOT%{_bindir}/rake
+
+%if %{without batteries}
+# packaged separately
+%{__rm} -r $RPM_BUILD_ROOT%{ruby_libdir}/{rubygems,rake,json,minitest}
+%{__rm} -r $RPM_BUILD_ROOT%{ruby_archdir}/json
+%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rake-*
+%{__rm} $RPM_BUILD_ROOT%{ruby_libdir}/{rake,rubygems,json}.rb
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/{gem,rake}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/rake*
+%{__rm} $RPM_BUILD_ROOT%{gem_dir}/specifications/{json,minitest,rake}-*.gemspec
+%{?with_doc:%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/ri/%{ruby_version}/system/JSON}
+%endif
+
+%if %{with doc}
+# too much .ri
+%{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/cache.ri
+%{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/created.rid
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc NEWS LEGAL README README.EXT ChangeLog ToDo
+%attr(755,root,root) %{_bindir}/ruby
+%attr(755,root,root) %{_libdir}/libruby.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libruby.so.1.9
+%{_mandir}/man1/ruby.1*
+
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/%{vendordir}
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/%{vendordir}
+
+%dir %{ruby_libdir}
+%dir %{ruby_archdir}
+%dir %{ruby_vendorlibdir}
+%dir %{ruby_vendorarchdir}
+
+%dir %{_datadir}/ri
+%dir %{_datadir}/ri/%{ruby_version}
+%dir %{ruby_ridir}
+
+%dir %{ruby_rdocdir}
+
+# common dirs for ruby vendor modules
+%dir %{ruby_vendorlibdir}/net
+
+# legacy dirs. when everything rebuilt in Th not using these dirs. drop them
+%dir %{legacy_archdir}
+%dir %{legacy_sitedir}
+%dir %{legacy_sitelibdir}
+%dir %{legacy_sitearchdir}
+%dir %{legacy_vendorarchdir}
+%dir %{legacy_libdir}/tasks
+%dir %{legacy_archdir}/racc
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libruby.so
+%{_includedir}/%{name}-%{ruby_version}
+%{_pkgconfigdir}/ruby-%{ruby_version}.pc
+%{ruby_libdir}/mkmf.rb
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libruby-static.a
+
+%if %{with tk}
+%files tk
+%defattr(644,root,root,755)
+%{ruby_libdir}/tcltk.rb
+%{ruby_libdir}/tk*.rb
+%{ruby_libdir}/tk
+%{ruby_libdir}/tkextlib
+%attr(755,root,root) %{ruby_archdir}/t*.so
+%endif
+
+%files rdoc
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rdoc
+%attr(755,root,root) %{_bindir}/ri
+%{_mandir}/man1/rdoc.1*
+%{ruby_libdir}/rdoc
+%dir %{gem_dir}/gems/rdoc-%{rdoc_ver}
+%dir %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin
+%attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/rdoc
+%{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec
+%attr(755,root,root) %{gem_dir}/gems/rdoc-%{rdoc_ver}/bin/ri
+
+%if %{with batteries}
+%files rubygems
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/gem
+%{ruby_libdir}/rubygems
+%{ruby_libdir}/rubygems.rb
+%{ruby_libdir}/ubygems.rb
+
+%files rake
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rake
+%{_mandir}/man1/rake.1*
+%{ruby_libdir}/rake
+%dir %{gem_dir}/gems/rake-%{rake_ver}
+%dir %{gem_dir}/gems/rake-%{rake_ver}/bin
+%attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/rake
+%{gem_dir}/specifications/rake-%{rake_ver}.gemspec
+
+%files json
+%defattr(644,root,root,755)
+%{ruby_libdir}/json
+%dir %{ruby_archdir}/json
+%dir %{ruby_archdir}/json/ext
+%attr(755,root,root) %{ruby_archdir}/json/ext/*.so
+%{gem_dir}/specifications/json-%{json_ver}.gemspec
+%endif
+
+%files modules
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/erb
+%attr(755,root,root) %{_bindir}/irb
+%attr(755,root,root) %{_bindir}/testrb
+%{ruby_libdir}/bigdecimal
+%{ruby_libdir}/cgi
+%{ruby_libdir}/date
+%{ruby_libdir}/digest
+%{ruby_libdir}/dl
+%{ruby_libdir}/drb
+%{ruby_libdir}/fiddle
+%{ruby_libdir}/io
+%{ruby_libdir}/irb
+%{ruby_libdir}/matrix
+%{ruby_libdir}/net
+%{ruby_libdir}/openssl
+%{ruby_libdir}/optparse
+%{ruby_libdir}/psych
+%{ruby_libdir}/racc
+%{ruby_libdir}/rbconfig
+%{ruby_libdir}/rexml
+%{ruby_libdir}/rinda
+%{ruby_libdir}/ripper
+%{ruby_libdir}/rss
+%{ruby_libdir}/shell
+%{ruby_libdir}/syck
+%{ruby_libdir}/test
+%{ruby_libdir}/uri
+%{ruby_libdir}/webrick
+%{ruby_libdir}/xmlrpc
+%{ruby_libdir}/yaml
+%{ruby_libdir}/[A-Za-s]*.rb
+%{ruby_libdir}/tempfile.rb
+%{ruby_libdir}/thread.rb
+%{ruby_libdir}/thwait.rb
+%{ruby_libdir}/time.rb
+%{ruby_libdir}/timeout.rb
+%{ruby_libdir}/tmpdir.rb
+%{ruby_libdir}/tracer.rb
+%{ruby_libdir}/tsort.rb
+%{ruby_libdir}/[u-z]*.rb
+%if %{with batteries}
+%exclude %{ruby_libdir}/rubygems.rb
+%exclude %{ruby_libdir}/ubygems.rb
+%endif
+%exclude %{ruby_libdir}/mkmf.rb
+%attr(755,root,root) %{ruby_archdir}/[a-s]*.so
+%attr(755,root,root) %{ruby_archdir}/[u-z]*.so
+%dir %{ruby_archdir}/digest
+%attr(755,root,root) %{ruby_archdir}/digest/*.so
+%dir %{ruby_archdir}/dl
+%attr(755,root,root) %{ruby_archdir}/dl/callback.so
+%dir %{ruby_archdir}/enc
+%attr(755,root,root) %{ruby_archdir}/enc/*.so
+%dir %{ruby_archdir}/enc/trans
+%attr(755,root,root) %{ruby_archdir}/enc/trans/*.so
+%dir %{ruby_archdir}/io
+%attr(755,root,root) %{ruby_archdir}/io/*.so
+%dir %{ruby_archdir}/mathn
+%attr(755,root,root) %{ruby_archdir}/mathn/*.so
+%dir %{ruby_archdir}/racc
+%attr(755,root,root) %{ruby_archdir}/racc/*.so
+%{ruby_archdir}/rbconfig.rb
+
+%{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec
+%{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec
+
+%if %{with batteries}
+# minitest
+%{ruby_libdir}/minitest
+%{gem_dir}/specifications/minitest-%{minitest_ver}.gemspec
+%endif
+
+# parents of gem_dir
+%dir %{_datadir}/%{name}/gems
+#%dir %{_datadir}/%{name}/gems/%{ruby_version}
+%dir %{_datadir}/%{name}/gems/%{ruby_version}/gems
+
+%dir %{gem_dir}
+%dir %{gem_dir}/specifications
+%{_mandir}/man1/erb.1*
+%{_mandir}/man1/irb.1*
+%{_mandir}/man1/ri.1*
+%{_mandir}/man1/testrb.1*
+
+%files doc
+%defattr(644,root,root,755)
+%doc ruby-doc-bundle/*
+%{?with_doc:%doc ruby_%{doc_version}_stdlib}
+%{?with_doc:%doc ruby_%{doc_version}_core}
+
+%if %{with doc}
+%files doc-ri
+%defattr(644,root,root,755)
+%{ruby_ridir}/*
+%endif
+
+%files examples
+%defattr(644,root,root,755)
+%{_examplesdir}/%{name}-%{version}
diff --git a/site-and-vendor-arch-flags.patch b/site-and-vendor-arch-flags.patch
new file mode 100644 (file)
index 0000000..1363063
--- /dev/null
@@ -0,0 +1,188 @@
+From b0a875862d14244ca41cd1e1e9090f87757aaeb9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
+Date: Mon, 5 Sep 2011 13:10:47 +0200
+Subject: [PATCH] Added configuration flags for site and vendor architecture
+ specific directories.
+
+---
+ Makefile.in      |    3 +++
+ configure.in     |   40 ++++++++++++++++++++++++++++++++++++++++
+ tool/mkconfig.rb |    8 ++++++--
+ version.c        |    4 ++++
+ 4 files changed, 53 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index bcdaf5f..f57e4c4 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -34,6 +34,9 @@ datadir = @datadir@
+ archdir = @archdir@
+ sitearch = @sitearch@
+ sitedir = @sitedir@
++sitearchdir= @sitearchdir@
++vendordir = @vendordir@
++vendorarchdir = @vendorarchdir@
+ ruby_version = @ruby_version@
+ 
+ TESTUI = console
+diff --git a/configure.in b/configure.in
+index 83e5d76..31532bd 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2811,6 +2811,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do
+     dir="${SITE_DIR}"
+ done
+ 
++AC_ARG_WITH(sitearchdir,
++          AS_HELP_STRING([--with-sitearchdir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]),
++            [sitearchdir=$withval],
++            [sitearchdir='${rubylibprefix}/site_ruby/${arch}'])
++dir="${sitearchdir}"
++until SITEARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITEARCH_DIR}"; do
++    dir="${SITEARCH_DIR}"
++done
++
+ AC_ARG_WITH(vendordir,
+           AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]),
+             [vendordir=$withval],
+@@ -2820,19 +2829,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
+     dir="${VENDOR_DIR}"
+ done
+ 
++AC_ARG_WITH(vendorarchdir,
++          AS_HELP_STRING([--with-vendorarchdir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]),
++            [vendorarchdir=$withval],
++            [vendorarchdir='${rubylibprefix}/vendor_ruby/${arch}'])
++dir="${vendorarchdir}"
++until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_DIR}"; do
++    dir="${VENDORARCH_DIR}"
++done
++
+ if test "${LOAD_RELATIVE+set}"; then
+     AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
+     RUBY_EXEC_PREFIX=""
+     RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+     RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+     RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
++    RUBY_SITE_ARCHLIB_PATH="`eval echo "$SITEARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+     RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
++    RUBY_VENDOR_ARCHLIB_PATH="`eval echo "$VENDORARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+ else
+     RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
+     RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+     RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+     RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
++    RUBY_SITE_ARCHLIB_PATH="`eval echo \\"$SITEARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+     RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
++    RUBY_VENDOR_ARCHLIB_PATH="`eval echo \\"$VENDORARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+ fi
+ 
+ pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
+@@ -2850,6 +2872,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"],
+   [
+     RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\""
+     ])
++AS_CASE(["$RUBY_SITE_ARCHLIB_PATH"],
++  ["$RUBY_LIB_PREFIX/"*], [
++    RUBY_SITE_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_ARCHLIB_PATH\" : \"$pat\"`"'"'
++    ],
++  [
++    RUBY_SITE_ARCHLIB_PATH="\"${RUBY_SITE_ARCHLIB_PATH}\""
++    ])
+ AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
+   ["$RUBY_LIB_PREFIX/"*], [
+     RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"'
+@@ -2857,6 +2886,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
+   [
+     RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\""
+     ])
++AS_CASE(["$RUBY_VENDOR_ARCHLIB_PATH"],
++  ["$RUBY_LIB_PREFIX/"*], [
++    RUBY_VENDOR_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_ARCHLIB_PATH\" : \"$pat\"`"'"'
++    ],
++  [
++    RUBY_VENDOR_ARCHLIB_PATH="\"${RUBY_VENDOR_ARCHLIB_PATH}\""
++    ])
+ pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)'
+ AS_CASE(["$RUBY_LIB_PREFIX"],
+   ["$RUBY_EXEC_PREFIX/"*], [
+@@ -2878,19 +2914,23 @@ if test "x$SITE_DIR" = xno; then
+     AC_DEFINE(NO_RUBY_SITE_LIB)
+ else
+     AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH})
++    AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, ${RUBY_SITE_ARCHLIB_PATH})
+ fi
+ if test "x$VENDOR_DIR" = xno; then
+     AC_DEFINE(NO_RUBY_VENDOR_LIB)
+ else
+     AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH})
++    AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, ${RUBY_VENDOR_ARCHLIB_PATH})
+ fi
+ 
+ AC_SUBST(arch)dnl
+ AC_SUBST(sitearch)dnl
+ AC_SUBST(ruby_version)dnl
+ AC_SUBST(archdir)dnl
+ AC_SUBST(sitedir)dnl
++AC_SUBST(sitearchdir)dnl
+ AC_SUBST(vendordir)dnl
++AC_SUBST(vendorarchdir)dnl
+ 
+ configure_args=$ac_configure_args
+ AC_SUBST(configure_args)dnl
+diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
+index b707c4b..6230720 100755
+--- a/tool/mkconfig.rb
++++ b/tool/mkconfig.rb
+@@ -44,6 +44,8 @@ v_others = []
+ continued_line = nil
+ path_version = "/$(ruby_version)"
+ archdir_override = "$(vendorlibdir)/$(sitearch)"
++sitearchdir_override = "$(sitelibdir)/$(sitearch)"
++vendorarchdir_override = "$(vendorlibdir)/$(sitearch)"
+ File.foreach "config.status" do |line|
+   next if /^#/ =~ line
+   name = nil
+@@ -79,6 +81,8 @@ File.foreach "config.status" do |line|
+     when /^RUBY_SO_NAME$/; next if $so_name
+     when /^arch$/; if val.empty? then val = arch else arch = val end
+     when /^archdir$/; archdir_override = val; next
++    when /^sitearchdir$/; sitearchdir_override = val; next
++    when /^vendorarchdir$/; vendorarchdir_override = val; next
+     when /^sitearch/; val = '$(arch)' if val.empty?
+     end
+     case val
+@@ -213,11 +217,11 @@ print <<EOS
+ EOS
+ print <<EOS unless v_disabled["sitedir"]
+   CONFIG["sitelibdir"] = "$(sitedir)#{path_version}"
+-  CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
++  CONFIG["sitearchdir"] = "#{sitearchdir_override}"
+ EOS
+ print <<EOS unless v_disabled["vendordir"]
+   CONFIG["vendorlibdir"] = "$(vendordir)#{path_version}"
+-  CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
++  CONFIG["vendorarchdir"] = "#{vendorarchdir_override}"
+ EOS
+ print <<EOS
+   CONFIG["topdir"] = File.dirname(__FILE__)
+diff --git a/version.c b/version.c
+index 59d4e5e..2558aa0 100644
+--- a/version.c
++++ b/version.c
+@@ -50,8 +50,12 @@
+ #ifndef RUBY_ARCHLIB
+ #define RUBY_ARCHLIB                RUBY_LIB         "/"RUBY_ARCH
+ #endif
++#ifndef RUBY_SITE_ARCHLIB
+ #define RUBY_SITE_ARCHLIB           RUBY_SITE_LIB2   "/"RUBY_SITEARCH
++#endif
++#ifndef RUBY_VENDOR_ARCHLIB
+ #define RUBY_VENDOR_ARCHLIB         RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
++#endif
+ #ifdef  RUBY_THINARCH
+ #define RUBY_THIN_ARCHLIB           RUBY_LIB         "/"RUBY_THINARCH
+ #define RUBY_SITE_THIN_ARCHLIB      RUBY_SITE_LIB2   "/"RUBY_THINARCH
+-- 
+1.7.6.1
+
diff --git a/testrb.1 b/testrb.1
new file mode 100644 (file)
index 0000000..eaef767
--- /dev/null
+++ b/testrb.1
@@ -0,0 +1,60 @@
+.\" DO NOT MODIFY THIS FILE! it was generated by rd2
+.TH testrb 1 "December 2003"
+.SH NAME
+.PP
+testrb \- Automatic runner for Test::Unit of Ruby
+.SH SYNOPSIS
+.PP
+testrb [options] [\-\- untouched arguments] test ...
+.SH DESCRIPTION
+.PP
+testrb loads and runs unit\-tests.  If test is directory name, testrb1.8
+testrb traverses the directory.
+.SH OPTIONS
+.TP
+.fi
+.B
+\-r, \-\-runner=RUNNER
+Use the given RUNNER.  (t[k], c[onsole], g[tk], f[ox])
+.TP
+.fi
+.B
+\-a, \-\-add=TORUN
+Add TORUN to the list of things to run;  can be a file or a directory.
+.TP
+.fi
+.B
+\-p, \-\-pattern=PATTERN
+Match files to collect against PATTERN.  (default pattern is
+/\\Atest_.*\\.rb\\Z/.)
+.TP
+.fi
+.B
+\-n, \-\-name=NAME
+Runs tests matching NAME.  (patterns may be used.)
+.TP
+.fi
+.B
+\-t, \-\-testcase=TESTCASE
+Runs tests in TestCases matching TESTCASE.  (patterns may be used.)
+.TP
+.fi
+.B
+\-v, \-\-verbose=[LEVEL]
+Set the output level (default is verbose).  (p[rogress], n[ormal],
+v[erbose], s[ilent])
+.TP
+.fi
+.B
+\-\-
+Stop processing options so that the remaining options will be passed to
+the test.
+.TP
+.fi
+.B
+\-h, \-\-help
+Display help.
+.SH AUTHOR
+.PP
+This manpage was contributed by akira yamada <akira@debian.org>
+