[packages/mysql-ruby] handle Config deprecation in ruby 2.3

glen glen at pld-linux.org
Thu Oct 26 20:29:37 CEST 2017


commit 62277a37aed83f44e9629f24ed34433461328ed8
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu Oct 26 21:26:54 2017 +0300

    handle Config deprecation in ruby 2.3

 mysql-ruby.spec            |  8 ++++++--
 rbconfig-deprecation.patch | 14 ++++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/mysql-ruby.spec b/mysql-ruby.spec
index a345150..f563c65 100644
--- a/mysql-ruby.spec
+++ b/mysql-ruby.spec
@@ -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
index 0000000..0dc3dab
--- /dev/null
+++ b/rbconfig-deprecation.patch
@@ -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"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mysql-ruby.git/commitdiff/2a7ba56cf3e93f96e2cb21bf67c8836b38b65df5



More information about the pld-cvs-commit mailing list