homebrew-core/Formula/qt.rb

48 lines
1.5 KiB
Ruby
Raw Normal View History

require 'formula'
class Qt <Formula
2009-10-23 15:28:52 +00:00
url 'http://get.qt.nokia.com/qt/source/qt-mac-opensource-src-4.5.3.tar.gz'
md5 'c549d6c0c2e0723377cb955c78a1b680'
homepage 'http://www.qtsoftware.com'
def install
2009-10-23 15:28:52 +00:00
if version == '4.5.3'
# Reported 6 months ago (at 4.5.0-rc1), still not fixed in the this release! :(
makefiles=%w[plugins/sqldrivers/sqlite/sqlite.pro 3rdparty/webkit/WebCore/WebCore.pro]
makefiles.each { |makefile| `echo 'LIBS += -lsqlite3' >> src/#{makefile}` }
end
2009-10-12 18:51:17 +00:00
conf_args = ["-prefix", prefix,
"-system-sqlite", "-system-libpng", "-system-zlib",
"-nomake", "demos", "-nomake", "examples", "-no-qt3support",
"-release", "-cocoa",
"-confirm-license", "-opensource",
"-I/usr/X11R6/include", "-L/usr/X11R6/lib",
"-fast"]
if MACOS_VERSION >= 10.6
conf_args << '-arch' << 'x86_64'
else
conf_args << '-arch' << 'x86'
end
system "./configure", *conf_args
system "make install"
# fuck weird prl files
`find #{lib} -name \*.prl -delete`
# fuck crazy disk usage
`rm -r #{prefix+'doc'+'html'} #{prefix+'doc'+'src'}`
# wtf are these anyway?
`rm -r #{bin}/Assistant_adp.app #{bin}/pixeltool.app #{bin}/qhelpconverter.app`
# we specified no debug already! :P
`rm #{lib}/libQtUiTools_debug.a`
# meh
`rm #{prefix}/q3porting.xml`
end
def caveats
"We agreed to the Qt opensource license for you.\nIf this is unacceptable you should uninstall :P"
end
2009-09-12 16:06:43 +00:00
end