Subject: Re: optional X11 dependency in packages?
To: Jim Wise <>
From: Alistair Crooks <>
List: tech-pkg
Date: 01/10/2002 08:19:35
FWIW, I prefer separate packages, a la mtr and mtr-gtk. There are
a number of times when you really don't want the x11 frills - such
as packages installed on a dmz host, where I personally can see no
reason to have X11 installed - and other times when you do, and I
can't see enough packages in pkgsrc to warrant something heavyweight
like the flavours stuff from OpenBSD. So, rather than force everything
to have complicated package Makefiles and PLISTs, I think two
packages are better.


On Wed, Jan 09, 2002 at 04:18:21PM -0500, Jim Wise wrote:
> Hash: SHA1
> 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?
> On Wed, 9 Jan 2002, Lubomir Sedlacik wrote:
> >hi there,
> >
> >disclaimer: since search on mail-index is not working i haven't searched
> >the whole archive of tech-pkg so if this topic was didcussed before i would
> >be happy if someone points me to the appropriate thread.
> >
> >scenario 1: some time ago i wanted to install webalizer (www/webalizer),
> >a log file (http, ftp, squid) analyzer which generates html and png
> >statistics.  obviously it is dependent on gd (and that is dependent on
> >lipbng, libjpeg, etc), which is dependent on X11--oops!  on X11?  why
> >would i want to have X11 on my server??  so i needed to remove that
> >dependency manually to get it working.
> >
> >scenario 2: mplayer has support for aalib, nice!  so finally i can watch
> >some mpegs from my fast server on slow terminal in ascii :), well.
> >theoretically.  aalib has support for X11 too and is thus dependent on
> >X11, same with sdl, mplaer, etc.  this would take more work to get it
> >working on X11-free box.
> >
> >and i am sure there are lots of similar scenarios over the pkgsrc.
> >
> >question: is it possible to decide in package whether machine has X11
> >and take some action then?  something like:
> >
> >.ifdef (HAVE_X11)
> >.include "../../mk/"
> >.else
> >CONFIGURE_ARGS=+	--without-x
> >.endif
> >
> >if not (i don't see anything in 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,
> >
> >regards,
> >
> >
> - -- 
> 				Jim Wise
> Version: GnuPG v1.0.6 (NetBSD)
> Comment: For info see
> iD8DBQE8PLOiN71lEcOYcw4RAiplAKCU55EitGjDVBX5F7lttb5zBa0QGQCfak2s
> Tb1ZEriq/Svy+UkVpSjJxFA=
> =Ky4D