From 9ea316fd37f824fb9ff3987a54b57c1452afc2a3 Mon Sep 17 00:00:00 2001 From: Hans de Graaff Date: Fri, 18 Jan 2019 09:22:39 +0100 Subject: [PATCH] dev-ruby/listen: add ruby26 revision Signed-off-by: Hans de Graaff Package-Manager: Portage-2.3.51, Repoman-2.3.11 --- .../listen/files/listen-3.1.5-ruby26.patch | 33 +++++++++++++ dev-ruby/listen/listen-3.1.5-r3.ebuild | 49 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 dev-ruby/listen/files/listen-3.1.5-ruby26.patch create mode 100644 dev-ruby/listen/listen-3.1.5-r3.ebuild diff --git a/dev-ruby/listen/files/listen-3.1.5-ruby26.patch b/dev-ruby/listen/files/listen-3.1.5-ruby26.patch new file mode 100644 index 000000000000..f90ab1ed213c --- /dev/null +++ b/dev-ruby/listen/files/listen-3.1.5-ruby26.patch @@ -0,0 +1,33 @@ +From 2908365366792ac3ba010fa32bc3be2beaed451a Mon Sep 17 00:00:00 2001 +From: Samuel Williams +Date: Sun, 16 Dec 2018 11:32:45 +1300 +Subject: [PATCH] Use raw Pathname to fix Linux specs. + +--- + lib/listen/adapter/linux.rb | 2 +- + spec/lib/listen/adapter/linux_spec.rb | 12 +----------- + 2 files changed, 2 insertions(+), 12 deletions(-) + +diff --git a/spec/lib/listen/adapter/linux_spec.rb b/spec/lib/listen/adapter/linux_spec.rb +index d77f0c0..da48319 100644 +--- a/spec/lib/listen/adapter/linux_spec.rb ++++ b/spec/lib/listen/adapter/linux_spec.rb +@@ -10,17 +10,7 @@ + end + + if linux? +- let(:dir1) do +- instance_double( +- Pathname, +- 'dir1', +- to_s: '/foo/dir1', +- cleanpath: real_dir1 +- ) +- end +- +- # just so cleanpath works in above double +- let(:real_dir1) { instance_double(Pathname, 'dir1', to_s: '/foo/dir1') } ++ let(:dir1) {Pathname.new("/foo/dir1")} + + let(:config) { instance_double(Listen::Adapter::Config) } + let(:queue) { instance_double(Queue) } diff --git a/dev-ruby/listen/listen-3.1.5-r3.ebuild b/dev-ruby/listen/listen-3.1.5-r3.ebuild new file mode 100644 index 000000000000..b34298d01ef8 --- /dev/null +++ b/dev-ruby/listen/listen-3.1.5-r3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +USE_RUBY="ruby23 ruby24 ruby25 ruby26" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +RUBY_FAKEGEM_TASK_DOC="" +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md" + +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +SRC_URI="https://github.com/guard/listen/archive/v${PV}.tar.gz -> ${P}.tar.gz" +DESCRIPTION="Listens to file modifications and notifies you about the changes" +HOMEPAGE="https://github.com/guard/listen" + +LICENSE="MIT" +SLOT="3" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" +IUSE="test" + +# Block on other packages trying to install a /usr/bin/listen +RDEPEND+="!!media-radio/ax25-apps !!=dev-ruby/rb-inotify-0.9.7 >=dev-ruby/ruby_dep-1.2:1" + +ruby_add_bdepend "test? ( dev-ruby/thor )" + +PATCHES=( "${FILESDIR}/${P}-ruby26.patch" ) + +all_ruby_prepare() { + rm -f Gemfile || die + sed -i -e "/git/,+3d" -e "/rb-fsevent/d" ${PN}.gemspec || die + sed -i -e "/rb-fsevent/d" lib/listen/adapter/darwin.rb || die + rm -rf spec/lib/listen/adapter/darwin_spec.rb || die +} + +each_ruby_prepare() { + mkdir spec/.fixtures || die +} + +each_ruby_test() { + RSPEC_VERSION=3 ruby-ng_rspec + rm -rf spec/.fixtures || die +} -- 2.26.2