commit: 9c6f43d25a8d5d4b6aa6200e2152eb62387812b8 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> AuthorDate: Mon Dec 28 06:51:23 2015 +0000 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> CommitDate: Mon Dec 28 06:51:47 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c6f43d2
dev-ruby/asciidoctor: add 1.5.3 Package-Manager: portage-2.2.24 dev-ruby/asciidoctor/Manifest | 1 + dev-ruby/asciidoctor/asciidoctor-1.5.3.ebuild | 46 ++++++++++++++++++++++ .../files/asciidoctor-1.5.3-slim-options.patch | 31 +++++++++++++++ 3 files changed, 78 insertions(+) diff --git a/dev-ruby/asciidoctor/Manifest b/dev-ruby/asciidoctor/Manifest index 7d3bf99..ac84096 100644 --- a/dev-ruby/asciidoctor/Manifest +++ b/dev-ruby/asciidoctor/Manifest @@ -1 +1,2 @@ DIST asciidoctor-1.5.2.tar.gz 494239 SHA256 f10242d7ea5e8c3b6279c9535e67d58fb0b8ffe2c5625e7b211af3dd683dd368 SHA512 5d50134d4bed58bb5dc610929c30b1272c8d75e9748f6587a4e00cd8d76b4f86e8edd17b04a8579d984e9ce3864c3d96a81bc526988a6c6d71e418923c94d67a WHIRLPOOL 67cf1cdd71dd4819c2d829d729057ec0b7b6ac107a5754333eb257a80545c4229870a1ae83b14172bd52e5e8b145bc1f56db6bca6af341d6ee7ca6b63267e7c8 +DIST asciidoctor-1.5.3.tar.gz 509233 SHA256 b6aa27203bf9fc8ca55d0c0468f8f3e70ae1b3aa60f1bb50dd6aa53497275841 SHA512 17e5c930b2d2d1727b5b5f2100f6b625edf3af73e98aadf84135bdf01bbbef8587b310fe513508ae575ee6b8a08d573ac512fbfc3d6e9ea9e144048786865c35 WHIRLPOOL 9333bee73633e18b9c334d6f622df07e8d07c1a491852b710b2edc31c892ebbc00e2d915a9234253f7a13611988f8d53e3a791a73e4ca6cbd82e90444dce9fe1 diff --git a/dev-ruby/asciidoctor/asciidoctor-1.5.3.ebuild b/dev-ruby/asciidoctor/asciidoctor-1.5.3.ebuild new file mode 100644 index 0000000..ff08e44 --- /dev/null +++ b/dev-ruby/asciidoctor/asciidoctor-1.5.3.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +USE_RUBY="ruby20 ruby21" + +RUBY_FAKEGEM_TASK_TEST="test features" +RUBY_FAKEGEM_RECIPE_DOC="rdoc" +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.adoc README.adoc" + +RUBY_FAKEGEM_EXTRAINSTALL="data" + +inherit ruby-fakegem + +DESCRIPTION="Processor for converting AsciiDoc into HTML 5, DocBook 4.5 and other formats" +HOMEPAGE="https://github.com/asciidoctor/asciidoctor" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RUBY_PATCHES=( ${P}-slim-options.patch ) + +ruby_add_bdepend "test? ( + dev-util/cucumber + dev-ruby/rspec-expectations:* + dev-ruby/asciimath + dev-ruby/coderay + dev-ruby/erubis + dev-ruby/haml + dev-ruby/nokogiri + dev-ruby/slim + dev-ruby/tilt )" + +all_ruby_prepare() { + rm Gemfile || die +} + +all_ruby_install() { + all_fakegem_install + + doman man/asciidoctor.1 +} diff --git a/dev-ruby/asciidoctor/files/asciidoctor-1.5.3-slim-options.patch b/dev-ruby/asciidoctor/files/asciidoctor-1.5.3-slim-options.patch new file mode 100644 index 0000000..3494269 --- /dev/null +++ b/dev-ruby/asciidoctor/files/asciidoctor-1.5.3-slim-options.patch @@ -0,0 +1,31 @@ +From 04b9d6153d1e289bd450a2f52bffde754ef4d1b0 Mon Sep 17 00:00:00 2001 +From: Antonio Terceiro <[email protected]> +Date: Tue, 17 Nov 2015 11:17:16 -0200 +Subject: [PATCH] Initialize slim-related attributes regardless of when slim + was loaded + +Setting instance attributes of the Template class cannot depend on +whether slim has been loaded before or not. +--- + lib/asciidoctor/converter/template.rb | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/asciidoctor/converter/template.rb b/lib/asciidoctor/converter/template.rb +index 10eaa99..43be87b 100644 +--- a/lib/asciidoctor/converter/template.rb ++++ b/lib/asciidoctor/converter/template.rb +@@ -253,10 +253,10 @@ def scan_dir template_dir, pattern, template_cache = nil + unless defined? ::Slim + # slim doesn't get loaded by Tilt, so we have to load it explicitly + Helpers.require_library 'slim' +- if @safe && ::Slim::VERSION >= '3.0' +- slim_asciidoc_opts = (@engine_options[:slim][:asciidoc] ||= {}) +- slim_asciidoc_opts[:safe] ||= @safe +- end ++ end ++ if @safe && ::Slim::VERSION >= '3.0' ++ slim_asciidoc_opts = (@engine_options[:slim][:asciidoc] ||= {}) ++ slim_asciidoc_opts[:safe] ||= @safe + end + # load include plugin when using Slim >= 2.1 + require 'slim/include' unless (defined? ::Slim::Include) || ::Slim::VERSION < '2.1'
