vagrant-1.9.1-r1.ebuild 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. USE_RUBY="ruby21 ruby22 ruby23"
  5. RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
  6. RUBY_FAKEGEM_GEMSPEC="vagrant.gemspec"
  7. RUBY_FAKEGEM_EXTRAINSTALL="keys plugins templates version.txt"
  8. RUBY_FAKEGEM_TASK_DOC=""
  9. inherit bash-completion-r1 ruby-fakegem eutils
  10. DESCRIPTION="A tool for building and distributing development environments"
  11. HOMEPAGE="http://vagrantup.com/"
  12. SRC_URI="https://github.com/mitchellh/vagrant/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  13. LICENSE="MIT"
  14. SLOT="0"
  15. KEYWORDS="~amd64"
  16. IUSE="+virtualbox"
  17. RDEPEND="${RDEPEND}
  18. app-arch/libarchive
  19. net-misc/curl
  20. virtualbox? ( || ( app-emulation/virtualbox app-emulation/virtualbox-bin ) )"
  21. ruby_add_rdepend "
  22. >=dev-ruby/childprocess-0.5.0
  23. >=dev-ruby/erubis-2.7.0
  24. >=dev-ruby/i18n-0.6.0:* <dev-ruby/i18n-0.8.0:*
  25. >=dev-ruby/listen-3.1.5
  26. >=dev-ruby/hashicorp-checkpoint-0.1.1
  27. >=dev-ruby/log4r-1.1.9 <dev-ruby/log4r-1.1.11
  28. >=dev-ruby/net-ssh-3.0.1:*
  29. >=dev-ruby/net-sftp-2.1
  30. >=dev-ruby/net-scp-1.1.0
  31. || ( >=dev-ruby/rest-client-1.6.0:0 dev-ruby/rest-client:2 )
  32. >=dev-ruby/nokogiri-1.6.7.1
  33. >=dev-ruby/mime-types-2.6.2:* <dev-ruby/mime-types-3:*
  34. "
  35. ruby_add_bdepend "
  36. >=dev-ruby/rake-11.3.0
  37. "
  38. all_ruby_prepare() {
  39. # remove bundler support
  40. sed -i '/[Bb]undler/d' Rakefile || die
  41. rm Gemfile || die
  42. # loosen dependencies
  43. sed -e '/hashicorp-checkpoint\|listen\|net-ssh\|net-scp\|rake\|childprocess/s/~>/>=/' \
  44. -e '/ruby_dep/s/<=/>=/' \
  45. -e '/nokogiri/s/=/>=/' \
  46. -i ${PN}.gemspec || die
  47. # remove windows-specific gems
  48. sed -e '/wdm\|winrm/d' \
  49. -i ${PN}.gemspec || die
  50. # remove bsd-specific gems
  51. sed -e '/rb-kqueue/d' \
  52. -i ${PN}.gemspec || die
  53. # disable embedded CA certs and use system ones
  54. epatch "${FILESDIR}"/${PN}-1.8.1-disable-embedded-cacert.patch
  55. # fix rvm issue (bug #474476)
  56. epatch "${FILESDIR}"/${PN}-1.8.1-rvm.patch
  57. }
  58. all_ruby_install() {
  59. newbashcomp contrib/bash/completion.sh ${PN}
  60. all_fakegem_install
  61. # provide executable similar to upstream:
  62. # https://github.com/mitchellh/vagrant-installers/blob/master/substrate/modules/vagrant_installer/templates/vagrant.erb
  63. newbin "${FILESDIR}/${P}" "${PN}"
  64. # directory for plugins.json
  65. dodir /var/lib/vagrant
  66. }