aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Jensen2015-02-23 10:15:45 +0100
committerMike McQuaid2015-02-25 08:17:41 +0000
commitc33a07a08854c0bdb3110efced263933d479ac75 (patch)
treeaf0e2afa90dbe92a5be55c61c2234c04beadb6fb
parent6e08b0512083ff07b48e1ed2c2e9842110e19fa7 (diff)
downloadhomebrew-c33a07a08854c0bdb3110efced263933d479ac75.tar.bz2
libQGLViewer 2.6.1. Patch to have the framework linked in the lib directory
Closes #37101. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/libqglviewer.rb51
1 files changed, 49 insertions, 2 deletions
diff --git a/Library/Formula/libqglviewer.rb b/Library/Formula/libqglviewer.rb
index 31ed6fa11..8aea7207e 100644
--- a/Library/Formula/libqglviewer.rb
+++ b/Library/Formula/libqglviewer.rb
@@ -2,8 +2,8 @@ require 'formula'
class Libqglviewer < Formula
homepage 'http://www.libqglviewer.com/'
- url 'http://www.libqglviewer.com/src/libQGLViewer-2.5.1.tar.gz'
- sha1 '21e10a28153cb649e29bbe9a288eecc280b30f0e'
+ url 'http://www.libqglviewer.com/src/libQGLViewer-2.6.1.tar.gz'
+ sha1 '9220b3f2b8629df36bf91cc8de397e65b2cab476'
head 'https://github.com/GillesDebunne/libQGLViewer.git'
@@ -19,6 +19,12 @@ class Libqglviewer < Formula
depends_on 'qt'
+ # This patches makes the package install QGLViewer.framework under
+ # #{lib}, where it will be picked by homebrew.
+ # Patch has been submitted to the developer, check with versions
+ # newer than 2.6.1 if this is still required.
+ patch :DATA
+
def install
args = ["PREFIX=#{prefix}"]
args << "CONFIG += x86 x86_64" if build.universal?
@@ -29,3 +35,44 @@ class Libqglviewer < Formula
end
end
end
+
+__END__
+diff --git a/QGLViewer/QGLViewer.pro b/QGLViewer/QGLViewer.pro
+index d805aa0..736a58f 100644
+--- a/QGLViewer/QGLViewer.pro
++++ b/QGLViewer/QGLViewer.pro
+@@ -240,26 +240,14 @@ macx|darwin-g++ {
+ FRAMEWORK_HEADERS.path = Headers
+ QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
+
+- DESTDIR = $${HOME_DIR}/Library/Frameworks/
+-
+- # For a Framework, 'include' and 'lib' do no make sense.
+- # These and prefix will all define the DESTDIR, in that order in case several are defined
+- !isEmpty( INCLUDE_DIR ) {
+- DESTDIR = $${INCLUDE_DIR}
+- }
+-
+- !isEmpty( LIB_DIR ) {
+- DESTDIR = $${LIB_DIR}
+- }
+-
+- !isEmpty( PREFIX ) {
+- DESTDIR = $${PREFIX}
+- }
+-
+- QMAKE_POST_LINK=cd $$DESTDIR/QGLViewer.framework/Headers && (test -L QGLViewer || ln -s . QGLViewer)
+-
+- #QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/
+- #QMAKE_LFLAGS_SONAME = -Wl,-install_name,
++ !isEmpty( LIB_DIR ) {
++ DESTDIR = $${LIB_DIR}
++ }
++
++ # or to $${PREFIX}/lib otherwise
++ !isEmpty( PREFIX ) {
++ DESTDIR = $${PREFIX}/lib
++ }
+
+ # Framework already installed, with includes
+ INSTALLS -= include target