ports structure and improvement suggestions

[LoN]Kamikaze LoN_Kamikaze at gmx.de
Tue May 9 12:21:35 UTC 2006


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.


More information about the freebsd-ports mailing list