Subject: Handling of OPSYS-specific patches
To: None <tech-pkg@netbsd.org>
From: Jonathan Perkin <sketch@rd.bbc.co.uk>
List: tech-pkg
Date: 02/28/2002 15:04:54
Hello,

What's the cleanest way of basically doing...

.if ${OPSYS} == "SunOS"
	(Apply this SunOS-specific patch)
.endif

I presumed there'd be a specific naming scheme in patches/ directory
where this is all handled automatically but it doesn't seem to be
implemented.  I thought it was

 o patch-[a-z][a-z]		Apply for all OPSYS
 o patch-${OPSYS}-[a-z][a-z]	Apply only on OPSYS

due to the fact an "Applying ${OPSYS} patches.." message is printed,
but that just seems to be generic output which doesn't actually mean
it's applying OPSYS patches but is just applying all patches.

The "distinfo files for multiple architectures" thread on this list
last August seems to touch on this a bit, but is more interested in
the distinfo file.

I can try and write this into the .mk files if people wish, or is
there a cleaner solution proposed and in the works?  I only ask
because games/xfrisk needs a small patch for SunOS:

--- Makefile.orig       Thu Feb 28 14:59:02 2002
+++ Makefile    Thu Feb 28 14:58:31 2002
@@ -104,9 +104,9 @@
 #XLIBS=-L$(XDIR)/lib -lXaw -lXext -lXmu -lXt -lX11
 
 # System V (Solaris, Irix, etc.) will probably want -lsocket -lnsl.
-#LIBS=-lsocket -lnsl
+LIBS=-lsocket -lnsl
 # on other systems leave LIBS blank for now
-LIBS=
+#LIBS=
 
 # On some systems -DNARROWPROTO is needed for working Xaw scrollbars
 # This includes FreeBSD 3.x and recent Linux

which I should have probably checked before submitting the pkgsrc,
but ah well.  Even lamer, seeing as I'm a big user of zoularis :)

I was about to put something into the Makefile to apply this small
patch, but it just struck me as odd that this isn't (TTBOMK) already
handled automatically.

Cheers,

-- 
 Jonathan Perkin - BBC Internet Services - <sketch@rd.bbc.co.uk>