From 898ac9f9c2587b99392e07fcb8b1991be0895607 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 2 Dec 2020 12:23:31 -0600 Subject: [PATCH] libqglviewer: build dylib instead of Framework (#20178) --- .../repos/builtin/packages/libqglviewer/package.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libqglviewer/package.py b/var/spack/repos/builtin/packages/libqglviewer/package.py index a60ade218a..ff078b78b7 100644 --- a/var/spack/repos/builtin/packages/libqglviewer/package.py +++ b/var/spack/repos/builtin/packages/libqglviewer/package.py @@ -16,10 +16,21 @@ class Libqglviewer(QMakePackage): # http://libqglviewer.com/installUnix.html - depends_on('qt+opengl') + depends_on('qt+gui+opengl') depends_on('freeglut', when='^qt@:3.0') build_directory = 'QGLViewer' + def patch(self): + # Build dylib instead of Framework on macOS + if self.spec.satisfies('platform=darwin'): + filter_file('!staticlib: CONFIG *= lib_bundle', '', + join_path('QGLViewer', 'QGLViewer.pro'), string=True) + def qmake_args(self): return ['PREFIX=' + self.prefix] + + @run_after('install') + def darwin_fix(self): + if self.spec.satisfies('platform=darwin'): + fix_darwin_install_name(self.prefix.lib)