Recent u-boot port change

From: Christopher Bowman <crb_at_chrisbowman.com>
Date: Sun, 08 May 2022 22:29:08 UTC
First, I truly do appreciate all the effort every one puts into FreeBSD.  Apologies if I’m not quite following protocol here:

I see that u-boot master port was recently upgraded to pull u-boot 2022.04.  I have a private port that I’ve been using but looks me to an earlier version of the port since the recent one uses a version of u-boot I can’t get to work.  I attempted to update my private port based on the new version to see if I can get it working and committed  However, I’m confused how the master port ever built.  When I try to build with my patches applied I get the following errors:

tools/mkeficapsule.c:18:10: fatal error: 'uuid/uuid.h' file not found
#include <uuid/uuid.h>
       ^~~~~~~~~~~~~
1 error generated.

There is a uuid.h in /usr/include so I patched this.

Then I come across:

tools/mkeficapsule.c:21:10: fatal error: 'gnutls/gnutls.h' file not found
#include <gnutls/gnutls.h>
       ^~~~~~~~~~~~~~~~~
1 error generated.

Ok so I install gnutls and patch the make file to also search /usr/local/include where that gets installed.  Next I get:

tools/mkeficapsule.c:631:8: warning: implicit declaration of function 'uuid_parse' is invalid in C99 [-Wimplicit-function-declaration]
                      if (uuid_parse(optarg, uuid_buf)) {
                          ^
1 warning generated.

uuid_parse doesn’t exist in /usr/include/uudi.h but /usr/include/sys/uuid.h which is included by /usr/include/uuid.h does have a parse_uuid (note: not uuid_parse) which looks right so I patch again but now I get:

tools/mkeficapsule.c:631:8: warning: implicit declaration of function 'parse_uuid' is invalid in C99 [-Wimplicit-function-declaration]
                      if (parse_uuid(optarg, uuid_buf)) {
                          ^
1 warning generated.

at which point I give up and start to wonder how any of the other u-boot ports build?  I mean this doesn’t look very specific to my port which is a Xilinx Zynq/arm architecture.  I didn’t see any other Zynq ports in the tree so I couldn’t look at them for reference.  This all happens on a 13.0 system with a recent git copy of ports.

Any comments?
Regards,
Christopher