summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2023-12-09 09:27:06 +0100
committerHans de Graaff <graaff@gentoo.org>2023-12-09 09:27:18 +0100
commit32101c8c3c552785c03b2021b07f80068465e68a (patch)
tree3b053b801f81e8764c7a05e85ac684f68e602eba /dev-ruby
parentdev-ruby/rdoc: drop 6.4.0 (diff)
downloadgentoo-32101c8c3c552785c03b2021b07f80068465e68a.tar.gz
gentoo-32101c8c3c552785c03b2021b07f80068465e68a.tar.bz2
gentoo-32101c8c3c552785c03b2021b07f80068465e68a.zip
dev-ruby/org-ruby: add 0.9.12_p20200519
Add an upstream snapshot since the gem has not been released in many years. Also fix the File.exists? deprecation to allow ruby32. Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/org-ruby/Manifest1
-rw-r--r--dev-ruby/org-ruby/files/org-ruby-0.9.12-file-exists.patch36
-rw-r--r--dev-ruby/org-ruby/org-ruby-0.9.12_p20200519.ebuild33
3 files changed, 70 insertions, 0 deletions
diff --git a/dev-ruby/org-ruby/Manifest b/dev-ruby/org-ruby/Manifest
index 64b9d2e10763..8507c48f7bf3 100644
--- a/dev-ruby/org-ruby/Manifest
+++ b/dev-ruby/org-ruby/Manifest
@@ -1 +1,2 @@
DIST org-ruby-0.9.12.tar.gz 143472 BLAKE2B c90e0f664f64be0449e63d717441f3c8aac9957c3b892392c8425847ea42dd23e3b7a598f57969432601ba9c6208633c7aa6e101a4684db2f68c07511bcb0458 SHA512 040c7bc9d9727fcec9bbd7ed4994ca489121c103d58242f98d340b4149f94cb97fc0bbc670bbd5dfba5a11de53930b579a33b6b1ffa343c7f2602674ec65aa07
+DIST org-ruby-0.9.12_p20200519.tar.gz 151533 BLAKE2B 8a4f11ffc6ddf8019a4df5924d64c31f2a50786d2b4871967f0b178095cbb3ca46084824293568b974e1d79aa6a4207558da0dcb08569de12a89d0b6aac3344e SHA512 ff55464fff4a0e20bf9aaa7fecb4622f1a322228add113e7b9e465009c6177b7c97332c6681c57d5d6e2967e7215a915e5eb99148eb311a0b890d8e48acf6e70
diff --git a/dev-ruby/org-ruby/files/org-ruby-0.9.12-file-exists.patch b/dev-ruby/org-ruby/files/org-ruby-0.9.12-file-exists.patch
new file mode 100644
index 000000000000..04d3c8ba9ad4
--- /dev/null
+++ b/dev-ruby/org-ruby/files/org-ruby-0.9.12-file-exists.patch
@@ -0,0 +1,36 @@
+commit c80af35e142d7705a367b5b39545fbba5b1f9bc2
+Author: Hans de Graaff <hans@degraaff.org>
+Date: Sat Dec 9 09:23:29 2023 +0100
+
+ Use non-deprecated File.exist? method
+
+ File.exists? has been deprecated for some time and is no longer
+ present in Ruby 3.2. With this change the specs pass again on Ruby
+ 3.2.
+
+diff --git a/lib/org-ruby/output_buffer.rb b/lib/org-ruby/output_buffer.rb
+index 90a0aae..3179cd5 100644
+--- a/lib/org-ruby/output_buffer.rb
++++ b/lib/org-ruby/output_buffer.rb
+@@ -137,7 +137,7 @@ module Orgmode
+ end
+
+ def do_custom_markup
+- if File.exists? @options[:markup_file]
++ if File.exist? @options[:markup_file]
+ load_custom_markup
+ if @custom_blocktags.empty?
+ no_valid_markup_found
+diff --git a/lib/org-ruby/parser.rb b/lib/org-ruby/parser.rb
+index a57fd9e..192b855 100644
+--- a/lib/org-ruby/parser.rb
++++ b/lib/org-ruby/parser.rb
+@@ -129,7 +129,7 @@ module Orgmode
+
+ # Check include file availability and permissions
+ def check_include_file(file_path)
+- can_be_included = File.exists? file_path
++ can_be_included = File.exist? file_path
+
+ if not ENV['ORG_RUBY_INCLUDE_ROOT'].nil?
+ # Ensure we have full paths
diff --git a/dev-ruby/org-ruby/org-ruby-0.9.12_p20200519.ebuild b/dev-ruby/org-ruby/org-ruby-0.9.12_p20200519.ebuild
new file mode 100644
index 000000000000..c23ffde5d3f9
--- /dev/null
+++ b/dev-ruby/org-ruby/org-ruby-0.9.12_p20200519.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby31 ruby32"
+
+COMMIT=7a28c2e6e91cdaceb1fddc2d870f4458632816e8
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+RUBY_FAKEGEM_RECIPE_DOC="none"
+RUBY_FAKEGEM_EXTRADOC="README.org History.org"
+RUBY_FAKEGEM_GEMSPEC="org-ruby.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Ruby routines for parsing org-mode files"
+HOMEPAGE="https://github.com/wallyqs/org-ruby"
+SRC_URI="https://github.com/wallyqs/org-ruby/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+RUBY_S="${PN}-${COMMIT}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+PATCHES=( "${FILESDIR}/org-ruby-0.9.12-file-exists.patch" )
+
+ruby_add_rdepend ">=dev-ruby/rubypants-0.2:0"
+ruby_add_bdepend "test? ( dev-ruby/tilt )"
+
+all_ruby_prepare() {
+ sed -i -e '1irequire "pathname"' spec/spec_helper.rb || die
+}