mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-09 04:51:27 +02:00
bettercap: better support of slotted ruby deps (nio4r)
This commit is contained in:
parent
4464d04f7e
commit
d8ff862b03
4 changed files with 54 additions and 4 deletions
|
|
@ -16,6 +16,11 @@ SLOT="0"
|
|||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
ruby_add_rdepend "|| ( dev-ruby/nio4r:0 dev-ruby/nio4r:2 )
|
||||
ruby_add_rdepend "ruby_targets_ruby21? ( dev-ruby/nio4r:0 )
|
||||
!ruby_targets_ruby21? ( dev-ruby/nio4r:2 )
|
||||
=dev-ruby/timers-4.1*
|
||||
"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -e 's|"nio4r", "~> 2"|"nio4r"|' -i async.gemspec
|
||||
}
|
||||
1
dev-ruby/nio4r/Manifest
Normal file
1
dev-ruby/nio4r/Manifest
Normal file
|
|
@ -0,0 +1 @@
|
|||
DIST nio4r-2.0.0.gem 99840 SHA256 2ecc70fe1ae4c8a4638109475dbb6401249facdae5b4be12db931152864844cd SHA512 347afee015e673c8c878799b50affe155ad880608309162de2b4437c051a60feb902b44bc9f5ca5af6fb9e2f84a067410596eac68b1a39374a167205dadc1444 WHIRLPOOL fec5bdd5e2c1ffee8a73116fdf41a7716d72d7a60ed32b52647ee91f3457e1cd77bf39e2a094f2d1939c23d99a3e27294c93e94c0db272874a55573178e1ca14
|
||||
38
dev-ruby/nio4r/nio4r-2.0.0-r1.ebuild
Normal file
38
dev-ruby/nio4r/nio4r-2.0.0-r1.ebuild
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
USE_RUBY="ruby22 ruby23 ruby24"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC=""
|
||||
RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md"
|
||||
|
||||
inherit ruby-fakegem
|
||||
|
||||
DESCRIPTION="A high performance selector API for monitoring IO objects"
|
||||
HOMEPAGE="https://github.com/celluloid/nio4r"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="2"
|
||||
KEYWORDS="~amd64 ~arm ~ppc64 ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
# Note that nio4r bundles a patched copy of libev, and without these
|
||||
# patches the tests fail: https://github.com/celluloid/nio4r/issues/15
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/[Cc]overalls/d' -e '/[Bb]undler/d' spec/spec_helper.rb || die
|
||||
sed -e '/extension/ s:^:#:' -i Rakefile || die
|
||||
}
|
||||
|
||||
each_ruby_configure() {
|
||||
${RUBY} -Cext/${PN} extconf.rb || die
|
||||
}
|
||||
|
||||
each_ruby_compile() {
|
||||
emake V=1 -Cext/${PN}
|
||||
cp ext/${PN}/*$(get_modname) lib/ || die
|
||||
}
|
||||
|
|
@ -27,11 +27,17 @@ ruby_add_rdepend "
|
|||
=dev-ruby/rubydns-2.0*
|
||||
"
|
||||
|
||||
each_ruby_prepare() {
|
||||
#https://github.com/evilsocket/bettercap/issues/412
|
||||
all_ruby_prepare() {
|
||||
sed -e "s|'rubydns', '~> 1.0', '>= 1.0.3'|'rubydns'|" -i bettercap.gemspec
|
||||
}
|
||||
|
||||
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die
|
||||
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die
|
||||
each_ruby_prepare() {
|
||||
#bundle does not support slotted gems and fails if ruby21 and other ruby2x are enabled
|
||||
if use !ruby_targets_ruby21; then
|
||||
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die
|
||||
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die
|
||||
fi
|
||||
}
|
||||
|
||||
# FIXME:
|
||||
Loading…
Reference in a new issue