depext-cygwinports provides all functions that are necessary in order to support opam-depext under cygwin. The installation of external libraries (like pcre, gtk2, or gmp) is very convenient this way.
depext-cygwinports will also install a wrapper for
$(opam config var bin).
pkg-config is available as either
cygwin and most build instructions will just look for
/usr/x86_64-w64-mingw32/sys-root/mingw/binto your $PATH (in front of
/usr/bin, not after it!). The cygwin maintainer use this convention to avoid name clashes. There is for example one
/usr/bin(for cygwin’s version of libcurl that is linked against
cygwin1.dll), one in
/usr/x86_64-w64-mingw32/sys-root/mingw/bin(64-bit native windows) and one in
/usr/i686-w64-mingw32/sys-root/mingw/bin. The dlls at
/usr/i686-w64-mingw32/sys-root/mingw/binusually also have identical names. Therefore you have to configure your PATH manually. (As an alternative you can use
eval $(ocaml-env cygwin)instead of
eval $(opam config env), see ocaml-env)
Now you can use
opam depext in the same way as under linux.
The following command for example will install
OCaml-Top including all
dependencies (gtk2, gtksourceview, etc.):
depext-cygwinportswon’t work in multiuser contexts - you need write access to your root directory of cygwin. If you use the graphical installer and start it as normal user, the installer will configure it correct for you. If you want to install additonal cygwin packages later or update your installation, start cygwin’s setup with
cygwin-installis the wrapper installed by
depext-cygwinports, it will call cygwin’s setup with the right parameters for you).
And by the way, you can create multiple, independent cygwin installations without any problems. Every user could create its own version, it would just waste disk space.
depext-cygwinportsis a misnomer at the moment. Yaakov Selkowitz recently moved all relevant packages from his repository (‘cygwinports’) to the main repository. The latest release of
depext-cygwinportstherefore does not longer install any packages from cygwinports. But this might change again in the future.