summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2011-11-28 19:33:58 +0000
committerHans de Graaff <graaff@gentoo.org>2011-11-28 19:33:58 +0000
commit03bc09d5d7b4cfbae9ee05ec5cb123a3f53a728a (patch)
treee881a86100a9f84d2379b27203dc13925bda5033 /dev-ruby
parentRemove RDoc tests due to compatibility issues. Add nokogiri dependency for te... (diff)
downloadgentoo-2-03bc09d5d7b4cfbae9ee05ec5cb123a3f53a728a.tar.gz
gentoo-2-03bc09d5d7b4cfbae9ee05ec5cb123a3f53a728a.tar.bz2
gentoo-2-03bc09d5d7b4cfbae9ee05ec5cb123a3f53a728a.zip
Fix compatibility with newer versions of rubygems. Fix provided by Tomoh K. in bug 391059.
(Portage version: 2.1.10.11/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/ruby-gettext/ChangeLog10
-rw-r--r--dev-ruby/ruby-gettext/files/ruby-gettext-rubygems-load-path.patch21
-rw-r--r--dev-ruby/ruby-gettext/ruby-gettext-2.1.0_p20100728-r3.ebuild60
3 files changed, 90 insertions, 1 deletions
diff --git a/dev-ruby/ruby-gettext/ChangeLog b/dev-ruby/ruby-gettext/ChangeLog
index 9d458c738772..a372d8a047b4 100644
--- a/dev-ruby/ruby-gettext/ChangeLog
+++ b/dev-ruby/ruby-gettext/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-ruby/ruby-gettext
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-gettext/ChangeLog,v 1.75 2011/10/23 15:53:10 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-gettext/ChangeLog,v 1.76 2011/11/28 19:33:58 graaff Exp $
+
+*ruby-gettext-2.1.0_p20100728-r3 (28 Nov 2011)
+
+ 28 Nov 2011; Hans de Graaff <graaff@gentoo.org>
+ +ruby-gettext-2.1.0_p20100728-r3.ebuild,
+ +files/ruby-gettext-rubygems-load-path.patch:
+ Fix compatibility with newer versions of rubygems. Fix provided by Tomoh K.
+ in bug 391059.
23 Oct 2011; Raúl Porcel <armin76@gentoo.org>
ruby-gettext-2.1.0_p20100728-r1.ebuild:
diff --git a/dev-ruby/ruby-gettext/files/ruby-gettext-rubygems-load-path.patch b/dev-ruby/ruby-gettext/files/ruby-gettext-rubygems-load-path.patch
new file mode 100644
index 000000000000..8ee97702e0a1
--- /dev/null
+++ b/dev-ruby/ruby-gettext/files/ruby-gettext-rubygems-load-path.patch
@@ -0,0 +1,21 @@
+Fix compatibility with newer rubygems versions. Patch provided by
+Tomoh K. in bug 391059.
+
+--- lib/gettext/runtime/locale_path.rb.orig
++++ lib/gettext/runtime/locale_path.rb
+@@ -52,7 +52,14 @@
+
+ load_path = $LOAD_PATH.dup
+ if defined? ::Gem
+- load_path += Gem.all_load_paths
++ begin
++ load_path +=Gem::Specification.map{|s|s.gem_dir}
++ rescue NoMethodError
++ begin
++ load_path +=Gem.all_load_paths
++ rescue NoMethodError
++ end
++ end
+ end
+ load_path.map!{|v| v.match(/(.*?)(\/lib)*?$/); $1}
+ load_path.each {|path|
diff --git a/dev-ruby/ruby-gettext/ruby-gettext-2.1.0_p20100728-r3.ebuild b/dev-ruby/ruby-gettext/ruby-gettext-2.1.0_p20100728-r3.ebuild
new file mode 100644
index 000000000000..8251851cbb90
--- /dev/null
+++ b/dev-ruby/ruby-gettext/ruby-gettext-2.1.0_p20100728-r3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-gettext/ruby-gettext-2.1.0_p20100728-r3.ebuild,v 1.1 2011/11/28 19:33:58 graaff Exp $
+
+EAPI=2
+
+USE_RUBY="ruby18 ruby19 jruby ree18"
+
+RUBY_FAKEGEM_NAME="${PN/ruby-/}"
+RUBY_FAKEGEM_VERSION="${PV%_*}"
+
+RUBY_FAKEGEM_TASK_DOC="rerdoc"
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_EXTRADOC="ChangeLog ChangeLog-1 NEWS-1 README.rdoc"
+
+RUBY_FAKEGEM_TASK_TEST="test"
+
+RUBY_FAKEGEM_EXTRAINSTALL="data"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Ruby GetText Package is Native Language Support Library and Tools modeled after GNU gettext package"
+HOMEPAGE="http://www.yotabanana.com/hiki/ruby-gettext.html"
+SRC_URI="http://dev.a3li.li/gentoo/distfiles/${P}.tar.bz2"
+
+KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd ~x86-macos"
+IUSE=""
+SLOT="0"
+LICENSE="Ruby"
+
+ruby_add_rdepend ">=dev-ruby/locale-2.0.5"
+
+RDEPEND="${RDEPEND}
+ sys-devel/gettext"
+DEPEND="${DEPEND}
+ sys-devel/gettext"
+
+ruby_add_bdepend "test? ( || ( virtual/ruby-test-unit dev-ruby/test-unit:2 ) )"
+
+all_ruby_prepare() {
+ # Allison 2.0.3 produces illegal HTML which markaby doesn't like.
+ sed -i '/allison/d' Rakefile || die
+
+ epatch "${FILESDIR}/${PN}-rubygems-load-path.patch"
+}
+
+each_ruby_test() {
+ # Upstream tries to daisy-chain rake calls but they fail badly
+ # with our setup, so run it manually.
+ pushd test
+ ${RUBY} -S rake test || die "tests failed"
+ popd
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ insinto /usr/share/doc/${PF}
+ doins -r samples || die
+}