Skip to content

Instantly share code, notes, and snippets.

@jkp
Created February 26, 2012 22:02
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jkp/1919267 to your computer and use it in GitHub Desktop.
Save jkp/1919267 to your computer and use it in GitHub Desktop.
Formula to build a minimal qt5 base installation.
require 'formula'
require 'hardware'
class Qt5Base < Formula
homepage 'http://qt.nokia.com/'
head 'git://gitorious.org/qt/qtbase.git', :tag => 'e34ee3127043773a037bfd18a2d457d409032ee5'
keg_only 'For development purposes only'
def patches
[
# Fix compilation with llvm-gcc.
"https://qt.gitorious.org/qt/qt/commit/448ab7cd150ab7bb7d12bcac76bc2ce1c72298bd?format=patch",
# Disable wlan code
"https://raw.github.com/gist/1926645/680c9547f6e31c1545b0964ab6f025744d9af536/gistfile1.txt",
]
end
def install
ENV.llvm
# Needed due to attempting to link moc with gcc.
ENV['LD'] = ENV['CXX']
sdk = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk'
args = ['-prefix', prefix,
'-confirm-license', '-opensource',
'-platform', 'macx-llvm',
'-release',
'-no-framework',
'-no-rpath',
'-fast',
'-arch', 'x86',
'-sdk', sdk,
'-qpa',
'-no-exceptions',
'-no-sql-driver',
'-no-sql-psql',
'-no-sql-mysql',
'-no-sql-odbc',
'-no-sql-tds',
'-no-sql-oci',
'-no-sql-db2',
'-no-sql-sqlite',
'-no-sql-sqlite2',
'-no-sql-ibase',
'-no-phonon-backend',
'-no-javascript-jit',
'-no-declarative-debug',
'-no-cups',
'-no-nis',
'-no-dbus',
'-no-xcb',
'-no-wayland',
'-nomake', 'doc',
'-nomake', 'examples',
'-nomake', 'tests']
system "./configure", *args
system "make"
ENV.j1
system "make install"
end
def caveats; <<-EOS.undent
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.
EOS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment