# Overriding Macro Assignments in the Apache 2.2 Port



## gvkv (Aug 7, 2010)

I'm trying to configure and install apache 2.2 from ports but I'd like it to use the Perl interpreter that I already have on my machine.  The problem is that it always insists on using version 5.10.1 (set via the PERL5 variable) and wants to install the Perl 5.10 port.  I have 5.12.1 on my machine and I've tried overriding the macro assignment via the -E (and -e) options but


```
export PERL5=/usr/local/bin/perl
make -E PERL5 -V PERL5
```

returns


```
/usr/local/bin/perl5.10.1
```

Is there some other way?


----------



## lily (Aug 7, 2010)

Yeah, fixing bsd.perl.mk and bsd.port.mk to follow convention from bsd.commands.mk by using `*?=*' instead of `*=*'.


----------



## DutchDaemon (Aug 7, 2010)

It's quite possible to recompile your perl-dependent ports to look for Perl 5.12 .. http://forums.freebsd.org/showthread.php?t=16001


----------



## gvkv (Aug 8, 2010)

lily said:
			
		

> Yeah, fixing bsd.perl.mk and bsd.port.mk to follow convention from bsd.commands.mk by using `*?=*' instead of `*=*'.



I tried that and while `make -E PERL5 -V PERL5` helpfully returns [CMD="shell"]/usr/local/bin/perl[/CMD], the apache port still wants to install the perl port.


----------



## gvkv (Aug 8, 2010)

DutchDaemon said:
			
		

> It's quite possible to recompile your perl-dependent ports to look for Perl 5.12 .. http://forums.freebsd.org/showthread.php?t=16001



That's helpful for the future (but what if you're using neither portmaster nor portupgrade?) but I now realized that my core problem is that my Perl installation isn't from the port.  The real lesson I'm taking from all this is to either use ports or don't--and if you do mix and match, be aware.


----------



## DutchDaemon (Aug 8, 2010)

Exactly. And using a port management tool is really the way to go.


----------

