]> git.pld-linux.org Git - packages/ruby.git/blobdiff - ruby.spec
- up
[packages/ruby.git] / ruby.spec
index 52746b8545ce49c674290a52521da5a4caf4ddb2..8c6efed7608e65ebad2878c813fe483884e70f95 100644 (file)
--- a/ruby.spec
+++ b/ruby.spec
@@ -1,37 +1,31 @@
-#
-# NOTE: - segfaults on ppc during building when is built with  `--with-pthreads'
-#      /home/users/builder/rpm/BUILD/ruby-1.8.5-p2/lib/mkmf.rb:147: [BUG] Segmentation fault
-#      ruby 1.8.5 (2006-12-04) [powerpc-linux]
-#
-#      - on the other hand when ruby is built on pcc with `--without-pthreads'
-#      compilation of tk extensions fails with message:
-#
-#      Ruby is not compiled with --enable-pthread, but your Tcl/Tk 
-#      **   library seems to be compiled with pthread support. This
-#      **   combination may cause frequent hang or segmentation fault
-#      **   errors when Ruby/Tk is working.
+# TODO
+# - include ext/ in docs
+# - replace ri with fastri
+# - patch ri to search multiple indexes (one per package), so RPMs can
+#   install ri docs
 #
 # Conditional build:
 %bcond_without doc     # skip generating docs (which is time-consuming). Intended for speed up test builds
 %bcond_without emacs   # skip building package with ruby-mode for emacs
 %bcond_without tk      # skip building package with Tk bindings
+%bcond_with    onigurma
 #
 %define                ruby_ver        1.8
 %define                ruby_ridir      %{_datadir}/ri/%{ruby_ver}/system
-%define        ruby_preview preview1
 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:       1.8.6
-Release:       0.%{ruby_preview}.1
+Version:       1.8.7
+Release:       1
 Epoch:         1
 License:       The Ruby License
 Group:         Development/Languages
-Source0:       ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{name}-1.8.6-%{ruby_preview}.tar.gz
-# Source0-md5: 12c52f3fbf628f6e5c75f1daeda75207
+%define patchlevel 22
+Source0:       ftp://ftp.ruby-lang.org/pub/ruby/1.8/%{name}-%{version}-p%{patchlevel}.tar.bz2
+# Source0-md5: 2d57acee0d80531e14ec0f6826a1f9fb
 Source1:       http://www.ibiblio.org/pub/languages/ruby/doc/%{name}-texi-1.4-en.tar.gz
 # Source1-md5: 839fda4af52b5c5c6d21f879f7fc62bf
 Source2:       http://www.math.sci.hokudai.ac.jp/~gotoken/ruby/%{name}-uguide-981227.tar.gz
@@ -39,8 +33,8 @@ Source2:      http://www.math.sci.hokudai.ac.jp/~gotoken/ruby/%{name}-uguide-981227.t
 Source3:       http://www.ibiblio.org/pub/languages/ruby/doc/%{name}faq-990927.tar.gz
 # Source3-md5: 634c25b14e19925d10af3720d72e8741
 Source4:       irb.1
-Source5:       http://www.geocities.jp/kosako3/oniguruma/archive/onigd2_5_8.tar.gz
-# Source5-md5: 82cd47ded85f854149ae620a9fa728e5
+Source5:       http://www.geocities.jp/kosako3/oniguruma/archive/onigd2_5_9.tar.gz
+# Source5-md5: 7e4c2b197387232afd9a11378feeb246
 %define stdlibdoc_version      0.10.1
 Source6:       http://www.ruby-doc.org/download/stdlib/%{name}-doc-stdlib-%{stdlibdoc_version}.tgz
 # Source6-md5: 5437c281b44e7a4af142d2bd35eba407
@@ -52,9 +46,8 @@ Source10:     ri.1
 Source11:      testrb.1
 Source12:      %{name}-mode-init.el
 Patch0:                %{name}-info.patch
-Patch1:                %{name}-LIB_PREFIX.patch
 Patch2:                %{name}-mkmf-shared.patch
