On Apr 14, 2007, at 12:16, Karl Timmermann wrote:
Does anyone know how to modify the php5 port file to let it work with a binary install of MySQL5 that I installed using the installer found on mysql.com? I think only part of the port file has to be changed:
variant mysql5 conflicts mysql3 mysql4 { depends_lib-append \ port:mysql5 configure.args-delete \ --without-mysql configure.args-append \ --with-mysql=${workpath}/mysql5 \ --with-pdo-mysql=${prefix}/bin/mysql_config5 \ --with-mysql-sock=${prefix}/var/run/mysql5/mysqld.sock \ --with-mysqli=${prefix}/bin/mysql_config5 post-extract { file mkdir "${workpath}/mysql5" file link -symbolic "${workpath}/mysql5/lib" "${prefix}/lib/mysql5" file link -symbolic "${workpath}/mysql5/include" "${prefix}/ include/mysql5" } }
The mysql5 directory that the installer uses is: /usr/local/ mysql-5.0.37-osx10.4-i686/ and it contains the bin, lib, include, data, etc folders. The sock file is at /tmp/mysqld.sock.
I would appreciate any help in changing the above to work with my MySQL5 install.
First I will tell you how to do it. Then I will tell you why you should not do it. :-) I believe the mysql.com installers put a symlink at /usr/local/mysql which points to the current version. So I'll use that instead of specifying the complete directory name. So. To use the mysql.com packages, change the mysql5 variant to read: variant mysql5 conflicts mysql3 mysql4 { configure.args-delete \ --without-mysql configure.args-append \ --with-mysql=/usr/local/mysql \ --with-pdo-mysql=/usr/local/mysql/bin/mysql_config \ --with-mysql-sock=/tmp/mysqld.sock \ --with-mysqli=/usr/local/mysql/bin/mysql_config } Note that this is just off the top of my head; I haven't tested it. The reason you should not do this, or at least the reason why I do not presently include a variant like this in the php5 portfile, is that it is MacPorts policy to use its own versions of software unless there is a compelling reason not to. What is your reason for not using the MacPorts version of mysql5? This MacPorts policy is documented here along with some reasons why it is in place: http://trac.macosforge.org/projects/macports/wiki/ FAQ#WhyisMacPortsusingitsownlibraries