Porting Software Written in Ada
Matthias Andree
ma at dt.e-technik.uni-dortmund.de
Fri Jan 2 17:35:44 PST 2004
"Li-lun Wang (Leland Wang)" <llwang at infor.org> writes:
> I am making a FreeBSD port for a software written in Ada. There does not
> seem to be any software in Ada in the FreeBSD ports right now, and I have
> several questions about the dependencies:
Note I don't have Ada experience on FreeBSD, but I do have some ports
experience.
> 1. I make the software build_depend on lang/gnat; is it correct?
lang/gnat-glade uses
BUILD_DEPENDS= adagcc:${PORTSDIR}/lang/gnat
That should work.
> 2. I notice that the resulting executable depends on libgnat-3.15.so.1.
> How should I write the LIB_DEPENDS? The "3.15" part is actually the
> variable $LIBRARY_VERSION in lang/gnat/Makefile. Should include
> lang/gnat/Makefile somehow or hard code 3.15 into my Makefile?
As GNAT doesn't change often, I'd personally find
LIB_DEPENDS=gnat-3.15.1:${PORTSDIR}/lang/gnat (or whatever the path is)
fine: that's the version you have tested the port with, and that you
know it'll work with without changes.
> 3. What should I do if I hope the package not lib_depend on libgnat like
> the cvsup package which does not depend on m3?
You might offer an option to link libgnat statically, but I cannot tell
you how to do this with Ada code. If it's regular C linkage,
ld ... -static -lgnat -Bdynamic -lc ...
would do the job, where ... is a list of other linker objects,
libraries, whatever else goes into the executable of your port.
HTH,
--
Matthias Andree
Encrypt your mail: my GnuPG key ID is 0x052E7D95
More information about the freebsd-ports
mailing list