From owner-freebsd-questions@FreeBSD.ORG Thu May 20 23:03:57 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B5EE16A4CE for ; Thu, 20 May 2004 23:03:57 -0700 (PDT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E603E43D48 for ; Thu, 20 May 2004 23:03:56 -0700 (PDT) (envelope-from cchang@ctzen.com) Received: from charon.ctzen.com (h0040055d253a.ne.client2.attbi.com[24.147.64.178]) by comcast.net (rwcrmhc12) with ESMTP id <2004052106034701400cogbse>; Fri, 21 May 2004 06:03:47 +0000 Received: by charon.ctzen.com (Postfix, from userid 1000) id 6C0EC3BA2F; Fri, 21 May 2004 02:03:46 -0400 (EDT) Date: Fri, 21 May 2004 02:03:46 -0400 From: Chiang Seng Chang To: freebsd-questions@freebsd.org Message-ID: <20040521060346.GA65201@europa.ctzen.com> References: <40ABA587.7020604@ctzen.com> <20040521004850.GA457@cashmere.blitzed.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040521004850.GA457@cashmere.blitzed.org> User-Agent: Mutt/1.4.2.1i Subject: Re: defining knobs in pkgtools.conf question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 06:03:57 -0000 but I found this in /var/db/pkg/python/options: # This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for python-2.3.3_5 _OPTIONS_READ=python-2.3.3_5 WITH_THREADS=true WITHOUT_HUGE_STACK_SIZE=true WITH_UCS2=true WITH_PYMALLOC=true So I suppose the safest way is to install a port interactively the 1st time and then import the options file into pkgtools.conf -cs On Fri, May 21, 2004 at 12:48:50AM +0000, Andy Smith wrote: > On Wed, May 19, 2004 at 02:20:55PM -0400, Chiang Seng Chang wrote: > > === quote === > > > > OPTIONS= THREADS "Enable thread support" on \ > > HUGE_STACK_SIZE "Use a larger thread stack" off \ > > UCS2 "Use UCS2 instead of UCS4 for unicode support" off \ > > PYMALLOC "Uses python's internal malloc" on > > > > .include > > > > .if defined(WITH_THREADS) > > CONFIGURE_ARGS+= --with-threads > > CFLAGS+= ${PTHREAD_CFLAGS} > > .if defined(WITHOUT_HUGE_STACK_SIZE) > > CFLAGS+= -DTHREAD_STACK_SIZE=0x20000 > > .else > > CFLAGS+= -DTHREAD_STACK_SIZE=0x100000 > > .endif # defined(WITHOUT_HUGE_STACK_SIZE) > > CONFIGURE_ENV+= LDFLAGS="${PTHREAD_LIBS} ${LDFLAGS}" > > .else > > CONFIGURE_ARGS+= --without-threads > > .if defined(LDFLAGS) > > CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" > > .endif # defined(LDFLAGS) > > .endif # defined(WITH_THREADS) > > > > .if defined(WITHOUT_UCS2) > > CONFIGURE_ARGS+= --enable-unicode=ucs4 > > .endif > > > > .if defined(WITHOUT_PYMALLOC) > > CONFIGURE_ARGS+= --without-pymalloc > > .endif > > > > === end quote === > > > > So if I wish to put the knobs into pkgtools.conf so that it can build it > > batch mode, do I: > > > > WITH_THREADS=1 > > WITHOUT_HUGE_STACK_SIZE=1 > > I think that you only need to match the variables used in the > Makefile. So the above would be correct, and the following two > should just be omitted: > > > WITH_UCS2=1 > > WITH_PYMALLOC=1 > > Don't forget you'll need to set BATCH as well. > > > I guess my question is how to decide wheather to use WITH_XXX=1 or > > WITHOUT_XXX=0 ? > > Set the exact same variables as the Makefile is testing. > > > does WITH_XXX=0 result in #defined(WITH_XXX) returning false ? > > I believe not, as "defined()" only tests if that name is defined, > not what its value is. > > -- > http://freebsdwiki.org/ - Encrypted mail welcome - keyid 0xBF15490B