Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 482296 - net-libs/webkit-gtk - add ruby20 support
Summary: net-libs/webkit-gtk - add ruby20 support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2013-08-24 07:06 UTC by Mark David Dumlao
Modified: 2013-10-05 09:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net-libs/webkit-gtk-2.0.4 with ruby20 support (webkit-gtk-2.0.4.ebuild,7.98 KB, text/plain)
2013-08-24 07:08 UTC, Mark David Dumlao
Details
net-libs/webkit-gtk-2.0.4 with ruby20 support (webkit-gtk-2.0.4.ebuild,8.08 KB, text/plain)
2013-08-24 07:20 UTC, Mark David Dumlao
Details
net-libs/webkit-gtk-1.10.2-r300 with ruby20 support (webkit-gtk-1.10.2-r300.ebuild,8.57 KB, text/plain)
2013-08-24 07:21 UTC, Mark David Dumlao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark David Dumlao 2013-08-24 07:06:46 UTC
Ruby 2.0 is a recommended backwards-compatible version bump from ruby 1.9. Most gems compatible with Ruby 1.9 almost definitely support Ruby 2.0 with a few notable incompatibilities.
http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/

With ruby20 now a RUBY_TARGET in Gentoo, ebuilds will need to be updated to conditionally depend on virtual/rubygems[ruby_targets_ruby20]

webkit-gtk only has DEPENDS on virtual/rubygems[ruby_targets_ruby19] or virtual/rubygems[ruby_targets_ruby18]. Since gems cannot be installed with ruby19 and ruby20 side by side, it is impossible to install webkit-gtk with RUBY_TARGETS set to have only ruby20.

This bug tracks an attempt to add ruby20 support to net-libs/webkit-gtk.
Comment 1 Mark David Dumlao 2013-08-24 07:08:47 UTC
Created attachment 356832 [details]
net-libs/webkit-gtk-2.0.4 with ruby20 support
Comment 2 Mark David Dumlao 2013-08-24 07:20:01 UTC
Comment on attachment 356832 [details]
net-libs/webkit-gtk-2.0.4 with ruby20 support

obsoleted to add myconf edit
Comment 3 Mark David Dumlao 2013-08-24 07:20:29 UTC
Created attachment 356836 [details]
net-libs/webkit-gtk-2.0.4 with ruby20 support
Comment 4 Mark David Dumlao 2013-08-24 07:21:37 UTC
Created attachment 356838 [details]
net-libs/webkit-gtk-1.10.2-r300 with ruby20 support
Comment 5 Mark David Dumlao 2013-08-24 11:35:31 UTC
webkit-gtk-2.0.4 successfully compiles with ruby20.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-24 13:40:07 UTC
Comment on attachment 356836 [details]
net-libs/webkit-gtk-2.0.4 with ruby20 support

--- webkit-gtk-2.0.4.ebuild     2013-08-06 13:47:01.760532080 +0200
+++ -   2013-08-24 15:40:00.070141057 +0200
@@ -59,7 +59,8 @@
 DEPEND="${RDEPEND}
        ${PYTHON_DEPS}
        dev-lang/perl
