summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-01-25 01:19:31 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-01-25 01:19:31 +0000
commit69cadf0e004a2e32e3a9fb2af7d1d154986d838a (patch)
tree692d2d0f55fffa42ac0733d766ff0c06f9737f3f /dev-ruby/fast_xs
parentSecurity stablization for root exploit. CVE-2012-0056. bug #399243 (diff)
downloadgentoo-2-69cadf0e004a2e32e3a9fb2af7d1d154986d838a.tar.gz
gentoo-2-69cadf0e004a2e32e3a9fb2af7d1d154986d838a.tar.bz2
gentoo-2-69cadf0e004a2e32e3a9fb2af7d1d154986d838a.zip
Add ruby19 to the supported targets (with a patch to fix the tests).
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/fast_xs')
-rw-r--r--dev-ruby/fast_xs/ChangeLog6
-rw-r--r--dev-ruby/fast_xs/fast_xs-0.8.0.ebuild6
-rw-r--r--dev-ruby/fast_xs/files/fast_xs-0.8.0+ruby-1.9.patch23
3 files changed, 32 insertions, 3 deletions
diff --git a/dev-ruby/fast_xs/ChangeLog b/dev-ruby/fast_xs/ChangeLog
index 4d8770c3971c..eed2774d534d 100644
--- a/dev-ruby/fast_xs/ChangeLog
+++ b/dev-ruby/fast_xs/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-ruby/fast_xs
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/fast_xs/ChangeLog,v 1.3 2012/01/25 00:52:49 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/fast_xs/ChangeLog,v 1.4 2012/01/25 01:19:31 flameeyes Exp $
+
+ 25 Jan 2012; Diego E. Pettenò <flameeyes@gentoo.org>
+ +files/fast_xs-0.8.0+ruby-1.9.patch, fast_xs-0.8.0.ebuild:
+ Add ruby19 to the supported targets (with a patch to fix the tests).
*fast_xs-0.8.0 (25 Jan 2012)
diff --git a/dev-ruby/fast_xs/fast_xs-0.8.0.ebuild b/dev-ruby/fast_xs/fast_xs-0.8.0.ebuild
index 6494f85656b5..110845c2cf27 100644
--- a/dev-ruby/fast_xs/fast_xs-0.8.0.ebuild
+++ b/dev-ruby/fast_xs/fast_xs-0.8.0.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/fast_xs/fast_xs-0.8.0.ebuild,v 1.1 2012/01/25 00:52:49 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/fast_xs/fast_xs-0.8.0.ebuild,v 1.2 2012/01/25 01:19:31 flameeyes Exp $
EAPI=4
-USE_RUBY="ruby18 ree18"
+USE_RUBY="ruby18 ree18 ruby19"
RUBY_FAKEGEM_TASK_DOC="docs"
RUBY_FAKEGEM_DOCDIR="doc"
@@ -24,6 +24,8 @@ IUSE=""
ruby_add_bdepend "doc? ( >=dev-ruby/hoe-2.3.2 )"
ruby_add_bdepend "test? ( >=dev-ruby/hoe-2.3.2 virtual/ruby-test-unit )"
+RUBY_PATCHES=( "${P}+ruby-1.9.patch" )
+
each_ruby_configure() {
${RUBY} -Cext/fast_xs extconf.rb || die "extconf.rb failed"
${RUBY} -Cext/fast_xs_extra extconf.rb || die "extconf.rb failed"
diff --git a/dev-ruby/fast_xs/files/fast_xs-0.8.0+ruby-1.9.patch b/dev-ruby/fast_xs/files/fast_xs-0.8.0+ruby-1.9.patch
new file mode 100644
index 000000000000..cdd72f2db3fb
--- /dev/null
+++ b/dev-ruby/fast_xs/files/fast_xs-0.8.0+ruby-1.9.patch
@@ -0,0 +1,23 @@
+Index: fast_xs-0.8.0/test/test_erb_util_module_overrides.rb
+===================================================================
+--- fast_xs-0.8.0.orig/test/test_erb_util_module_overrides.rb
++++ fast_xs-0.8.0/test/test_erb_util_module_overrides.rb
+@@ -35,11 +35,13 @@ class TestErbUtilModuleOverrides < Test:
+
+ def test_preserve_encoding
+ foo = "foo"
+- foo.force_encoding Encoding::US_ASCII
+- assert_equal Encoding::US_ASCII, url_encode(foo).encoding
+- assert_equal Encoding::US_ASCII, html_escape(foo).encoding
+- assert_equal Encoding::US_ASCII, u(foo).encoding
+- assert_equal Encoding::US_ASCII, h(foo).encoding
++ ascii_encoding = (RUBY_VERSION =~ /1\.9/) ? Encoding::ASCII_8BIT : Encoding::US_ASCII
++
++ foo.force_encoding ascii_encoding
++ assert_equal ascii_encoding, url_encode(foo).encoding
++ assert_equal ascii_encoding, html_escape(foo).encoding
++ assert_equal ascii_encoding, u(foo).encoding
++ assert_equal ascii_encoding, h(foo).encoding
+
+ foo.force_encoding Encoding::BINARY
+ assert_equal Encoding::BINARY, url_encode(foo).encoding