From owner-freebsd-questions@FreeBSD.ORG Wed Aug 22 14:34:51 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A20D816A419 for ; Wed, 22 Aug 2007 14:34:51 +0000 (UTC) (envelope-from linder@jeuxvideo.com) Received: from www.odyssee-interactive.com (pop.pissavy.com [217.174.215.94]) by mx1.freebsd.org (Postfix) with ESMTP id 4348F13C4A7 for ; Wed, 22 Aug 2007 14:34:50 +0000 (UTC) (envelope-from linder@jeuxvideo.com) Received: from oblivion.jeuxvideo.com (odyssee-interactive.rain.fr [83.206.74.241]) (authenticated bits=0) by www.odyssee-interactive.com (8.12.10/8.12.10) with ESMTP id l7MEYlOF024416; Wed, 22 Aug 2007 16:34:49 +0200 Date: Wed, 22 Aug 2007 16:34:47 +0200 From: Gabriel Linder To: "Maxim Khitrov" Message-ID: <20070822163447.3741e377@oblivion.jeuxvideo.com> In-Reply-To: <26ddd1750708220632u48ed0773i80f9dc77ffddf980@mail.gmail.com> References: <20070822095408.61c11ab2@oblivion.jeuxvideo.com> <26ddd1750708220632u48ed0773i80f9dc77ffddf980@mail.gmail.com> Organization: =?ISO-8859-1?Q?L'Odyss=E9e?= Interactive X-Mailer: Claws Mail 2.10.0 (GTK+ 2.8.20; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Ports build parameters (knobs) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2007 14:34:51 -0000 On Wed, 22 Aug 2007 09:32:34 -0400 "Maxim Khitrov" wrote: > On 8/22/07, Gabriel Linder wrote: > > Hello, > > > > During the build of the graphical portion of my new FreeBSD-powered > > laptop I noticed that some knobs are not listed in /usr/ports/KNOBS > > and so, I can't add them to make.conf before building the packages. > > > > When I run "make fetch-recursive" for fluxbox, I get : > > > > WITH_DEBUG=yes Build with debugging symbols > > WITH_DOCHTML=yes Install the HTML documentation > > WITH_DOCPDF=yes Install the PDF documentation > > WITH_GNOME=yes Enable GNOME support > > WITH_IMLIB2=yes Enable Imlib2 (pixmap themes) support > > [snip] > > > > and for libiconv : > > > > WITHOUT_EXTRA_ENCODINGS=yes Disable extra character sets > > WITH_EXTRA_PATCHES=yes Apply extra patches (fixes cp932, > > adds EUCJP-MS) > > > > GNOME and DEBUG are listed in /usr/ports/KNOBS, but IMLIB2 and > > EXTRA_PATCHES are not... Is there a way to have the full list of > > supported build options ? Or maybe I am wrong and these settings > > are not supposed to be in make.conf but > > in /var/db/ports//options, if so please let me know :) > > My experience has shown that it's always best to look at the Makefile > of any port you are about to install. That's the most reliable way to > learn about the port and the knobs it supports. However, this can be > rather tedious when installing something with a few hundred > dependencies (like gnome), so I actually came up with a solution to > speed things up. > > First of all, you should install portconf from ports-mgmt and use it > to specify port-specific options. It's a much cleaner way of doing > things than using if statements in make.conf. You can also easily > transfer the configuration to other systems. In addition to > port-specific options, you can use * to set global knobs. Here's the > start of my ports.conf file just to give you an idea: > > *: WITHOUT_BDB |\ > WITHOUT_DEBUG |\ > WITHOUT_DEBUGGING |\ > WITHOUT_IPV6 |\ > WITHOUT_NLS |\ > WITHOUT_PROFILE |\ > WITH_OPTIMIZED_CFLAGS |\ > WITH_TTF_BYTECODE_ENABLED > converters/libiconv: WITHOUT_EXTRA_ENCODINGS > lang/php5: WITHOUT_CGI |\ > WITH_MULTIBYTE I did not know this tool, thanks :) > And so on... Now as far as actually discovering what knobs are > available, I wrote a simple script to do this. The contents are below, > save them as /usr/local/sbin/getknobs or something similar. The idea > is this; when you are about to install a port, run getknobs from the > port's directory. The script uses 'make missing' to determine all the > other ports that are about to be installed, then goes through their > port directories and searches all the files for WITH/WITHOUT_* > patterns. You then get a nice print out of all the knobs that you can > configure before running make install for the current port. > > Since this script is using make missing you will not get the knobs for > ports that are already installed. The script was meant to be used from > the very beginning (i.e. starting from a clean system), so that on > each step you are only shown knobs for ports that aren't already > configured. You can easily modify this behavior if you want. You may > also need to adjust the regular expression used to find the knobs. Wow, this is a great idea with a wonderful script. Thanks you !