Port maintainer query: what to use to specify serial port?

David Wolfskill david at catwhisker.org
Thu May 11 03:41:28 UTC 2006


I received a couple of good, similar-in-spirit suggestions from Serge
Gagnon and Sam Lawrance:  thank you!

I simplified one suggestion a little bit to arrive at the following
change to the port Makefile:

[after ".include <bsd.port.mk>"]
.if ${OSVERSION} < 600000
GPSMAN_DEFAULT_PORT?=	/dev/cuaa0
.else
GPSMAN_DEFAULT_PORT?=	/dev/cuad0
.endif
 
then add a new stanza:

post-patch:
	${REINPLACE_CMD} "s|/dev/ttyS0|${GPSMAN_DEFAULT_PORT}|" ${WRKSRC}/util/exerciser.tcl
	${REINPLACE_CMD} "s|/dev/ttyS0|${GPSMAN_DEFAULT_PORT}|" ${WRKSRC}/manual/html/info/l_realtime.doc.txt
	${REINPLACE_CMD} "s|/dev/ttyS0|${GPSMAN_DEFAULT_PORT}|" ${WRKSRC}/gpsman.tcl


thus taking the place of one of the patches (and adding one -- in the
documentation -- that I had overlooked).  (The gpsman.tcl file has a
couple of other changes it still needs.)

It appears to work quite well; "make patch" does the expected, including
the above replacements.

Thanks again for the assistance!

Peace,
david   (current hat: maintainer of port astro/gpsman)
-- 
David H. Wolfskill				david at catwhisker.org
Spam received via "opt-out" lists is still spam, and should be treated as such.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


More information about the freebsd-ports mailing list