From owner-freebsd-ports@FreeBSD.ORG Wed May 10 05:07:28 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E724416A404 for ; Wed, 10 May 2006 05:07:28 +0000 (UTC) (envelope-from boris@brooknet.com.au) Received: from jay.exetel.com.au (jay.exetel.com.au [220.233.0.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B03343D45 for ; Wed, 10 May 2006 05:07:26 +0000 (GMT) (envelope-from boris@brooknet.com.au) Received: (qmail 32218 invoked by uid 507); 10 May 2006 15:07:25 +1000 Received: from 180.205.233.220.exetel.com.au (HELO ?192.168.0.157?) (220.233.205.180) by jay.exetel.com.au with SMTP; 10 May 2006 15:07:25 +1000 In-Reply-To: <20060510035430.GM545@bunrab.catwhisker.org> References: <20060510035430.GM545@bunrab.catwhisker.org> Mime-Version: 1.0 (Apple Message framework v749.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9799FB13-4235-43C9-BE20-331EA82668D4@brooknet.com.au> Content-Transfer-Encoding: 7bit From: Sam Lawrance Date: Wed, 10 May 2006 15:07:24 +1000 To: David Wolfskill X-Mailer: Apple Mail (2.749.3) Cc: ports@freebsd.org Subject: Re: Port maintainer query: what to use to specify serial port? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2006 05:07:29 -0000 On 10/05/2006, at 1:54 PM, David Wolfskill wrote: > The author of the port I maintain (astro/gpsman) has recently informed > me that he's released an updated distribution, so I'd like to > update the > FreeBSD port to correspond. > > It's a pretty simple port -- it's a Tcl/Tk application; there's no > compilation involved. > > But it is developed under Linux, so the port has a few patches to the > author's code to make things work better (or "at all") in FreeBSD. > > One of the patches has historically changed the default serial port > from > /dev/ttyS0 to /dev/cuaa0. > > But I just noticed that my laptop (running 6.1-STABLE) doesn't have > /dev/cuaa0. Right; that was one of the changes from 4.x, so it should > be /dev/cuad0... well, for 6.x. Is there a decent way to make the > replacement appropriate for the OS running at the time of installation > (that isn't so much additional hassle that it's not really worth the > bother)? Do we care enough about 4.x to address this issue? > > Please respond to me, as I'm not subscribed to this list (Reply-To > set intentionally); feel free to also include the list as a recipient > of your message if you believe it will be beneficial to do so. Instead of a device name, you can put something like %%SERIAL%% in the patched file. Then in the port makefile: .include .if ${OSVERSION} >= 600000 GPSMAN_DEFAULT_PORT?= /dev/cuad0 .else GPSMAN_DEFAULT_PORT?= /dev/cuaa0 .endif post-patch: ${REINPLACE_CMD} "s|%%SERIAL%%|${GPSMAN_DEFAULT_PORT}|" ${WRKSRC}/ file_to_patch.tcl