macports / upt-macports

The Universal Packaging Tool (upt) backend for MacPorts
https://framagit.org/upt/upt
BSD 3-Clause "New" or "Revised" License
9 stars 12 forks source link

Ruby ports #36

Closed reneeotten closed 5 years ago

reneeotten commented 5 years ago

I just added Ruby 2.6 as supported version to the Ruby PortGroup (https://github.com/macports/macports-ports/commit/b4b32250f11c731de991bd6b51a4c626b3eed9ad).

After doing so I tried to package a (random) port (rb-treetop) to see how upt performs. It does get all the dependencies and such right, but there are a few issues with the current template. Admittedly, we (or probably I) will need to do some more work on the PortGroup itself to fix some of them.... but that might take a while since I don't have much experience with Ruby nor writing PortGroups ;)

Anyway, the template will eventually need some more changes once the new PortGroup is ready, but for now it should result in a working Portfile with the current PG which isn't the case right now.

Specifically:

  1. ruby.branches needs to be before ruby.setup, otherwise there are no subports generated (I would consider this a bug in the PG)
  2. for dependencies it shouldn't be port:rb${ruby.version}-<name> but port:rb${ruby.suffix}-<name>

Trying to package its dependency (rb-polyglot) there is an issue with the formatting of the description that makes the Portfile fail the parsing by MacPorts. Fixing that makes both ports (as far as I can tell at least) install correctly.

Finally, it logs the following message (twice): [ERROR ] [Backend] Could not determine the type of the source archive That should not happen I think as the source should be always .gem here, but also with the latest release of upt-rubygems I thought is was setting an ArchiveType, correct? You made an exception for rubygems in the base.Portfile template for the archive_type, perhaps the same thing should happen for the logging as well?