diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-04-19 20:02:28 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-04-19 20:02:28 +0000 |
commit | 95b453d11b4ce4d9b9df0699366e978a275355ef (patch) | |
tree | 1bc49e5a2b94709db2f9e2eb2730340f3a0505ca | |
parent | Version bump. (diff) | |
download | gentoo-2-95b453d11b4ce4d9b9df0699366e978a275355ef.tar.gz gentoo-2-95b453d11b4ce4d9b9df0699366e978a275355ef.tar.bz2 gentoo-2-95b453d11b4ce4d9b9df0699366e978a275355ef.zip |
Add patch to properly load plugins on Ruby 1.9.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
-rw-r--r-- | dev-ruby/little-plugger/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/little-plugger/files/little-plugger-1.1.2-rubylib.patch | 36 | ||||
-rw-r--r-- | dev-ruby/little-plugger/little-plugger-1.1.2-r1.ebuild | 33 |
3 files changed, 77 insertions, 1 deletions
diff --git a/dev-ruby/little-plugger/ChangeLog b/dev-ruby/little-plugger/ChangeLog index 23937ebcf6ec..c7113038278d 100644 --- a/dev-ruby/little-plugger/ChangeLog +++ b/dev-ruby/little-plugger/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-ruby/little-plugger # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/little-plugger/ChangeLog,v 1.2 2010/02/02 13:14:56 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/little-plugger/ChangeLog,v 1.3 2010/04/19 20:02:28 flameeyes Exp $ + +*little-plugger-1.1.2-r1 (19 Apr 2010) + + 19 Apr 2010; Diego E. Pettenò <flameeyes@gentoo.org> + +little-plugger-1.1.2-r1.ebuild, + +files/little-plugger-1.1.2-rubylib.patch: + Add patch to properly load plugins on Ruby 1.9. *little-plugger-1.1.2 (02 Feb 2010) diff --git a/dev-ruby/little-plugger/files/little-plugger-1.1.2-rubylib.patch b/dev-ruby/little-plugger/files/little-plugger-1.1.2-rubylib.patch new file mode 100644 index 000000000000..438a05ce38b1 --- /dev/null +++ b/dev-ruby/little-plugger/files/little-plugger-1.1.2-rubylib.patch @@ -0,0 +1,36 @@ +From 20803ae92c846590640c7213b43138022bfe912f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com> +Date: Mon, 19 Apr 2010 21:49:17 +0200 +Subject: [PATCH] Search within the Ruby library path before the gems. + +Older RubyGems versions as shipped with Ruby 1.9 will not search within +paths provided as library paths (RUBYLIB environment variable or -I +option), so will be unable to find locally-present libraries. + +To avoid bad interactions with those versions, explicitly search the +library path first, and only then run the command through Gem. +--- + lib/little-plugger.rb | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/lib/little-plugger.rb b/lib/little-plugger.rb +index 17e1be3..fc95adb 100644 +--- a/lib/little-plugger.rb ++++ b/lib/little-plugger.rb +@@ -188,6 +188,13 @@ module LittlePlugger + @loaded ||= {} + found = {} + ++ $:.each do |libdir| ++ Dir.glob(File.join(libdir, plugin_path, '*.rb')).each do |path| ++ name = File.basename(path, '.rb').to_sym ++ found[name] = path unless found.key? name ++ end ++ end ++ + Gem.find_files(File.join(plugin_path, '*.rb')).each do |path| + name = File.basename(path, '.rb').to_sym + found[name] = path unless found.key? name +-- +1.7.0.4 + diff --git a/dev-ruby/little-plugger/little-plugger-1.1.2-r1.ebuild b/dev-ruby/little-plugger/little-plugger-1.1.2-r1.ebuild new file mode 100644 index 000000000000..a0e993cb43b6 --- /dev/null +++ b/dev-ruby/little-plugger/little-plugger-1.1.2-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/little-plugger/little-plugger-1.1.2-r1.ebuild,v 1.1 2010/04/19 20:02:28 flameeyes Exp $ + +EAPI=2 + +USE_RUBY="ruby18 ruby19 jruby" + +RUBY_FAKEGEM_TASK_TEST="spec:specdoc" + +RUBY_FAKEGEM_TASK_DOC="doc:rdoc" +RUBY_FAKEGME_DOCDIR="doc" + +RUBY_FAKEGEM_EXTRADOC="History.txt README.rdoc" + +inherit ruby-fakegem eutils + +DESCRIPTION="Module that provides Gem based plugin management" +HOMEPAGE="http://github.com/TwP/${PN}" + +IUSE="" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +ruby_add_bdepend doc "dev-ruby/bones dev-ruby/bones-extras" +ruby_add_bdepend test "dev-ruby/bones dev-ruby/bones-extras" + +all_ruby_prepare() { + # needed for proper work with Ruby 1.9, without updated RubyGems; + # reported upstream + epatch "${FILESDIR}"/${P}-rubylib.patch +} |