mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-ruby/gpgme: add 2.0.26
Closes: https://bugs.gentoo.org/962128 Bug: https://bugs.gentoo.org/978788 Signed-off-by: Alfred Wingate <parona@protonmail.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1558 Merges: https://codeberg.org/gentoo/gentoo/pulls/1558 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
b4c71a60c7
commit
2cb86100b3
@@ -1 +1,2 @@
|
||||
DIST ruby-gpgme-2.0.24.tar.gz 3512481 BLAKE2B 69de16ca15088025c8aa5e8a7910d99df11df1e8ba522d16f9b23a89960683555dbdfe238c351532ffb57283c99b4b4c06c570e6c7755e21a40c67d9f9e00214 SHA512 d906cc669b4e55facd13838c711601ce587e197d44cdc614c4972b2fe411c6259fa236d9713e0ff716ab97fa34840feb0b503db298e6b7a3125d3bcce12d7835
|
||||
DIST ruby-gpgme-2.0.26.tar.gz 3179297 BLAKE2B 3e3b86bff032a00384f4365f7ddd0965878e0857823a02458cd57ba7ea320aa5b14c0fa96b2bac8735978b2885284e0252cc20412bc506ceef46616875ee9588 SHA512 e2e5425a87b6161ef340f9136b861d29a7673873736e8594eb90b3845801589f0e6ddbb41f00b861adf81ad97a4a24e777467eb7bff8efd3a5b43107dbcc165d
|
||||
|
||||
21
dev-ruby/gpgme/files/gpgme-2.0.26-fix-test.patch
Normal file
21
dev-ruby/gpgme/files/gpgme-2.0.26-fix-test.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
--- a/test/key_test.rb
|
||||
+++ b/test/key_test.rb
|
||||
@@ -78,7 +78,7 @@ describe GPGME::Key do
|
||||
end
|
||||
|
||||
it "can specify options for Ctx" do
|
||||
- GPGME::Ctx.expects(:new).with(:armor => true).yields(mock(:export_keys => true))
|
||||
+ GPGME::Ctx.expects(:new).with({"armor": true}).yields(mock({"export_keys": true}))
|
||||
GPGME::Key.export("wadus", :armor => true)
|
||||
end
|
||||
|
||||
@@ -114,7 +114,7 @@ describe GPGME::Key do
|
||||
end
|
||||
|
||||
it "can specify options for Ctx" do
|
||||
- GPGME::Ctx.expects(:new).with(:armor => true).yields(mock(:import_keys => true, :import_result => true))
|
||||
+ GPGME::Ctx.expects(:new).with({"armor": true}).yields(mock({"import_keys": true, "import_result": true}))
|
||||
GPGME::Key.import("wadus", :armor => true)
|
||||
end
|
||||
end
|
||||
|
||||
19
dev-ruby/gpgme/files/gpgme-2.0.26-minitest6.patch
Normal file
19
dev-ruby/gpgme/files/gpgme-2.0.26-minitest6.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
https://bugs.gentoo.org/978788
|
||||
|
||||
--- a/test/data_test.rb
|
||||
+++ b/test/data_test.rb
|
||||
@@ -121,10 +121,10 @@ describe GPGME::Data do
|
||||
|
||||
it "can set file_name" do
|
||||
data = GPGME::Data.new("wadus")
|
||||
- [ "foo.bar", nil ].each do |file_name|
|
||||
- data.file_name = file_name
|
||||
- assert_equal file_name, data.file_name
|
||||
- end
|
||||
+ data.file_name = "foo.bar"
|
||||
+ assert_equal "foo.bar", data.file_name
|
||||
+ data.file_name = nil
|
||||
+ assert_nil data.file_name
|
||||
end
|
||||
end
|
||||
|
||||
12
dev-ruby/gpgme/files/gpgme-2.0.26-mocha2.patch
Normal file
12
dev-ruby/gpgme/files/gpgme-2.0.26-mocha2.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- a/test/test_helper.rb
|
||||
+++ b/test/test_helper.rb
|
||||
@@ -15,7 +15,7 @@ require 'bundler/setup'
|
||||
require 'minitest/autorun'
|
||||
require 'minitest/spec'
|
||||
require 'minitest/pride'
|
||||
-require 'mocha'
|
||||
+require 'mocha/minitest'
|
||||
require 'gpgme'
|
||||
|
||||
if RUBY_VERSION.split('.').first.to_i > 1
|
||||
|
||||
67
dev-ruby/gpgme/gpgme-2.0.26.ebuild
Normal file
67
dev-ruby/gpgme/gpgme-2.0.26.ebuild
Normal file
@@ -0,0 +1,67 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
USE_RUBY="ruby32 ruby33 ruby34 ruby40"
|
||||
|
||||
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
|
||||
|
||||
RUBY_FAKEGEM_EXTENSIONS=(ext/gpgme/extconf.rb)
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="NEWS README.rdoc"
|
||||
|
||||
inherit edo ruby-fakegem
|
||||
|
||||
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 ~arm64 ~x86"
|
||||
|
||||
RDEPEND="
|
||||
>=app-crypt/gpgme-1.18.0:=
|
||||
>=dev-libs/libassuan-2.5.6:=
|
||||
>=dev-libs/libgpg-error-1.47
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
ruby_add_bdepend "
|
||||
test? (
|
||||
>=dev-ruby/mocha-2:*
|
||||
>=dev-ruby/minitest-5:*
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/gpgme-2.0.26-mocha2.patch
|
||||
"${FILESDIR}"/gpgme-2.0.26-minitest6.patch
|
||||
"${FILESDIR}"/gpgme-2.0.26-fix-test.patch
|
||||
)
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i -e '/\(coverall\|bundler\|ruby-debug\|byebug\)/I s:^:#:' \
|
||||
-e '3igem "mocha", "~> 2"; gem "minitest", ">= 5"' \
|
||||
test/test_helper.rb || die
|
||||
|
||||
sed -i -e '/portile/d ; /rubyforge/d' ${RUBY_FAKEGEM_GEMSPEC} || die
|
||||
}
|
||||
|
||||
each_ruby_configure() {
|
||||
export RUBY_GPGME_USE_SYSTEM_LIBRARIES=1
|
||||
each_fakegem_configure
|
||||
}
|
||||
|
||||
each_ruby_test() {
|
||||
unset DISPLAY GPG_AGENT_INFO GPG_TTY
|
||||
|
||||
local -x MT_NO_PLUGINS=true
|
||||
# Run tests by hand due to tests being order dependant (newer minitest adds randomness)
|
||||
for test_file in test/*_test.rb; do
|
||||
edo ${RUBY} -Ilib:test:. -e "require '${test_file}'" || die
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user