]> git.pld-linux.org Git - packages/ruby.git/blobdiff - ruby.spec
cleanup unused patches; renum patches
[packages/ruby.git] / ruby.spec
index fd5f81b91fdcba3640257da0d838fe55db68dfda..dfa6dce8954a17e9425151ca3d574a29791c0996 100644 (file)
--- a/ruby.spec
+++ b/ruby.spec
@@ -3,26 +3,20 @@
 #      - 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)
-# - fix requires/provides 'ruby(abi) = '
-# - nil this macro: %ruby_mod_ver_requires_eq "Requires: ruby-modules(ver) = "
-# - fix tk build
-# - %ruby_version is empty and rpm error then
-# - vendor packages get installed to /usr/share/ruby/vendor_ruby/PACKAGE, which
-#   will be installed fine on ruby < 2.0, but not usable as path not in include
-#   path, how to force vendor packages built with ruby 2.0 pull ruby 2.0?
+# - vendor *noarch* packages get installed to /usr/share/ruby/vendor_ruby/PACKAGE, which
+#   will be installed fine on ruby < 2.0, but not usable as dir not in included
+#   in load_path, how to force vendor packages built with ruby 2.0 pull ruby 2.0?
 #   for packages with gem deps it's simple: ruby-listen-2.7.1-0.2.noarch marks ruby-modules-2.0.0.451-0.17.x86_64 (cap /usr/share/gems/specifications)
-# - File::FNM_CASEFOLD does not work at all:
-#   $ LC_ALL=C ruby -e 'Dir.glob("/usr/lib64/*tk8.5.*", File::FNM_CASEFOLD).find{|file| puts file}'
-#   -e:1:in `glob': invalid byte sequence in US-ASCII (ArgumentError)
+#   add that dir to legacy loadpath?
 #
 # 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_with    tk              # build Tk bindings (tcl8.6 is not supported)
 %bcond_without batteries       # Don't include rubygems, json, rake, minitest
 %bcond_without default_ruby    # use this Ruby as default system Ruby
 %bcond_with    bootstrap       # build bootstrap version
 
-%define                rel             0.20
+%define                rel             1
 %define                ruby_version    2.0
 %define                basever         2.0.0
 %define                patchlevel      481
@@ -70,20 +64,13 @@ Source6:    operating_system.rb
 Patch0:                %{oname}-lib64.patch
 Patch1:                %{oname}-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
-Patch7:                strip-ccache.patch
-Patch8:                duplicated-paths.patch
-Patch9:                DESTDIR.patch
-Patch10:       empty-ruby-version.patch
-Patch11:       rubygems-2.0.0-binary-extensions.patch
-Patch12:       custom-rubygems-location.patch
+Patch3:                mkmf-verbose.patch
+Patch4:                strip-ccache.patch
+Patch5:                duplicated-paths.patch
+Patch6:                DESTDIR.patch
+Patch7:                empty-ruby-version.patch
+Patch8:                rubygems-2.0.0-binary-extensions.patch
+Patch9:                custom-rubygems-location.patch
 URL:           http://www.ruby-lang.org/
 BuildRequires: autoconf >= 2.60
 BuildRequires: automake
@@ -436,24 +423,17 @@ Biblioteka JSON dla jÄ™zyka Ruby.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-#%patch3 -p1
-#%patch4 -p1
-#%patch5 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
 
 # must be regenerated with new bison
 %{__rm} parse.{c,h}
 
-# File::FNM_CASEFOLD gives ArgumentError errors, disabling it seems to make tk configure to succeed
-# http://sprunge.us/CXEO
-%{__sed} -i -e 's/, File::FNM_CASEFOLD//' ext/tk/extconf.rb
-
 # Install custom operating_system.rb.
 install -d lib/rubygems/defaults
 cp -p %{SOURCE6} lib/rubygems/defaults
@@ -464,6 +444,9 @@ 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}/,'
 
+# no configure option to disable, so just rm
+%{!?with_tk:rm -rf ext/tk}
+
 %build
 rubygems_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rubygems.rb | xargs)
 if [ $rubygems_ver != %{rubygems_ver} ]; then
@@ -526,6 +509,10 @@ install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{ruby_ridir}} \
 %{__make} install %{?with_doc:install-doc -j1} \
        DESTDIR=$RPM_BUILD_ROOT
 
+# Version is empty if --with-ruby-version is specified.
+# http://bugs.ruby-lang.org/issues/7807
+sed -i -e 's/Version: \${ruby_version}/Version: %{ruby_version}/' $RPM_BUILD_ROOT%{_pkgconfigdir}/%{oname}-%{ruby_version}.pc
+
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{basever}.%{patchlevel}
 cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{basever}.%{patchlevel}
 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/rdoc%{ruby_suffix}.1
@@ -546,7 +533,7 @@ mv $RPM_BUILD_ROOT${gem_dir}/{gems,specifications} $RPM_BUILD_ROOT%{gem_dir}
 # NOTE: when making symlinks, do not symlink paths that could be directories,
 # as there may came files from other packages as well. actually, unlikely as
 # the links to got system dir and only ruby may package there (other distro
-# packages should go to vendo dirs)
+# packages should go to vendor dirs)
 install -d $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/lib
 mv $RPM_BUILD_ROOT%{ruby_libdir}/rake* $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/lib
 ln -s %{gem_dir}/gems/rake-%{rake_ver}/lib/rake $RPM_BUILD_ROOT%{ruby_libdir}
@@ -694,7 +681,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libruby.so
 %{_includedir}/%{oname}-%{ruby_version}
-%{_pkgconfigdir}/ruby-%{ruby_version}.pc
+%{_pkgconfigdir}/%{oname}-%{ruby_version}.pc
 %{ruby_libdir}/mkmf.rb
 
 %files static
This page took 0.068165 seconds and 4 git commands to generate.