]> git.pld-linux.org Git - packages/mysql-ruby.git/commitdiff
handle Config deprecation in ruby 2.3
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 26 Oct 2017 18:26:54 +0000 (21:26 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 26 Oct 2017 18:26:54 +0000 (21:26 +0300)
mysql-ruby.spec
rbconfig-deprecation.patch [new file with mode: 0644]

index a345150f054891bfc02466cacd50eae8b8c232c4..f563c65c2e29924d0bb234c1369ff7b87c043ac0 100644 (file)
@@ -2,14 +2,15 @@ Summary:      MySQL module for Ruby
 Summary(pl.UTF-8):     Moduł MySQL dla języka Ruby
 Name:          mysql-ruby
 Version:       2.8.2
-Release:       9
+Release:       10
 License:       GPL
 Group:         Development/Languages
 Source0:       http://tmtm.org/downloads/mysql/ruby/%{name}-%{version}.tar.gz
 # Source0-md5: eb998b89b7e391cffe0a1f84bd426f9b
 Patch0:                %{name}-amd64.patch
 Patch1:                %{name}-encoding.patch
-URL:           http://www.tmtm.org/mysql/ruby/
+Patch2:                rbconfig-deprecation.patch
+URL:           http://www.tmtm.org/mysql/ruby/README.html
 BuildRequires: mysql-devel
 BuildRequires: rpm-rubyprov
 BuildRequires: rpmbuild(macros) >= 1.665
@@ -60,6 +61,9 @@ Dokumentacji w formacie ri dla %{name}.
 %setup -q
 %patch0 -p0
 %patch1 -p1
+%patch2 -p1
+
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
 %build
 ruby extconf.rb \
diff --git a/rbconfig-deprecation.patch b/rbconfig-deprecation.patch
new file mode 100644 (file)
index 0000000..0dc3dab
--- /dev/null
@@ -0,0 +1,14 @@
+--- mysql-ruby-2.8.2/extconf.rb~       2017-10-26 21:23:06.000000000 +0300
++++ mysql-ruby-2.8.2/extconf.rb        2017-10-26 21:24:59.070002292 +0300
+@@ -37,9 +37,9 @@
+   f.puts src
+ end
+ if defined? cpp_command then
+-  cpp = Config.expand(cpp_command(''))
++  cpp = RbConfig.expand(cpp_command(''))
+ else
+-  cpp = Config.expand sprintf(CPP, $CPPFLAGS, $CFLAGS, '')
++  cpp = RbConfig.expand sprintf(CPP, $CPPFLAGS, $CFLAGS, '')
+ end
+ if /mswin32/ =~ RUBY_PLATFORM && !/-E/.match(cpp)
+   cpp << " -E"
This page took 0.029383 seconds and 4 git commands to generate.