summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-05-18 09:14:32 +0200
committerMichał Górny <mgorny@gentoo.org>2022-05-18 09:36:10 +0200
commitcbc86ab7d3fb2afd7f0baba35b838763a02dc398 (patch)
tree8d771094df22053f40f680c6871716b5e0626ed3
parentapp-misc/votrify: Enable py3.10 & py3.11 (diff)
downloadgentoo-cbc86ab7d3fb2afd7f0baba35b838763a02dc398.tar.gz
gentoo-cbc86ab7d3fb2afd7f0baba35b838763a02dc398.tar.bz2
gentoo-cbc86ab7d3fb2afd7f0baba35b838763a02dc398.zip
dev-ruby/rbst: Modernize, enable py3.10 & py3.11
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-ruby/rbst/rbst-0.6.5-r1.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/dev-ruby/rbst/rbst-0.6.5-r1.ebuild b/dev-ruby/rbst/rbst-0.6.5-r1.ebuild
new file mode 100644
index 00000000000..580e897b127
--- /dev/null
+++ b/dev-ruby/rbst/rbst-0.6.5-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+USE_RUBY="ruby25 ruby26 ruby27"
+
+RUBY_FAKEGEM_NAME="RbST"
+RUBY_FAKEGEM_GEMSPEC="RbST.gemspec"
+
+inherit python-single-r1 ruby-fakegem
+
+DESCRIPTION="A simple Ruby wrapper for processing rST via docutils"
+HOMEPAGE="https://github.com/xwmx/rbst/"
+SRC_URI="
+ https://github.com/xwmx/rbst/archive/${PV}.tar.gz -> ${P}.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ dev-python/docutils
+ ${PYTHON_DEPS}
+"
+DEPEND="
+ test? ( ${RDEPEND} )
+"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/minitest-5.14.0:5
+ >=dev-ruby/mocha-1.1.0:1.0
+ )
+"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ ruby-ng_pkg_setup
+}
+
+all_ruby_prepare() {
+ # do not use bundler
+ sed -i -e '/bundler/,/end/d' \
+ Rakefile test/helper.rb || die
+ # do not use python2
+ sed -i -e '/python2/,/end/d' \
+ test/test_rbst.rb || die
+ # broken by new docutils
+ sed -i -e '/it.*LaTeX/,/end/d' \
+ test/test_rbst.rb || die
+
+ # force our python version
+ sed -i -e "s:\(python_path=\"\)python:\1${EPYTHON}:" lib/rbst.rb || die
+ python_fix_shebang lib/rst2parts
+}