ocaml port submissions

Rainer Müller raimue at macports.org
Wed May 19 03:50:31 PDT 2010


On 19.05.2010 11:02, Tom Hutchinson wrote:
> An extra archive needs to be downloaded (in a different format too -
> it seems like there's current no good way to mix gzip and bz2 in the
> extract phase - I ended up exacting the additional file manually in
> extract-post). Then some files need to be moved from one directory to
> the other. Then a patch that affects several files needs to be
> applied. This patch file is in the extra archive. There isn't a
> simple single build target anymore either.

This is true, using post-extract is the only solution we have at the moment.

> The part that is still a little bit a magic is destroot. I'll have to
> look more to learn how the whole staging process works. I don't have
> internet access at home (an experiment I would strongly encourage
> others to try) so I was just using the sources and a downloaded copy
> of the guide. Are there other resources I should read?

The guide and the portfile man page is the best documentation, as it is
the only documentation we have ;-)

Reading the source directly might also be more helpful in some places
where documentation still lacks features.

> This weekend I'll try to clean up this portfile. Right now some parts
> are kind of hacks. For instance, in some places I looked how the
> tcl's files worked and did things manually (when I couldn't directly
> use the predefined phases). While this will work now, it seems much
> better to use the proper lookup functions.
> 

> [...]
> Style-wise, I'm wondering about setting setting this variable
> ($ocamlfind_destdir). I don't see any big advantage to this over just
> calling the command every time. I haven't seen this kind of thing in
> other ports (though admittedly I've only read a relatively small
> number in great detail).

I would prefer a "set ocamlfind_destdir ..." instruction over this proc
if it is being used in destroot only. This would also automatically
ensure it is only being called once.

> Another thing I'll be looking into is updating the OCaml Batteries
> Included port (caml-batteries).
> 
> I have a question. Should I continue with the caml- prefix for port
> names? Some ports are named ocaml-* (which is widely used in naming
> packages for Linux distributions).

This is something I do not have the knowledge to give advice. As far as
I know caml is the language and ocaml is an implementation. So in
theory, would it be possible to use these ports with another
implementation or do they contain ocaml specific parts?

If others are going with ocaml-* we could just do the same if that is
what users would expect.

> Yikes - I apologize for this long and rambling e-mail

After a weekend without internet at home I would have to ramble, too :P

Rainer


More information about the macports-dev mailing list