2009-11-05 18:14:59 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Qwt < Formula
|
2009-11-05 18:14:59 +00:00
|
|
|
homepage 'http://qwt.sourceforge.net/'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/qwt/qwt/6.1.0/qwt-6.1.0.tar.bz2'
|
2013-07-12 06:18:31 +00:00
|
|
|
sha1 '48a967038f7aa9a9c87c64bcb2eb07c5df375565'
|
2009-11-05 18:14:59 +00:00
|
|
|
|
|
|
|
depends_on 'qt'
|
|
|
|
|
|
|
|
def install
|
2010-12-30 11:51:25 +00:00
|
|
|
inreplace 'qwtconfig.pri' do |s|
|
2011-05-05 18:47:00 +00:00
|
|
|
# change_make_var won't work because there are leading spaces
|
|
|
|
s.gsub! /^\s*QWT_INSTALL_PREFIX\s*=(.*)$/, "QWT_INSTALL_PREFIX=#{prefix}"
|
2010-12-30 11:51:25 +00:00
|
|
|
end
|
|
|
|
|
2013-11-22 13:31:47 +00:00
|
|
|
args = ['-config', 'release', '-spec']
|
|
|
|
# On Mavericks we want to target libc++, this requires a unsupported/macx-clang-libc++ flag
|
|
|
|
if ENV.compiler == :clang and MacOS.version >= :mavericks
|
|
|
|
args << "unsupported/macx-clang-libc++"
|
|
|
|
else
|
|
|
|
args << "macx-g++"
|
|
|
|
end
|
|
|
|
system 'qmake', *args
|
2011-08-27 00:51:56 +00:00
|
|
|
system "make"
|
2009-11-05 18:14:59 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2013-01-21 09:33:56 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
The qwtmathml library contains code of the MML Widget from the Qt solutions package.
|
|
|
|
Beside the Qwt license you also have to take care of its license.
|
|
|
|
EOS
|
|
|
|
end
|
2009-11-05 18:14:59 +00:00
|
|
|
end
|