Porting OpenCPN

Andrea Venturoli ml at netfence.it
Wed Jul 13 09:41:25 UTC 2016


Please forgive me if you see this message twice: I think the first time 
it didn't get through...




Hello.

I'm trying to port OpenCPN (http://opencpn.org/ocpn/) and I'm up to the 
point where the program seems to work; I couldn't try any GPS hardware, 
though.

In case anyone is interested in having a look, you can find it here:
http://www.netfence.it/download/OpenCPN_port.tbz

Still, I've got a couple of questions...

There is no downloadable archive for OpenCPN, so I "git cloned" the 
source, created a tarball and put it on my website (as MASTER_SITE).
Does the port infrastructure allow for direct "git clone" instead?



There's the following code, which I'm no so sure how to translate:

>  int isTTYreal(const char *dev)
>  {
>      struct serial_struct serinfo;
>      int ret = 0;
>
>      int fd = open(dev, O_RDWR | O_NONBLOCK | O_NOCTTY);
>
>      // device name is pointing to a real device
>      if(fd >= 0) {
>        if (ioctl(fd, TIOCGSERIAL, &serinfo)==0) {
>              // If device type is no PORT_UNKNOWN we accept the port
>              if (serinfo.type != PORT_UNKNOWN)
>                  ret = 1;
>         }
>          close (fd);
>      }

For now I commented the ioctl and just set ret=1 if open succeeds; do we 
have anything equivalent to this Linuxism, instead?

   bye & Thanks
	av.


More information about the freebsd-ports mailing list