summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-ruby/ruby_smb/Manifest1
-rw-r--r--dev-ruby/ruby_smb/files/ruby_smb-3.2.5-import-pathname-no-simplecov.patch21
-rw-r--r--dev-ruby/ruby_smb/ruby_smb-3.2.5.ebuild46
3 files changed, 68 insertions, 0 deletions
diff --git a/dev-ruby/ruby_smb/Manifest b/dev-ruby/ruby_smb/Manifest
index bae94582503c..a95a5fc21671 100644
--- a/dev-ruby/ruby_smb/Manifest
+++ b/dev-ruby/ruby_smb/Manifest
@@ -1 +1,2 @@
DIST ruby_smb-1.1.0.gem 175104 BLAKE2B ffa4a7b3666f736fd721c8d561c28724709c7db6a2a4075e183a0a931e5df0c8047e428a2537a747eda9482d9023c2ed8fd8157d1b40244615b3818dc0c0bc37 SHA512 038ca625b580ac32455d08c675a5d7319e320944fe3aef6ed7272872fdc6affbbf2bda325897369cb23d4d62e24923a74b13fe392017854c6c5b9889c5e003f6
+DIST ruby_smb-3.2.5.tar.gz 371107 BLAKE2B 452e93b2623f5354d257588a5b80803285a5b90c97b7f7318971986a9a0c3c18c80b00a0d1a32fba24447ceda73279656a76bc36ee38ea758a274db7cfe43d2c SHA512 15122587f7aa6ee85bcbd4a328b85e6db250b344754d1f059693d2710a8cce2b5ecdf034bd680bd9f2b0f752cf3378fbef9736b81448ac1436505f8aac98ae14
diff --git a/dev-ruby/ruby_smb/files/ruby_smb-3.2.5-import-pathname-no-simplecov.patch b/dev-ruby/ruby_smb/files/ruby_smb-3.2.5-import-pathname-no-simplecov.patch
new file mode 100644
index 000000000000..074c5a70b343
--- /dev/null
+++ b/dev-ruby/ruby_smb/files/ruby_smb-3.2.5-import-pathname-no-simplecov.patch
@@ -0,0 +1,21 @@
+https://github.com/rapid7/ruby_smb/pull/250
+
+From a786565241b721e971ec60697d91516695cecb0a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 22 Mar 2023 07:22:14 +0000
+Subject: [PATCH] virtual_disk: Add 'pathname' require
+
+Needed for join()'s call to Pathname.new(). Only comes up if disabling
+simplecov because of a transitive-require.
+--- a/lib/ruby_smb/server/share/provider/virtual_disk/virtual_pathname.rb
++++ b/lib/ruby_smb/server/share/provider/virtual_disk/virtual_pathname.rb
+@@ -3,6 +3,8 @@ class Server
+ module Share
+ module Provider
+ class VirtualDisk < Disk
++ require 'pathname'
++
+ # This object emulates Ruby's builtin Pathname object but uses a virtual file system instead of the real local
+ # one.
+ class VirtualPathname
+
diff --git a/dev-ruby/ruby_smb/ruby_smb-3.2.5.ebuild b/dev-ruby/ruby_smb/ruby_smb-3.2.5.ebuild
new file mode 100644
index 000000000000..74f82135e43e
--- /dev/null
+++ b/dev-ruby/ruby_smb/ruby_smb-3.2.5.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
+RUBY_FAKEGEM_TASK_TEST="spec"
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+inherit ruby-fakegem
+
+DESCRIPTION="Pure Ruby implementation of the SMB Protocol Family"
+HOMEPAGE="https://github.com/rapid7/ruby_smb"
+SRC_URI="https://github.com/rapid7/ruby_smb/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="1"
+KEYWORDS="~amd64 ~arm ~x86"
+
+ruby_add_rdepend "
+ dev-ruby/bindata:*
+ dev-ruby/rubyntlm
+ dev-ruby/windows_error
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2.5-import-pathname-no-simplecov.patch
+)
+
+all_ruby_prepare() {
+ sed -i \
+ -e '/simplecov/Id' \
+ -e '/coveralls/d' \
+ -e '/TRAVIS/d' \
+ -e '1irequire "rubyntlm"; require "time"' \
+ spec/spec_helper.rb || die
+
+ sed -i \
+ -e '/fivemat/d' \
+ ${PN}.gemspec || die
+
+ sed -i \
+ -e '/pry-byebug/d' \
+ -e '/pry-rescue/d' \
+ -e '/coveralls/d' \
+ Gemfile || die
+}