Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2016 11:39:02 +0200
From:      Andrea Venturoli <ml@netfence.it>
To:        "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   Porting OpenCPN
Message-ID:  <1569cead-c078-0714-9330-9a3ff19088dd@netfence.it>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1569cead-c078-0714-9330-9a3ff19088dd>