[patch #8209] Fix compilation for Ruby >= 2.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch #8209] Fix compilation for Ruby >= 2.0

Eric L.-2
URL:
  <http://savannah.nongnu.org/patch/?8209>

                 Summary: Fix compilation for Ruby >= 2.0
                 Project: WeeChat
            Submitted by: None
            Submitted on: Fri 11 Oct 2013 08:56:02 PM UTC
                Category: compilation
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: [hidden email]
             Open/Closed: Open
         Discussion Lock: Any
                IRC nick: tmatth

    _______________________________________________________

Details:

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.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 11 Oct 2013 08:56:02 PM UTC  Name: configure_ruby.patch  Size: 1kB  
By: None
Fixes compilation if Ruby version could not be detected
<http://savannah.nongnu.org/patch/download.php?file_id=29358>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8209>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[patch #8209] Fix compilation for Ruby >= 2.0

Eric L.-2
Additional Item Attachment, patch #8209 (project weechat):

File name: 0001-configure-don-t-build-Ruby-plugins-if-version-was-no.patch
Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8209>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[patch #8209] Fix compilation for Ruby >= 2.0

Eric L.-2
Update of patch #8209 (project weechat):

                  Status:                    None => Need Info              
             Assigned to:                    None => flashcode              

    _______________________________________________________

Follow-up 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?

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8209>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[patch #8209] Fix compilation for Ruby >= 2.0

Eric L.-2
Follow-up Comment #2, patch #8209 (project weechat):

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)
    _______________________________________________________

Additional Item Attachment:

File name: 0001-ruby-Fix-compilation-with-ruby-2.patch Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8209>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[patch #8209] Fix compilation for Ruby >= 2.0

Eric L.-2
Follow-up Comment #3, patch #8209 (project weechat):

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)
    _______________________________________________________

Additional Item Attachment:

File name: 0001-configure-remove-unused-DRUBY_VERSION.patch Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8209>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[patch #8209] Fix compilation for Ruby >= 2.0

Eric L.-2
Update of patch #8209 (project weechat):

                  Status:               Need Info => Done                  

    _______________________________________________________

Follow-up 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!

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8209>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev