forked from Homebrew/legacy-homebrew
/
qwt.rb
31 lines (25 loc) · 957 Bytes
/
qwt.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'formula'
class Qwt < Formula
url 'http://sourceforge.net/projects/qwt/files/qwt/6.0.1/qwt-6.0.1.tar.bz2'
homepage 'http://qwt.sourceforge.net/'
sha1 '301cca0c49c7efc14363b42e082b09056178973e'
depends_on 'qt'
def install
inreplace 'qwtconfig.pri' do |s|
# change_make_var won't work because there are leading spaces
s.gsub! /^\s*QWT_INSTALL_PREFIX\s*=(.*)$/, "QWT_INSTALL_PREFIX=#{prefix}"
end
system "qmake -spec macx-g++ -config release"
system "make"
ENV.j1
system "make install"
# The pkg-config files installed suggest that headers can be found in the
# `include` directory. Make this so by creating symlinks from `include` to
# the Frameworks' Headers folders.
include.mkdir
Pathname.glob(lib + '*.framework/Headers').each do |path|
framework_name = File.basename(File.dirname(path), '.framework')
ln_s path.realpath, include+framework_name
end
end
end