Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 284655 Details for
Bug 363079
dev-ruby/erubis fails tests with ruby 1.9
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
new fixed ebuild and patch
erubis-2.7.0-fix.patch (text/plain), 4.76 KB, created by
Shunsuke Shimizu
on 2011-08-25 17:31:26 UTC
(
hide
)
Description:
new fixed ebuild and patch
Filename:
MIME Type:
Creator:
Shunsuke Shimizu
Created:
2011-08-25 17:31:26 UTC
Size:
4.76 KB
patch
obsolete
>diff -urN erubis.orig/erubis-2.7.0-r1.ebuild erubis/erubis-2.7.0-r1.ebuild >--- erubis.orig/erubis-2.7.0-r1.ebuild 1970-01-01 09:00:00.000000000 +0900 >+++ erubis/erubis-2.7.0-r1.ebuild 2011-08-26 01:27:05.137927270 +0900 >@@ -0,0 +1,49 @@ >+# Copyright 1999-2011 Gentoo Foundation >+# Distributed under the terms of the GNU General Public License v2 >+# $Header: >+ >+EAPI="2" >+ >+USE_RUBY="ruby18 ree18 ruby19 jruby" >+ >+RUBY_FAKEGEM_TASK_DOC="" >+RUBY_FAKEGEM_TASK_TEST="" >+ >+RUBY_FAKEGEM_DOCDIR="doc" >+RUBY_FAKEGEM_EXTRADOC="CHANGES.txt README.txt" >+ >+inherit ruby-fakegem >+ >+DESCRIPTION="Erubis is an implementation of eRuby" >+HOMEPAGE="http://www.kuwata-lab.com/erubis/" >+ >+LICENSE="MIT" >+SLOT="0" >+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-solaris" >+IUSE="" >+ >+ruby_add_bdepend "test? ( virtual/ruby-test-unit )" >+ruby_add_rdepend ">=dev-ruby/abstract-1.0.0" >+ >+each_ruby_prepare() { >+ # Fix case so that the associated test will work. Reported as http://rubyforge.org/tracker/index.php?func=detail&aid=27330&group_id=1320&atid=5201 >+ mv test/data/users-guide/Example.ejava test/data/users-guide/example.ejava || die >+ >+ epatch ${FILESDIR}/${PN}-test-fixrubybin.patch >+ >+ # jruby seems to have a different ordering of variables. >+ # http://rubyforge.org/tracker/?func=detail&aid=28555&group_id=1320&atid=5201 >+ case ${RUBY} in >+ *jruby) >+ sed -i -e 's/"x", "_buf"/"_buf", "x"/' test/data/users-guide/main_program2.result >+ ;; >+ *) >+ ;; >+ esac >+} >+ >+each_ruby_test() { >+ epatch ${FILESDIR}/${PN}-test-fixrubybin2-fix.patch >+ RUBYLIB="${S}/lib" RUBYBIN="${RUBY}" ${RUBY} "${S}/test/test.rb" || die >+ epatch ${FILESDIR}/${PN}-test-fixrubybin2-recover.patch >+} >diff -urN erubis.orig/files/erubis-test-fixrubybin.patch erubis/files/erubis-test-fixrubybin.patch >--- erubis.orig/files/erubis-test-fixrubybin.patch 1970-01-01 09:00:00.000000000 +0900 >+++ erubis/files/erubis-test-fixrubybin.patch 2011-08-26 02:08:12.877954628 +0900 >@@ -0,0 +1,24 @@ >+diff -urN erubis-2.7.0.orig/test/test-main.rb erubis-2.7.0/test/test-main.rb >+--- erubis-2.7.0.orig/test/test-main.rb 2011-08-25 22:36:46.697813982 +0900 >++++ erubis-2.7.0/test/test-main.rb 2011-08-26 02:01:01.447949845 +0900 >+@@ -235,7 +235,7 @@ >+ _test() >+ # >+ _with_dummy_file do |filepath| >+- actual = `erubis #{@options} #{filepath}` >++ actual = `#{ENV['RUBYBIN']} #{ENV['S']}/bin/erubis #{@options} #{filepath}` >+ assert_equal @expected, actual >+ end >+ end >+diff -urN erubis-2.7.0.orig/test/test-users-guide.rb erubis-2.7.0/test/test-users-guide.rb >+--- erubis-2.7.0.orig/test/test-users-guide.rb 2011-08-25 22:36:46.707813984 +0900 >++++ erubis-2.7.0/test/test-users-guide.rb 2011-08-25 23:56:56.027867302 +0900 >+@@ -44,6 +44,8 @@ >+ expected.sub!('["_context", "x", "_buf"]', '["_buf", "x", "_context"]') >+ end >+ end >++ command.sub!(/^erubis/,"ruby #{ENV['S']}/bin/erubis") >++ command.sub!(/^ruby/,ENV['RUBYBIN']) >+ result = `#{command}` >+ assert_text_equal(expected, result) >+ end >diff -urN erubis.orig/files/erubis-test-fixrubybin2-fix.patch erubis/files/erubis-test-fixrubybin2-fix.patch >--- erubis.orig/files/erubis-test-fixrubybin2-fix.patch 1970-01-01 09:00:00.000000000 +0900 >+++ erubis/files/erubis-test-fixrubybin2-fix.patch 2011-08-26 01:50:46.717943031 +0900 >@@ -0,0 +1,12 @@ >+diff -urN erubis-2.7.0.orig/lib/erubis/main.rb erubis-2.7.0/lib/erubis/main.rb >+--- erubis-2.7.0.orig/lib/erubis/main.rb 2011-08-25 22:36:46.697813982 +0900 >++++ erubis-2.7.0/lib/erubis/main.rb 2011-08-26 01:22:22.757924141 +0900 >+@@ -470,7 +470,7 @@ >+ def check_syntax(filename, src) >+ require 'open3' >+ #command = (ENV['_'] || 'ruby') + ' -wc' # ENV['_'] stores command name >+- bin = ENV['_'] && File.basename(ENV['_']) =~ /^ruby/ ? ENV['_'] : 'ruby' >++ bin = ENV['RUBYBIN'] >+ command = bin + ' -wc' >+ stdin, stdout, stderr = Open3.popen3(command) >+ stdin.write(src) >diff -urN erubis.orig/files/erubis-test-fixrubybin2-recover.patch erubis/files/erubis-test-fixrubybin2-recover.patch >--- erubis.orig/files/erubis-test-fixrubybin2-recover.patch 1970-01-01 09:00:00.000000000 +0900 >+++ erubis/files/erubis-test-fixrubybin2-recover.patch 2011-08-26 01:26:30.497926886 +0900 >@@ -0,0 +1,12 @@ >+diff -urN erubis-2.7.0.orig/lib/erubis/main.rb erubis-2.7.0/lib/erubis/main.rb >+--- erubis-2.7.0.orig/lib/erubis/main.rb 2011-08-25 22:36:46.697813982 +0900 >++++ erubis-2.7.0/lib/erubis/main.rb 2011-08-26 01:22:22.757924141 +0900 >+@@ -470,7 +470,7 @@ >+ def check_syntax(filename, src) >+ require 'open3' >+ #command = (ENV['_'] || 'ruby') + ' -wc' # ENV['_'] stores command name >+- bin = ENV['RUBYBIN'] >++ bin = ENV['_'] && File.basename(ENV['_']) =~ /^ruby/ ? ENV['_'] : 'ruby' >+ command = bin + ' -wc' >+ stdin, stdout, stderr = Open3.popen3(command) >+ stdin.write(src)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 363079
:
269469
|
284627
| 284655