Vapor 4 and MacPorts

Every once in a blue moon, I have to program a backend for my apps myself. Now is that time again and I just checked, there is still no vapor port of this available in MacPorts (but some scientific 3D application of the same name). So I guess I have to walk that rocky path again …

The brew formula is now integrated into homebrew itself and now located here: homebrew-core/Formula/v/vapor.rb at main · Homebrew/homebrew-core · GitHub

I'll follow it as above:

  • downloaded https://github.com/vapor/toolbox/archive/refs/tags/20.0.0.tar.gz then
  • openssl dgst -sha256 /Users/lars/Downloads/toolbox-20.0.0.tar.gz
  • SHA2-256(/Users/lars/Downloads/toolbox-20.0.0.tar.gz)= b3b215a69ae8b5235d4f37229313ee1947de5c5b9ad2142a76b17c105dd758cf was fine
  • mkdir vapor
  • cd vapor/
  • tar -xvf /Users/lars/Downloads/toolbox-20.0.0.tar.gz
  • install the dependency openssl: sudo port -v install openssl
  • cd toolbox-20.0.0/
  • swift build --disable-sandbox -c release -Xswiftc -cross-module-optimization
  • mv .build/release/vapor vapor
  • ./vapor --help printed the help message
  • cp vapor ~/bin/vapor
  • which vapor prints now /Users/lars/bin/vapor (for this I of course had to add ~/bin to my $PATH

So this way now I got a fresh vapor installation. Note to self: don't forget to request a MacPorts port this time!

Kind regards,

Lars