I was trying to compile the example of net/anet in the project presentation page, http://www.codelabs.ch/anet/ and it fails because of missing files:
ada -c -I- -gnatA /home/nat/tmp/client.adb
client.adb:5:06: file "anet-socket_families.ads" not found
client.adb:5:06: "Client (body)" depends on "Anet.Sockets (spec)"
client.adb:5:06: "Anet.Sockets (spec)" depends on "Anet.Socket_Families (spec)"
client.adb:5:06: file "anet-sockets-thin-unix.ads" not found
client.adb:5:06: "Client (body)" depends on "Anet.Sockets.Unix (spec)"
client.adb:5:06: "Anet.Sockets.Unix (spec)" depends on "Anet.Sockets.Thin.Unix (spec)"
gnatmake: "/home/nat/tmp/client.adb" compilation error
I won't have time to investigate anet build system in the near future, so I'm only reporting issue without any patch proposal.
A commit references this bug:
Date: Sat Jul 12 13:58:58 UTC 2014
New revision: 361616
net/anet: Install missing files and relocate static library
Natacha noticed that some of the source files were not being installed.
I tested the fix using PREFIX/lib/gnat/anet.gpr and then discovered it
was expecting libanet.a to be installed at PREFIX/lib rather than
PREFIX/lib/anet, so I modified the pkg-plist for that as well.
Submitted by: Natacha Porte
Patch by: maintainer (marino)
This is was a good catch. After installing the newest version of the anet port, I tested it by creating the client.gpr file:
> with "anet.gpr";
> project Client is
> for Object_Dir use "obj";
> for Main use ("client.adb");
> end Client;
With ADA_PROJECT_PATH set to /usr/local/lib/gnat in the environment, I built "client" like this:
> /usr/local/gcc-aux/bin/gnatmake -p -P client
object directory "/usr/home/marino/natacha/anet/obj" created for project client
ada -c -I- -gnatA /usr/home/marino/natacha/anet/client.adb
gnatbind -x /usr/home/marino/natacha/anet/obj/client.ali
gnatlink /usr/home/marino/natacha/anet/obj/client.ali /usr/local/lib/libanet.a -Wl,-rpath,/usr/local/gcc-aux/lib/gcc/x86_64-aux-freebsd10.0/4.9.0/adalib/ -o /usr/home/marino/natacha/anet/obj/client
So I think the anet problem should be solved now, thanks!