From owner-freebsd-ports@FreeBSD.ORG Tue May 9 12:21:35 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67D3716A40A for ; Tue, 9 May 2006 12:21:35 +0000 (UTC) (envelope-from LoN_Kamikaze@gmx.de) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 57DC843D66 for ; Tue, 9 May 2006 12:21:31 +0000 (GMT) (envelope-from LoN_Kamikaze@gmx.de) Received: (qmail invoked by alias); 09 May 2006 12:21:30 -0000 Received: from p54A7FF3C.dip.t-dialin.net (EHLO [192.168.0.12]) [84.167.255.60] by mail.gmx.net (mp043) with SMTP; 09 May 2006 14:21:30 +0200 X-Authenticated: #5465401 Message-ID: <44608946.6000804@gmx.de> Date: Tue, 09 May 2006 14:21:26 +0200 From: "[LoN]Kamikaze" Organization: Lords of Nightmare User-Agent: Thunderbird 1.5.0.2 (X11/20060423) MIME-Version: 1.0 To: Jeremy Chadwick , Sideris Michael , freebsd-ports@freebsd.org References: <20060508200926.GA6005@daemons.gr> <20060509061026.GA14039@pentarou.parodius.com> <20060509111435.GA1228@roadrunner.aventurien.local> In-Reply-To: <20060509111435.GA1228@roadrunner.aventurien.local> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: Subject: Re: ports structure and improvement suggestions X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2006 12:21:35 -0000 Ulrich Spoerlein wrote: > Jeremy Chadwick wrote: >> # No IPv6, and no X11 >> IPV6 = no >> X11 = no >> >> devel/gettext { >> EXAMPLES = no >> HTMLMAN = no >> } >> www/apache20 { >> KQUEUE_SUPPORT = yes >> } >> www/suphp { >> CHECKPATH = no >> LOGFILE = /var/log/suphp.log >> } >> net/cvsup { >> X11 = yes >> } >> >> [snip] > > You can already do this with make(1)-magic in /etc/make.conf. This is > also guaranteed to work, whereas the pkgtools.conf approach is flawed. > > Example /etc/make.conf (platform specific) > > .if ${.CURDIR:M*/usr/ports*} > CFLAGS+= -Os > WRKDIRPREFIX= /vol/obj > .include "/etc/ports.conf" > .endif > > And my /etc/ports.conf (platform independant, meaning I share it across > several machines) > > BATCH= true > PACKAGE_BUILDING=true > WITH_OPENSSL_BASE=yes > PAPERSIZE= a4 > A4= true > WITH_GHOSTSCRIPT_AFPL= yes > > .if ${.CURDIR:M*/audio/amarok} > WITH_XINE= true > #... > .endif > > .if ${.CURDIR:M*/audio/abcde} > WITH_CDDA2WAV= true > #... > .endif > > .if ${.CURDIR:M*/databases/postgresql*} > #WITH_OPTIMIZED_CFLAGS= true > .endif > > .if ${.CURDIR:M*/multimedia/*} > WITH_THEORA= true > WITH_X264= true > WITH_OPTIMIZED_CFLAGS=true > WITH_XVID= true > #... > .endif > > This allows for global options, category specific options and individual > options. It is processed early enough and doesn't care if you invoke > make install or portinstall. It will produce a correct INDEX, though > ports might be listed twice, since we have slave ports. The syntax > stinks, of course, and you still have to hunt for the Knobs yourself. There is a tutorial in German, with a rather big example make.conf . http://wiki.bsdforen.de/index.php/Make.conf_optimieren#.2Fetc.2Fmake.conf I can translate the tutorial if there is interest. It also shows how to manage repeating port configuration tasks using lists and loops.