Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/asciidoctor/files/, dev-ruby/asciidoctor/
Date: Mon, 28 Dec 2015 06:51:55
Message-Id: 1451285507.9c6f43d25a8d5d4b6aa6200e2152eb62387812b8.graaff@gentoo
1 commit: 9c6f43d25a8d5d4b6aa6200e2152eb62387812b8
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 28 06:51:23 2015 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 28 06:51:47 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c6f43d2
7
8 dev-ruby/asciidoctor: add 1.5.3
9
10 Package-Manager: portage-2.2.24
11
12 dev-ruby/asciidoctor/Manifest | 1 +
13 dev-ruby/asciidoctor/asciidoctor-1.5.3.ebuild | 46 ++++++++++++++++++++++
14 .../files/asciidoctor-1.5.3-slim-options.patch | 31 +++++++++++++++
15 3 files changed, 78 insertions(+)
16
17 diff --git a/dev-ruby/asciidoctor/Manifest b/dev-ruby/asciidoctor/Manifest
18 index 7d3bf99..ac84096 100644
19 --- a/dev-ruby/asciidoctor/Manifest
20 +++ b/dev-ruby/asciidoctor/Manifest
21 @@ -1 +1,2 @@
22 DIST asciidoctor-1.5.2.tar.gz 494239 SHA256 f10242d7ea5e8c3b6279c9535e67d58fb0b8ffe2c5625e7b211af3dd683dd368 SHA512 5d50134d4bed58bb5dc610929c30b1272c8d75e9748f6587a4e00cd8d76b4f86e8edd17b04a8579d984e9ce3864c3d96a81bc526988a6c6d71e418923c94d67a WHIRLPOOL 67cf1cdd71dd4819c2d829d729057ec0b7b6ac107a5754333eb257a80545c4229870a1ae83b14172bd52e5e8b145bc1f56db6bca6af341d6ee7ca6b63267e7c8
23 +DIST asciidoctor-1.5.3.tar.gz 509233 SHA256 b6aa27203bf9fc8ca55d0c0468f8f3e70ae1b3aa60f1bb50dd6aa53497275841 SHA512 17e5c930b2d2d1727b5b5f2100f6b625edf3af73e98aadf84135bdf01bbbef8587b310fe513508ae575ee6b8a08d573ac512fbfc3d6e9ea9e144048786865c35 WHIRLPOOL 9333bee73633e18b9c334d6f622df07e8d07c1a491852b710b2edc31c892ebbc00e2d915a9234253f7a13611988f8d53e3a791a73e4ca6cbd82e90444dce9fe1
24
25 diff --git a/dev-ruby/asciidoctor/asciidoctor-1.5.3.ebuild b/dev-ruby/asciidoctor/asciidoctor-1.5.3.ebuild
26 new file mode 100644
27 index 0000000..ff08e44
28 --- /dev/null
29 +++ b/dev-ruby/asciidoctor/asciidoctor-1.5.3.ebuild
30 @@ -0,0 +1,46 @@
31 +# Copyright 1999-2015 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +# $Id$
34 +
35 +EAPI=5
36 +USE_RUBY="ruby20 ruby21"
37 +
38 +RUBY_FAKEGEM_TASK_TEST="test features"
39 +RUBY_FAKEGEM_RECIPE_DOC="rdoc"
40 +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.adoc README.adoc"
41 +
42 +RUBY_FAKEGEM_EXTRAINSTALL="data"
43 +
44 +inherit ruby-fakegem
45 +
46 +DESCRIPTION="Processor for converting AsciiDoc into HTML 5, DocBook 4.5 and other formats"
47 +HOMEPAGE="https://github.com/asciidoctor/asciidoctor"
48 +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
49 +
50 +LICENSE="MIT"
51 +SLOT="0"
52 +KEYWORDS="~amd64"
53 +IUSE=""
54 +
55 +RUBY_PATCHES=( ${P}-slim-options.patch )
56 +
57 +ruby_add_bdepend "test? (
58 + dev-util/cucumber
59 + dev-ruby/rspec-expectations:*
60 + dev-ruby/asciimath
61 + dev-ruby/coderay
62 + dev-ruby/erubis
63 + dev-ruby/haml
64 + dev-ruby/nokogiri
65 + dev-ruby/slim
66 + dev-ruby/tilt )"
67 +
68 +all_ruby_prepare() {
69 + rm Gemfile || die
70 +}
71 +
72 +all_ruby_install() {
73 + all_fakegem_install
74 +
75 + doman man/asciidoctor.1
76 +}
77
78 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
79 new file mode 100644
80 index 0000000..3494269
81 --- /dev/null
82 +++ b/dev-ruby/asciidoctor/files/asciidoctor-1.5.3-slim-options.patch
83 @@ -0,0 +1,31 @@
84 +From 04b9d6153d1e289bd450a2f52bffde754ef4d1b0 Mon Sep 17 00:00:00 2001
85 +From: Antonio Terceiro <terceiro@×××××××××××××.org>
86 +Date: Tue, 17 Nov 2015 11:17:16 -0200
87 +Subject: [PATCH] Initialize slim-related attributes regardless of when slim
88 + was loaded
89 +
90 +Setting instance attributes of the Template class cannot depend on
91 +whether slim has been loaded before or not.
92 +---
93 + lib/asciidoctor/converter/template.rb | 8 ++++----
94 + 1 file changed, 4 insertions(+), 4 deletions(-)
95 +
96 +diff --git a/lib/asciidoctor/converter/template.rb b/lib/asciidoctor/converter/template.rb
97 +index 10eaa99..43be87b 100644
98 +--- a/lib/asciidoctor/converter/template.rb
99 ++++ b/lib/asciidoctor/converter/template.rb
100 +@@ -253,10 +253,10 @@ def scan_dir template_dir, pattern, template_cache = nil
101 + unless defined? ::Slim
102 + # slim doesn't get loaded by Tilt, so we have to load it explicitly
103 + Helpers.require_library 'slim'
104 +- if @safe && ::Slim::VERSION >= '3.0'
105 +- slim_asciidoc_opts = (@engine_options[:slim][:asciidoc] ||= {})
106 +- slim_asciidoc_opts[:safe] ||= @safe
107 +- end
108 ++ end
109 ++ if @safe && ::Slim::VERSION >= '3.0'
110 ++ slim_asciidoc_opts = (@engine_options[:slim][:asciidoc] ||= {})
111 ++ slim_asciidoc_opts[:safe] ||= @safe
112 + end
113 + # load include plugin when using Slim >= 2.1
114 + require 'slim/include' unless (defined? ::Slim::Include) || ::Slim::VERSION < '2.1'