Fri Feb 12 11:50:00 GMT 2010
Before we start:
On 11/02/2010 15:36, Ed Keith wrote:
> It has been brought to my attention that the ocaml package has been
> orphaned. I am willing to take it over.
That's good news! You've chosen a bit of a challenge to start off with.
> I believe I have the source package ready, but am still having problems
> figuring out exactly how to package the bin, I am working on it.
Since you didn't mention ITP'ing flexdll, I take it that you build ocaml
with only static libraries.
You may want to take a look at how I built OCaml for Cygwin Ports:
(Yes, that's for 3.11.1; 3.11.2 just came out and I was working on
other things this week.)
The "official" way of supporting OCaml shared modules (dll*.so stublibs
and *.cmxs natdynlink modules) on PE/COFF platforms is with FlexDLL,
which implements a way to link libraries without resolving all their
symbol dependencies at link time. (Ports SVN also includes a few
patches necessary for flexdll to work correctly.) The drawback is
that you *must* use the OCaml compilers to link any code that uses
OCaml, which means, for instance, the GraphViz OCaml bindings whose
stublib is normally linked with libtool cannot be built as-is, nor can
Kalzium be built with the solver which uses facile (native code) but
links with CXX. The vast majority of packages build just as they do on
ELF platforms, so this is a tradeoff to be made for the functionality.
The only alternative is ugly, won't fix .cmxs linkage, and won't be
supported upstream, so it's probably not worth the bother.
The other issue to be determined is what should be (in cygport
terminology) OCAML_LIBDIR. By default, this is /usr/lib/ocaml, but some
distros version this in order to account for the API/ABI changes which
do periodically occur. (For instance, there was such a change between
3.09 and 3.10.0, which they then undid for 3.10.1. I suppose I got what
I deserved for using a .0 release.) Actually, Debian *used* to do this,
but today I see that they stopped, possibly because it would be quite
tedious to rebuild ALL ocaml packages for every OCaml point release. So
sticking with the default may make sense, with the understanding that
packages may have to periodically be rebuilt as time goes on.
As for packaging, my .cygport creates separate packages for ocaml-camlp4
(due to its size and only periodic usage) and ocaml-labltk (due to the
added dependency on tcl/tk). You don't have to go this route, but I
will at least suggest it.
HTH, and please let us know how we can further help with your ITA.
More information about the Cygwin-apps