From owner-freebsd-ports@freebsd.org Wed Jul 13 09:41:25 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51076B97345 for ; Wed, 13 Jul 2016 09:41:25 +0000 (UTC) (envelope-from ml@netfence.it) Received: from smtp206.alice.it (smtp206.alice.it [82.57.200.102]) by mx1.freebsd.org (Postfix) with ESMTP id E209915CC for ; Wed, 13 Jul 2016 09:41:24 +0000 (UTC) (envelope-from ml@netfence.it) Received: from soth.ventu (87.16.63.56) by smtp206.alice.it (8.6.060.28) (authenticated as acanedi@alice.it) id 577E7EB801479E01 for freebsd-ports@freebsd.org; Wed, 13 Jul 2016 11:41:16 +0200 Received: from alamar.ventu (alamar.local.netfence.it [10.1.2.18]) by soth.ventu (8.15.2/8.15.2) with ESMTP id u6D9d2eI034712 for ; Wed, 13 Jul 2016 11:39:04 +0200 (CEST) (envelope-from ml@netfence.it) X-Authentication-Warning: soth.ventu: Host alamar.local.netfence.it [10.1.2.18] claimed to be alamar.ventu From: Andrea Venturoli Subject: Porting OpenCPN To: "freebsd-ports@freebsd.org" Message-ID: <1569cead-c078-0714-9330-9a3ff19088dd@netfence.it> Date: Wed, 13 Jul 2016 11:39:02 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2016 09:41:25 -0000 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.