You can install the mcrypt PHP extension with homebrew and use it with the standard PHP installation that comes with OS X.
Install mcrypt:
brew install mcrypt
Install the php extension -- this installs the whole php 5.5, but you can still use the system-provided one by default
Note: install the version compatible with whatever your OS X PHP version currently is (check with php -v)
brew install homebrew/php/php55-mcrypt
The mcrypt shared library should now be installed in /usr/local/Cellar/php55-mcrypt/5.5.30/mcrypt.so.
The PHP settings file is /private/etc/php.ini. If you don't have said file, copy contents from php.ini.default in the same directory as your php.ini.
Find the Dynamic Extensions section of the php.ini file and add the following line to it:
extension=/usr/local/Cellar/php55-mcrypt/5.5.30/mcrypt.so
After this, you should have mcrypt installed and enabled in PHP (check with php -m -- mcrypt should be listed among the modules.
I see no mcrypt.so at "/usr/local/Cellar/mcrypt/2.6.8/".
drwxr-xr-x 14 hieugioi admin 448 Apr 29 18:29 .
drwxr-xr-x 3 hieugioi admin 96 Apr 27 17:19 ..
drwxr-xr-x 3 hieugioi admin 96 Nov 17 2008 .brew
-rw-r--r-- 1 hieugioi admin 485 Nov 17 2008 AUTHORS
-rw-r--r-- 1 hieugioi admin 35147 Nov 17 2008 COPYING
-rw-r--r-- 1 hieugioi admin 18832 Nov 17 2008 ChangeLog
-rw-r--r-- 1 hieugioi admin 645 Apr 27 17:19 INSTALL_RECEIPT.json
-rw-r--r-- 1 hieugioi admin 25592 Nov 17 2008 NEWS
-rw-r--r-- 1 hieugioi admin 595 Nov 17 2008 README
-rw-r--r-- 1 hieugioi admin 98 Nov 17 2008 TODO
drwxr-xr-x 5 hieugioi admin 160 Apr 27 17:19 bin
drwxr-xr-x 4 hieugioi admin 128 Nov 17 2008 include
drwxr-xr-x 5 hieugioi admin 160 Nov 17 2008 lib
drwxr-xr-x 4 hieugioi admin 128 Nov 17 2008 share