Building OpenWRT with Homebrew on Yosemite Mac OS X 10.10

Recently homebrew is more popular than macports and has support  most of the packages you may need on Mac OS X. To get OpenWRT complied on OS X prepare a disk image with  Disk Utiliy->New Image-> Case sensitive, sparse disk Image. Second, install XCode from App Store, and Command Line Tools:

xcode-select –install

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install required packages by brew install …

gcc47 coreutils asciidoc bzip2 fastjar flex gnu-getopt gtk2 intltool zlib openssl rsync ruby sdcc unzip gettext libxslt bison gawk autoconf wget ncurses e2fsprogs ossp-uuid gawk findutils gnu-tar

You may need to move existing getopt and tar and make symbolic link new gnu-getopt and gnu-tar. Switch to the new disk image and follow:

git clone git://git.openwrt.org/14.07/openwrt.git
cd openwrt
make menuconfig
make -j 8

Done