diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-emulation/vagrant |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-emulation/vagrant')
-rw-r--r-- | app-emulation/vagrant/Manifest | 13 | ||||
-rw-r--r-- | app-emulation/vagrant/files/vagrant-1.8.1-disable-embedded-cacert.patch | 17 | ||||
-rw-r--r-- | app-emulation/vagrant/files/vagrant-1.8.1-rvm.patch | 11 | ||||
-rw-r--r-- | app-emulation/vagrant/files/vagrant-1.9.6 | 45 | ||||
-rw-r--r-- | app-emulation/vagrant/files/vagrant.in | 44 | ||||
-rw-r--r-- | app-emulation/vagrant/metadata.xml | 21 | ||||
-rw-r--r-- | app-emulation/vagrant/vagrant-1.9.7.ebuild | 84 | ||||
-rw-r--r-- | app-emulation/vagrant/vagrant-1.9.8.ebuild | 81 | ||||
-rw-r--r-- | app-emulation/vagrant/vagrant-2.0.0.ebuild | 81 |
9 files changed, 397 insertions, 0 deletions
diff --git a/app-emulation/vagrant/Manifest b/app-emulation/vagrant/Manifest new file mode 100644 index 000000000000..e218d8dab737 --- /dev/null +++ b/app-emulation/vagrant/Manifest @@ -0,0 +1,13 @@ +AUX vagrant-1.8.1-disable-embedded-cacert.patch 742 SHA256 564864e3b8fa7b16439bf074736836c3fbd61d61d9850c3f0c0716be106d3637 SHA512 a3c791490f2b34965a3f3303ce064be76c86a6321d3d5616837b104e2db9a318c57ded7c59a925de7c79e6a5dce9a35ca0d90ef37cf8012d257f3e4e03d84508 WHIRLPOOL baf540cda2633286b38e585a365881c1fa52d4222982a96d976dbcf8c95169b713db20fd838bf7bf1b22aa5a4ea0a0b8c52b075ba5117d48923520c51c8757c5 +AUX vagrant-1.8.1-rvm.patch 302 SHA256 00fbfe62a4985ccc2015423e893b738a4bc674fa5a983e7c6f696287ce989a9f SHA512 23178e36c808fb240236d6fb3c86df738fa5d2aedfc1d64bc7669f0807645863b8571818e58bb59160541f81141cbf124f2aeb2113225b094e19a5a852e2784c WHIRLPOOL 75809426fee843220e9ce3f56e0b36822bf9d58f5c6603780dc4e7626fb2016ffc96147c377791c8df178d617a1073287fe9b99c0f3680e74596dc97ddc8bec8 +AUX vagrant-1.9.6 1564 SHA256 e83061cd295206997c000677e222c9e53faf65e0e615f84267b96c9e2626b462 SHA512 4a4ed00d90a24919a6528b8fa10b309c31e5d5bd83ab43ddf042b9afcc814895a2259faf46e9d186da65d0b825ba4a848d2421e98e2e9616b67d3f4ff5d99ff2 WHIRLPOOL 6774119816f24bed3bcac49e22ba20ff6a22e8067cbe6339211a4356f0176ad0fda90a92901c0df6dc54d2aa8739deab243adb0d7aeb07fe1bfad4d552cbcdfa +AUX vagrant.in 1541 SHA256 c09cc8ed50c9b770101563b73c1791c5ad2185385aeded6aa341719a2f7a8de6 SHA512 05b6c08eab0f4d5f523cfb4231db673ed66052fc72c27e97228be06a5f881da301538b8ff2e4872e8190ca996b994820a468c54b26759e2ca4036da409ca1a82 WHIRLPOOL e987e9b0565d752859904e60a30b76c8aa27b3873ccdeb455961717a8dd03a1a1dbeb7aba957bba7736b5c356282a9802c2b5d8185f28972502911243fa5626e +DIST vagrant-1.9.7.tar.gz 1119024 SHA256 194de72442a2d08f6e04fbed8698a99d190a0e7203d35b49e80d4ddfcb71fb1b SHA512 062921070ace7ce93145981b5b768dc9dc447559fc12c52c8da323d1e3523fbff2a8e7afca0e2f751e232aae822c969b5d166b3b0f01a0744ca20c4e4e33567f WHIRLPOOL ef0331781cf6a71dca9eb485943c459a5360f55b1db45b4f23b413b848eeac1700afe3ea51b6dd2e0da1a7c1ba6ad456bd9fcb7a7b3532145e95a38fc997dd99 +DIST vagrant-1.9.8.tar.gz 1127560 SHA256 59c1d50437d2f50eeae219bc03c90d397fe8d8c974cce7c51b017b8ceeaefb54 SHA512 d22cc0a6800aa5ef84085c750f5ec8729f7b3adefd9a5df1a1fcaf60d1219e781869ede4f57ce4fdeb269224603dfc3a8024545a0250ebd9e144745ce9aa670b WHIRLPOOL d9c199322798e792a895aef03f729b4db8bb5eb3eaab960092d5aa2831032106a9f55ac3957b43378cceea2d27cf53f8ecf6ff38ff54ff2f8c4451c0238029ee +DIST vagrant-2.0.0.tar.gz 1142850 SHA256 c25d3a5f18abdf349047f4d80bb74e6cb526959536e4bef5aa771de9d39cb260 SHA512 ee9059dfd205253d6f978fd225d85eef5a281532a1992bc9382eb713c95a0280d4b6518460106227237ae4e93cf5e2eaf670bd378627c3e9696b0fe9a2427ac1 WHIRLPOOL 8337800f6c5cc88081dc6f8630de60ecba8c851687d14143f34dc41b62cbd67b1e463f7351ecc0e1c764742004fdba389bc33c0bb2a5c043d1fbf6dde352171c +EBUILD vagrant-1.9.7.ebuild 2245 SHA256 5e97589630d665e2dcc26db5bf1705e7c4bf806fda8787f5aabe6a5bb114858c SHA512 1ce490a033e9afc4f56ff266f066c9e5d348b89ef957e64aaf749338d68635989504f803840b707bc4ffbf8f7352ce603246c39a9c8e0226c594908bb4e492b1 WHIRLPOOL d359ed94862b957cdfc8f27a9cba698e2b1ff6b37669961d80ec6945ca49ca32d05f8cfd10c547d2b048eb7c162a2aec65fafcbdcf2d5f92e386996d79df2e25 +EBUILD vagrant-1.9.8.ebuild 2169 SHA256 85dac8cc6a0fc46541c6ac55cc1600f2d4f1db6106f45ad7bc4b97b8bdc45e24 SHA512 ece9364b5437f22a2f441408c0811d14dd93138e7d9cce5ed785847b9e38982c880c808a1ba7668ca24fdeadfdd59a77a931461897eb54266aec4c834549f6b2 WHIRLPOOL 3c9521dfdcda46b7f28fa24a16bb975122eec57fd013c273b3a831551585a4899b829af40da7ea3bc629f87d8d429e0d73b7293cfa6ebd08800fd7200876b7c1 +EBUILD vagrant-2.0.0.ebuild 2162 SHA256 a306f15d034fb2dc1d280efdea71fc74fd9934aaaf3509781e7ea204efdd913d SHA512 149763cc4f924a7879e0ad2da42f1d8dd74ff2679b44ad4fc3f16be588dab3794a7415decb089a73c15f4a86d44102d4fa58198c49106dc1e58dead8ba8bdea4 WHIRLPOOL 071ce0a575507a9598b20b8e4e9ab9829a655f4ba8963c634422ea31341541cbe141334d4ced98bfbbdcbcf097e679da70fe524a207a3fd00e46074ae0de0a04 +MISC ChangeLog 6375 SHA256 28dba9e48cdcb83898cdf4ab42121ea70fafc2aad540ce1f32cee1ee175706e3 SHA512 b72a0c371ba71fb0338b87b6d9e57c401672a422012670a7fede13f4a6bcc4ff8ac3270f844880a75b3fa792cf9d47c2845a8cbc6093a0f737a0907cfeebea89 WHIRLPOOL fda114ad8209f062e240d88dcc592af434ca678780550c8612f2b7d34b19aa2a9611fd9277d13f56ff92ca1671116a1251bee68db842ff9b1637625b7279cceb +MISC ChangeLog-2015 5872 SHA256 e34883a45cf43c4dc5f1e70fe05237c1b2dfd516c521d1ef1133d2a85250d610 SHA512 28e0390fb222950479e87991ed877731aff7d1fe78177bdf1043036af7f792d44114ab86d8af947f9c80bd539f275a6516b1f9894cd140f4658aa3f05641506d WHIRLPOOL 55c00413ec85340e8fbf7f7b86550a1de8dcba1f2cfe6b0813e57a3f84c67a77fdc2b90ae4bfef37335e4ec86d028413bc00798d1c7bd8221f9b767759c3ac65 +MISC metadata.xml 572 SHA256 68069b04e6eb7838158806e4163fcf8c9fd885d20d2a1c5f3078ad321cbf5fd0 SHA512 37ddaa8e7b99b2b9e1487254af11c2201db8469da1a63e26c64b4cb3499867bd3d15b6e2c8871a1550a92722e76c0509408b148e993592b733fd8d14299aeddc WHIRLPOOL 7f744885f8f48ee98e53552454ef90a8e036819676e71a8c3ced62cb2ecfd7cf12c48b7c7107bc81c39d522531b6c6c45958fc4da286f2226a64e270bced3dcf diff --git a/app-emulation/vagrant/files/vagrant-1.8.1-disable-embedded-cacert.patch b/app-emulation/vagrant/files/vagrant-1.8.1-disable-embedded-cacert.patch new file mode 100644 index 000000000000..afcb6f707f5f --- /dev/null +++ b/app-emulation/vagrant/files/vagrant-1.8.1-disable-embedded-cacert.patch @@ -0,0 +1,17 @@ +diff --git a/lib/vagrant/util/downloader.rb b/lib/vagrant/util/downloader.rb +index 8756fc3..7fb2be8 100644 +--- a/lib/vagrant/util/downloader.rb ++++ b/lib/vagrant/util/downloader.rb +@@ -215,8 +215,9 @@ module Vagrant + # If we're in Vagrant, then we use the packaged CA bundle + if Vagrant.in_installer? + subprocess_options[:env] ||= {} +- subprocess_options[:env]["CURL_CA_BUNDLE"] = +- File.expand_path("cacert.pem", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]) ++ # Use system certificates. ++ # subprocess_options[:env]["CURL_CA_BUNDLE"] = ++ # File.expand_path("cacert.pem", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]) + end + + return [options, subprocess_options] + diff --git a/app-emulation/vagrant/files/vagrant-1.8.1-rvm.patch b/app-emulation/vagrant/files/vagrant-1.8.1-rvm.patch new file mode 100644 index 000000000000..81d17be010e3 --- /dev/null +++ b/app-emulation/vagrant/files/vagrant-1.8.1-rvm.patch @@ -0,0 +1,11 @@ +--- vagrant-1.8.1/bin/vagrant ++++ vagrant-1.8.1/bin/vagrant +@@ -5,6 +5,8 @@ + # initializing which have historically resulted in stack traces. + Signal.trap("INT") { abort } + ++ENV.delete('GEM_PATH') ++ + # Split arguments by "--" if its there, we'll recombine them later + argv = ARGV.dup + argv_extra = [] diff --git a/app-emulation/vagrant/files/vagrant-1.9.6 b/app-emulation/vagrant/files/vagrant-1.9.6 new file mode 100644 index 000000000000..ef264888f3ff --- /dev/null +++ b/app-emulation/vagrant/files/vagrant-1.9.6 @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# +# This is a wrapper to properly execute Vagrant within the embedded +# Vagrant installation directory. This sets up proper environmental variables +# so that everything loads and compiles to proper directories. + +VAGRANT_DIR="$( ruby -e 'print Gem::default_path[-1] + "/gems/vagrant-1.9.6"' )" + +# Export GEM_HOME based on VAGRANT_HOME +# +# This needs to be set because Bundler includes gem paths +# from RubyGems' Gem.paths. +if [ -z $VAGRANT_HOME ]; then + VAGRANT_HOME=$(eval echo "~/.vagrant.d") +fi +export GEM_HOME="$VAGRANT_HOME/gems" + +# SSL certs +export SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt" + +# Export an environmental variable to say we're in a Vagrant +# installer created environment. +export VAGRANT_INSTALLER_ENV=1 + +# This is currently used only in Vagrant::Plugin::Manager.system_plugins_file +# to locate plugins configuration file. +export VAGRANT_INSTALLER_EMBEDDED_DIR="/var/lib/vagrant" +export VAGRANT_INSTALLER_VERSION="2" + +# Determine the OS that we're on, which is used in some later checks. +# It is very important we do this _before_ setting the PATH below +# because uname dependencies can conflict on some platforms. +OS=$(uname -s 2>/dev/null) + +# Export the OS as an environmental variable that Vagrant can access +# so that it can behave better. +export VAGRANT_DETECTED_OS="${OS}" + +VAGRANT_EXECUTABLE="${VAGRANT_DIR}/bin/vagrant" + +# Export the VAGRANT_EXECUTABLE so that pre-rubygems can optimize a bit +export VAGRANT_EXECUTABLE + +# Call the actual Vagrant bin with our arguments +exec ruby "${VAGRANT_EXECUTABLE}" "$@" diff --git a/app-emulation/vagrant/files/vagrant.in b/app-emulation/vagrant/files/vagrant.in new file mode 100644 index 000000000000..761753208a77 --- /dev/null +++ b/app-emulation/vagrant/files/vagrant.in @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# This is a wrapper to properly execute Vagrant within the embedded +# Vagrant installation directory. This sets up proper environmental variables +# so that everything loads and compiles to proper directories. + +VAGRANT_DIR="$( ruby -e 'print Gem::default_path[-1] + "/gems/vagrant-@VAGRANT_VERSION@"' )" + +# Export GEM_HOME based on VAGRANT_HOME +# +# This needs to be set because Bundler includes gem paths +# from RubyGems' Gem.paths. +if [ -z ${VAGRANT_HOME} ]; then + VAGRANT_HOME="~/.vagrant.d" +fi +export GEM_HOME="${VAGRANT_HOME}/gems" + +# SSL certs +export SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt" + +# Export an environmental variable to say we're in a Vagrant +# installer created environment. +export VAGRANT_INSTALLER_ENV=1 + +# This is currently used only in Vagrant::Plugin::Manager.system_plugins_file +# to locate plugins configuration file. +export VAGRANT_INSTALLER_EMBEDDED_DIR="/var/lib/vagrant" +export VAGRANT_INSTALLER_VERSION=2 + +# Export the OS as an environmental variable that Vagrant can access +# so that it can behave better. +export VAGRANT_DETECTED_OS="$(uname -s 2>/dev/null)" + +# Export the VAGRANT_EXECUTABLE so that pre-rubygems can optimize a bit +export VAGRANT_EXECUTABLE="${VAGRANT_DIR}/bin/vagrant" + +# Allow to install plugins even with deps in different slots (Bug #628648) +export VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 + +# Make it work with rvm (Bugs #474476 #628648) +unset GEM_HOME GEM_PATH + +# Call the actual Vagrant bin with our arguments +exec ruby "${VAGRANT_EXECUTABLE}" "$@" diff --git a/app-emulation/vagrant/metadata.xml b/app-emulation/vagrant/metadata.xml new file mode 100644 index 000000000000..8fedf524af40 --- /dev/null +++ b/app-emulation/vagrant/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>hydrapolic@gmail.com</email> + <name>Tomas Mozes</name> + <description>Proxy maintainer</description> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="virtualbox"> + Use VirtualBox provider. + </flag> + </use> + <upstream> + <remote-id type="github">mitchellh/vagrant</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-emulation/vagrant/vagrant-1.9.7.ebuild b/app-emulation/vagrant/vagrant-1.9.7.ebuild new file mode 100644 index 000000000000..b6b67db26be1 --- /dev/null +++ b/app-emulation/vagrant/vagrant-1.9.7.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +USE_RUBY="ruby22 ruby23" + +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md" +RUBY_FAKEGEM_GEMSPEC="vagrant.gemspec" +RUBY_FAKEGEM_EXTRAINSTALL="keys plugins templates version.txt" +RUBY_FAKEGEM_TASK_DOC="" + +inherit bash-completion-r1 ruby-fakegem eutils + +DESCRIPTION="A tool for building and distributing development environments" +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" +IUSE="+virtualbox" + +RDEPEND="${RDEPEND} + app-arch/libarchive + net-misc/curl + virtualbox? ( || ( app-emulation/virtualbox app-emulation/virtualbox-bin ) )" + +ruby_add_rdepend " + >=dev-ruby/childprocess-0.6.0 + >=dev-ruby/erubis-2.7.0 + <dev-ruby/i18n-0.8.0:* + >=dev-ruby/listen-3.1.5 + >=dev-ruby/hashicorp-checkpoint-0.1.1 + >=dev-ruby/log4r-1.1.9 <dev-ruby/log4r-1.1.11 + >=dev-ruby/net-ssh-4.1.0:* + >=dev-ruby/net-sftp-2.1 + >=dev-ruby/net-scp-1.2.0 + || ( dev-ruby/rest-client:2 >=dev-ruby/rest-client-1.6.0:0 ) + >=dev-ruby/nokogiri-1.7.1 + <dev-ruby/mime-types-3:* +" + +ruby_add_bdepend " + >=dev-ruby/rake-11.3.0 +" + +all_ruby_prepare() { + # remove bundler support + sed -i '/[Bb]undler/d' Rakefile || die + rm Gemfile || die + + # loosen dependencies + sed -e '/hashicorp-checkpoint\|listen\|net-ssh\|net-scp\|rake\|childprocess/s/~>/>=/' \ + -e '/ruby_dep/s/<=/>=/' \ + -i ${PN}.gemspec || die + + # remove windows-specific gems + sed -e '/wdm\|winrm/d' \ + -i ${PN}.gemspec || die + + # remove bsd-specific gems + sed -e '/rb-kqueue/d' \ + -i ${PN}.gemspec || die + + # disable embedded CA certs and use system ones + epatch "${FILESDIR}"/${PN}-1.8.1-disable-embedded-cacert.patch + + # fix rvm issue (bug #474476) + epatch "${FILESDIR}"/${PN}-1.8.1-rvm.patch + + sed -e "s/@VAGRANT_VERSION@/${PV}/g" "${FILESDIR}/${PN}.in" > "${PN}" || die +} + +all_ruby_install() { + newbashcomp contrib/bash/completion.sh ${PN} + all_fakegem_install + + # provide executable similar to upstream: + # https://github.com/mitchellh/vagrant-installers/blob/master/substrate/modules/vagrant_installer/templates/vagrant.erb + dobin "${PN}" + + # directory for plugins.json + dodir /var/lib/vagrant +} diff --git a/app-emulation/vagrant/vagrant-1.9.8.ebuild b/app-emulation/vagrant/vagrant-1.9.8.ebuild new file mode 100644 index 000000000000..7d133f044ebf --- /dev/null +++ b/app-emulation/vagrant/vagrant-1.9.8.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +USE_RUBY="ruby22 ruby23" + +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md" +RUBY_FAKEGEM_GEMSPEC="vagrant.gemspec" +RUBY_FAKEGEM_EXTRAINSTALL="keys plugins templates version.txt" +RUBY_FAKEGEM_TASK_DOC="" + +inherit bash-completion-r1 ruby-fakegem eutils + +DESCRIPTION="A tool for building and distributing development environments" +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" +IUSE="+virtualbox" + +RDEPEND="${RDEPEND} + app-arch/libarchive + net-misc/curl + virtualbox? ( || ( app-emulation/virtualbox app-emulation/virtualbox-bin ) )" + +ruby_add_rdepend " + >=dev-ruby/childprocess-0.6.0 + >=dev-ruby/erubis-2.7.0 + <dev-ruby/i18n-0.8.0:* + >=dev-ruby/listen-3.1.5 + >=dev-ruby/hashicorp-checkpoint-0.1.1 + >=dev-ruby/log4r-1.1.9 <dev-ruby/log4r-1.1.11 + >=dev-ruby/net-ssh-4.1.0:* + >=dev-ruby/net-sftp-2.1 + >=dev-ruby/net-scp-1.2.0 + || ( dev-ruby/rest-client:2 >=dev-ruby/rest-client-1.6.0:0 ) + >=dev-ruby/nokogiri-1.7.1 + <dev-ruby/mime-types-3:* +" + +ruby_add_bdepend " + >=dev-ruby/rake-12.0.0 +" + +all_ruby_prepare() { + # remove bundler support + sed -i '/[Bb]undler/d' Rakefile || die + rm Gemfile || die + + # loosen dependencies + sed -e '/hashicorp-checkpoint\|listen\|net-ssh\|net-scp\|rake\|childprocess/s/~>/>=/' \ + -e '/ruby_dep/s/<=/>=/' \ + -i ${PN}.gemspec || die + + # remove windows-specific gems + sed -e '/wdm\|winrm/d' \ + -i ${PN}.gemspec || die + + # remove bsd-specific gems + sed -e '/rb-kqueue/d' \ + -i ${PN}.gemspec || die + + # disable embedded CA certs and use system ones + epatch "${FILESDIR}"/${PN}-1.8.1-disable-embedded-cacert.patch + + sed -e "s/@VAGRANT_VERSION@/${PV}/g" "${FILESDIR}/${PN}.in" > "${PN}" || die +} + +all_ruby_install() { + newbashcomp contrib/bash/completion.sh ${PN} + all_fakegem_install + + # provide executable similar to upstream: + # https://github.com/mitchellh/vagrant-installers/blob/master/substrate/modules/vagrant_installer/templates/vagrant.erb + dobin "${PN}" + + # directory for plugins.json + dodir /var/lib/vagrant +} diff --git a/app-emulation/vagrant/vagrant-2.0.0.ebuild b/app-emulation/vagrant/vagrant-2.0.0.ebuild new file mode 100644 index 000000000000..5b4b6f8b77d5 --- /dev/null +++ b/app-emulation/vagrant/vagrant-2.0.0.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +USE_RUBY="ruby22 ruby23" + +RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md" +RUBY_FAKEGEM_GEMSPEC="vagrant.gemspec" +RUBY_FAKEGEM_EXTRAINSTALL="keys plugins templates version.txt" +RUBY_FAKEGEM_TASK_DOC="" + +inherit bash-completion-r1 ruby-fakegem + +DESCRIPTION="A tool for building and distributing development environments" +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" +IUSE="+virtualbox" + +RDEPEND="${RDEPEND} + app-arch/libarchive + net-misc/curl + virtualbox? ( || ( app-emulation/virtualbox app-emulation/virtualbox-bin ) )" + +ruby_add_rdepend " + >=dev-ruby/childprocess-0.6.0 + >=dev-ruby/erubis-2.7.0 + <dev-ruby/i18n-0.8.0:* + >=dev-ruby/listen-3.1.5 + >=dev-ruby/hashicorp-checkpoint-0.1.1 + >=dev-ruby/log4r-1.1.9 <dev-ruby/log4r-1.1.11 + >=dev-ruby/net-ssh-4.1.0:* + >=dev-ruby/net-sftp-2.1 + >=dev-ruby/net-scp-1.2.0 + || ( dev-ruby/rest-client:2 >=dev-ruby/rest-client-1.6.0:0 ) + >=dev-ruby/nokogiri-1.7.1 + <dev-ruby/mime-types-3:* +" + +ruby_add_bdepend " + >=dev-ruby/rake-12.0.0 +" + +all_ruby_prepare() { + # remove bundler support + sed -i '/[Bb]undler/d' Rakefile || die + rm Gemfile || die + + # loosen dependencies + sed -e '/hashicorp-checkpoint\|listen\|net-ssh\|net-scp\|rake\|childprocess/s/~>/>=/' \ + -e '/ruby_dep/s/<=/>=/' \ + -i ${PN}.gemspec || die + + # remove windows-specific gems + sed -e '/wdm\|winrm/d' \ + -i ${PN}.gemspec || die + + # remove bsd-specific gems + sed -e '/rb-kqueue/d' \ + -i ${PN}.gemspec || die + + # disable embedded CA certs and use system ones + eapply "${FILESDIR}/${PN}-1.8.1-disable-embedded-cacert.patch" + + sed -e "s/@VAGRANT_VERSION@/${PV}/g" "${FILESDIR}/${PN}.in" > "${PN}" || die +} + +all_ruby_install() { + newbashcomp contrib/bash/completion.sh ${PN} + all_fakegem_install + + # provide executable similar to upstream: + # https://github.com/mitchellh/vagrant-installers/blob/master/substrate/modules/vagrant_installer/templates/vagrant.erb + dobin "${PN}" + + # directory for plugins.json + dodir /var/lib/vagrant +} |