From owner-freebsd-ports Tue Feb 1 21:40:58 2000 Delivered-To: freebsd-ports@freebsd.org Received: from shale.csir.co.za (shale.csir.co.za [146.64.46.5]) by builder.freebsd.org (Postfix) with ESMTP id 61D293DE3 for ; Tue, 1 Feb 2000 21:40:51 -0800 (PST) Received: from granite.hip.berkeley.edu (granite.hip.berkeley.edu [136.152.155.25]) by shale.csir.co.za (8.9.3/8.9.3) with ESMTP id HAA56924; Wed, 2 Feb 2000 07:40:41 +0200 (SAT) (envelope-from reg@shale.csir.co.za) Received: (from reg@localhost) by granite.hip.berkeley.edu (8.9.3/8.9.3) id VAA03384; Tue, 1 Feb 2000 21:32:28 -0800 (PST) (envelope-from reg) Date: Tue, 1 Feb 2000 21:32:28 -0800 From: Jeremy Lea To: Bill Fumerola Cc: ports@FreeBSD.ORG Subject: Re: gd requiring X (was Re: skip requires X?) Message-ID: <20000201213227.A279@shale.csir.co.za> References: <20000201213431.G79328@jade.chc-chimes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20000201213431.G79328@jade.chc-chimes.com>; from billf@chc-chimes.com on Tue, Feb 01, 2000 at 09:34:31PM -0500 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 .if defined(HAVE_X11) USE_X11= yes CONFIGURE_ARGS+= --with-x .else CONFIGURE_ARGS+= --without-x .endif .include 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