diff options
author | Hans de Graaff <graaff@gentoo.org> | 2018-05-13 09:48:06 +0200 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2018-05-14 06:23:12 +0200 |
commit | 577410d6e2e9ec67994a881a7dc0ba87f253660a (patch) | |
tree | ad2dfc5247c80694f87ed023fcd1b6edac8b80af /dev-ruby/redcloth | |
parent | dev-ruby/websocket-driver: add ruby25 (diff) | |
download | gentoo-577410d6e2e9ec67994a881a7dc0ba87f253660a.tar.gz gentoo-577410d6e2e9ec67994a881a7dc0ba87f253660a.tar.bz2 gentoo-577410d6e2e9ec67994a881a7dc0ba87f253660a.zip |
dev-ruby/redcloth: add ruby25
Backport an upstream patch for ruby25 compatability.
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-ruby/redcloth')
-rw-r--r-- | dev-ruby/redcloth/files/redcloth-4.3.2-load-documents.patch | 30 | ||||
-rw-r--r-- | dev-ruby/redcloth/redcloth-4.3.2-r1.ebuild | 59 |
2 files changed, 89 insertions, 0 deletions
diff --git a/dev-ruby/redcloth/files/redcloth-4.3.2-load-documents.patch b/dev-ruby/redcloth/files/redcloth-4.3.2-load-documents.patch new file mode 100644 index 000000000000..f390afd58268 --- /dev/null +++ b/dev-ruby/redcloth/files/redcloth-4.3.2-load-documents.patch @@ -0,0 +1,30 @@ +From 00b55ace17ed408b1b6129e1ba6c90fd4f0a6d2c Mon Sep 17 00:00:00 2001 +From: Matijs van Zuijlen <matijs@matijs.net> +Date: Tue, 29 Aug 2017 08:08:36 +0200 +Subject: [PATCH] Replace deprecated YAML.load_documents + +The .load_documents method is deprecated and seems to have been removed +entirely in the upcoming Ruby 2.5. +--- + spec/spec_helper.rb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb +index af6279a..74a5cae 100644 +--- a/spec/spec_helper.rb ++++ b/spec/spec_helper.rb +@@ -26,11 +26,11 @@ def fixtures + Dir[File.join(File.dirname(__FILE__), *%w[fixtures *.yml])].each do |testfile| + testgroup = File.basename(testfile, '.yml') + num = 0 +- YAML::load_documents(File.open(testfile)) do |doc| ++ YAML::load_stream(File.open(testfile)) do |doc| + name = doc['name'] || num + @fixtures["#{testgroup} #{name}"] = doc + num += 1 + end + end + @fixtures +-end +\ No newline at end of file ++end diff --git a/dev-ruby/redcloth/redcloth-4.3.2-r1.ebuild b/dev-ruby/redcloth/redcloth-4.3.2-r1.ebuild new file mode 100644 index 000000000000..06d1e166eb64 --- /dev/null +++ b/dev-ruby/redcloth/redcloth-4.3.2-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +USE_RUBY="ruby23 ruby24 ruby25" + +RUBY_FAKEGEM_NAME="RedCloth" + +RUBY_FAKEGEM_RECIPE_TEST="rspec" +RUBY_FAKEGEM_TASK_DOC="" + +RUBY_FAKEGEM_DOCDIR="doc" + +RUBY_FAKEGEM_EXTRADOC="README.rdoc CHANGELOG" + +RUBY_FAKEGEM_REQUIRE_PATHS="lib/case_sensitive_require" + +inherit ruby-fakegem versionator + +DESCRIPTION="A module for using Textile in Ruby" +HOMEPAGE="http://redcloth.org/" + +GITHUB_USER=jgarber +SRC_URI="https://github.com/${GITHUB_USER}/redcloth/archive/v${PV}.tar.gz -> ${RUBY_FAKEGEM_NAME}-${PV}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +DEPEND+=" =dev-util/ragel-6*" + +PATCHES=( "${FILESDIR}/${P}-load-documents.patch" ) + +ruby_add_bdepend " + >=dev-ruby/rake-0.8.7 + >=dev-ruby/rake-compiler-0.7.1 + test? ( >=dev-ruby/diff-lcs-1.1.2 )" + +pkg_setup() { + ruby-ng_pkg_setup + + # Export the VERBOSE variable to avoid remapping of stdout and + # stderr, and that breaks because of bad interactions between + # echoe, Ruby and Gentoo. + export VERBOSE=1 +} + +all_ruby_prepare() { + sed -i -e '/[Bb]undler/d' Rakefile ${PN}.gemspec || die + rm -f tasks/{release,rspec,rvm}.rake || die +} + +each_ruby_compile() { + # We cannot run this manually easily, because Ragel re-generation + # is a mess + ${RUBY} -S rake compile || die "rake compile failed" +} |