Subject: Re: pkgsrc & DEPENDS
To: None <tech-pkg@netbsd.org>
From: Wayne Cuddy <wcuddy@crb-web.com>
List: tech-pkg
Date: 12/19/2001 11:46:15
On Wed, Dec 19, 2001 at 10:29:23AM -0600, Frederick Bruckman wrote:
> [Please direct followups to tech-pkg, which I'm cc'ing, as package
> construction issues are outside the charter of netbsd-help.]
> 
> On Wed, 19 Dec 2001, Wayne Cuddy wrote:
> 
> > On Wed, Dec 19, 2001 at 01:45:24PM +0900, Masao Uebayashi wrote:
> > > > I am building some packages and have read the Packages.txt and
> > > > packages(7) man pages.  I have a package that depends on one package OR
> > > > another.  What is the syntax to express this using the DEPENDS macros
> > > > in the NetBSD package system?
> > >
> > >   .if some_confition
> > >   DEPENDS+=     one-1.2.3../../foo/one
> > >   .else
> > >   DEPENDS+=     another-4.5.6:../../bar/another
> > >   .endif
> >
> > Forgive my ignorance, I am not extactly sure how this helps me, how would I do
> > something like:
> >
> > DEPENDS+=	pkg-1.2|pkg-2.0
> 
> You could use wildcards, as
> 
> DEPENDS+=	pkg-{1.2,2.0}:../../cat/pkg
> 
> or more simply put
> 
> DEPENDS+=	pkg>=1.2:../../cat/pkg
> 
> You could even depend on two different packages, as
> 
> DEPENDS+=	{pkg_a-1.2,pkg_b-2.0}:../../cat/pkg_a
> 
> but think carefully before doing something like that. If eitherof the
> two packages depend on, different packages, the sub-dependencies of the
> package actually built against will get encoded in the binary package,
> which probably isn't what you want. That last is probably only a good
> idea if "pkg_a" was just renamed to "pkg_b", and maybe not even then.
> 
> Frederick
Here is what I am trying to do.  I have built a an xemacs package
(xemacs-no-x) which does not require any X libraries to be on the system in
order to be built/installed.  I based this package on the original xemacs
package.

I also built an xemacs-ispell-1.32 package.  I want this package to require
either the original xemacs package or the xemacs-no-x package so I guess I
need to do this some DEPENDS line.