summaryrefslogtreecommitdiff
path: root/dev-ruby/coderay
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-ruby/coderay
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-ruby/coderay')
-rw-r--r--dev-ruby/coderay/Manifest1
-rw-r--r--dev-ruby/coderay/coderay-1.1.3-r2.ebuild46
-rw-r--r--dev-ruby/coderay/files/coderay-1.1.3-ruby30.patch51
-rw-r--r--dev-ruby/coderay/metadata.xml9
4 files changed, 107 insertions, 0 deletions
diff --git a/dev-ruby/coderay/Manifest b/dev-ruby/coderay/Manifest
new file mode 100644
index 000000000000..77502be2a907
--- /dev/null
+++ b/dev-ruby/coderay/Manifest
@@ -0,0 +1 @@
+DIST coderay-1.1.3.tar.gz 229139 BLAKE2B a900cc5fbac950f66814d9300876d6a273b296d07139297d5344d26c5710d23c37761e5743ef972f523afa20fa663f239c03d9d2ad47232b77e53fe5053736f0 SHA512 a5208965e8dbad53d179fdc1c57df59ba4e13522a1a57c371ccd3f9369408a1c7d878867df48b201a1d590b46ef0f9bada3f3e7810866f17d244b5b370aba3fb
diff --git a/dev-ruby/coderay/coderay-1.1.3-r2.ebuild b/dev-ruby/coderay/coderay-1.1.3-r2.ebuild
new file mode 100644
index 000000000000..1f455fb20fb3
--- /dev/null
+++ b/dev-ruby/coderay/coderay-1.1.3-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby32 ruby33 ruby34 ruby40"
+
+# The test target also contains test:exe but that requires
+# shoulda-context which we do not have packaged yet.
+RUBY_FAKEGEM_TASK_TEST="spec test:functional test:units"
+
+RUBY_FAKEGEM_TASK_DOC="doc"
+RUBY_FAKEGEM_DOCDIR="doc"
+
+RUBY_FAKEGEM_EXTRADOC="Changes-pre-1.0.textile Changes.textile FOLDERS README_INDEX.rdoc README.markdown"
+
+RUBY_FAKEGEM_GEMSPEC="coderay.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A Ruby library for syntax highlighting"
+HOMEPAGE="http://coderay.rubychan.de/"
+SRC_URI="https://github.com/rubychan/coderay/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
+IUSE=""
+
+PATCHES=("${FILESDIR}/${P}-ruby30.patch")
+
+# Redcloth is an optional but automagically tested dependency. This
+# requires redcloth-4.2.2. We don't depend on this version to make
+# bootstrapping rspec with new versions easier, since redcloth depends
+# on rake-compiler.
+
+ruby_add_bdepend "test? ( dev-ruby/rspec:3 )"
+
+all_ruby_prepare() {
+ sed -i -e "/[Bb]undler/d" Rakefile || die
+ sed -i -e '/git ls-files/ s:^:#:' -e 's/.rc.*"/"/' coderay.gemspec || die
+ sed -i -e '/simplecov/ s:^:#:' spec/spec_helper.rb test/*/*.rb || die
+
+ # Fix failing tests for lazy evaluation in ruby26
+ sed -i -e 's/\.filter$/.filter.to_a/' test/unit/filter.rb || die
+}
diff --git a/dev-ruby/coderay/files/coderay-1.1.3-ruby30.patch b/dev-ruby/coderay/files/coderay-1.1.3-ruby30.patch
new file mode 100644
index 000000000000..99ce3053a1d7
--- /dev/null
+++ b/dev-ruby/coderay/files/coderay-1.1.3-ruby30.patch
@@ -0,0 +1,51 @@
+From c1c15034749684fcad91ad2bcb2fcd2056faf18d Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Sun, 21 Feb 2021 23:04:03 +0900
+Subject: [PATCH] Fix test suite for ruby 3.0 change for methods on subclass of
+ Array
+
+With ruby 3.0, especially with https://github.com/ruby/ruby/pull/3690 ,
+for subclass of Array, `flatten` method now returns the instance of Array,
+not of the subclass.
+
+To keep the object instance of the subclass, use `flatten!` instead.
+---
+ test/unit/debug.rb | 3 ++-
+ test/unit/statistic.rb | 5 +++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/test/unit/debug.rb b/test/unit/debug.rb
+index 88baf563..b694f21e 100644
+--- a/test/unit/debug.rb
++++ b/test/unit/debug.rb
+@@ -24,7 +24,8 @@ def test_creation
+ [" \n", :space],
+ ["[]", :method],
+ [:end_line, :head],
+- ].flatten
++ ]
++ TEST_INPUT.flatten!
+ TEST_OUTPUT = <<-'DEBUG'.chomp
+ integer(10)operator((\\\))string<content(test)>head[
+
+diff --git a/test/unit/statistic.rb b/test/unit/statistic.rb
+index 1326dca6..776774d4 100644
+--- a/test/unit/statistic.rb
++++ b/test/unit/statistic.rb
+@@ -24,7 +24,8 @@ def test_creation
+ [" \n", :space],
+ ["[]", :method],
+ [:end_line, :test],
+- ].flatten
++ ]
++ TEST_INPUT.flatten!
+ TEST_OUTPUT = <<-'DEBUG'
+
+ Code Statistics
+@@ -56,4 +57,4 @@ def test_filtering_text_tokens
+ assert_equal TEST_OUTPUT, TEST_INPUT.statistic
+ end
+
+-end
+\ No newline at end of file
++end
diff --git a/dev-ruby/coderay/metadata.xml b/dev-ruby/coderay/metadata.xml
new file mode 100644
index 000000000000..c685ebad7e3a
--- /dev/null
+++ b/dev-ruby/coderay/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>