passing parameters to configure script of a port

Pieter de Goeje pieter at degoeje.nl
Sun Jun 10 23:20:26 UTC 2007


On Sunday 10 June 2007, Angelin Lalev wrote:
> Hi,
>
> I want to build squid from ports, but I need to pass some custom options to
> configure script. Something more, I want to be sure that when I run
> portupdate it won't revert to default options. Which is the right way to do
> this ?
You can use something like this in make.conf:

# insert your own leet matching pattern here
CURRENT_PORT=${.CURDIR:C/.*ports\///}

.if ${CURRENT_PORT} == "category/name"
CONFIGURE_ARGS+= --some-option
# you can also change things like CFLAGS here.
.endif


Some ports set CONFIGURE_ARGS explicitly, making the above not work. To work 
around this, set CONFIGURE_ARGS on the make command line. You can then add it 
to the MAKE_ARGS list in /usr/local/etc/pkgtools.conf to make it work when 
upgrading using portupgrade.

HTH,
Pieter de Goeje


More information about the freebsd-questions mailing list