Recompilar MAMP

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

1tar zxvf curl-7.16.2.tar.gz
2cd curl-7.16.2
3./configure --prefix=/Applications/MAMP/Library
4make
5make install

Freetype

1tar zxvf freetype-2.3.4.tar.gz
2cd freetype-2.3.4
3./configure --enable-shared --configure=/Applications/MAMP/Library/
4make
5make install

Gettext

1tar zxvf gettext-0.16.1.tar.gz
2cd gettext-0.16.1
3./configure --prefix=/Applications/MAMP/Library
4make
5make install

IMAP (Parche para osx: imap-2006i-osx.patch )

1tar zxvf imap-2006i.tar.Z
2cd imap-2006i
3patch -p1 < imap-2006i-osx.patch
4make oxp
5cp c-client/*.h /Applications/MAMP/Library/lib/imap-2006i/include/
6cp c-client/*.c /Applications/MAMP/Library/lib/imap-2006i/lib/
7cp c-client/c-client.a /Applications/MAMP/Library/lib/imap-2006i/lib/libc-client.a

JPEG

1tar zxvf jpegsrc.v6b.tar.gz
2cd jpeg-6b
3./configure --enable-shared --prefix=/Applications/MAMP/Library
4ln -s `which glibtool` ./libtool
5make
6make install

libiconv

1tar zxvf libiconv-1.11.tar.gz
2cd libiconv-1.11
3./configure --enable-shared --prefix=/Applications/MAMP/Library
4make
5make install

LibIdn

1tar xvfz libidn-0.6.14.tar.gz
2cd libidn-0.6.14
3./configure --enable-shared --prefix=/Applications/MAMP/Library/
4make
5make install

libmcrypt

1tar zxvf libmcrypt-2.5.8.tar.gz
2cd libmcrypt-2.5.8
3./configure --enable-shared --prefix=/Applications/MAMP/Library/
4make
5make install

libpng

1tar zxvf libpng-1.2.18.tar.gz
2cd libpng-1.2.18
3./configure --enable-shared --prefix=/Applications/MAMP/Library
4make
5make install

libxml

1tar zxvf libxml2-2.6.29.tar.gz
2cd libxml2-2.6.29
3./configure --enable-shared --prefix=/Applications/MAMP/Library
4make
5make install

libxst

1tar zxvf libxslt-1.1.21.tar.gz
2cd libxslt-1.1.21
3./configure --enable-shared --prefix=/Applications/MAMP/Library/ --with-libxml-prefix=/Applications/MAMP/Library/
4make
5make install

t1lib

1tar zxvf t1lib-5.1.1.tar.gz
2cd t1lib-5.1.1
3./configure --enable-shared --prefix=/Applications/MAMP/Library/
4make without_doc
5make install

libexpat

Esta libreria es necesaria y no esta incluida, asi que hay que bajarla de http://sourceforge.net/projects/expat/

1tar zxvf expat-2.0.1.tar.gz
2cd expat-2.0.1
3./configure --enable-shared --prefix=/Applications/MAMP/Library/
4make
5make install

MySQL

1tar xvfz mysql-5.0.41.tar.gz
2cd mysql-5.0.41
3./configure --prefix=/Applications/MAMP/Library --with-unix-socket-path=/Applications/MAMP/tmp/mysql/mysql.sock --with-tcp-port=9999 --localstatedir=/Applications/MAMP/db/mysql/
4make
5make install

Apache2

1tar zxvf httpd-2.0.59.tar.gz
2cd httpd-2.0.59
3./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
4make

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

1make install

PHP

1tar zxvf php-5.2.5.tar.gz
2cd php-5.2.5
3./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
4make
5make test
6make 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…


Misexta.tv Download (Firefox Addon)
CNET Mootools Libraries
comments powered by Disqus