commit: 90bff66fd061aff46088a3c8bbf2509b41f913e6 Author: Hans de Graaff <hans <AT> degraaff <DOT> org> AuthorDate: Tue Oct 6 12:38:23 2015 +0000 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> CommitDate: Tue Oct 6 12:38:23 2015 +0000 URL: https://gitweb.gentoo.org/dev/graaff.git/commit/?id=90bff66f
dev-ruby/spring: add revision with Isolate support This currently breaks bundler support. Package-Manager: portage-2.2.20.1 dev-ruby/spring/Manifest | 1 + .../spring/files/spring-1.4.0-no-bundler.patch | 79 ++++++++++++++++++++++ dev-ruby/spring/metadata.xml | 6 ++ dev-ruby/spring/spring-1.4.0-r100.ebuild | 35 ++++++++++ 4 files changed, 121 insertions(+) diff --git a/dev-ruby/spring/Manifest b/dev-ruby/spring/Manifest new file mode 100644 index 0000000..06ea1b4 --- /dev/null +++ b/dev-ruby/spring/Manifest @@ -0,0 +1 @@ +DIST spring-1.4.0.tar.gz 38007 SHA256 a27501bd182893d6071b46c03d47cb43ab78b4515901420e487d7a4b78821aa7 SHA512 b7096861dd19c3869f3899d8a48f26f39a6496f3b1a1c407d91c48b7896212f3eb18a477c6a3416c8522e1b8de955c20372814c29babbd465d8c0bdff51c928d WHIRLPOOL 8af890262cb45b579bed035b460c87d96cf13b5cc60f642669ab59bb5ea9af470a0cdb220d26bbc466fb1e1913b29ffbf404acebef37a1e05b9b0a86d8c874b6 diff --git a/dev-ruby/spring/files/spring-1.4.0-no-bundler.patch b/dev-ruby/spring/files/spring-1.4.0-no-bundler.patch new file mode 100644 index 0000000..a86715b --- /dev/null +++ b/dev-ruby/spring/files/spring-1.4.0-no-bundler.patch @@ -0,0 +1,79 @@ +commit 55a8136e7ec8753eca783473710bcf6056c40783 +Author: Hans de Graaff <[email protected]> +Date: Tue Oct 6 14:31:33 2015 +0200 + + Avoid bundler. + +diff --git a/lib/spring/application_manager.rb b/lib/spring/application_manager.rb +index 8b34b9f..739eac6 100644 +--- a/lib/spring/application_manager.rb ++++ b/lib/spring/application_manager.rb +@@ -92,7 +92,7 @@ module Spring + def start_child(preload = false) + @child, child_socket = UNIXSocket.pair + +- Bundler.with_clean_env do ++# Bundler.with_clean_env do + @pid = Process.spawn( + { + "RAILS_ENV" => app_env, +@@ -105,7 +105,7 @@ module Spring + "-e", "require 'spring/application/boot'", + 3 => child_socket + ) +- end ++# end + + start_wait_thread(pid, child) if child.gets + child_socket.close +diff --git a/lib/spring/client/run.rb b/lib/spring/client/run.rb +index 4a7c213..f6dd216 100644 +--- a/lib/spring/client/run.rb ++++ b/lib/spring/client/run.rb +@@ -66,9 +66,9 @@ module Spring + env.socket_path.unlink if env.socket_path.exist? + + pid = Process.spawn( +- gem_env, ++ isolate_env, + "ruby", +- "-e", "gem 'spring', '#{Spring::VERSION}'; require 'spring/server'; Spring::Server.boot" ++ "-e", "require 'spring/server'; Spring::Server.boot", + ) + + until env.socket_path.exist? +@@ -78,6 +78,10 @@ module Spring + end + end + ++ def isolate_env ++ {} ++ end ++ + def gem_env + bundle = Bundler.bundle_path.to_s + paths = Gem.path + ENV["GEM_PATH"].to_s.split(File::PATH_SEPARATOR) +diff --git a/lib/spring/configuration.rb b/lib/spring/configuration.rb +index e25e079..7bc0759 100644 +--- a/lib/spring/configuration.rb ++++ b/lib/spring/configuration.rb +@@ -8,6 +8,10 @@ module Spring + ENV['BUNDLE_GEMFILE'] || "Gemfile" + end + ++ def isolatefile ++ 'Isolate' ++ end ++ + def after_fork_callbacks + @after_fork_callbacks ||= [] + end +@@ -42,6 +46,8 @@ module Spring + def find_project_root(current_dir) + if current_dir.join(gemfile).exist? + current_dir ++ elsif current_dir.join(isolatefile).exist? ++ current_dir + elsif current_dir.root? + raise UnknownProject.new(Dir.pwd) + else diff --git a/dev-ruby/spring/metadata.xml b/dev-ruby/spring/metadata.xml new file mode 100644 index 0000000..9bf681c --- /dev/null +++ b/dev-ruby/spring/metadata.xml @@ -0,0 +1,6 @@ +<?xml version = '1.0' encoding = 'UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd></herd> +<maintainer><email>[email protected]</email></maintainer> +</pkgmetadata> diff --git a/dev-ruby/spring/spring-1.4.0-r100.ebuild b/dev-ruby/spring/spring-1.4.0-r100.ebuild new file mode 100644 index 0000000..243bbc0 --- /dev/null +++ b/dev-ruby/spring/spring-1.4.0-r100.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +USE_RUBY="ruby19 ruby20 ruby21" + +RUBY_FAKEGEM_TASK_DOC="" +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md" + +RUBY_FAKEGEM_TASK_TEST="test:unit" + +inherit ruby-fakegem + +DESCRIPTION="Rails application preloader" +HOMEPAGE="https://github.com/rails/spring" +SRC_URI="https://github.com/rails/spring/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="1.1" +KEYWORDS="~amd64" + +IUSE="" + +RUBY_PATCHES=( "${P}-no-bundler.patch" ) + +ruby_add_rdepend ">=dev-ruby/rubygems-2.1.0" + +ruby_add_bdepend "test? ( dev-ruby/bundler dev-ruby/activesupport )" + +all_ruby_prepare() { + sed -i -e '/files/d' \ + -e '/bump/d' ${PN}.gemspec || die + sed -i -e '/bump/d' Rakefile || die +}
