summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2013-10-18 05:37:46 +0000
committerTim Harder <radhermit@gentoo.org>2013-10-18 05:37:46 +0000
commitf420d24dfce63bbb6e54b5bd58aa6786f9706109 (patch)
tree4ae27949d83dda04586386d1a7276112f009e8e7 /app-emulation
parentRequire >=jinja-2.7, bug #487422 by jlec. (diff)
downloadgentoo-2-f420d24dfce63bbb6e54b5bd58aa6786f9706109.tar.gz
gentoo-2-f420d24dfce63bbb6e54b5bd58aa6786f9706109.tar.bz2
gentoo-2-f420d24dfce63bbb6e54b5bd58aa6786f9706109.zip
Version bump, fix rubygems2 compat (bug #486096, patch by Tiago Macedo).
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/vagrant/ChangeLog8
-rw-r--r--app-emulation/vagrant/files/vagrant-1.3.5-rubygems2.patch42
-rw-r--r--app-emulation/vagrant/vagrant-1.3.5.ebuild68
3 files changed, 117 insertions, 1 deletions
diff --git a/app-emulation/vagrant/ChangeLog b/app-emulation/vagrant/ChangeLog
index 76c1e90b0d95..9fef163ca114 100644
--- a/app-emulation/vagrant/ChangeLog
+++ b/app-emulation/vagrant/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/vagrant
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vagrant/ChangeLog,v 1.28 2013/10/03 00:50:11 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vagrant/ChangeLog,v 1.29 2013/10/18 05:37:46 radhermit Exp $
+
+*vagrant-1.3.5 (18 Oct 2013)
+
+ 18 Oct 2013; Tim Harder <radhermit@gentoo.org> +vagrant-1.3.5.ebuild,
+ +files/vagrant-1.3.5-rubygems2.patch:
+ Version bump, fix rubygems2 compat (bug #486096, patch by Tiago Macedo).
*vagrant-1.3.4 (03 Oct 2013)
diff --git a/app-emulation/vagrant/files/vagrant-1.3.5-rubygems2.patch b/app-emulation/vagrant/files/vagrant-1.3.5-rubygems2.patch
new file mode 100644
index 000000000000..763fb6fd1088
--- /dev/null
+++ b/app-emulation/vagrant/files/vagrant-1.3.5-rubygems2.patch
@@ -0,0 +1,42 @@
+--- vagrant-1.3.5/plugins/commands/plugin/action/install_gem.rb
++++ vagrant-1.3.5/plugins/commands/plugin/action/install_gem.rb
+@@ -1,6 +1,10 @@
+ require "rubygems"
+ require "rubygems/dependency_installer"
+-require "rubygems/format"
++begin
++ require "rubygems/format"
++rescue LoadError
++ # rubygems 2.0
++end
+
+ require "log4r"
+
+@@ -26,8 +30,13 @@
+ if plugin_name =~ /\.gem$/
+ # If we're installing from a gem file, determine the name
+ # based on the spec in the file.
+- pkg = Gem::Format.from_file_by_path(plugin_name)
++ pkg = if defined?(Gem::Format)
++ Gem::Format.from_file_by_path(plugin_name)
++ else
++ Gem::Package.new(plugin_name)
++ end
+ find_plugin_name = pkg.spec.name
++ version = pkg.spec.version
+ end
+
+ # Install the gem
+--- vagrant-1.3.5/plugins/commands/plugin/action/prune_gems.rb
++++ vagrant-1.3.5/plugins/commands/plugin/action/prune_gems.rb
+@@ -126,6 +126,10 @@
+
+ if prune_specs.length > 0
+ env[:gem_helper].with_environment do
++
++ # due to a bug in rubygems 2.0, we need to load the specifications before removing any
++ Gem::Specification.to_a
++
+ prune_specs.each do |prune_spec|
+ uninstaller = Gem::Uninstaller.new(prune_spec.name, {
+ :all => true,
diff --git a/app-emulation/vagrant/vagrant-1.3.5.ebuild b/app-emulation/vagrant/vagrant-1.3.5.ebuild
new file mode 100644
index 000000000000..72a02d7df56c
--- /dev/null
+++ b/app-emulation/vagrant/vagrant-1.3.5.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vagrant/vagrant-1.3.5.ebuild,v 1.1 2013/10/18 05:37:46 radhermit Exp $
+
+EAPI="5"
+USE_RUBY="ruby19"
+
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
+RUBY_FAKEGEM_GEMSPEC="vagrant.gemspec"
+RUBY_FAKEGEM_EXTRAINSTALL="config keys plugins templates"
+RUBY_FAKEGEM_TASK_DOC=""
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="A tool for building and distributing virtual machines using VirtualBox"
+HOMEPAGE="http://vagrantup.com/"
+SRC_URI="https://github.com/mitchellh/vagrant/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x64-macos"
+IUSE="test"
+
+# Missing ebuild for contest
+RESTRICT="test"
+
+RDEPEND="${RDEPEND}
+ net-misc/curl
+ !x64-macos? ( || ( app-emulation/virtualbox app-emulation/virtualbox-bin ) )"
+
+ruby_add_rdepend "
+ >=dev-ruby/childprocess-0.3.7
+ >=dev-ruby/erubis-2.7.0
+ dev-ruby/i18n:0.6
+ >=dev-ruby/json-1.5.1
+ >=dev-ruby/log4r-1.1.9
+ >=dev-ruby/net-ssh-2.6.6
+ >=dev-ruby/net-scp-1.1.0
+"
+
+ruby_add_bdepend "
+ dev-ruby/rake
+ test? ( dev-ruby/mocha virtual/ruby-minitest )
+"
+
+all_ruby_prepare() {
+ # remove bundler support
+ sed -i '/[Bb]undler/d' Rakefile || die
+ rm Gemfile || die
+
+ # loosen dependencies
+ sed -e '/childprocess\|erubis\|log4r\|net-scp\|net-ssh/s/~>/>=/' \
+ -i ${PN}.gemspec || die
+
+ epatch "${FILESDIR}"/${PN}-1.2.1-no-warning.patch
+ epatch "${FILESDIR}"/${PN}-1.2.2-rvm.patch
+ epatch "${FILESDIR}"/${P}-rubygems2.patch
+}
+
+pkg_postinst() {
+ if use x64-macos ; then
+ ewarn
+ ewarn "For Mac OS X prefixes, you must install the virtualbox"
+ ewarn "package specifically for OS X which can be found at:"
+ ewarn "https://www.virtualbox.org/wiki/Downloads"
+ ewarn
+ fi
+}