From a7a674512013d4c79fda14dbbf98bced955c437b Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Fri, 17 Aug 2018 17:58:08 -0500 Subject: qtgraph and cbtf-argonavis create proper library paths in modules (#8797) --- var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py | 10 +++++++++- var/spack/repos/builtin/packages/qtgraph/package.py | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py index 668cd5c8d5..7e2b1db644 100644 --- a/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py +++ b/var/spack/repos/builtin/packages/cbtf-argonavis-gui/package.py @@ -41,6 +41,7 @@ ########################################################################## from spack import * +import os class CbtfArgonavisGui(QMakePackage): @@ -107,10 +108,17 @@ class CbtfArgonavisGui(QMakePackage): # The implementor of qtgraph has set up the library and include # paths in a non-conventional way. We reflect that here. + # What library suffix should be used based on library existence + if os.path.isdir(self.spec['qtgraph'].prefix.lib64): + qtgraph_lib_dir = self.spec['qtgraph'].prefix.lib64 + else: + qtgraph_lib_dir = self.spec['qtgraph'].prefix.lib + run_env.prepend_path( 'LD_LIBRARY_PATH', join_path( - self.spec['qtgraph'].prefix.lib64, + qtgraph_lib_dir, '{0}'.format(self.spec['qt'].version.up_to(3)))) + # The openspeedshop libraries are needed to actually load the # performance information into the GUI. run_env.prepend_path( diff --git a/var/spack/repos/builtin/packages/qtgraph/package.py b/var/spack/repos/builtin/packages/qtgraph/package.py index cf8f229273..57d374d902 100644 --- a/var/spack/repos/builtin/packages/qtgraph/package.py +++ b/var/spack/repos/builtin/packages/qtgraph/package.py @@ -40,6 +40,7 @@ # Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import os class Qtgraph(QMakePackage): @@ -66,11 +67,17 @@ class Qtgraph(QMakePackage): spack_env.set('GRAPHVIZ_ROOT', self.spec['graphviz'].prefix) spack_env.set('INSTALL_ROOT', self.prefix) + # What library suffix should be used based on library existence + if os.path.isdir(self.prefix.lib64): + lib_dir = self.prefix.lib64 + else: + lib_dir = self.prefix.lib + # The implementor has set up the library and include paths in # a non-conventional way. We reflect that here. run_env.prepend_path( 'LD_LIBRARY_PATH', join_path( - self.prefix.lib64, + lib_dir, '{0}'.format(self.spec['qt'].version.up_to(3)))) run_env.prepend_path('CPATH', self.prefix.include.QtGraph) -- cgit v1.2.3-60-g2f50