From 62007389099832d4e0a975fbd11c4a8a7cf0fdce Mon Sep 17 00:00:00 2001 From: Marek Szuba Date: Fri, 13 Nov 2020 15:03:06 +0100 Subject: [PATCH] dev-ruby/duktape-rb: new package Ruby bindings for dev-lang/duktape. This appears to be the only JavaScript runtime compatible with dev-ruby/execjs that is not based on Google V8 (which doesn't work on 32-bit PPC), works under Linux (unless it is somehow possible to get Apple JavaScriptCore to do so; pretty sure Windows Script Host will not), and works under C Ruby (therubyrhino is JRuby-specific). With none of the versions of net-libs/nodejs currently in the tree even compiling on ppc, we urgently need this one in order not to break Ruby on Rails in Gentoo/PPC32. On my test amd64 system, dev-ruby/execjs-2.7.0 modified to depend on dev-lang/duktape-rb both successfully detects it and passes all tests. Nb. no ruby27 support because of dependencies which don't support it yet. Signed-off-by: Marek Szuba --- dev-ruby/duktape-rb/Manifest | 1 + dev-ruby/duktape-rb/duktape-rb-2.3.0.0.ebuild | 36 +++++++++++++++++++ dev-ruby/duktape-rb/metadata.xml | 11 ++++++ 3 files changed, 48 insertions(+) create mode 100644 dev-ruby/duktape-rb/Manifest create mode 100644 dev-ruby/duktape-rb/duktape-rb-2.3.0.0.ebuild create mode 100644 dev-ruby/duktape-rb/metadata.xml diff --git a/dev-ruby/duktape-rb/Manifest b/dev-ruby/duktape-rb/Manifest new file mode 100644 index 0000000000000..a78c853e0a814 --- /dev/null +++ b/dev-ruby/duktape-rb/Manifest @@ -0,0 +1 @@ +DIST duktape-rb-2.3.0.0.tar.gz 1356464 BLAKE2B be7362ddbe6860bcb12c8f8909f66ae525585e628f7be2317b07eb07960f8f25e503dbc89e713e57144cc8108751ac856aa73a16cbd58502e928acf9e116247c SHA512 af4fd45387c3f40cd24bf3c879ef4e0d7efd43ca24f0cb866bf869db7fa9f4add9b60122c0dcfbce5491cdd7479b1414637fa1054078216b9f57fa426feb0154 diff --git a/dev-ruby/duktape-rb/duktape-rb-2.3.0.0.ebuild b/dev-ruby/duktape-rb/duktape-rb-2.3.0.0.ebuild new file mode 100644 index 0000000000000..36f25d8917dca --- /dev/null +++ b/dev-ruby/duktape-rb/duktape-rb-2.3.0.0.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +USE_RUBY="ruby25 ruby26" + +RUBY_FAKEGEM_GEMSPEC="duktape.gemspec" +RUBY_FAKEGEM_NAME="duktape" + +inherit ruby-fakegem + +MY_PN=${PN/-/\.} +MY_P=${MY_PN}-${PV} + +DESCRIPTION="Ruby bindings to the Duktape JavaScript interpeter" +HOMEPAGE="https://github.com/judofyr/duktape.rb" +SRC_URI="https://github.com/judofyr/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +# Tests require dev-ruby/sdoc, which is currently ~arch-only and fairly limited +# in the number of supported keywords. +RESTRICT="test" + +RDEPEND+="dev-lang/duktape" + +ruby_add_bdepend "dev-ruby/rake-compiler" + +RUBY_S=${MY_P} + +each_ruby_compile() { + ${RUBY} -S rake compile +} diff --git a/dev-ruby/duktape-rb/metadata.xml b/dev-ruby/duktape-rb/metadata.xml new file mode 100644 index 0000000000000..6d364fd717afc --- /dev/null +++ b/dev-ruby/duktape-rb/metadata.xml @@ -0,0 +1,11 @@ + + + + + marecki@gentoo.org + Marek Szuba + + + judofyr/duktape.rb + +