El soporte de LDAP en MAMP 1.7.1 esta roto asi que tube que recompilar el PHP, lo cual me obligo a recompilar todas sus dependencias, pero como no encontre ninguna guia de como realizarlo correctamente, aqui esta como lo hice yo.
Lo primero es descargarse el codigo fuente proporcionado por la gente de MAMP, y su version compilada.
Codigo fuente:Â MAMP 1.7.1 (src)
Version Intel:Â MAMP 1.7.1 (intel)
Version PPC:Â MAMP 1.7.1 (ppc)
Una vez que tengamos esto, hay que instalar MAMP la version compilada en /Applications y asi ya tenemos toda la estructura correcta lista para solo recompilar lo necesario.
Ahora descomprimimos el codigo fuente y vamos compilando las diferentes librerias:
CURL
tar zxvf curl-7.16.2.tar.gz
cd curl-7.16.2
./configure --prefix=/Applications/MAMP/Library
make
make install
Freetype
tar zxvf freetype-2.3.4.tar.gz
cd freetype-2.3.4
./configure --enable-shared --configure=/Applications/MAMP/Library/
make
make install
Gettext
tar zxvf gettext-0.16.1.tar.gz
cd gettext-0.16.1
./configure --prefix=/Applications/MAMP/Library
make
make install
IMAP (Parche para osx:Â imap-2006i-osx.patch)
tar zxvf imap-2006i.tar.Z
cd imap-2006i
patch -p1 < imap-2006i-osx.patch
make oxp
cp c-client/*.h /Applications/MAMP/Library/lib/imap-2006i/include/
cp c-client/*.c /Applications/MAMP/Library/lib/imap-2006i/lib/
cp c-client/c-client.a /Applications/MAMP/Library/lib/imap-2006i/lib/libc-client.a
JPEG
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --enable-shared --prefix=/Applications/MAMP/Library
ln -s `which glibtool` ./libtool
make
make install
libiconv
tar zxvf libiconv-1.11.tar.gz
cd libiconv-1.11
./configure --enable-shared --prefix=/Applications/MAMP/Library
make
make install
LibIdn
tar xvfz libidn-0.6.14.tar.gz
cd libidn-0.6.14
./configure --enable-shared --prefix=/Applications/MAMP/Library/
make
make install
libmcrypt
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure --enable-shared --prefix=/Applications/MAMP/Library/
make
make install
libpng
tar zxvf libpng-1.2.18.tar.gz
cd libpng-1.2.18
./configure --enable-shared --prefix=/Applications/MAMP/Library
make
make install
libxml
tar zxvf libxml2-2.6.29.tar.gz
cd libxml2-2.6.29
./configure --enable-shared --prefix=/Applications/MAMP/Library
make
make install
libxst
tar zxvf libxslt-1.1.21.tar.gz
cd libxslt-1.1.21
./configure --enable-shared --prefix=/Applications/MAMP/Library/ --with-libxml-prefix=/Applications/MAMP/Library/
make
make install
t1lib
tar zxvf t1lib-5.1.1.tar.gz
cd t1lib-5.1.1
./configure --enable-shared --prefix=/Applications/MAMP/Library/
make without_doc
make install
libexpat
Esta libreria es necesaria y no esta incluida, asi que hay que bajarla de http://sourceforge.net/projects/expat/
tar zxvf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --enable-shared --prefix=/Applications/MAMP/Library/
make
make install
MySQL
tar xvfz mysql-5.0.41.tar.gz
cd mysql-5.0.41
./configure --prefix=/Applications/MAMP/Library --with-unix-socket-path=/Applications/MAMP/tmp/mysql/mysql.sock --with-tcp-port=9999 --localstatedir=/Applications/MAMP/db/mysql/
make
make install
Apache2
tar zxvf httpd-2.0.59.tar.gz
cd httpd-2.0.59
./configure --prefix=/Applications/MAMP/Library --sysconfdir=/Applications/MAMP/conf/apache --enable-nonportable-atomics --enable-so --enable-cgid --enable-auth-anon --enable-auth-dbm --enable-auth-digest --enable-file-cache --enable-echo --enable-charset-lite --enable-cache --enable-disk-cache --enable-mem-cache --enable-example --enable-ext-filter --enable-case-filter --enable-case-filter-in --enable-deflate --enable-mime-magic --enable-cern-meta --enable-expires --enable-headers --enable-usertrack --enable-unique-id --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-bucketeer --enable-http --enable-info --enable-cgid --enable-vhost-alias --enable-speling --enable-rewrite --enable-so --with-ssl=/usr --enable-dav --enable-dav-fs --enable-ssl=shared --enable-mods-shared=most --with-mpm=prefork --without-berkeley-db
make
Si al compilar nos aparece este error:
endrecv.c:965:2: error: #error APR has detected sendfile on your system, but nobody has written a
sendrecv.c:966:2: error: #error version of it for APR yet. To get past this, either write apr_sendfile
sendrecv.c:967:2: error: #error or change APR_HAS_SENDFILE in apr.h to 0.
Entonces tenemos que editar el fichero srclib/apr/include/apr.h y cambiar la linea #define APR_HAS_SENDFILE 1 por #define APR_HAS_SENDFILE 0
Y finalmente para instalar
make install
PHP
tar zxvf php-5.2.5.tar.gz
cd php-5.2.5
./configure --with-mysql=/Applications/MAMP/Library --with-apxs2=/Applications/MAMP/Library/bin/apxs --with-gd --with-jpeg-dir=/Applications/MAMP/Library --with-png-dir=/Applications/MAMP/Library --with-zlib --with-freetype-dir=/Applications/MAMP/Library --prefix=/Applications/MAMP/bin/php5 --exec-prefix=/Applications/MAMP/bin/php5 --sysconfdir=/Applications/MAMP/conf/php5 --with-soap --with-config-file-path=/Applications/MAMP/conf/php5 --enable-track-vars --enable-bcmath --enable-ftp --enable-gd-native-ttf --with-bz2=/usr --with-ldap --with-mysqli=/Applications/MAMP/Library/bin/mysql_config --with-sqlite --with-ttf --with-t1lib=/Applications/MAMP/Library --enable-mbstring=all --with-curl=/Applications/MAMP/Library --enable-dbx --enable-sockets --enable-bcmath --with-imap=shared,/Applications/MAMP/Library/lib/imap-2006i --enable-soap --with-kerberos --enable-calendar --with-pgsql=shared,/Applications/MAMP/Library/pg --enable-dbase --enable-exif --with-libxml-dir=/Applications/MAMP/Library --with-gettext=shared,/Applications/MAMP/Library --with-xsl=/Applications/MAMP/Library --with-pdo-mysql=shared,/Applications/MAMP/Library --with-pdo-pgsql=shared,/Applications/MAMP/Library/pg --with-mcrypt=shared,/Applications/MAMP/Library --with-openssl --with-iconv=shared,/Applications/MAMP/Library
make
make test
make install
Y con esto ya tenemos recompilado el MAMP y listos para funcionar. En cualquiera de las opciones se puede aprovechar para cambiar opciones, añadir o quitar modules, etc…