I created an Ebuild for ruby-gd2. It's like ruby-gd but provides a nicer interface.
Created attachment 94145 [details] dev-ruby/ruby-gd2-1.1.1.ebuild
Created attachment 94186 [details] ruby-gd2-1.1.1 ebuild (proper) Hello. Your ebuild has several design mistakes; you may want to read http://devmanual.gentoo.org/ebuild-writing/ to learn how to write proper ebuilds. I wrote a new (and hopefully correct) ebuild for ruby-gd2 which I've tested on my system (x86) and it works. You can find it attached here. Regards.
Hi, Tested your ebuild on a server machine (amd64). After building i tried: irb -r gd2 and got: /usr/lib64/ruby/gems/1.8/gems/gd2-1.1.1/lib/gd2.rb:150:in `[]':RuntimeError: unknown symbol "gdFontCacheShutdown" After echo "media-libs/gd truetype" > /etc/portage/package.use and remerging media-libs/gd the problem was solved. For me it's just a bug in ruby-gd2, it should not depend on 'optimal' gd features. It should detect them on the fly. Maybe you should add a 'use dependency' for truetype on media-libs/gd in your ebuild? (Bevor i post a suggestion i'll spend time reading on the ebuild guide ;) ) Thx for not ignoring my bad ebuild skills, Markus
Created attachment 94209 [details, diff] ruby-gd2-1.1.1.ebuild.diff (patch for 'proper') Hi! I've tested what you say on my system and I can reproduce it. As a matter of fact, I had truetype enabled on media-libs/gd, so this is why I didn't catch it in the first place. :-) I've attached a patch that should fix this (and also adds ~amd64). Please let me know if it works for you; it does for me. Regards.
Hi, i tested your ebuild. I remerged gd without freetype and your ebuild refuses correctly to continue. But after remerging gd with truetype ruby-gd2 stops with an Access Virolation: seon ruby-gd2 # emerge ruby-gd2 Calculating dependencies... done! >>> Emerging (1 of 1) dev-ruby/ruby-gd2-1.1.1 to / >>> checking ebuild checksums ;-) >>> checking auxfile checksums ;-) >>> checking miscfile checksums ;-) >>> checking gd2-1.1.1.gem ;-) >>> Unpacking source... >>> Source unpacked. >>> Compiling source in /var/tmp/portage/ruby-gd2-1.1.1/work ... >>> Source compiled. >>> Test phase [not enabled]: dev-ruby/ruby-gd2-1.1.1 >>> Install ruby-gd2-1.1.1 into /var/tmp/portage/ruby-gd2-1.1.1/image/ category dev-ruby ACCESS DENIED mkdir: /usr/lib64/ruby/gems/1.8/doc ACCESS DENIED mkdir: /usr/lib64/ruby/gems/1.8/doc Attempting local installation of '/var/tmp/portage/ruby-gd2-1.1.1/distdir/gd2-1.1.1' Successfully installed gd2, version 1.1.1 >>> Completed installing ruby-gd2-1.1.1 into /var/tmp/portage/ruby-gd2-1.1.1/image/ --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE = "/var/log/sandbox/sandbox-dev-ruby_-_ruby-gd2-1.1.1-1045.log" mkdir: /usr/lib64/ruby/gems/1.8/doc mkdir: /usr/lib64/ruby/gems/1.8/doc -------------------------------------------------------------------------------- !!! This ebuild is from an overlay: '/usr/local/portage' cat /var/log/sandbox/sandbox-dev-ruby_-_ruby-gd2-1.1.1-1045.log mkdir: /usr/lib64/ruby/gems/1.8/doc mkdir: /usr/lib64/ruby/gems/1.8/doc Without your latest patch I got the same problems, so something is broken on my system.
Hello. Hm, strange. Does the directory "/usr/lib64/ruby/gems/1.8/doc" exist in your system? Have you tried issuing USE="-doc" emerge -av ruby-gd2 ?
Hi, Thx for your idear with the path. I just got /usr/lib/ruby/gems/<gemstuff> while it should be /usr/lib64/ruby/gems/<gemstuff> I did following: mv /usr/lib/ruby/gems /usr/lib64/ruby/ rmdir /usr/lib/ruby ln -s /usr/lib64/ruby /usr/lib/ruby And now 'emerge ruby-gd2' works correct! Im a little bit confused about the directory layout of rubygems (it installs /usr/lib/ruby) equery f rubygems | grep lib /usr/lib /usr/lib/ruby /usr/lib/ruby/gems /usr/lib/ruby/gems/1.8 /usr/lib/ruby/gems/1.8/cache /usr/lib/ruby/gems/1.8/cache/sources-0.0.1.gem /usr/lib/ruby/gems/1.8/doc /usr/lib/ruby/gems/1.8/doc/.keep /usr/lib/ruby/gems/1.8/gems /usr/lib/ruby/gems/1.8/gems/sources-0.0.1 /usr/lib/ruby/gems/1.8/gems/sources-0.0.1/lib /usr/lib/ruby/gems/1.8/gems/sources-0.0.1/lib/sources.rb /usr/lib/ruby/gems/1.8/specifications /usr/lib/ruby/gems/1.8/specifications/sources-0.0.1.gemspec /usr/lib64 /usr/lib64/ruby /usr/lib64/ruby/site_ruby /usr/lib64/ruby/site_ruby/1.8 /usr/lib64/ruby/site_ruby/1.8/gemconfigure.rb /usr/lib64/ruby/site_ruby/1.8/rubygems /usr/lib64/ruby/site_ruby/1.8/rubygems.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/builder.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/cmd_manager.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/command.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/config_file.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/custom_require.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/dependency_list.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/deployment.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/doc_manager.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/format.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/gem_commands.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/gem_openssl.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/gem_runner.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/installer.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/old_format.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/open-uri.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/package.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/remote_installer.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/rubygems_version.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/security.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/source_index.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/specification.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/timer.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/user_interaction.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/validator.rb /usr/lib64/ruby/site_ruby/1.8/rubygems/version.rb /usr/lib64/ruby/site_ruby/1.8/ubygems.rb /usr/lib64/ruby/site_ruby/auto_gem.rb Some libs are located in /usr/lib and some in /usr/lib64, is this intended? Maybe its a new bug? Markus P.S. Im not a native english speaker, complain please only constructionally.
Another idea; try issuing gem install -r gd2 and see what happens. Make sure you've first unmerged ruby-gd2 and reverted the changes you made in your latest comment so that we know what's going on.
Reverted all the changes and unmerged ruby-gd2 emerge --unmerge ruby-gd2 emerge --unmerge rubygems rm -r /usr/lib/ruby emerge rubygems gem install gd2 -> Attempting local installation of 'gd2' Local gem file not found: gd2*.gem Attempting remote installation of 'gd2' /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:204:in `report_activate_error': Could not find RubyGem sources (> 0.0.0) (Gem::LoadError) from /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:141:in `activate' from /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:37:in `require_gem_with_options' from /usr/lib64/ruby/site_ruby/1.8/rubygems.rb:31:in `require_gem' from /usr/lib64/ruby/site_ruby/1.8/rubygems/remote_installer.rb:425:in `sources' from /usr/lib64/ruby/site_ruby/1.8/rubygems/remote_installer.rb:435:in `source_index_hash' from /usr/lib64/ruby/site_ruby/1.8/rubygems/remote_installer.rb:399:in `install' from /usr/lib64/ruby/site_ruby/1.8/rubygems/gem_commands.rb:195:in `execute' from /usr/lib64/ruby/site_ruby/1.8/rubygems/gem_commands.rb:153:in `execute' from /usr/lib64/ruby/site_ruby/1.8/rubygems/command.rb:49:in `invoke' from /usr/lib64/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:94:in `process_args' from /usr/lib64/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:67:in `run' from /usr/lib64/ruby/site_ruby/1.8/rubygems/gem_runner.rb:13:in `run' from /usr/bin/gem:17 After: mv /usr/lib/ruby/gems /usr/lib64/ruby/ rmdir /usr/lib/ruby ln -s /usr/lib64/ruby /usr/lib/ruby Evrything wokrds correct again (ebuild and gem install). I thing rubygems should (on amd64) simple install it's few libarys in /usr/lib at /usr/lib64. Thx for your spending time in my (ex)problem. Markus
I think I've nailed it down: # gem help install Usage: gem install GEMNAME [options] Options: <snip> -i, --install-dir DIR <snip> Defaults: --both --version '> 0' --rdoc --no-force --no-test --install-dir /usr/lib/ruby/gems/1.8 So it tries to install the gems under /usr/lib/ruby/gems/1.8 by default. This also means that with gem install -r -i /usr/lib64/ruby/ you shouldn't have any problems and won't even have to do the modifications you did to fix it. Of course, it still remains a problem for Gentoo. But, according to this http://docs.rubygems.org/read/chapter/11 RubyGems support a configuration file. So if you create (as root I guess) ~/.gemrc and in it write gem: -i /usr/lib64/ruby/ you shouldn't have any problems with Gentoo either. If you feel like trying it, please let me know of the results.
Now in the Sunrise overlay: http://www.gentoo-sunrise.org/sunrise/browser/reviewed/dev-ruby/ruby-gd2
If Ruby itself installs into /usr/lib64, that should be reflected in Ruby's Config.rb file. I would think that the gem command would use this when determining where to install gems. If it doesn't, that seems like gem itself might be broken?
It sounds like a sensible conclusion to me, especially if Markus is able to install other gems without any problems.
Is there still any interest to get this into the tree? Please reply, otherwise the bug will be marked as WONTFIX in 30 days from now and I'll remove it from sunrise (it is broken there anyway). 1.1.1 May 12, 2006 seems to be the recent version according to rubygems.
Closing old bug due to no response. Cleaning up sunrise because of outdated ruby18 support.