Subject: Re: optional X11 dependency in packages?
To: Jim Wise <jwise@draga.com>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 01/09/2002 18:43:40
On Wed, 9 Jan 2002, Jim Wise wrote:

> On Wed, 9 Jan 2002, Lubomir Sedlacik wrote:
>
> >question: is it possible to decide in package whether machine has X11
> >and take some action then?  something like:
> >
> >.ifdef (HAVE_X11)
> >.include "../../mk/x11.buildlink.mk"
> >.else
> >CONFIGURE_ARGS=+	--without-x
> >.endif
> >
> >if not (i don't see anything in mk/bsd.pkg.defaults.mk), shouldn't be a
> >mechanism like this implemented in pkgsrc?  there are many packages
> >which depend on X11 only because of legacy of other packages on which it
> >is dependent too or can be used without X11 support with altered
> >functionality.
> >
> >i would like to know your oppinions, ideas, etc. thanks,

I suggested that some time ago (re: xhfs), but the consensus was to
make separate packages. That's why these "no-x" packages exist. By the
time you conditionalize the PLIST handling, it would probably have
been easier to make a separate package anyway. Plus you leave "no-x"
users out in the cold as far as binary packages are concerned.

> I have correct patches for gd and webalizer to have the type of optional
> X11 dependency you describe (for the same reason).  I've been debating
> whether it is better to have gd have an optional X11 dependency like
> this (the only change in functionality is xpm output), or to have a
> separate gd-nox11 package, ala ghostscript.
>
> What do people think?

Separate. Besides the old reasons, the whole bunch of "HAVE_X11=no"
packages would probably never get the benefit of bulk-build testing,
whereas separate packages certainly would.

Frederick