diff options
| author | Bruno Santos | 2012-03-10 15:01:10 +0000 |
|---|---|---|
| committer | Adam Vandenberg | 2012-04-08 19:30:12 -0700 |
| commit | 4574cd4a3e340f06788991fcf5d3916b49d39314 (patch) | |
| tree | 02ca63081286da8f7d4b9d75548e46c481af0e3b /Library/Formula | |
| parent | 39f82fe08ca90eae7634b3225fd53fbeaefeb4c6 (diff) | |
| download | homebrew-4574cd4a3e340f06788991fcf5d3916b49d39314.tar.bz2 | |
LibQGLViewer 2.3.15
libQGLViewer is a C++ library based on Qt that eases the creation of OpenGL 3D viewers
A patch is included in the formula to change the hardcoded install path to #{prefix}.
Closes #10837.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/libqglviewer.rb | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Library/Formula/libqglviewer.rb b/Library/Formula/libqglviewer.rb new file mode 100644 index 000000000..5f1377543 --- /dev/null +++ b/Library/Formula/libqglviewer.rb @@ -0,0 +1,51 @@ +require 'formula' + +class Libqglviewer < Formula + homepage 'http://www.libqglviewer.com/' + url 'http://www.libqglviewer.com/src/libQGLViewer-2.3.15.tar.gz' + md5 'f06186fc20d38a1f20c8b1378093d1e8' + + depends_on 'qt' + + def options + [ + ['--universal', "Build both x86_64 and x86 architectures."], + ] + end + + def patches + DATA + end + + def install + args = ["PREFIX=#{prefix}"] + + if ARGV.include? '--universal' + args << "CONFIG += x86 x86_64" + end + + cd 'QGLViewer' do + system "qmake", *args + system "make" + end + end + + 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" + 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 |
