Subject: Re: Handling of OPSYS-specific patches
To: Jonathan Perkin <>
From: Alistair Crooks <>
List: tech-pkg
Date: 02/28/2002 16:36:04
On Thu, Feb 28, 2002 at 04:15:34PM +0100, Thomas Klausner wrote:
> On Thu, Feb 28, 2002 at 03:04:54PM +0000, Jonathan Perkin wrote:
> > there a cleaner solution proposed and in the works?  I only ask
> > because games/xfrisk needs a small patch for SunOS:
> In this case I think it would be easiest if you passed down the LIBS
> setting from the Makefile via
> 	MAKE_ENV+=	LIBS="-lsocket -lnsl"
> (wrapped in the appropriate ifdefs, of course).
> Currently, there is no support for OPSYS-specific patches.

There used to be ${OPSYS} support for patches, keyed on a patches-${OPSYS}
directory, IIRC. We found that it was almost never used, and dispensed
with it.

Thomas gives a very good workaround above - I've also used one, depending
which make(1) program is being used, to do the equivalent of:

OPSYS!= uname -s

.if ${OPSYS} == "SunOS"
LIBS= -lsocket -lnsl
.elif ${OPSYS} == ...

in the relevant Makefile.