summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-07 09:10:24 +0100
committerSam James <sam@gentoo.org>2023-04-07 12:24:55 +0100
commitd9b7ea12115cfb6404aed23be3fd800ccfc82e5f (patch)
tree315616832f931272f6e3f4172b9d21d64812cc7f /dev-ruby/sass
parentdev-ruby/marcel: enable ruby32, fix tests (diff)
downloadgentoo-d9b7ea12115cfb6404aed23be3fd800ccfc82e5f.tar.gz
gentoo-d9b7ea12115cfb6404aed23be3fd800ccfc82e5f.tar.bz2
gentoo-d9b7ea12115cfb6404aed23be3fd800ccfc82e5f.zip
dev-ruby/sass: enable ruby32, replace dev-ruby/sass-listen dep
sass-listen only ever existed as a fork to support older Rubies anyway. Use the patch that Fedora are given both dev-ruby/sass & dev-ruby/sass-listen are EOL and on life support in distros, really. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ruby/sass')
-rw-r--r--dev-ruby/sass/files/sass-3.7.4-use-listen-not-sass-listen.patch14
-rw-r--r--dev-ruby/sass/sass-3.7.4-r2.ebuild60
2 files changed, 74 insertions, 0 deletions
diff --git a/dev-ruby/sass/files/sass-3.7.4-use-listen-not-sass-listen.patch b/dev-ruby/sass/files/sass-3.7.4-use-listen-not-sass-listen.patch
new file mode 100644
index 000000000000..17d2aa9217c2
--- /dev/null
+++ b/dev-ruby/sass/files/sass-3.7.4-use-listen-not-sass-listen.patch
@@ -0,0 +1,14 @@
+https://src.fedoraproject.org/rpms/rubygem-sass/blob/rawhide/f/rubygem-sass-3.5.6-use-listen.patch
+--- a/lib/sass/plugin/compiler.rb
++++ b/lib/sass/plugin/compiler.rb
+@@ -377,8 +377,8 @@ module Sass::Plugin
+
+ # This is mocked out in compiler_test.rb.
+ def create_listener(*args, &block)
+- require 'sass-listen'
+- SassListen.to(*args, &block)
++ require 'listen'
++ Listen.to(*args, &block)
+ end
+
+ def remove_redundant_directories(directories)
diff --git a/dev-ruby/sass/sass-3.7.4-r2.ebuild b/dev-ruby/sass/sass-3.7.4-r2.ebuild
new file mode 100644
index 000000000000..43ee9a37a950
--- /dev/null
+++ b/dev-ruby/sass/sass-3.7.4-r2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+RUBY_FAKEGEM_EXTRAINSTALL="rails init.rb VERSION VERSION_NAME"
+
+inherit ruby-fakegem
+
+DESCRIPTION="An extension of CSS3, adding nested rules, variables, mixins, and more"
+HOMEPAGE="https://sass-lang.com/"
+SRC_URI="https://github.com/sass/ruby-sass/archive/${PV}.tar.gz -> ${P}.tar.gz"
+RUBY_S="ruby-sass-${PV}"
+
+LICENSE="MIT"
+SLOT="$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux"
+
+ruby_add_bdepend "doc? ( >=dev-ruby/yard-0.5.3 )"
+
+ruby_add_rdepend "
+ !!<dev-ruby/sass-3.4.25-r1:3.4
+ !!<dev-ruby/sass-3.5.7-r1:3.5
+ dev-ruby/listen
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.7.4-use-listen-not-sass-listen.patch
+)
+
+# tests could use `less` if we had it
+
+all_ruby_prepare() {
+ # Match activesupport which gets dragged in
+ sed -i -e '/minitest.*>= 5/s:.*:&, "< 5.16":' ${PN}.gemspec || die
+ sed -i -e '/minitest/s:6.0:5.16:' Gemfile || die
+ sed -i -e "/require 'minitest\/autorun'/igem 'minitest', '< 5.16'" test/test_helper.rb || die
+
+ # We use dev-ruby/listen now instead of dev-ruby/sass-listen
+ sed -i \
+ -e "/sass-listen/s:, '~> 4.0.0'::" \
+ -e "s:sass-listen:listen:" \
+ ${PN}.gemspec || die
+
+ # Don't require maruku as markdown provider but let yard decide.
+ sed -i -e '/maruku/d' .yardopts || die
+
+ # Keep VERSION_DATE around since we don't create a new package
+ sed -i -e '/at_exit/,/end/ s:^:#:' Rakefile || die
+}
+
+each_ruby_test() {
+ RUBOCOP=false ${RUBY} -S rake test:ruby || die
+}