Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rbnacl/files/, dev-ruby/rbnacl/
Date: Sat, 07 Apr 2018 05:33:13
Message-Id: 1523079163.a5ce5d3cecdf57bbac811abf0e6f9a1069f0ee8f.graaff@gentoo
1 commit: a5ce5d3cecdf57bbac811abf0e6f9a1069f0ee8f
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 7 05:32:12 2018 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 7 05:32:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5ce5d3c
7
8 dev-ruby/rbnacl: fix buffer size on ppc32, bug 650834
9
10 Thanks to slyfox for providing a patch.
11
12 Closes: https://bugs.gentoo.org/650834
13 Package-Manager: Portage-2.3.24, Repoman-2.3.6
14
15 dev-ruby/rbnacl/files/rbnacl-buffer-size.patch | 24 ++++++++++++++++++
16 dev-ruby/rbnacl/rbnacl-4.0.2-r1.ebuild | 34 ++++++++++++++++++++++++++
17 dev-ruby/rbnacl/rbnacl-5.0.0-r1.ebuild | 34 ++++++++++++++++++++++++++
18 3 files changed, 92 insertions(+)
19
20 diff --git a/dev-ruby/rbnacl/files/rbnacl-buffer-size.patch b/dev-ruby/rbnacl/files/rbnacl-buffer-size.patch
21 new file mode 100644
22 index 00000000000..3725c8550e0
23 --- /dev/null
24 +++ b/dev-ruby/rbnacl/files/rbnacl-buffer-size.patch
25 @@ -0,0 +1,24 @@
26 +Patches based on upstream patch below but reworked to apply to 5.0.0
27 +
28 +From 299e0ddbb8fcafc99214c26d6002da145cc84a0c Mon Sep 17 00:00:00 2001
29 +From: Sergei Trofimovich <slyfox@g.o>
30 +Date: Sun, 18 Mar 2018 21:13:09 +0000
31 +Subject: [PATCH] rbnacl: fix byffer size type in randombytes_buf binding
32 +
33 +---
34 + lib/rbnacl/random.rb | 2 +-
35 + 1 file changed, 1 insertion(+), 1 deletion(-)
36 +
37 +diff --git a/lib/rbnacl/random.rb b/lib/rbnacl/random.rb
38 +index 9742186..db85d6d 100644
39 +--- a/lib/rbnacl/random.rb
40 ++++ b/lib/rbnacl/random.rb
41 +@@ -13,7 +13,7 @@ module Random
42 +
43 + sodium_function :c_random_bytes,
44 + :randombytes_buf,
45 +- [:pointer, :ulong_long]
46 ++ %i[pointer size_t]
47 +
48 + # Returns a string of random bytes
49 + #
50
51 diff --git a/dev-ruby/rbnacl/rbnacl-4.0.2-r1.ebuild b/dev-ruby/rbnacl/rbnacl-4.0.2-r1.ebuild
52 new file mode 100644
53 index 00000000000..8501b10c9e7
54 --- /dev/null
55 +++ b/dev-ruby/rbnacl/rbnacl-4.0.2-r1.ebuild
56 @@ -0,0 +1,34 @@
57 +# Copyright 1999-2018 Gentoo Foundation
58 +# Distributed under the terms of the GNU General Public License v2
59 +
60 +EAPI=6
61 +
62 +USE_RUBY="ruby22 ruby23 ruby24 ruby25"
63 +
64 +RUBY_FAKEGEM_RECIPE_DOC="rdoc"
65 +RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md"
66 +
67 +RUBY_FAKEGEM_RECIPE_TEST="rspec3"
68 +
69 +inherit ruby-fakegem
70 +
71 +DESCRIPTION="Provides a high-level toolkit for building cryptographic systems and protocols"
72 +HOMEPAGE="https://github.com/cryptosphere/rbnacl"
73 +
74 +LICENSE="MIT"
75 +SLOT="4"
76 +KEYWORDS="~amd64 ~ppc64 ~x86"
77 +IUSE=""
78 +
79 +RDEPEND+=" dev-libs/libsodium"
80 +DEPEND+=" test? ( dev-libs/libsodium )"
81 +
82 +ruby_add_rdepend "dev-ruby/ffi"
83 +
84 +PATCHES=( "${FILESDIR}/rbnacl-buffer-size.patch" )
85 +
86 +all_ruby_prepare() {
87 + sed -i -e '/coveralls/I s:^:#:' \
88 + -e '/bundler/ s:^:#:' \
89 + -e 's:rbnacl/libsodium:rbnacl:' spec/spec_helper.rb
90 +}
91
92 diff --git a/dev-ruby/rbnacl/rbnacl-5.0.0-r1.ebuild b/dev-ruby/rbnacl/rbnacl-5.0.0-r1.ebuild
93 new file mode 100644
94 index 00000000000..6637069d73d
95 --- /dev/null
96 +++ b/dev-ruby/rbnacl/rbnacl-5.0.0-r1.ebuild
97 @@ -0,0 +1,34 @@
98 +# Copyright 1999-2018 Gentoo Foundation
99 +# Distributed under the terms of the GNU General Public License v2
100 +
101 +EAPI=6
102 +
103 +USE_RUBY="ruby22 ruby23 ruby24 ruby25"
104 +
105 +RUBY_FAKEGEM_RECIPE_DOC="rdoc"
106 +RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md"
107 +
108 +RUBY_FAKEGEM_RECIPE_TEST="rspec3"
109 +
110 +inherit ruby-fakegem
111 +
112 +DESCRIPTION="Provides a high-level toolkit for building cryptographic systems and protocols"
113 +HOMEPAGE="https://github.com/cryptosphere/rbnacl"
114 +
115 +LICENSE="MIT"
116 +SLOT="5"
117 +KEYWORDS="~amd64 ~ppc64 ~x86"
118 +IUSE=""
119 +
120 +RDEPEND+=" dev-libs/libsodium"
121 +DEPEND+=" test? ( dev-libs/libsodium )"
122 +
123 +ruby_add_rdepend "dev-ruby/ffi"
124 +
125 +PATCHES=( "${FILESDIR}/rbnacl-buffer-size.patch" )
126 +
127 +all_ruby_prepare() {
128 + sed -i -e '/coveralls/I s:^:#:' \
129 + -e '/bundler/ s:^:#:' \
130 + -e 's:rbnacl/libsodium:rbnacl:' spec/spec_helper.rb
131 +}