Bug 63389

Summary: lang/php4 doesn't read PHP4_OPTIONS from Makefile.local anymore
Product: Ports & Packages Reporter: Osma Suominen <ozone>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me CC: admin
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Osma Suominen 2004-02-26 13:40:08 UTC
lang/php4 Makefile allows options to be read from various places instead
of having to set them on each install, which is good. I had placed my
options in /usr/ports/lang/php4/Makefile.local

However, it seems the mega-patch for PR 57699 (Makefile CVS rev 1.30) moved
the inclusion of bsd.port.pre.mk down. This means that Makefile.local is now
included only after options have been chosen, so setting PHP4_OPTIONS there
has no effect.

I know there are other ways of specifying PHP options. For me, a magic
php4_options file is not very intuitive; a Makefile.local in the expected
place is much better.

Fix: 

Solution 1:
Move the inclusion of bsd.port.pre.mk back above the options stuff. This
will probably break things that were reported in PR 57699 (OpenLDAP, MySQL)
and fixed in Makefile 1.30. Maybe there are other ways to fix those?

Solution 2:
Hard-code the inclusion of Makefile.local (and Makefile.inc, while you're at
it) so it is done before determining options. Not very pretty but does the
job I believe.

Solution 3:
Decide that writing options in Makefile.local (and/or .inc) is not a
supported way of selecting options, and document it in the beginning of the
Makefile.
How-To-Repeat: 
cd /usr/ports/lang/php4

Create a file Makefile.local and specify some options there:

--clip--
PHP4_OPTIONS= MYSQL IMAP
--clip--

Run make

The default options are used instead of the ones specified in Makefile.local
Comment 1 Clement Laforet freebsd_committer freebsd_triage 2004-02-26 14:13:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer.
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2004-02-29 00:18:13 UTC
State Changed
From-To: open->closed

Using Makefile.local is unsupported and strongly discouraged.