require 'formula' require 'hardware' class Qt = 10.6 and Hardware.is_64_bit? conf_args << '-arch' << 'x86_64' else conf_args << '-arch' << 'x86' end system "./configure", *conf_args system "make install" # stop crazy disk usage (prefix+'doc/html').rmtree (prefix+'doc/src').rmtree # what are these anyway? (bin+'Assistant_adp.app').rmtree (bin+'pixeltool.app').rmtree (bin+'qhelpconverter.app').rmtree # remove porting file for non-humans (prefix+'q3porting.xml').unlink # Some config scripts will only find Qt in a "Frameworks" folder # VirtualBox is an example of where this is needed # See: http://github.com/mxcl/homebrew/issues/issue/745 cd prefix do ln_s lib, "Frameworks" end end def caveats "We agreed to the Qt opensource license for you.\nIf this is unacceptable you should uninstall." end end