ports structure and improvement suggestions

Ulrich Spoerlein uspoerlein at gmail.com
Tue May 9 11:18:15 UTC 2006


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.
The OPTIONS stuff sucks, because it is interactive. It always reminds me
of the Windows 2000 (??) installation: wait 20 minutes, click next, wait
30 minutes, click ok, wait 40 minutes, click reboot. wtf?

Ulrich Spoerlein
-- 
 PGP Key ID: 20FEE9DD				Encrypted mail welcome!
Fingerprint: AEC9 AF5E 01AC 4EE1 8F70  6CBD E76E 2227 20FE E9DD
Which is worse: ignorance or apathy?
Don't know. Don't care.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060509/1297cfc7/attachment.pgp


More information about the freebsd-ports mailing list