Source: libprelude
Version: 5.1.1-4
Severity: serious
User pkg-ruby-extras-maintain...@lists.alioth.debian.org
Usertags: ruby2.7-transition

Dear Maintainer,

We are removing ruby 2.5 support and src:libprelude FTBFS against ruby 2.7, 
check this build log:

https://buildd.debian.org/status/fetch.php?pkg=libprelude&arch=amd64&ver=5.1.1-4%2Bb2&stamp=1584634713&raw=0

The attached debdiff adds ruby 2.7 support, fixing the FTBFS.

Thanks for considering the patch!

-- 
Lucas Kanashiro

diff -Nru libprelude-5.1.1/debian/changelog 
libprelude-5.1.1.new/debian/changelog
--- libprelude-5.1.1/debian/changelog   2019-11-17 07:07:24.000000000 -0300
+++ libprelude-5.1.1.new/debian/changelog       2020-03-23 10:27:52.863826694 
-0300
@@ -1,3 +1,11 @@
+libprelude (5.1.1-5) unstable; urgency=medium
+
+  * Add support to Ruby 2.7.
+    + d/p/020-ruby27_support.patch: add patch to avoid ambiguity in
+      rb_define_virtual_variable call.
+
+ -- Lucas Kanashiro <lucas.kanash...@canonical.com>  Mon, 23 Mar 2020 10:26:52 
-0300
+
 libprelude (5.1.1-4) unstable; urgency=medium
 
   * d/rules
diff -Nru libprelude-5.1.1/debian/patches/020-ruby27_support.patch 
libprelude-5.1.1.new/debian/patches/020-ruby27_support.patch
--- libprelude-5.1.1/debian/patches/020-ruby27_support.patch    1969-12-31 
21:00:00.000000000 -0300
+++ libprelude-5.1.1.new/debian/patches/020-ruby27_support.patch        
2020-03-23 10:29:08.063904212 -0300
@@ -0,0 +1,28 @@
+Description: Add support to Ruby 2.7
+ Type cast the parameters of rb_define_virtual_variable call to avoid 
ambiguity:
+ .
+ /usr/include/ruby-2.7.0/ruby/backward/cxxanyargs.hpp:59:1: note: candidate: 
‘void ruby::backward::cxxanyargs::rb_define_virtual_variable(const char*, VALUE 
(*)(...), void (*)(...))’
+   59 | rb_define_virtual_variable(const char *q, type *w, void_type *e)
+      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
+/usr/include/ruby-2.7.0/ruby/backward/cxxanyargs.hpp:90:1: note: candidate: 
‘void ruby::backward::cxxanyargs::rb_define_virtual_variable(const char*, VALUE 
(*)(...), void (*)(VALUE, ID, VALUE*))’
+   90 | rb_define_virtual_variable(const char *q, type *w, rb_gvar_setter_t *e)
+Author: Lucas Kanashiro <lucas.kanash...@canonical.com>
+Forwarded: No
+X-Not-Forwarded-Reason: Waiting for upstream approval to create my account in 
their BTS
+Last-Updated: 2020-03-03
+
+--- a/bindings/ruby/Prelude.cxx
++++ b/bindings/ruby/Prelude.cxx
+@@ -1260,7 +1260,12 @@
+     swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
+   }
+ 
++#if RUBY_VERSION_MAJOR == 2 && RUBY_VERSION_MINOR < 7
+   rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", 
swig_ruby_trackings_count, NULL);
++#else
++  rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", (rb_gvar_getter_t 
*)swig_ruby_trackings_count, (rb_gvar_setter_t *)NULL);
++#endif
++
+ }
+ 
+ /* Add a Tracking from a C/C++ struct to a Ruby object */
diff -Nru libprelude-5.1.1/debian/patches/series 
libprelude-5.1.1.new/debian/patches/series
--- libprelude-5.1.1/debian/patches/series      2019-11-15 18:30:15.000000000 
-0300
+++ libprelude-5.1.1.new/debian/patches/series  2020-03-23 10:26:39.971750566 
-0300
@@ -10,3 +10,4 @@
 017-enable_detection_new_python3.patch
 018-fix_gtkdoc_1.32.patch
 019-fix_path_max_on_hurd.patch
+020-ruby27_support.patch

Reply via email to