Re: Add CONFIGURE_ARGS option for port in make.conf

2008-08-07 Thread Matthias Kellermann

Polytropon wrote:

As it has been mentioned before, /etc/make.conf is read
first with your +=, setting CONFIGURE_ARGS to only this
one value. Then, Makefile of the port is read, and it
has a = in it, not a +=, so CONFIGURE_ARGS is overwritten
and your setting is gone.

Hint:

Maybe the Makefile.local mechanism of the ports is still
available. Then, you would add your += directive in a file
called Makefile.local in the port's directory. As far is I
know, Makefile.local is read after Makefile, so you can
profit from settings done in the first mentioned place.

Thanks for your hint. This worked fine.

Nevertheless it would be a good thing to keep this kind of port
modifications in a central place.

Regards,
Matthias

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


Re: Add CONFIGURE_ARGS option for port in make.conf

2008-08-07 Thread Polytropon
On Thu, 07 Aug 2008 16:04:46 +0200, Matthias Kellermann <[EMAIL PROTECTED]> 
wrote:
> Thanks, but I thought CONFIGURE_ARGS+= should add this option and not 
> overwrite the options from the Makefile. Therefore the plus-sign.

As it has been mentioned before, /etc/make.conf is read
first with your +=, setting CONFIGURE_ARGS to only this
one value. Then, Makefile of the port is read, and it
has a = in it, not a +=, so CONFIGURE_ARGS is overwritten
and your setting is gone.

Hint:

Maybe the Makefile.local mechanism of the ports is still
available. Then, you would add your += directive in a file
called Makefile.local in the port's directory. As far is I
know, Makefile.local is read after Makefile, so you can
profit from settings done in the first mentioned place.

-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Add CONFIGURE_ARGS option for port in make.conf

2008-08-07 Thread Martin Tournoij
On Thu, Aug 07, 2008 at 10:04:23AM +0200, Matthias Kellermann wrote:
> Hi list,
> 
> I want to compile a port with an option that is not controllable through 
> the FreeBSD Makefile or with make config.
> 
> The specific port is lang/php4 and the option I want to add is 
> --with-mime-magic (I know, php4 is old and not supported after 8.8.08 
> and --with-mime-magic is deprecated, but thats another story...).
> 
> So I added an option to make.conf(5):
> 
> .if ${.CURDIR:M*/lang/php4}
> CONFIGURE_ARGS+=--with-mime-magic
> .endif
> 
> Unfortonately, this does not work.
> 
> When I add this option in the Makefile it works. The relevant part looks 
> like this:
> 
> CONFIGURE_ARGS= --enable-versioning \
>   --with-mime-magic \
>  --enable-memory-limit \
>  --with-layout=GNU \
>  --with-config-file-scan-dir=${PREFIX}/etc/php \
>  --disable-all \
>  --program-prefix=""
> 
> Any ideas whats wrong here?
> 
> Regards,
> Matthias

/etc/make.conf is read first, from make(1):
First of all, the initial list of specifications will be read from the
system makefile, sys.mk, unless inhibited with the -r option.  The 
standard
sys.mk as shipped with FreeBSD also handles make.conf(5)

So if the port uses VAR= instead of VAR+= (Or VAR?=) then settings in
/etc/make.conf will have no effect.

AFAIK there is no pretty workaround, you will need to edit the Makefile.

For a more structual solution, ports should use CONFIGURE_ARGS+= instead of
CONFIGURE_ARGS, or a a new variable can be added, where the user can set
custom configure arguments (i.e.  LOCAL_CONFIGURE_ARGS).

-- 
Martin Tournoij
[EMAIL PROTECTED]
http://www.daemonforums.org

QOTD:
Do not overtax your powers.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Add CONFIGURE_ARGS option for port in make.conf

2008-08-07 Thread Matthias Kellermann

RW wrote:

On Thu, 07 Aug 2008 10:04:23 +0200
Matthias Kellermann <[EMAIL PROTECTED]> wrote:


Hi list,

I want to compile a port with an option that is not controllable
through the FreeBSD Makefile or with make config.
...
So I added an option to make.conf(5):

.if ${.CURDIR:M*/lang/php4}
CONFIGURE_ARGS+=--with-mime-magic
.endif

Unfortonately, this does not work. 
...

Any ideas whats wrong here?


make.conf is read before the makefile. The use of "CONFIGURE_ARGS=" in
the port makefile means that any change to CONFIGURE_ARGS made in
make.conf is lost.

I think you'll have to maintain a patch against the port makefile.


Thanks, but I thought CONFIGURE_ARGS+= should add this option and not 
overwrite the options from the Makefile. Therefore the plus-sign.


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


Re: Add CONFIGURE_ARGS option for port in make.conf

2008-08-07 Thread RW
On Thu, 07 Aug 2008 10:04:23 +0200
Matthias Kellermann <[EMAIL PROTECTED]> wrote:

> Hi list,
> 
> I want to compile a port with an option that is not controllable
> through the FreeBSD Makefile or with make config.
> ...
> So I added an option to make.conf(5):
> 
> .if ${.CURDIR:M*/lang/php4}
> CONFIGURE_ARGS+=--with-mime-magic
> .endif
> 
> Unfortonately, this does not work. 
>...
> Any ideas whats wrong here?

make.conf is read before the makefile. The use of "CONFIGURE_ARGS=" in
the port makefile means that any change to CONFIGURE_ARGS made in
make.conf is lost.

I think you'll have to maintain a patch against the port makefile.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Add CONFIGURE_ARGS option for port in make.conf

2008-08-07 Thread Matthias Kellermann

Hi list,

I want to compile a port with an option that is not controllable through 
the FreeBSD Makefile or with make config.


The specific port is lang/php4 and the option I want to add is 
--with-mime-magic (I know, php4 is old and not supported after 8.8.08 
and --with-mime-magic is deprecated, but thats another story...).


So I added an option to make.conf(5):

.if ${.CURDIR:M*/lang/php4}
CONFIGURE_ARGS+=--with-mime-magic
.endif

Unfortonately, this does not work.

When I add this option in the Makefile it works. The relevant part looks 
like this:


CONFIGURE_ARGS= --enable-versioning \
--with-mime-magic \
--enable-memory-limit \
--with-layout=GNU \
--with-config-file-scan-dir=${PREFIX}/etc/php \
--disable-all \
--program-prefix=""

Any ideas whats wrong here?

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