Re: defining knobs in pkgtools.conf question

2004-05-21 Thread Chiang Seng Chang
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 +, 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=0x2
  .else
  CFLAGS+=-DTHREAD_STACK_SIZE=0x10
  .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


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: defining knobs in pkgtools.conf question

2004-05-20 Thread Andy Smith
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=0x2
 .else
 CFLAGS+=-DTHREAD_STACK_SIZE=0x10
 .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


pgpY27aJR6qyu.pgp
Description: PGP signature


defining knobs in pkgtools.conf question

2004-05-19 Thread Chiang Seng Chang
Hi,
This is from the lang/python Makefile
=== 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=0x2
.else
CFLAGS+=-DTHREAD_STACK_SIZE=0x10
.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
WITH_UCS2=1
WITH_PYMALLOC=1
or
WITH_THREADS=1
WITHOUT_HUGE_STACK_SIZE=1
WITHOUT_UCS2=0
WITHOUT_PYMALLOC=0
I guess my question is how to decide wheather to use WITH_XXX=1 or 
WITHOUT_XXX=0 ?

does WITH_XXX=0 result in #defined(WITH_XXX) returning false ?
Regards.
-cs
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]