summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2014-04-21 07:35:43 +0000
committerHans de Graaff <graaff@gentoo.org>2014-04-21 07:35:43 +0000
commit34295e60093596cbc31cb8e4b5399e568816fb0a (patch)
treea5458ea318ded17a5d8eabc786c6cdef8c19ac99 /eclass/ruby-fakegem.eclass
parentUse multilib_build_binaries consistently, and the new multilib_native_use* fu... (diff)
downloadgentoo-2-34295e60093596cbc31cb8e4b5399e568816fb0a.tar.gz
gentoo-2-34295e60093596cbc31cb8e4b5399e568816fb0a.tar.bz2
gentoo-2-34295e60093596cbc31cb8e4b5399e568816fb0a.zip
Read the YAML metadata with UTF-8 by default and make an exception for older ruby targets, since all new targets will support (and need) the UTF-8 flag. Fixes bug 504642.
Diffstat (limited to 'eclass/ruby-fakegem.eclass')
-rw-r--r--eclass/ruby-fakegem.eclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index 05c3fafc1eb2..153c3fd7534a 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.40 2013/11/09 10:22:06 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.41 2014/04/21 07:35:43 graaff Exp $
# @ECLASS: ruby-fakegem.eclass
# @MAINTAINER:
@@ -253,11 +253,11 @@ ruby_fakegem_gemspec_gemspec() {
# rubygems creates an installation from a .gem file.
ruby_fakegem_metadata_gemspec() {
case ${RUBY} in
- *ruby19)
- ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2
+ *jruby)
+ ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1').read).to_ruby" > $2
;;
*)
- ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1').read).to_ruby" > $2
+ ${RUBY} -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2
;;
esac
}
@@ -287,7 +287,7 @@ ruby_fakegem_genspec() {
# so better taking this into consideration.
local quoted_description=${DESCRIPTION//\"/\\\"}
cat - > $1 <<EOF
-# generated by ruby-fakegem.eclass $Revision: 1.40 $
+# generated by ruby-fakegem.eclass $Revision: 1.41 $
Gem::Specification.new do |s|
s.name = "${RUBY_FAKEGEM_NAME}"
s.version = "${RUBY_FAKEGEM_VERSION}"
@@ -337,7 +337,7 @@ ruby_fakegem_binwrapper() {
#!${rubycmd}
# This is a simplified version of the RubyGems wrapper
#
-# Generated by ruby-fakegem.eclass $Revision: 1.40 $
+# Generated by ruby-fakegem.eclass $Revision: 1.41 $
require 'rubygems'