- Try to get building with ruby 2.7 bsc#1169446
- Add patches: * ruby27-warnings.patch * ruby-includes.patch OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm:svn/subversion?expand=0&rev=320
This commit is contained in:
committed by
Git OBS Bridge
parent
147c59b417
commit
de689a9560
32
ruby-includes.patch
Normal file
32
ruby-includes.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 9d3f457d0059b426d3483d0a733f45a2ea8f6dcd Mon Sep 17 00:00:00 2001
|
||||
From: James McCoy <jamessan@apache.org>
|
||||
Date: Tue, 24 Mar 2020 23:30:21 +0000
|
||||
Subject: [PATCH] Remove incorrect include paths from svn_cv_ruby_includes.
|
||||
|
||||
Files under ruby/ and ruby/backward/ should be included using "#include
|
||||
<ruby/...>", if needed, instead of adding those directories to the include
|
||||
path.
|
||||
|
||||
* build/ac-macros/swig.m4
|
||||
(SVN_FIND_SWIG): Remove "-I$rbconfig_rubyhdrdir/ruby
|
||||
-I$rbconfig_rubyhdrdir/ruby/backward"
|
||||
|
||||
|
||||
git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1875602 13f79535-47bb-0310-9956-ffa450edef68
|
||||
---
|
||||
build/ac-macros/swig.m4 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build/ac-macros/swig.m4 b/build/ac-macros/swig.m4
|
||||
index bc2599038f22..c707a8c28253 100644
|
||||
--- a/build/ac-macros/swig.m4
|
||||
+++ b/build/ac-macros/swig.m4
|
||||
@@ -230,7 +230,7 @@ AC_DEFUN(SVN_FIND_SWIG,
|
||||
AC_CACHE_CHECK([for Ruby include path], [svn_cv_ruby_includes],[
|
||||
if test -d "$rbconfig_rubyhdrdir"; then
|
||||
dnl Ruby >=1.9
|
||||
- svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward"
|
||||
+ svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir"
|
||||
if test -d "$rbconfig_rubyarchhdrdir"; then
|
||||
dnl Ruby >=2.0
|
||||
svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir"
|
121
ruby27-warnings.patch
Normal file
121
ruby27-warnings.patch
Normal file
@@ -0,0 +1,121 @@
|
||||
From 4c75471f13559ad336a7dc9bc129a50f174c4991 Mon Sep 17 00:00:00 2001
|
||||
From: James McCoy <jamessan@apache.org>
|
||||
Date: Thu, 2 Apr 2020 03:01:43 +0000
|
||||
Subject: [PATCH] Fix Proc.new warnings in Ruby bindings with Ruby >= 2.7
|
||||
|
||||
Per Ruby 2.7's release notes[1], use the block-capturing syntax instead of
|
||||
explicit Proc.new to resolve warnings like these in the Ruby SWIG APIs:
|
||||
|
||||
subversion/bindings/swig/ruby/svn/client.rb:640: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
|
||||
subversion/bindings/swig/ruby/svn/core.rb:258: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
|
||||
|
||||
[1]: https://github.com/ruby/ruby/blob/v2_7_0/NEWS#proclambda-without-block-is-deprecated-
|
||||
|
||||
* subversion/bindings/swig/ruby/svn/client.rb:
|
||||
(set_log_msg_func, set_log_msg_func2, set_notify_func, set_cancel_func):
|
||||
Replace callback=Proc.new parameter with &callback
|
||||
(def_init_callbacks): Remove explicit nil parameters to above functions,
|
||||
leveraging deafaults
|
||||
|
||||
* subversion/bindings/swig/ruby/svn/core.rb:
|
||||
(add_simple_prompt_provider, add_username_prompt_provider,
|
||||
add_ssl_server_trust_prompt_provider, add_ssl_client_cert_prompt_provider,
|
||||
add_ssl_client_cert_pw_prompt_provider): Replace prompt=Proc.new parameter
|
||||
with &prompt
|
||||
|
||||
|
||||
git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1876020 13f79535-47bb-0310-9956-ffa450edef68
|
||||
---
|
||||
subversion/bindings/swig/ruby/svn/client.rb | 16 ++++++++--------
|
||||
subversion/bindings/swig/ruby/svn/core.rb | 10 +++++-----
|
||||
2 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/subversion/bindings/swig/ruby/svn/client.rb b/subversion/bindings/swig/ruby/svn/client.rb
|
||||
index 50a0385592eb..30d328bcd895 100644
|
||||
--- a/subversion/bindings/swig/ruby/svn/client.rb
|
||||
+++ b/subversion/bindings/swig/ruby/svn/client.rb
|
||||
@@ -637,25 +637,25 @@ def switch(path, uri, peg_rev=nil, rev=nil, depth=nil,
|
||||
ignore_externals, allow_unver_obstruction, self)
|
||||
end
|
||||
|
||||
- def set_log_msg_func(callback=Proc.new)
|
||||
+ def set_log_msg_func(&callback)
|
||||
callback_wrapper = Proc.new do |items|
|
||||
items = items.collect do |item|
|
||||
item_wrapper = CommitItemWrapper.new(item)
|
||||
end
|
||||
callback.call(items)
|
||||
end
|
||||
- set_log_msg_func2(callback_wrapper)
|
||||
+ set_log_msg_func2(&callback_wrapper)
|
||||
end
|
||||
|
||||
- def set_log_msg_func2(callback=Proc.new)
|
||||
+ def set_log_msg_func2(&callback)
|
||||
@log_msg_baton = Client.set_log_msg_func3(self, callback)
|
||||
end
|
||||
|
||||
- def set_notify_func(callback=Proc.new)
|
||||
+ def set_notify_func(&callback)
|
||||
@notify_baton = Client.set_notify_func2(self, callback)
|
||||
end
|
||||
|
||||
- def set_cancel_func(callback=Proc.new)
|
||||
+ def set_cancel_func(&callback)
|
||||
@cancel_baton = Client.set_cancel_func(self, callback)
|
||||
end
|
||||
|
||||
@@ -707,9 +707,9 @@ def remove_from_changelists(changelists_names, paths, depth=nil)
|
||||
|
||||
private
|
||||
def init_callbacks
|
||||
- set_log_msg_func(nil)
|
||||
- set_notify_func(nil)
|
||||
- set_cancel_func(nil)
|
||||
+ set_log_msg_func
|
||||
+ set_notify_func
|
||||
+ set_cancel_func
|
||||
end
|
||||
%w(log_msg notify cancel).each do |type|
|
||||
private "#{type}_func", "#{type}_baton"
|
||||
diff --git a/subversion/bindings/swig/ruby/svn/core.rb b/subversion/bindings/swig/ruby/svn/core.rb
|
||||
index 15ebe139b6a2..26e5e84d4fba 100644
|
||||
--- a/subversion/bindings/swig/ruby/svn/core.rb
|
||||
+++ b/subversion/bindings/swig/ruby/svn/core.rb
|
||||
@@ -249,31 +249,31 @@ def add_windows_ssl_server_trust_provider
|
||||
end
|
||||
end
|
||||
|
||||
- def add_simple_prompt_provider(retry_limit, prompt=Proc.new)
|
||||
+ def add_simple_prompt_provider(retry_limit, &prompt)
|
||||
args = [retry_limit]
|
||||
klass = AuthCredSimple
|
||||
add_prompt_provider("simple", args, prompt, klass)
|
||||
end
|
||||
|
||||
- def add_username_prompt_provider(retry_limit, prompt=Proc.new)
|
||||
+ def add_username_prompt_provider(retry_limit, &prompt)
|
||||
args = [retry_limit]
|
||||
klass = AuthCredUsername
|
||||
add_prompt_provider("username", args, prompt, klass)
|
||||
end
|
||||
|
||||
- def add_ssl_server_trust_prompt_provider(prompt=Proc.new)
|
||||
+ def add_ssl_server_trust_prompt_provider(&prompt)
|
||||
args = []
|
||||
klass = AuthCredSSLServerTrust
|
||||
add_prompt_provider("ssl_server_trust", args, prompt, klass)
|
||||
end
|
||||
|
||||
- def add_ssl_client_cert_prompt_provider(retry_limit, prompt=Proc.new)
|
||||
+ def add_ssl_client_cert_prompt_provider(retry_limit, &prompt)
|
||||
args = [retry_limit]
|
||||
klass = AuthCredSSLClientCert
|
||||
add_prompt_provider("ssl_client_cert", args, prompt, klass)
|
||||
end
|
||||
|
||||
- def add_ssl_client_cert_pw_prompt_provider(retry_limit, prompt=Proc.new)
|
||||
+ def add_ssl_client_cert_pw_prompt_provider(retry_limit, &prompt)
|
||||
args = [retry_limit]
|
||||
klass = AuthCredSSLClientCertPw
|
||||
add_prompt_provider("ssl_client_cert_pw", args, prompt, klass)
|
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 15 07:39:43 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Try to get building with ruby 2.7 bsc#1169446
|
||||
- Add patches:
|
||||
* ruby27-warnings.patch
|
||||
* ruby-includes.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 31 06:02:23 UTC 2020 - Martin Liška <mliska@suse.cz>
|
||||
|
||||
|
@@ -63,6 +63,8 @@ Patch40: subversion-perl-underlinking.patch
|
||||
# PATCH-FIX-UPSTREAM subversion-1.12.0-swig-4.patch -- Support Swig 4
|
||||
Patch41: subversion-1.12.0-swig-4.patch
|
||||
Patch42: gcc10-do-not-optimize-get_externals_to_pin.patch
|
||||
Patch43: ruby27-warnings.patch
|
||||
Patch44: ruby-includes.patch
|
||||
BuildRequires: apache-rpm-macros
|
||||
BuildRequires: apache2-devel >= 2.2.0
|
||||
BuildRequires: apache2-prefork
|
||||
@@ -244,6 +246,8 @@ parameters and keywords for the svn command and other tools.
|
||||
%patch41 -p1
|
||||
%endif
|
||||
%patch42 -p1
|
||||
%patch43 -p1
|
||||
%patch44 -p1
|
||||
|
||||
%build
|
||||
# Re-boot strap, needed for patch37
|
||||
|
Reference in New Issue
Block a user