- Remove deprecated Config:: usage
This commit is contained in:
John 2015-01-16 15:43:49 +09:00
parent 68b5c56275
commit 7b85c1c31d
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,22 @@
--- openbabel-2.3.2/scripts/CMakeLists.txt.rbconfig 2015-01-16 15:16:50.455454787 +0900
+++ openbabel-2.3.2/scripts/CMakeLists.txt 2015-01-16 15:19:56.608276116 +0900
@@ -308,7 +308,7 @@
# no regex metacharacters except possibly '.':
string(REGEX REPLACE ^${RUBY_POSSIBLE_LIB_DIR}/ruby ${RUBY_PREFIX} ruby_install_dir "${RUBY_SITEARCH_DIR}")
else (RUBY_PREFIX)
- execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['exec_prefix']"
+ execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['exec_prefix']"
OUTPUT_VARIABLE ruby_exec_prefix)
# It is reasonably safe to assume that ruby_exec_prefix contains no
# regex metacharacters except possibly '.':
--- openbabel-2.3.2/scripts/ruby/extconf.rb.rbconfig 2015-01-16 15:16:50.450454846 +0900
+++ openbabel-2.3.2/scripts/ruby/extconf.rb 2015-01-16 15:19:31.945564760 +0900
@@ -4,7 +4,7 @@
# binaries on OS X by default
require 'rbconfig'
darwin_ldflags = ""
-if Config::CONFIG["arch"] =~ /universal-darwin/
+if RbConfig::CONFIG["arch"] =~ /universal-darwin/
ENV['ARCHFLAGS'] = case `uname -smr`.chomp
when "i386" then '-arch i386'
when "ppc" then '-arch ppc'

View File

@ -10,7 +10,7 @@
Name: openbabel
Version: 2.3.2
Release: 9%{beta_ver}%{?dist}
Release: 10%{beta_ver}%{?dist}
Summary: Chemistry software file format converter
License: GPLv2
Group: Applications/File
@ -35,6 +35,8 @@ Patch7: openbabel-2.3.1-ruby19-vendorarch.patch
Patch8: openbabel-disable-tests-arm.patch
# temporarily disable some tests on ppc64 and s390(x) to unblock other builds (#1108103)
Patch9: openbabel-disable-tests-ppc64.patch
# Remove deprecated usage on ruby 22
Patch10: openbabel-2.3.1-ruby22-remove-deprecated-usage.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake
BuildRequires: desktop-file-utils
@ -152,6 +154,7 @@ Ruby wrapper for the Open Babel library.
%ifarch %{power64} s390 s390x
%patch9 -p1 -b .ppc64
%endif
%patch10 -p1 -b .rbconfig
chmod 644 src/formats/{fchk,genbank,mmcif}format.cpp
chmod 644 src/math/align.cpp
chmod 644 include/openbabel/{graphsym.h,math/align.h}
@ -256,6 +259,10 @@ make test
%{ruby_vendorarchdir}/openbabel.so
%changelog
* Fri Jan 16 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.3.2-10
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2
- Remove deprecated Config:: usage
* Thu Nov 13 2014 Dan Horák <dan[at]danny.cz> - 2.3.2-9
- disable some tests also on s390(x)