Subject: optional X11 dependency in packages?
To: None <tech-pkg@netbsd.org>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: tech-pkg
Date: 01/09/2002 20:45:55
--jL2BoiuKMElzg3CS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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:

=2Eifdef (HAVE_X11)
=2Einclude "../../mk/x11.buildlink.mk"
=2Eelse
CONFIGURE_ARGS=3D+	--without-x
=2Eendif

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,

regards,

--=20
-- Lubomir Sedlacik <salo@Xtrmntr.org>   ASCII Ribbon campaign against  /"\=
 --
--                  <salo@silcnet.org>   e-mail in gratuitous HTML and  \ /=
 --
--                                       Microsoft proprietary formats   X =
 --
-- PGPkey: http://Xtrmntr.org/salo.pgp                                  / \=
 --
-- Key Fingerprint: DBEC 8BEC 9A90 ECEC 0FEF  716E 59CE B70B 7E3B 70E2     =
 --

--jL2BoiuKMElzg3CS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE8PJ3zWc63C347cOIRAvvIAKCmas20YLkIJEJqu3R/pNrc74zF8wCgihSS
AoifRYVuBaFwAVR3ejYm6PU=
=4MiI
-----END PGP SIGNATURE-----

--jL2BoiuKMElzg3CS--