-       || ( virtual/rubygems[ruby_targets_ruby19]
+       || ( virtual/rubygems[ruby_targets_ruby20]
+            virtual/rubygems[ruby_targets_ruby19]
             virtual/rubygems[ruby_targets_ruby18] )
        >=app-accessibility/at-spi2-core-2.5.3
        >=dev-util/gtk-doc-am-1.10
@@ -206,7 +207,9 @@
                "$(usex aqua "--with-font-backend=pango --with-target=quartz" "")
                # Aqua support in gtk3 is untested
 
-       if has_version "virtual/rubygems[ruby_targets_ruby19]"; then
+       if has_version "virtual/rubygems[ruby_targets_ruby20]"; then
+               myconf="${myconf} RUBY=$(type -P ruby20)"
+       elif has_version "virtual/rubygems[ruby_targets_ruby19]"; then
                myconf="${myconf} RUBY=$(type -P ruby19)"
        else
                myconf="${myconf} RUBY=$(type -P ruby18)"
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-24 13:40:38 UTC
Comment on attachment 356838 [details]
net-libs/webkit-gtk-1.10.2-r300 with ruby20 support

--- webkit-gtk-1.10.2-r300.ebuild       2013-08-06 13:47:01.740532459 +0200
+++ -   2013-08-24 15:40:31.482957844 +0200
@@ -54,7 +54,8 @@
 DEPEND="${RDEPEND}
        ${PYTHON_DEPS}
        dev-lang/perl
-       || ( virtual/rubygems[ruby_targets_ruby19]
+       || ( virtual/rubygems[ruby_targets_ruby20]
+            virtual/rubygems[ruby_targets_ruby19]
             virtual/rubygems[ruby_targets_ruby18] )
        app-accessibility/at-spi2-core
        >=dev-util/gtk-doc-am-1.10
@@ -219,7 +220,9 @@
                "$(usex aqua "--with-font-backend=pango --with-target=quartz" "")
                # Aqua support in gtk3 is untested
 
-       if has_version "virtual/rubygems[ruby_targets_ruby19]"; then
+       if has_version "virtual/rubygems[ruby_targets_ruby20]"; then
+               myconf="${myconf} RUBY=$(type -P ruby20)"
+       elif has_version "virtual/rubygems[ruby_targets_ruby19]"; then
                myconf="${myconf} RUBY=$(type -P ruby19)"
        else
                myconf="${myconf} RUBY=$(type -P ruby18)"
Comment 8 Mark David Dumlao 2013-08-24 13:56:32 UTC
webkit-gtk-1.10.2-r300 successfully compiles with ruby20.
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-08-25 16:20:09 UTC
We had to introduce this explicit dependency because some ruby package (don't remember right now) caused webkit to pull almost all ruby interpreters available.

We'll have a look at the patches.
Comment 10 Mark David Dumlao 2013-08-25 16:57:40 UTC
(In reply to Gilles Dartiguelongue from comment #9)
> We had to introduce this explicit dependency because some ruby package
> (don't remember right now) caused webkit to pull almost all ruby
> interpreters available.
> 
> We'll have a look at the patches.

It's alright to have an explicit || dependency, what the bug is saying is that
the || dependency should include all RUBY_TARGETs available. Right now
we're only putting in ruby18 and ruby19, which causes mayhem for
people who put RUBY_TARGETS="ruby20".
Comment 11 Pacho Ramos gentoo-dev 2013-09-29 11:18:51 UTC
ruby team, is this the right way for handling the deps?
Comment 12 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-10-01 23:01:45 UTC
(In reply to Pacho Ramos from comment #11)
> ruby team, is this the right way for handling the deps?

@ruby team, we need a ruby equivalent of python-any-r1.eclass : a simple way to select the "best" ruby version to use for a non-ruby package whose build system uses ruby somewhere.
Comment 13 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-10-01 23:39:28 UTC
... and until such an eclass exists, I've applied Mark's patches.

+  01 Oct 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
+  webkit-gtk-1.10.2-r300.ebuild, webkit-gtk-2.0.4.ebuild:
+  Allow building using ruby20 (bug #482296, thanks to Mark David Dumlao).
Comment 14 Hans de Graaff gentoo-dev Security 2013-10-05 09:36:24 UTC
(In reply to Alexandre Rostovtsev from comment #12)
> (In reply to Pacho Ramos from comment #11)
> > ruby team, is this the right way for handling the deps?
> 
> @ruby team, we need a ruby equivalent of python-any-r1.eclass : a simple way
> to select the "best" ruby version to use for a non-ruby package whose build
> system uses ruby somewhere.

Discussion about that is in https://bugs.gentoo.org/show_bug.cgi?id=444828
Comment 15 Hans de Graaff gentoo-dev Security 2013-10-05 09:39:54 UTC
(In reply to Alexandre Rostovtsev from comment #13)
> ... and until such an eclass exists, I've applied Mark's patches.
> 
> +  01 Oct 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
> +  webkit-gtk-1.10.2-r300.ebuild, webkit-gtk-2.0.4.ebuild:
> +  Allow building using ruby20 (bug #482296, thanks to Mark David Dumlao).

I'm not sure why webkit-gtk depends on virtual/rubygems, rather than on dev-lang/ruby slots?

Right now I would also put ruby19 at the front of the ||() list, but that's exactly the kind of micromanagement we should provide in an eclass.

In any case both of these are nitpicks and what you have works.