summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2022-05-15 09:42:10 +0200
committerHans de Graaff <graaff@gentoo.org>2022-05-15 09:50:43 +0200
commit490850e4d6f5296b12186108b65aa7643267dbb2 (patch)
tree6d7aa985f67d7c4981eca303b1da15154809b736 /dev-ruby/sprockets
parentdev-python/httpcore: Enable py3.11 (diff)
downloadgentoo-490850e4d6f5296b12186108b65aa7643267dbb2.tar.gz
gentoo-490850e4d6f5296b12186108b65aa7643267dbb2.tar.bz2
gentoo-490850e4d6f5296b12186108b65aa7643267dbb2.zip
dev-ruby/sprockets: update EAPI 6 -> 8, add ruby30
Add ERB deprecation commit as well, already merged upstream but never released. Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/sprockets')
-rw-r--r--dev-ruby/sprockets/sprockets-3.7.2-r2.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/dev-ruby/sprockets/sprockets-3.7.2-r2.ebuild b/dev-ruby/sprockets/sprockets-3.7.2-r2.ebuild
new file mode 100644
index 000000000000..de73a55d6b0f
--- /dev/null
+++ b/dev-ruby/sprockets/sprockets-3.7.2-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby26 ruby27 ruby30"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+RUBY_FAKEGEM_GEMSPEC="sprockets.gemspec"
+
+RUBY_FAKEGEM_BINWRAP=""
+
+inherit ruby-fakegem
+
+DESCRIPTION="Ruby library for compiling and serving web assets"
+HOMEPAGE="https://github.com/rails/sprockets"
+SRC_URI="https://github.com/rails/sprockets/archive/v${PV}.tar.gz -> ${P}-git.tgz"
+
+LICENSE="MIT"
+SLOT="$(ver_cut 1)"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+IUSE=""
+
+PATCHES=( "${FILESDIR}/${P}-erb-deprecation.patch" "${FILESDIR}/${P}-kwargs.patch" )
+
+ruby_add_rdepend "
+ dev-ruby/concurrent-ruby:1
+ >=dev-ruby/rack-1:* <dev-ruby/rack-3:*"
+
+ruby_add_bdepend "test? (
+ dev-ruby/json
+ dev-ruby/rack-test
+ =dev-ruby/coffee-script-2*
+ =dev-ruby/execjs-2*
+ =dev-ruby/sass-3* >=dev-ruby/sass-3.1
+ dev-ruby/uglifier
+ )"
+
+all_ruby_prepare() {
+ # Avoid tests for template types that we currently don't package:
+ # eco and ejs.
+ sed -i -e '/eco templates/,/end/ s:^:#:' \
+ -e '/ejs templates/,/end/ s:^:#:' test/test_environment.rb || die
+ sed -i -e '/.ejs/ s:^:#:' test/test_asset.rb || die
+ rm -f test/test_require.rb test/test_{closure,eco,ejs,yui}_{compressor,processor}.rb || die
+ sed -i -e "/bundler/d" Rakefile || die
+}
+
+each_ruby_prepare() {
+ sed -i -e "s:ruby:${RUBY}:" test/test_sprocketize.rb || die
+}
+
+each_ruby_test() {
+ # Make sure we have completely separate copies. Hardlinks won't work
+ # for this test suite.
+ cp -R test test-new || die
+ rm -rf test || die
+ mv test-new test || die
+
+ each_fakegem_test
+}