summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2021-10-31 06:18:39 +0100
committerHans de Graaff <graaff@gentoo.org>2021-10-31 06:57:10 +0100
commitc75b80cefb5783ea9f570b153b047de98daf2f9e (patch)
treef147df079f9a630477ec2696600c2d1097026b4d /dev-ruby/ferret
parentdev-ruby/duktape-rb: fix extension install (diff)
downloadgentoo-c75b80cefb5783ea9f570b153b047de98daf2f9e.tar.gz
gentoo-c75b80cefb5783ea9f570b153b047de98daf2f9e.tar.bz2
gentoo-c75b80cefb5783ea9f570b153b047de98daf2f9e.zip
dev-ruby/ferret: EAPI 8; 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/ferret')
-rw-r--r--dev-ruby/ferret/ferret-0.11.8.7-r1.ebuild44
1 files changed, 44 insertions, 0 deletions
diff --git a/dev-ruby/ferret/ferret-0.11.8.7-r1.ebuild b/dev-ruby/ferret/ferret-0.11.8.7-r1.ebuild
new file mode 100644
index 000000000000..45a3f16cd148
--- /dev/null
+++ b/dev-ruby/ferret/ferret-0.11.8.7-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# ruby30 does not compile
+USE_RUBY="ruby26 ruby27"
+
+RUBY_FAKEGEM_NAME="ferret"
+
+RUBY_FAKEGEM_TASK_DOC="doc"
+RUBY_FAKEGEM_DOCDIR="doc/api"
+
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG RELEASE_CHANGES RELEASE_NOTES README.md TODO TUTORIAL.md"
+
+RUBY_FAKEGEM_EXTENSIONS=(ext/extconf.rb)
+
+inherit ruby-fakegem
+
+MY_P="${P/ruby-/}"
+DESCRIPTION="A ruby indexing/searching library"
+HOMEPAGE="https://github.com/jkraemer/ferret"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND+=" app-arch/bzip2"
+DEPEND+=" app-arch/bzip2"
+
+all_ruby_prepare() {
+ # Remove bundled bzlib code and use system version instead.
+ rm ext/BZLIB* ext/bzlib* || die
+ sed -i -e '14i $LDFLAGS += " -lbz2 "' ext/extconf.rb || die
+
+ # Avoid test known to fail upstream:
+ # https://github.com/jkraemer/ferret/issues/2
+ sed -i -e '/test_adding_long_url/,/^ end/ s:^:#:' \
+ test/unit/index/tc_index_writer.rb || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib test/test_all.rb || die
+}