Appropriateness for inclusion in MacPorts
Aaron Madlon-Kay
aaron+macports at madlon-kay.com
Tue Apr 9 05:51:35 UTC 2019
Resurrecting a thread of mine from a long time ago:
I asked about the possibility of making ports for fonts (not X11
fonts, but regular ones for e.g. /Library/Fonts). I have been making
such portfiles with great success in a private repo, like this one:
https://github.com/amake/MacPorts/blob/master/font/FiraCode/Portfile
These install the font files to ${destroot}/Library/Fonts and set
`destroot.violate_mtree yes`; I have just been living with the
warnings.
Now that I go back and read the old thread I realize I had missed
Rainer's idea here:
> To support installation of fonts via MacPorts, there could be some
> script that creates symlinks for the font files stored in ${prefix} to
> these system directories. That script could then be triggered in
> pre-activate/post-activate to create/remove symlinks. In case these
> files already exist, error out and instruct the user how to resolve the
> situation.
Is there an existing mechanism for such scripts? Any examples I should
look at? Also what would be the best place to put the actual font
files in ${prefix}? Some subdirectory of ${prefix}/share/fonts I would
think.
Thanks,
Aaron
On Tue, Sep 12, 2017 at 9:28 PM Rainer Müller <raimue at macports.org> wrote:
>
> On 2017-09-04 14:46, Aaron Madlon-Kay wrote:
> > 1. Some OSS Java applications
> >
> > There are some Java applications I use that have both GUI and CLI components. One of them is bundled by default with a JRE. A trivial port would basically just download a .zip and dump the contents in /Applications/MacPorts, and make a symlink or two in $PREFIX/bin. On the other hand they could be built from source via Maven or Gradle, but I’ve never seen a port like that.
> >
> > Several Java-based ports I am aware of are Ant, Maven, Gradle, Jython… these all basically just download binaries and maybe make some symlinks, but they are Serious CLI Dev Tools™, so maybe that’s OK for them.
>
> As Java applications are mostly self-contained without external
> dependencies (no dynamically linked libraries), I guess the approach to
> just extract the .zip will work.
>
> However, I do not know what kind of compatibility we can expect from the
> bytecode.
>
> > 2. OSS Fonts
> >
> > There are a number of fonts that I use that would be very convenient to have available through MacPorts. This is another “download and extract a binary” situation. Last time I looked I only found X11 fonts in MacPorts, whereas the ones I’m talking about here are mostly TrueType fonts.
>
> As Andrew already said, fonts are required to be installed to the
> system-wide directory /Library/Fonts or per-user into the home at
> ~/Library/Fonts.
>
> To support installation of fonts via MacPorts, there could be some
> script that creates symlinks for the font files stored in ${prefix} to
> these system directories. That script could then be triggered in
> pre-activate/post-activate to create/remove symlinks. In case these
> files already exist, error out and instruct the user how to resolve the
> situation.
>
> Rainer
More information about the macports-dev
mailing list