patchWeeChat - Patches: patch #8209, Fix compilation for Ruby >= 2.0

 
 

patch #8209: Fix compilation for Ruby >= 2.0

Submitted by:  None
Submitted on:  Fri 11 Oct 2013 08:56:02 PM UTC  
 
Category: compilationPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Sebastien Helleu <flashcode>Originator Email: -unavailable-
Open/Closed: ClosedIRC nick: tmatth

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 05 Feb 2014 04:31:24 PM UTC, comment #4:

Thank you for the patches, they are now committed, with some changes.
Both cmake and autotools should detect and use Ruby 2.0 without any problem.

Since the version is currently release candidate 2 (release planned for Sunday Feb 9th), feedback is welcome!

Sebastien Helleu <flashcode>
Project AdministratorIn charge of this item.
Tue 15 Oct 2013 08:59:02 PM UTC, comment #3:

Andrew's patch works for Ruby 2 and 1.9. If his patch is applied, the patch I'm now attaching could be used to remove the RUBY_VERSION define code from configure.ac, since it would no longer be needed.

(file #29383)

Tristan Matthews <tmatth>
Sun 13 Oct 2013 11:08:26 PM UTC, comment #2:

I'm attaching an alternative patch that just changes the #if tests from RUBY_VERSION to use RUBY_API_VERSION_MAJOR and RUBY_API_VERSION_MINOR. From some Google results I think these symbols are defined in 1.9, but I've only tested against Ruby 2.

It would probably be nicer to do this in CMake and define a single variable.

(file #29370)

Andrew Potter <talisein>
Sat 12 Oct 2013 06:51:49 AM UTC, comment #1:

Hi,

Thanks for the patch.
If I understand your patch (especially the error displayed), it means that WeeChat would not work at all with Ruby 2.0 ? But it's supposed to work fine: I tested Ruby 2.0 some months ago, but I compiled with cmake, which is the recommended way to compile WeeChat (anyway "configure" must be fixed if there is a problem).
So I'm not sure this is the good fix, maybe configure.ac should be fixed to work fine with Ruby 2.0, no?

Sebastien Helleu <flashcode>
Project AdministratorIn charge of this item.
Fri 11 Oct 2013 08:56:02 PM UTC, original submission:

The attached patch fixes configure.ac to avoid building the Ruby plugins if Ruby's version number could not be detected. Presently if weechat's configure script is run on a system with Ruby 2.0.0, configure will detect ruby headers and enable ruby plugins, but compilation will fail since RUBY_VERSION is undefined.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #29370:  0001-ruby-Fix-compilation-with-ruby-2.patch added by talisein (1kB - text/x-patch - Alternative patch to use RUBY_API_VERSION_MAJOR and MINOR)
file #29359:  0001-configure-don-t-build-Ruby-plugins-if-version-was-no.patch added by None (1kB - text/x-patch - nicer patch, prepared with git format-patch)
file #29358:  configure_ruby.patch added by None (1kB - text/x-patch - Fixes compilation if Ruby version could not be detected)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tmatth (Updated the item)
  • -unavailable- added by talisein (Updated the item)
  • -unavailable- added by flashcode (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 09 Feb 2014 09:53:33 AM UTCflashcodeOpen/ClosedOpen=>Closed
    Wed 05 Feb 2014 04:31:24 PM UTCflashcodeStatusNeed Info=>Done
    Tue 15 Oct 2013 08:59:02 PM UTCtmatthAttached File-=>Added 0001-configure-remove-unused-DRUBY_VERSION.patch, #29383
    Sun 13 Oct 2013 11:08:26 PM UTCtaliseinAttached File-=>Added 0001-ruby-Fix-compilation-with-ruby-2.patch, #29370
    Sat 12 Oct 2013 06:51:49 AM UTCflashcodeStatusNone=>Need Info
      Assigned toNone=>flashcode
    Fri 11 Oct 2013 09:29:47 PM UTCNoneAttached File-=>Added 0001-configure-don-t-build-Ruby-plugins-if-version-was-no.patch, #29359
    Fri 11 Oct 2013 08:56:02 PM UTCNoneAttached File-=>Added configure_ruby.patch, #29358

    Back to the top


    Powered by Savane 3.1-cleanup