summaryrefslogtreecommitdiff
path: root/dev-ruby/asciidoctor/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-07 17:30:28 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-07 17:30:28 +0100
commitdebb2c431b40a6b4750a39956cc5fcfa5a4a6476 (patch)
tree5c5fceb399f1dddaf02d4d8da8f674106cede374 /dev-ruby/asciidoctor/files
parenta17b25a10359070f9527893d861369d378021aa9 (diff)
gentoo auto-resync : 07:04:2023 - 17:30:27
Diffstat (limited to 'dev-ruby/asciidoctor/files')
-rw-r--r--dev-ruby/asciidoctor/files/asciidoctor-2.0.18-haml-6.patch130
-rw-r--r--dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch29
2 files changed, 159 insertions, 0 deletions
diff --git a/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-haml-6.patch b/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-haml-6.patch
new file mode 100644
index 000000000000..b6896999f838
--- /dev/null
+++ b/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-haml-6.patch
@@ -0,0 +1,130 @@
+https://sources.debian.org/patches/asciidoctor/2.0.18-2/0001-Port-tests-to-haml-6.patch/ (backport)
+https://github.com/asciidoctor/asciidoctor/pull/4395
+
+From 25ee484dd66cc813eaa421d1c104ae64478e51ff Mon Sep 17 00:00:00 2001
+From: Antonio Terceiro <terceiro@debian.org>
+Date: Mon, 26 Dec 2022 13:11:36 -0300
+Subject: [PATCH] Port tests to haml 6
+
+Forwarded: https://github.com/asciidoctor/asciidoctor/pull/4395
+Fixes: #4382
+--- a/asciidoctor.gemspec
++++ b/asciidoctor.gemspec
+@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
+ s.add_development_dependency 'cucumber', '~> 3.1.0'
+ # erubi is needed for testing alternate eRuby impls
+ s.add_development_dependency 'erubi', '~> 1.10.0'
+- s.add_development_dependency 'haml', '~> 5.2.0'
++ s.add_development_dependency 'haml', '~> 6.1'
+ s.add_development_dependency 'minitest', '~> 5.14.0'
+ s.add_development_dependency 'nokogiri', '~> 1.10.0'
+ s.add_development_dependency 'rake', '~> 12.3.0'
+--- a/lib/asciidoctor/converter/template.rb
++++ b/lib/asciidoctor/converter/template.rb
+@@ -29,7 +29,7 @@ class Converter::TemplateConverter < Con
+ erb: { trim: 0 },
+ # TODO line 466 of haml/compiler.rb sorts the attributes; file an issue to make this configurable
+ # NOTE AsciiDoc syntax expects HTML/XML output to use double quotes around attribute values
+- haml: { format: :xhtml, attr_wrapper: '"', escape_attrs: false, ugly: true },
++ haml: { format: :xhtml, attr_quote: '"', escape_attrs: false, ugly: true },
+ slim: { disable_escape: true, sort_attrs: false, pretty: false },
+ }
+
+--- a/test/converter_test.rb
++++ b/test/converter_test.rb
+@@ -9,7 +9,7 @@ context 'Converter' do
+ assert_kind_of Asciidoctor::Converter::CompositeConverter, doc.converter
+ selected = doc.converter.find_converter('paragraph')
+ assert_kind_of Asciidoctor::Converter::TemplateConverter, selected
+- assert_kind_of Tilt::HamlTemplate, selected.templates['paragraph']
++ assert_kind_of Haml::Template, selected.templates['paragraph']
+ assert_equal :html5, selected.templates['paragraph'].options[:format]
+ end
+
+@@ -18,7 +18,7 @@ context 'Converter' do
+ assert_kind_of Asciidoctor::Converter::CompositeConverter, doc.converter
+ selected = doc.converter.find_converter('paragraph')
+ assert_kind_of Asciidoctor::Converter::TemplateConverter, selected
+- assert_kind_of Tilt::HamlTemplate, selected.templates['paragraph']
++ assert_kind_of Haml::Template, selected.templates['paragraph']
+ assert_equal :xhtml, selected.templates['paragraph'].options[:format]
+ end
+
+@@ -95,7 +95,7 @@ context 'Converter' do
+ %w(paragraph sidebar).each do |node_name|
+ selected = doc.converter.find_converter node_name
+ assert_kind_of Asciidoctor::Converter::TemplateConverter, selected
+- assert_kind_of Tilt::HamlTemplate, selected.templates[node_name]
++ assert_kind_of Haml::Template, selected.templates[node_name]
+ assert_equal %(block_#{node_name}.html.haml), File.basename(selected.templates[node_name].file)
+ end
+ end
+@@ -126,7 +126,7 @@ context 'Converter' do
+ %w(paragraph).each do |node_name|
+ selected = doc.converter.find_converter node_name
+ assert_kind_of Asciidoctor::Converter::TemplateConverter, selected
+- assert_kind_of Tilt::HamlTemplate, selected.templates[node_name]
++ assert_kind_of Haml::Template, selected.templates[node_name]
+ assert_equal %(block_#{node_name}.xml.haml), File.basename(selected.templates[node_name].file)
+ end
+ end
+@@ -215,7 +215,7 @@ context 'Converter' do
+ refute_empty caches[:templates]
+ paragraph_template = caches[:templates].values.find {|t| File.basename(t.file) == 'block_paragraph.html.haml' }
+ refute_nil paragraph_template
+- assert_kind_of ::Tilt::HamlTemplate, paragraph_template
++ assert_kind_of Haml::Template, paragraph_template
+ end
+
+ test 'should be able to disable template cache' do
+--- a/test/fixtures/custom-backends/haml/docbook5/block_paragraph.xml.haml
++++ b/test/fixtures/custom-backends/haml/docbook5/block_paragraph.xml.haml
+@@ -1,6 +1,6 @@
+ - if title?
+ %formalpara{'xml:id'=>@id, role: (attr :role), xreflabel: (attr :reftext)}
+- %title=title
+- %para=content
++ %title!=title
++ %para!=content
+ - else
+- %para{'xml:id'=>@id, role: (attr :role), xreflabel: (attr :reftext)}=content
++ %para{'xml:id'=>@id, role: (attr :role), xreflabel: (attr :reftext)}!=content
+--- a/test/fixtures/custom-backends/haml/html5-tweaks/block_paragraph.html.haml
++++ b/test/fixtures/custom-backends/haml/html5-tweaks/block_paragraph.html.haml
+@@ -1 +1 @@
+-%p=content
++%p!=content
+--- a/test/fixtures/custom-backends/haml/html5-tweaks/embedded.html.haml
++++ b/test/fixtures/custom-backends/haml/html5-tweaks/embedded.html.haml
+@@ -1 +1 @@
+-=content
++!=content
+--- a/test/fixtures/custom-backends/haml/html5/block_paragraph.html.haml
++++ b/test/fixtures/custom-backends/haml/html5/block_paragraph.html.haml
+@@ -1,3 +1,3 @@
+ - if title?
+- .title=title
+-%p{id: @id, class: (attr 'role')}=content
++ .title!=title
++%p{id: @id, class: (attr 'role')}!=content
+--- a/test/fixtures/custom-backends/haml/html5/block_sidebar.html.haml
++++ b/test/fixtures/custom-backends/haml/html5/block_sidebar.html.haml
+@@ -1,5 +1,5 @@
+ %aside{id: @id, class: (attr 'role')}
+ - if title?
+ %header
+- %h1=title
+- =content.chomp
++ %h1!=title
++ !=content.chomp
+--- a/test/invoker_test.rb
++++ b/test/invoker_test.rb
+@@ -616,7 +616,7 @@ context 'Invoker' do
+ assert_kind_of Asciidoctor::Converter::CompositeConverter, doc.converter
+ selected = doc.converter.find_converter 'paragraph'
+ assert_kind_of Asciidoctor::Converter::TemplateConverter, selected
+- assert_kind_of Tilt::HamlTemplate, selected.templates['paragraph']
++ assert_kind_of Haml::Template, selected.templates['paragraph']
+ end
+
+ test 'should load custom templates from multiple template directories' do
diff --git a/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch b/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch
new file mode 100644
index 000000000000..86e577c796ec
--- /dev/null
+++ b/dev-ruby/asciidoctor/files/asciidoctor-2.0.18-ruby32.patch
@@ -0,0 +1,29 @@
+https://github.com/asciidoctor/asciidoctor/commit/b3c05398b1b4b483fe5f9c9ef89dc772863cf6f1
+https://src.fedoraproject.org/rpms/rubygem-asciidoctor/raw/rawhide/f/0001-resolves-4390-fix-call-order-so-use-of-an-include-fi.patch
+
+From b3c05398b1b4b483fe5f9c9ef89dc772863cf6f1 Mon Sep 17 00:00:00 2001
+From: Dan Allen <dan.j.allen@gmail.com>
+Date: Mon, 20 Feb 2023 23:47:59 -0700
+Subject: [PATCH] resolves #4390 fix call order so use of an include file with
+ invalid encoding continues to raise error when using Ruby >= 3.2.0
+
+--- a/lib/asciidoctor/reader.rb
++++ b/lib/asciidoctor/reader.rb
+@@ -1197,15 +1197,16 @@ def preprocess_include_directive target, attrlist
+ push_include inc_lines, inc_path, relpath, inc_offset, parsed_attrs
+ end
+ else
++ inc_content = nil
+ begin
+ # NOTE read content before shift so cursor is only advanced if IO operation succeeds
+ inc_content = reader.call(inc_path, read_mode) {|f| f.read }
+ shift
+- push_include inc_content, inc_path, relpath, 1, parsed_attrs
+ rescue
+ logger.error message_with_context %(include #{target_type} not readable: #{inc_path}), source_location: cursor
+ return replace_next_line %(Unresolved directive in #{@path} - include::#{expanded_target}[#{attrlist}])
+ end
++ push_include inc_content, inc_path, relpath, 1, parsed_attrs
+ end
+ true
+ end