Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 315487 - www-servers/gorg fails to compile with ruby-1.9
Summary: www-servers/gorg fails to compile with ruby-1.9
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Infrastructure
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ruby19
  Show dependency tree
 
Reported: 2010-04-15 17:48 UTC by Dror Levin (RETIRED)
Modified: 2011-12-04 10:13 UTC (History)
3 users (show)

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


Attachments
Build log (build.log,11.77 KB, text/plain)
2010-04-15 17:54 UTC, Dror Levin (RETIRED)
Details
files/gorg-0.6.4-ruby19.patch (gorg-0.6.4-ruby19.patch,6.35 KB, text/plain)
2011-11-19 20:40 UTC, Naohiro Aota
Details
files/gorg-0.6.4-ruby19-date.patch (gorg-0.6.4-ruby19-date.patch,743 bytes, text/plain)
2011-11-19 20:40 UTC, Naohiro Aota
Details
gorg-0.6.4.ebuild.patch (gorg-0.6.4.ebuild.patch,1.62 KB, text/plain)
2011-11-19 20:44 UTC, Naohiro Aota
Details
files/gorg-0.6.4-ruby19-date.patch (gorg-0.6.4-ruby19-date.patch,1000 bytes, text/plain)
2011-12-04 09:43 UTC, Naohiro Aota
Details
gorg-0.6.4.ebuild.patch (gorg-0.6.4.ebuild.patch,1.37 KB, patch)
2011-12-04 09:48 UTC, Naohiro Aota
Details | Diff
test.rb (test.rb,309 bytes, text/plain)
2011-12-04 09:53 UTC, Naohiro Aota
Details
files/gorg-0.6.4-ruby19-date.patch (gorg-0.6.4-ruby19-date.patch,1010 bytes, patch)
2011-12-04 09:56 UTC, Naohiro Aota
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dror Levin (RETIRED) gentoo-dev 2010-04-15 17:48:49 UTC
Uses ruby.eclass, probably needs to be adapted.
Comment 1 Dror Levin (RETIRED) gentoo-dev 2010-04-15 17:54:15 UTC
Created attachment 227943 [details]
Build log
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-11-10 06:01:55 UTC
ruby team:
is there a migration guide to for maintainers to port ebuilds to ruby1.9?
Comment 3 Hans de Graaff gentoo-dev Security 2010-11-10 06:38:41 UTC
gorg-0.6.4-r1 is already based on ruby-ng, so there is no work to be done on the ebuild anymore.

Can't help you with the ruby 1.9 part of gorg itself, haven't looked at 1.9 at all yet since it's still masked.
Comment 4 Tolga Dalman 2011-09-22 12:25:20 UTC
I think this is easily fixed. After 3 minutes Google search I found this URL:
http://boga.wordpress.com/2008/04/15/ruby-19-porting-notes/

Item 8. should fix Gorg compilation with Ruby 1.9:
--------------------------------------
In ruby1.9 for the RString in C extensions was changed because of optimization, you should use the RSTRING_LEN, RSTRING_PTR macros instead of directly accessing the len, ptr members.  

len = RSTRING(foo)->len
ptr = RSTRING(foo)->ptr

Should be changed to

len = RSTRING_LEN(foo);
ptr = RSTRING_PTR(foo);
--------------------------------------

Hope that helps.
Comment 5 Naohiro Aota gentoo-dev 2011-11-19 20:40:18 UTC
Created attachment 293133 [details]
files/gorg-0.6.4-ruby19.patch

ruby19 support. Built both with ruby18 and ruby19.
Comment 6 Naohiro Aota gentoo-dev 2011-11-19 20:40:58 UTC
Created attachment 293135 [details]
files/gorg-0.6.4-ruby19-date.patch

Ruby19 only patch. Deal with dropped library "parsedate".
Comment 7 Naohiro Aota gentoo-dev 2011-11-19 20:44:04 UTC
Created attachment 293137 [details]
gorg-0.6.4.ebuild.patch

- Use ruby18 and ruby19.
- Rewrite to use ruby-fakegem
- Apply above two patch

Installed and invoked fine, but whetehr or not it's really serving
contens is not yet tested.
Comment 8 Hans de Graaff gentoo-dev Security 2011-11-21 18:51:25 UTC
(In reply to comment #7)

> - Use ruby18 and ruby19.
> - Rewrite to use ruby-fakegem

gorg is not distributed as a gem, so I'd rather not install it as such. Why did you choose to do this instead of just using ruby-ng.eclass ?

> - Apply above two patch

I would like to avoid applying patches for specific ruby versions if possible. Isn't it possible to create a solution that works in both cases?
Comment 9 Naohiro Aota gentoo-dev 2011-12-04 09:43:57 UTC
Created attachment 294685 [details]
files/gorg-0.6.4-ruby19-date.patch

Rewrote the patch to work both with ruby18 and ruby19
Comment 10 Naohiro Aota gentoo-dev 2011-12-04 09:48:45 UTC
Created attachment 294687 [details, diff]
gorg-0.6.4.ebuild.patch

>> - Rewrite to use ruby-fakegem
> gorg is not distributed as a gem, so I'd rather not install it as such. Why did
> you choose to do this instead of just using ruby-ng.eclass ?

There were no reason to use ruby-fakegem. I've mis-understood that
using ruby-fakegem would be good for every place..

I've reverted the ebuild patch to use ruby-ng

Changes from current ebuild are
- Use ruby18 and ruby19
- Rewrite to use ruby-ng
- Apply ruby19 compatible patch
Comment 11 Naohiro Aota gentoo-dev 2011-12-04 09:53:07 UTC
Created attachment 294691 [details]
test.rb

Simple ruby script to show ${P}-ruby19-date.patch concept

$ cd /usr/portage/www-servers/gorg
$ ruby18 test.rb                  
Sat Apr 09 18:13:34 UTC 2011
Sat Apr 09 18:13:34 UTC 2011
true
$ ruby19 test.rb
2011-04-09 18:13:34 UTC
2011-04-09 18:13:34 UTC
true
Comment 12 Naohiro Aota gentoo-dev 2011-12-04 09:56:23 UTC
Created attachment 294693 [details, diff]
files/gorg-0.6.4-ruby19-date.patch

There was some error about the previous patch...
Comment 13 Hans de Graaff gentoo-dev Security 2011-12-04 10:13:50 UTC
Thanks for the patches and for testing. I also had an ebuild-in-progress for ruby-ng, so I've mixed our versions and created gorg 0.6.4-r1.