Files
Yasuhiro Kimura da2a4bdd21 Mk/bsd.default-versions.mk: Change default version of Ruby to 3.3
With the release of 3.2.8 Ruby 3.2 series switched to security fix
only phase and will be reach its EoL on March 2026. So change defult
version of Ruby to 3.3.

Following changes are made to pass exp-run.

* Fix build of audio/rubygem-ruby-shout by adding
  '--with-cflags="-Wno-error=int-conversion"' to CONFIGURE_ARGS.
* Build of devel/rubygem-mmap2 fails with Ruby 3.3 and later because
  of internal API change of Ruby. So mark BROKEN with them.
* devel/rubygem-xdg7, sysutils/vagrant and www/redmine51 don't support
  Ruby 3.3 and later. So mark BROKEN with them.
* misc/sdformat and textproc/ruby-rdtool are already marked BROKEN
  with Ruby 3.2 and build with all other Ruby versions also fails with
  same error. So mark just BROKEN.
* Fix plist error of sysutils/puppet8.
* Fix RUN_DEPENDS of textproc/quarto.

PR:		286217
Approved by:	self (with hat of ruby)
Exp-run by:	antoine
2025-05-09 19:06:38 +09:00

125 lines
4.8 KiB
Makefile

PORTNAME= vagrant
PORTVERSION= 2.3.7
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= sysutils rubygems devel
MAINTAINER= joe@thrallingpenguin.com
COMMENT= Vagrant Virtual Machine Manager
WWW= https://www.vagrantup.com/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= rubygem-builder>=2.1.2:devel/rubygem-builder \
rubygem-bundler>=1.12.5:sysutils/rubygem-bundler \
rubygem-main>=1.0:devel/rubygem-main
RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss \
curl:ftp/curl \
rubygem-bcrypt_pbkdf>=1.1:security/rubygem-bcrypt_pbkdf \
rubygem-childprocess>=5.0:devel/rubygem-childprocess \
rubygem-ed25519>=1.3.0:security/rubygem-ed25519 \
rubygem-erubi>=0:www/rubygem-erubi \
rubygem-googleapis-common-protos-types>=1.3.0:devel/rubygem-googleapis-common-protos-types \
rubygem-grpc>=1.48.0:net/rubygem-grpc \
rubygem-hashicorp-checkpoint>=0.1.5<0.2:www/rubygem-hashicorp-checkpoint \
rubygem-i18n>=1.12,2:devel/rubygem-i18n \
rubygem-ipaddr>=1.2.4:net/rubygem-ipaddr \
rubygem-listen>=3.7:devel/rubygem-listen \
rubygem-log4r>=1.1.9<1.1.11:sysutils/rubygem-log4r \
rubygem-mime-types>=3.3:misc/rubygem-mime-types \
rubygem-net-ftp>=0.2:ftp/rubygem-net-ftp \
rubygem-net-scp>=4.0.0:security/rubygem-net-scp \
rubygem-net-sftp>=4.0:security/rubygem-net-sftp \
rubygem-net-ssh>=7.0.0:security/rubygem-net-ssh \
rubygem-rb-kqueue>=0.2.0:devel/rubygem-rb-kqueue \
rubygem-rexml>=3.2:textproc/rubygem-rexml \
rubygem-rgl>=0.5.10:devel/rubygem-rgl \
rubygem-rubyzip>=2.3.2:archivers/rubygem-rubyzip \
rubygem-vagrant_cloud>=3.1.1:sysutils/rubygem-vagrant_cloud \
rubygem-wdm>=0.1.1:devel/rubygem-wdm \
rubygem-winrm-elevated>=1.2.3<2:sysutils/rubygem-winrm-elevated \
rubygem-winrm-fs>=1.3.5<2:filesystems/rubygem-winrm-fs \
rubygem-winrm>=2.3.6<3:sysutils/rubygem-winrm
USES= cpe ruby shebangfix
CPE_VENDOR= hashicorp
USE_GITHUB= yes
GH_ACCOUNT= hashicorp
GEM_ENV+= RB_USER_INSTALL=yes
SHEBANG_FILES= plugins/hosts/darwin/scripts/install_virtualbox.sh \
scripts/sign.sh scripts/website_push_www.sh
GEMFILES= vagrant-${PORTVERSION}.gem
RUBYGEMBIN= gem
BUILD_TARGET= ${ARCH}-${OPSYS:tl}-${OSREL:R}
PLIST_SUB+= BUILD_TARGET="${BUILD_TARGET}" \
DOC_DIR="lib/ruby/gems/${RUBY_VER}/doc" \
GEM_BASE_DIR="lib/ruby/gems/${RUBY_VER}/gems" \
GEMS_DIR="lib/ruby/gems/${RUBY_VER}" \
PORTVERSION="${PORTVERSION}"
RUBYGEM_ARGS= -l --no-document --no-update-sources --install-dir \
${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER} \
--ignore-dependencies --bindir=${STAGEDIR}${PREFIX}/bin
OPTIONS_DEFINE= BASH ZSH
OPTIONS_DEFAULT= BASH ZSH
BASH_PLIST_FILES= share/bash-completion/completions/vagrant
ZSH_PLIST_FILES= share/share/zsh/site-functions/_vagrant
REMOVE_TARGETS= .envrc .runner.sh .vimrc .yardopts flake.lock flake.nix Gemfile \
gen.go go.mod go.sum Makefile Rakefile shell.nix \
vagrant-config.hcl vagrant-spec.config.example.rb \
vagrant.gemspec vagrant_ssl.so
REMOVE_TARGETS_EXT= gem_make.out mkmf.log
.include <bsd.port.pre.mk>
.if ${RUBY_VER} >= 3.3
BROKEN= ruby 3.3 and later is not supported
.endif
post-patch:
@${REINPLACE_CMD} -e 's|@PREFIX@|${PREFIX}|g' \
${WRKSRC}/bin/vagrant \
${WRKSRC}/plugins/providers/virtualbox/action/network.rb \
${WRKSRC}/templates/locales/en.yml
do-build:
(cd ${WRKSRC}; (${ECHO_CMD} -e "install:\n\techo\n") > Makefile)
(cd ${WRKSRC}; ${SETENV} VAGRANT_INSTALLER_ENV=yes \
${GEM_ENV} ${RUBYGEMBIN} build vagrant.gemspec)
(cd ${WRKSRC}; ${SETENV} VAGRANT_INSTALLER_ENV=yes \
${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} \
${GEMFILES} -- ${CONFIGURE_ARGS})
${RMDIR} ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER}/build_info
${MKDIR} ${STAGEDIR}${DATADIR}/embedded/rgloader
${INSTALL_SCRIPT} ${FILESDIR}/loader.rb \
${STAGEDIR}${DATADIR}/embedded/rgloader/loader.rb
post-install:
${RMDIR} ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER}/doc
${RM} -r ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER}/gems/${PORTNAME}-${PORTVERSION}/ext
${RM} -r ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER}/gems/${PORTNAME}-${PORTVERSION}/nix
.for FILE in ${REMOVE_TARGETS}
${RM} ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER}/gems/${PORTNAME}-${PORTVERSION}/${FILE}
.endfor
.for FILE in ${REMOVE_TARGETS_EXT}
${RM} ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER}/extensions/${BUILD_TARGET}/${RUBY_VER}/${PORTNAME}-${PORTVERSION}/${FILE}
.endfor
post-install-BASH-on:
${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions
${RLN} ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER}/gems/${PORTNAME}-${PORTVERSION}/contrib/bash/completion.sh ${STAGEDIR}${PREFIX}/share/bash-completion/completions/vagrant
post-install-ZSH-on:
${MKDIR} ${STAGEDIR}${PREFIX}/share/share/zsh/site-functions
${RLN} ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER}/gems/${PORTNAME}-${PORTVERSION}/contrib/zsh/_vagrant ${STAGEDIR}${PREFIX}/share/share/zsh/site-functions
.include <bsd.port.post.mk>