2012-03-10 15:01:10 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libqglviewer < Formula
|
|
|
|
homepage 'http://www.libqglviewer.com/'
|
2012-06-21 06:56:44 +00:00
|
|
|
url 'http://www.libqglviewer.com/src/libQGLViewer-2.3.17.tar.gz'
|
|
|
|
sha1 '03b1da73bdb07988184c1f5d7c1c360be27b2a0e'
|
2012-03-10 15:01:10 +00:00
|
|
|
|
2012-08-10 05:15:51 +00:00
|
|
|
option :universal
|
2012-03-10 15:01:10 +00:00
|
|
|
|
2012-08-10 05:15:51 +00:00
|
|
|
depends_on 'qt'
|
2012-03-10 15:01:10 +00:00
|
|
|
|
2012-08-10 05:15:51 +00:00
|
|
|
def patches; DATA; end
|
2012-03-10 15:01:10 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
args = ["PREFIX=#{prefix}"]
|
2012-10-04 14:40:16 +00:00
|
|
|
args << "CONFIG += x86 x86_64" if build.universal?
|
2012-03-10 15:01:10 +00:00
|
|
|
|
|
|
|
cd 'QGLViewer' do
|
|
|
|
system "qmake", *args
|
|
|
|
system "make"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-08-10 05:15:51 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
To avoid issues with runtime linking and facilitate usage of the library:
|
|
|
|
sudo ln -s "#{prefix}/QGLViewer.framework" "/Library/Frameworks/QGLViewer.framework"
|
2012-03-10 15:01:10 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/QGLViewer/QGLViewer.pro
|
|
|
|
+++ b/QGLViewer/QGLViewer.pro
|
|
|
|
@@ -246,7 +246,7 @@
|
|
|
|
FRAMEWORK_HEADERS.path = Headers
|
|
|
|
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
|
|
|
|
|
|
|
|
- DESTDIR = ~/Library/Frameworks/
|
|
|
|
+ DESTDIR = $${PREFIX}
|
|
|
|
|
|
|
|
QMAKE_POST_LINK=cd $$DESTDIR/QGLViewer.framework/Headers && ln -s . QGLViewer
|