-Patch3:                %{name}-oniguruma-258-186.patch
+Patch5:                %{name}-lib64.patch
 URL:           http://www.ruby-lang.org/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -75,6 +68,7 @@ Provides:     ruby(ver) = %{ruby_ver}
 Obsoletes:     rdoc
 Obsoletes:     ruby-REXML
 Obsoletes:     ruby-doc < 1.8.4
+Obsoletes:     ruby-fastthread
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # bleh, some nasty (gcc or ruby) bug still not fixed
@@ -138,7 +132,6 @@ Standardowe moduły i narzędzia Ruby:
 - ri - interaktywna dokumentacja Ruby
 - testrb - automatyczny runner dla Ruby Test::Unit
 
-%if %{with tk}
 %package tk
 Summary:       Ruby/Tk bindings
 Summary(pl.UTF-8):     Wiązania Ruby/Tk
@@ -151,8 +144,6 @@ This pachage contains Ruby/Tk bindings.
 %description tk -l pl.UTF-8
 Ten pakiet zawiera wiązania Ruby/Tk.
 
-%endif
-
 %package devel
 Summary:       Ruby development libraries
 Summary(pl.UTF-8):     Biblioteki programistyczne interpretera języka Ruby
@@ -226,11 +217,10 @@ Ruby mode and debugger for Emacs.
 Tryb Ruby i debugger dla Emacsa.
 
 %prep
-%setup -q -a1 -a2 -a3 -a5 -a6 -a7 -n %{name}-1.8.6-preview1
+%setup -q -n %{name}-%{version}-p%{patchlevel} -a1 -a2 -a3 -a5 -a6 -a7 
 %patch0 -p1
-%patch1 -p1
 %patch2 -p1
-%patch3 -p0
+%patch5 -p1
 
 find . -name '*.rb' -o -name '*.cgi' -o -name '*.test' -o -name 'ruby.1' \
        -o -name 'ruby.info*' -o -name '*.html' -o -name '*.tcl' -o -name '*.texi' \
@@ -239,15 +229,18 @@ find . -name '*.rb' -o -name '*.cgi' -o -name '*.test' -o -name 'ruby.1' \
 %build
 cp -f /usr/share/automake/config.sub .
 
+%if %{with onigurma}
 cd oniguruma
 %configure \
        --with-rubydir=..
 %{__make} 18
 cd ..
+%endif
 
 %{__autoconf}
 %configure \
        --enable-shared \
+       --with-default-kcode=utf8 \
        --enable-pthread
 
 %{__make}
@@ -259,6 +252,8 @@ mkdir rdoc
 
 RUBYLIB=".:lib:`find ext/ .ext/ -type d | tr '\n' ':'`"
 export RUBYLIB
+LD_LIBRARY_PATH=$(pwd)
+export LD_LIBRARY_PATH
 
 ./miniruby bin/rdoc --inline-source --op rdoc/core \
        array.c bignum.c class.c compar.c dir.c dln.c dmyext.c enum.c \
@@ -313,7 +308,7 @@ cp -Rf rubyfaq faq
 # ruby emacs mode - borrowed from FC-4
 %if %{with emacs}
 install misc/*.el $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode
-rm -f $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/rubydb2x.el
+rm -f $RPM_BUILD_ROOT%{_emacs_lispdir}/%{name}-mode/rubydb2x.el*
 install %{SOURCE12} $RPM_BUILD_ROOT%{_emacs_lispdir}/site-start.d
 cat << EOF > path.el
 (setq load-path (cons "." load-path) byte-compile-warnings nil)
@@ -346,6 +341,9 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_libdir}/%{name}/site_ruby
 %dir %{_libdir}/%{name}/site_ruby/%{ruby_ver}
 %dir %{_libdir}/%{name}/site_ruby/%{ruby_ver}/*-linux*
+%dir %{_libdir}/%{name}/vendor_ruby
+%dir %{_libdir}/%{name}/vendor_ruby/%{ruby_ver}
+%dir %{_libdir}/%{name}/vendor_ruby/%{ruby_ver}/*-linux*
 %dir %{_datadir}/%{name}
 %dir %{_datadir}/ri
 %dir %{_datadir}/ri/%{ruby_ver}
This page took 0.063681 seconds and 4 git commands to generate.