josegonzalez/homebrew-php — pull request #412 by jmlane (2012-12-09 16:36:45+00:00)
Title: PHP Makefile always has system libraries before provided build paths

Due to a bug upstream with PHP 5.x (https://bugs.php.net/bug.php?id=44294), the system libraries are always on the build search path before library paths passed in the by the user. This causes builds to fail on OS 10.5 Leopard, where many system libraries are out-of-date.

These changes to abstract-php and php53 introduce a Makefile.global patch that is appropriate for both PHP 5.3.x and 5.4.x. The patch is very minor, however due to the way the formulae are subclassed, I cannot include the patch directly in abstract-php.rb in the DATA constant, as is suggested practice by the Homebrew manual.

It is worth noting that this code (and accompanying patch) results in a visible `patch unexpectedly ends in middle of line` error that I cannot seem to eliminate. Strangely, the patch applies correctly in both formulae, despite the concerning message.