defining knobs in pkgtools.conf question

Chiang Seng Chang cchang at europa.ctzen.com
Thu May 20 23:03:57 PDT 2004


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 <bsd.port.pre.mk>
> > 
> > .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




More information about the freebsd-questions mailing list