Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Feb 2000 21:32:28 -0800
From:      Jeremy Lea <reg@FreeBSD.ORG>
To:        Bill Fumerola <billf@chc-chimes.com>
Cc:        ports@FreeBSD.ORG
Subject:   Re: gd requiring X (was Re: skip requires X?)
Message-ID:  <20000201213227.A279@shale.csir.co.za>
In-Reply-To: <20000201213431.G79328@jade.chc-chimes.com>; from billf@chc-chimes.com on Tue, Feb 01, 2000 at 09:34:31PM -0500
References:  <Pine.BSF.4.21.0002012041440.10588-100000@cornflake.nickelkid.com> <Pine.BSF.4.21.0002012126490.305-100000@picnic.mat.net> <20000201213431.G79328@jade.chc-chimes.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Tue, Feb 01, 2000 at 09:34:31PM -0500, Bill Fumerola wrote:
> I am the new maintainer of gd. I plan to make it so gd can be built with
> and without X. I plan to make the default to not require X.
> 
> If ports need a "gd that absolutly has the X libs" then I will make another
> port that uses the existing gd port as its master and installs some different
> library or something.

This is the concept of optional dependencies.  Lets take gd as an
example, assuming the right bsd.port.mk magic.  gd's Makefile will look
something like this (I've not actually looked at this port in a long
time).

WANT_X11=	yes

.include <bsd.port.pre.mk>

.if defined(HAVE_X11)
USE_X11=	yes
CONFIGURE_ARGS+=	--with-x
.else
CONFIGURE_ARGS+=	--without-x
.endif

.include <bsd.port.post.mk>

If the use does not have X installed they get a little "Define
WITH_X11=yes if you want X support".  If they define "WITH_X11=no" then
they don't get X support.  If they have X installed and WITH_X11 is not
defined the port builds with X support, and doesn't say anything...

I'm still working on some of the packing issues.  My current plan is to
add a PKGNAME suffix, which depends on the highest level of USE_* (ie a
port which might use X or X and GNOME, would be known as foo-1.0,
foo-1.0-x11 and foo-1.0-gnome).

One solution is to have a standard FreeBSD package building policy: like
WITH_X11=yes on bento, and FreeBSD.org would only have one set of
packages.  If someone else wants to donate the machine cycles to say
building WITH_GNOME=yes packages, then they could be added.

Otherwise, what the package building scripts need to do is grep the
port's Makefile for "WANT_" something like this:

WANTS:=	grep "WANT_" Makefile

build-all-packages:
	for with in ${WANTS:S/WANT/WITH/g}; do
		make clean clean-depends
		make $${with}=yes package
	done
	cp `make package-name`*.tgz /ftpsitehere

If you want to see the beginings of this look at http://www.freebsd.org/~reg/

Regards,
 -Jeremy

-- 
FreeBSD - Because the best things in life are free...
                                           http://www.freebsd.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000201213227.A279>