2022-02-18 08:25:04 +03:00
|
|
|
# Copyright 1999-2022 Gentoo Authors
|
2021-10-31 10:16:14 +03:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
2022-05-06 19:32:38 +03:00
|
|
|
USE_RUBY="ruby26 ruby27 ruby30 ruby31"
|
2021-10-31 10:16:14 +03:00
|
|
|
|
|
|
|
RUBY_FAKEGEM_EXTRADOC="NEWS README.rdoc"
|
|
|
|
|
|
|
|
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
|
|
|
|
|
|
|
|
RUBY_FAKEGEM_EXTENSIONS=(ext/gpgme/extconf.rb)
|
|
|
|
|
|
|
|
inherit ruby-fakegem flag-o-matic
|
|
|
|
|
|
|
|
DESCRIPTION="Ruby language binding for GnuPG Made Easy"
|
|
|
|
HOMEPAGE="https://github.com/ueno/ruby-gpgme"
|
|
|
|
SRC_URI="https://github.com/ueno/ruby-gpgme/archive/v${PV}.tar.gz -> ruby-${P}.tar.gz"
|
|
|
|
RUBY_S="ruby-${P}"
|
|
|
|
|
|
|
|
LICENSE="LGPL-2.1+"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
IUSE=""
|
|
|
|
|
2022-02-18 08:25:04 +03:00
|
|
|
RDEPEND="
|
|
|
|
app-crypt/gpgme:="
|
|
|
|
DEPEND="${RDEPEND}"
|
2021-10-31 10:16:14 +03:00
|
|
|
|
|
|
|
ruby_add_bdepend "test? ( dev-ruby/mocha:0.14 )"
|
|
|
|
|
|
|
|
all_ruby_prepare() {
|
|
|
|
sed -i -e '/\(coverall\|bundler\|ruby-debug\|byebug\)/I s:^:#:' \
|
|
|
|
-e '3igem "mocha", "~> 0.14"' \
|
|
|
|
test/test_helper.rb || die
|
|
|
|
|
|
|
|
# Remove failing tests for now. This package was added without
|
|
|
|
# running any tests :-(
|
|
|
|
rm -f test/{ctx,crypto}_test.rb || die
|
|
|
|
|
|
|
|
sed -i -e '/portile/d ; /rubyforge/d' ${RUBY_FAKEGEM_GEMSPEC} || die
|
|
|
|
}
|
|
|
|
|
|
|
|
each_ruby_configure() {
|
|
|
|
append-flags -fPIC
|
|
|
|
export RUBY_GPGME_USE_SYSTEM_LIBRARIES=1
|
|
|
|
each_fakegem_configure
|
|
|
|
}
|
|
|
|
|
|
|
|
each_ruby_test() {
|
|
|
|
unset DISPLAY GPG_AGENT_INFO GPG_TTY
|
|
|
|
MT_NO_PLUGINS=true ${RUBY} -Ilib:test:. -e 'Dir["test/*_test.rb"].each{|f| require f}' || die
|
|
|
|
}
|