summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby/text-hyphen')
-rw-r--r--dev-ruby/text-hyphen/ChangeLog10
-rw-r--r--dev-ruby/text-hyphen/files/text-hyphen-1.0.0+ruby-1.9.patch41
-rw-r--r--dev-ruby/text-hyphen/text-hyphen-1.0.0-r1.ebuild29
3 files changed, 78 insertions, 2 deletions
diff --git a/dev-ruby/text-hyphen/ChangeLog b/dev-ruby/text-hyphen/ChangeLog
index 099159608a9b..802b0fcb2c21 100644
--- a/dev-ruby/text-hyphen/ChangeLog
+++ b/dev-ruby/text-hyphen/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-ruby/text-hyphen
-# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/text-hyphen/ChangeLog,v 1.10 2008/11/10 10:49:52 armin76 Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/text-hyphen/ChangeLog,v 1.11 2009/12/15 14:54:25 flameeyes Exp $
+
+*text-hyphen-1.0.0-r1 (15 Dec 2009)
+
+ 15 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+ +text-hyphen-1.0.0-r1.ebuild, +files/text-hyphen-1.0.0+ruby-1.9.patch:
+ Bump to ruby-fakegem, drop ppc and ppc64 keywords for now.
10 Nov 2008; Raúl Porcel <armin76@gentoo.org> text-hyphen-1.0.0.ebuild:
ia64 stable wrt #244214
diff --git a/dev-ruby/text-hyphen/files/text-hyphen-1.0.0+ruby-1.9.patch b/dev-ruby/text-hyphen/files/text-hyphen-1.0.0+ruby-1.9.patch
new file mode 100644
index 000000000000..f74e10fb30ab
--- /dev/null
+++ b/dev-ruby/text-hyphen/files/text-hyphen-1.0.0+ruby-1.9.patch
@@ -0,0 +1,41 @@
+Index: text-hyphen-1.0.0/lib/text/hyphen.rb
+===================================================================
+--- text-hyphen-1.0.0.orig/lib/text/hyphen.rb
++++ text-hyphen-1.0.0/lib/text/hyphen.rb
+@@ -269,7 +269,8 @@ private
+
+ def make_result_list(res) #:nodoc:
+ r = []
+- res.each_with_index { |c, i| r << i * (c.to_i % 2) }
++ res_a = (res.is_a? Array) ? res : res.split(//)
++ res_a.each_with_index { |c, i| r << i * (c.to_i % 2) }
+ r.reject { |i| i.to_i == 0 }
+ end
+
+Index: text-hyphen-1.0.0/tests/tc_text_hyphen.rb
+===================================================================
+--- text-hyphen-1.0.0.orig/tests/tc_text_hyphen.rb
++++ text-hyphen-1.0.0/tests/tc_text_hyphen.rb
+@@ -12,7 +12,7 @@ class Test__Text__Hyphen < Test::Unit::T
+ playback presents programmable representation)
+ POINTS = [
+ [2, 4, 8], # additional
+- [], # declination
++ [3, 5, 7], # declination
+ [2], # going
+ [4], # leaving
+ [3, 4], # maximize
+@@ -24,11 +24,11 @@ class Test__Text__Hyphen < Test::Unit::T
+ [3, 5, 8, 10] # representation
+ ]
+
+- VISUAL = %w(ad-di-tion-al declination go-ing leav-ing max-i-mizes
++ VISUAL = %w(ad-di-tion-al dec-li-na-tion go-ing leav-ing max-i-mizes
+ mul-ti-ple pe-ter play-back presents pro-gram-mable
+ rep-re-sen-ta-tion)
+
+- HY_TO = [ %w(addi- tional), [nil, 'declination'], %w(go- ing),
++ HY_TO = [ %w(addi- tional), %w(dec- lination), %w(go- ing),
+ %w(leav- ing), %w(maxi- mizes), %w(mul- tiple), %w(pe- ter),
+ %w(play- back), [nil, 'presents'], %w(pro- grammable),
+ %w(rep- resentation)]
diff --git a/dev-ruby/text-hyphen/text-hyphen-1.0.0-r1.ebuild b/dev-ruby/text-hyphen/text-hyphen-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..7149dac5be26
--- /dev/null
+++ b/dev-ruby/text-hyphen/text-hyphen-1.0.0-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/text-hyphen/text-hyphen-1.0.0-r1.ebuild,v 1.1 2009/12/15 14:54:25 flameeyes Exp $
+
+EAPI=2
+USE_RUBY="ruby18 ruby19 jruby"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_EXTRADOC="README Changelog"
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="Hyphenates various words according to the rules of the language the word is written in."
+HOMEPAGE="http://rubyforge.org/projects/text-format"
+SRC_URI="mirror://rubyforge/text-format/${P}.tar.gz"
+
+LICENSE="Ruby"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE=""
+
+ruby_add_bdepend test dev-ruby/archive-tar-minitar
+
+all_ruby_prepare() {
+ # Fix rakefile for new rake versions
+ sed -i -e 's: if t\.verbose::' Rakefile || die
+
+ epatch "${FILESDIR}/${P}+ruby-1.9.patch"
+}