diff options
author | Hans de Graaff <graaff@gentoo.org> | 2021-11-25 13:33:23 +0100 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2021-11-25 14:03:15 +0100 |
commit | 397d61e34be73c241699879659c482940fc46a0b (patch) | |
tree | 38888ee46c60e4b1538614ceb4d276ca7b5cf176 /dev-ruby/sassc | |
parent | dev-ruby/dependor: add ruby30 (diff) | |
download | gentoo-397d61e34be73c241699879659c482940fc46a0b.tar.gz gentoo-397d61e34be73c241699879659c482940fc46a0b.tar.bz2 gentoo-397d61e34be73c241699879659c482940fc46a0b.zip |
dev-ruby/sassc: fix extension install
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/sassc')
-rw-r--r-- | dev-ruby/sassc/sassc-2.4.0-r1.ebuild | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/dev-ruby/sassc/sassc-2.4.0-r1.ebuild b/dev-ruby/sassc/sassc-2.4.0-r1.ebuild new file mode 100644 index 000000000000..dd06a18a6a77 --- /dev/null +++ b/dev-ruby/sassc/sassc-2.4.0-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby26 ruby27" + +RUBY_FAKEGEM_RECIPE_DOC="none" +RUBY_FAKEGEM_DOCDIR="doc" +RUBY_FAKEGEM_EXTRADOC="README.md" + +inherit ruby-fakegem + +DESCRIPTION="Use libsass with Ruby" +HOMEPAGE="https://github.com/sass/sassc-ruby" +LICENSE="MIT" + +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86" +SLOT="2" +IUSE="" + +RDEPEND+=">=dev-libs/libsass-3.6.1" + +ruby_add_rdepend " + >=dev-ruby/ffi-1.9.6 +" + +ruby_add_bdepend "test? ( + dev-ruby/test_construct + dev-ruby/minitest-around +)" + +all_ruby_prepare() { + # Use unbundled libsass + rm -rf ext || die + + sed -i -e '/ffi_lib/ s:__dir__:"'${ESYSROOT}'/usr/'$(get_libdir)'":' \ + lib/sassc/native.rb || die + + # Avoid version-specific test so newer libsass versions can be used. + sed -i -e '/test_it_reports_the_libsass_version/,/end/ s:^:#:' test/native_test.rb || die + + sed -i -e '/pry/ s:^:#:' test/test_helper.rb || die +} + +each_ruby_test() { + ${RUBY} -Ilib:.:test -e 'Dir["test/**/*_test.rb"].each{|f| require f}' || die +} + +each_ruby_install() { + each_fakegem_install + ruby_fakegem_extensions_installed +} |