summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2018-02-08 07:20:38 +0100
committerHans de Graaff <graaff@gentoo.org>2018-02-08 07:25:05 +0100
commita8ee3e2c4e7439baab11db9f6f7518da6390dc66 (patch)
tree2a0efb56c8e62aee76157c2b0db325778b5806ff
parentdev-ruby/pundit: add ruby24 (diff)
downloadgentoo-a8ee3e2c.tar.gz
gentoo-a8ee3e2c.tar.bz2
gentoo-a8ee3e2c.zip
dev-ruby/pygments_rb: add 1.2.1
Package-Manager: Portage-2.3.19, Repoman-2.3.6
-rw-r--r--dev-ruby/pygments_rb/Manifest1
-rw-r--r--dev-ruby/pygments_rb/pygments_rb-1.2.1.ebuild62
2 files changed, 63 insertions, 0 deletions
diff --git a/dev-ruby/pygments_rb/Manifest b/dev-ruby/pygments_rb/Manifest
index 6083750717d5..8083ec0777dd 100644
--- a/dev-ruby/pygments_rb/Manifest
+++ b/dev-ruby/pygments_rb/Manifest
@@ -1 +1,2 @@
DIST pygments.rb-1.1.2.gem 1169920 BLAKE2B 3a864349dfb93f0a54cbe31c21afc1a8a4123f7e1e8e498f92ee19a6367d4dad318e07cd78d6e9aa74834c77e4e0bd6e9c8f12519e0ca2ef104099bc3960e0d5 SHA512 dee41bf20142b6a63396504b734c183049f84629e7a943bfb361458f6f8d55e9f84ac6c28bac069d839c519eaf562bd73c74e422ebaf750a7430690a8fad043c
+DIST pygments.rb-1.2.1.gem 1176064 BLAKE2B 7a6651606a433a9f15853ee06c3fe9a02d266f9441a08cc92c0db4ba679a97a2a25aaa4e96a621fbda0553e9b0c995ce53c6f828793f4937de12b3089f12963c SHA512 f0fc63ec028169872e28e2181c6a10c8a3f5e7f07074ba9f43475a0b5aa403a03d7045abb03433b600ef3d74c460556355b4ee64be598d3b93ddb1e0bb306259
diff --git a/dev-ruby/pygments_rb/pygments_rb-1.2.1.ebuild b/dev-ruby/pygments_rb/pygments_rb-1.2.1.ebuild
new file mode 100644
index 000000000000..0f9ba513dcd7
--- /dev/null
+++ b/dev-ruby/pygments_rb/pygments_rb-1.2.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+USE_RUBY="ruby22 ruby23 ruby24"
+PYTHON_COMPAT=( python2_7 )
+
+RUBY_FAKEGEM_NAME="pygments.rb"
+MY_P="${RUBY_FAKEGEM_NAME}-${PV}"
+
+RUBY_FAKEGEM_RECIPE_TEST="rake"
+RUBY_FAKEGEM_RECIPE_DOC="none"
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
+
+RUBY_FAKEGEM_GEMSPEC="${RUBY_FAKEGEM_NAME}.gemspec"
+
+inherit ruby-fakegem python-single-r1
+
+DESCRIPTION="Pygments syntax highlighting in ruby"
+HOMEPAGE="https://github.com/tmm1/pygments.rb"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+REQUIRED_USE+=" ${PYTHON_REQUIRED_USE}"
+
+RUBY_S="${MY_P}"
+
+RDEPEND+="
+ ${PYTHON_DEPS}
+ >=dev-python/pygments-2.2.0[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]"
+DEPEND+=" test? ( ${RDEPEND} )"
+
+ruby_add_rdepend ">=dev-ruby/multi_json-1.0.0"
+ruby_add_bdepend "dev-ruby/rake-compiler"
+
+pkg_setup() {
+ ruby-ng_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+all_ruby_prepare() {
+ sed -i -e '/[Bb]undler/d' Rakefile || die
+ sed -i -e '/s.files/d' pygments.rb.gemspec || die
+ python_fix_shebang lib/pygments/mentos.py
+ # we are loosing a "custom github lexer here", no idea what it is,
+ # but if we need it, it should go into dev-python/pygments
+ rm -r vendor lexers || die "removing bundled libs failed"
+}
+
+each_ruby_compile() {
+ # regenerate the lexer cache, based on the system pygments pkg
+ ${RUBY} cache-lexers.rb || die "regenerating lexer cache failed"
+}
+
+each_ruby_install() {
+ each_fakegem_install
+ ruby_fakegem_doins lexers
+}