Subject: Re: xmms Solaris fixes
To: None <tech-pkg@netbsd.org>
From: grant beattie <grant@netbsd.org>
List: tech-pkg
Date: 11/27/2002 21:57:19
On Wed, Nov 27, 2002 at 11:38:05AM +0100, Thomas Klausner wrote:

> > .if exists(${PKGDIR}/PLIST.${OPSYS})
> > PLIST_SRC=	${PKGDIR}/PLIST.${OPSYS}
> > 
> > At the moment, we have a sprinkling of PLIST-${OPSYS},
> > PLIST.${LOWER_OPSYS}, etc. so I'll try to clean these up shortly.
> 
> PLIST_SRC= or PLIST_SRC+=?
> How about similar stuff for MACHINE_ARCH?
> [I take it you talk about adding stuff to bsd.pkg.mk?]

As more platforms are supported, we should put some thought into how
this is done.

On different platforms, there are two classes of problems to address,

* packages which install mostly different files
* packages which install mostly common files and some different files

Essentially what I was thinking of doing was something like this:

.if exists(PLIST.common)
PLIST_SRC=	PLIST.common
. if exists(PLIST.OPSYS)
PLIST_SRC+=	PLIST.OPSYS
. endif
.else
PLIST_SRC=	PLIST
. if exists(PLIST.OPSYS)
PLIST_SRC=	PLIST.OPSYS
. endif
.endif

This way, the default PLIST will be used if PLIST.OPSYS doesn't exist.
PLIST.common and PLIST.OPSYS will be used if both exist. This gives us
some flexibility wrt. portability.

What do you think?

grant.