Porting software that wants to build/install its own language bindings
Lawrence Velázquez
larryv at macports.org
Tue Nov 29 02:21:15 CET 2016
> On Nov 28, 2016, at 7:31 PM, A. Karl Kornel <karl at kornel.us> wrote:
>
> I am looking for advice on how best to handle a port for a program
> that wants to build its own language bindings.
>
> I am writing a port for a program called "hivex", which is a tool and
> an API for manipulating Windows Registry "hive" files. The API is
> written in C, but it also is able to build support for Perl, Python,
> OCaml, and Ruby.
>
> What makes this confusing is that additional language support is added
> by `configure` switches (like --with-python and --without-ocaml), so
> I don't think separate Portfiles would be the best option here. I'm
> also not sure if subports would work either.
>
> Has anyone had to deal with this kind of situation before? Any advice
> would be appreciated!
As Brandon already said, it's common to use variants for this. Ports
that do this include boost, postgresql*, root[56], xapian-bindings, and
vim/MacVim (among many others).
A few ports do use subports or separate ports; these include
subversion-* and swig. If you can manage it, this setup is best because
other ports can then declare dependencies on your bindings (they cannot
properly depend on variants), but it might require more work on your
part. Depending on the build system, each subport might have to do
a full build while only installing the bindings and discarding
everything else.
vq
More information about the macports-dev
mailing list