diff options
author | Hans de Graaff <graaff@gentoo.org> | 2021-03-09 10:00:09 +0100 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2021-03-09 10:00:30 +0100 |
commit | e0ce2477f053db0c4d0dd9f73156a45702979b6a (patch) | |
tree | a0e2d42e693a0781b7b5c5bbe17c35f052f0a796 /dev-ruby/sassc | |
parent | dev-ruby/kramdown-syntax-coderay: add ruby27 (diff) | |
download | gentoo-e0ce2477f053db0c4d0dd9f73156a45702979b6a.tar.gz gentoo-e0ce2477f053db0c4d0dd9f73156a45702979b6a.tar.bz2 gentoo-e0ce2477f053db0c4d0dd9f73156a45702979b6a.zip |
dev-ruby/sassc: fix library loading on prefix
Closes: https://bugs.gentoo.org/768042
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/sassc')
-rw-r--r-- | dev-ruby/sassc/sassc-2.2.1-r1.ebuild | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/dev-ruby/sassc/sassc-2.2.1-r1.ebuild b/dev-ruby/sassc/sassc-2.2.1-r1.ebuild new file mode 100644 index 000000000000..8dd3c00b8f4c --- /dev/null +++ b/dev-ruby/sassc/sassc-2.2.1-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +USE_RUBY="ruby25 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 ~arm64" +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__:"'${EROOT}'/usr/lib64":' \ + 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 +} |