From owner-freebsd-ports Mon Apr 10 2:36:12 2000 Delivered-To: freebsd-ports@freebsd.org Received: from shale.csir.co.za (shale.csir.co.za [146.64.46.5]) by hub.freebsd.org (Postfix) with ESMTP id 87CF337B727; Mon, 10 Apr 2000 02:33:53 -0700 (PDT) (envelope-from reg@shale.csir.co.za) Received: from C992631-A.pinol1.sfba.home.com (C992631-A.pinol1.sfba.home.com [24.12.58.155]) by shale.csir.co.za (8.9.3/8.9.3) with ESMTP id LAA77209; Mon, 10 Apr 2000 11:32:56 +0200 (SAT) (envelope-from reg@shale.csir.co.za) Received: (from reg@localhost) by C992631-A.pinol1.sfba.home.com (8.9.3/8.9.3) id CAA10243; Mon, 10 Apr 2000 02:32:37 -0700 (PDT) (envelope-from reg) Date: Mon, 10 Apr 2000 02:32:37 -0700 From: Jeremy Lea To: freebsd-ports@FreeBSD.org Cc: Satoshi Asami Subject: WITH/WITHOUT options cleanup Message-ID: <20000410023237.F32928@shale.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi all, I've placed a patch at http://www.freebsd.org/~reg/with.patch, which cleans up the handling of options in ports. Basically these are any things the user can define while building ports. We had a mixture of NO_, WANT_, WITH_, WITHOUT_, DONT_USE_ and USE_, and these were being tested against YES, yes, NO or no. This was confusing. This patch makes two kinds of variables: WITH_FOO - Turns on support for FOO. WITHOUT_FOO - Turns off support for FOO. These are boolean, and should only be tested with defined(). If a port autodetect's support then it should use something like: .if defined(WITH_X11) || (exists(${X11BASE}/lib/libX11.a) \ && !defined(WITHOUT_X11)) ... .endif (bsd.port.pre.mk needs to be included before this to get X11BASE). The patch also removes nearly all occurances of WITH_ variables in ports, since I want to be able to scan for the options above automatically. I will write something for the handbook reserving WITH_ and WITHOUT_ as variable names. USE_ should also be reserved for knobs in bsd.port.mk. The ports I've not touched are the emacs/mule/canna cancer^H^H^H set of ports, which have a set of WITH_ options, which should be CONFIGURE_ARGS+= options. I'm scared of breaking these... Also, I've not tried to alter any setttings with have multiple values (like ispell's languages (although these should be WITH_), or glx's chipset). Comments please. -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