Update mono, F#: support "select"

Mojca Miklavec mojca at macports.org
Tue Dec 13 16:56:59 CET 2016


Hi,

On 13 December 2016 at 16:32, Luc Bourhis wrote:
> Hi,
>
> I am writing an update for the fsharp port (F# language), which is very outdated. This requires an update to the mono port, from version 3 to 4. One could make the case to support every x.y version of Mono and F# as MacPorts does for python, ruby, etc and then to let the user choose with port select. I would appreciate some pointers on how to support “port select” though.

I would suggest you to think twice (or three times) before going for
support for multiple versions. It is possible, but I would do it only
if this is really really really needed.

(Ruby is completely outdated and only the interpreter works, packaging
is completely unmaintained. Perl is only working because David puts
countless hours into updating a zillion packages. And even then there
are constant complains that we shouldn't support multiple versions.
Only python works satisfactory as it has quite some maintainers, lots
of dependent ports and a reasonably small number of modules.)

So if you really really really want to do it (and if you are willing
to maintain it), you need to:

* make sure that versions can be installed in parallel without any
conflicting files
* create a list of files (A) where port select will put the symlinks
* for each port create a list of files (B) where the symlinks will point to
* make a port sysutils/<foo>_select (look at other examples there)
that installs the list of symlinks (A) (and an empty list)
* for every port that will use this:

    PortGroup select 1.0
    select.group <foo>
    depends_run port:<foo>_select

    select.file <file-with-list-of-files-B>
    # for example ${filespath}/${subport} if you have multiple subports

You can put the list of files to "files/<(sub)portname>".

Mojca


More information about the macports-dev mailing list