metis: fix OS X install (#764)

Without this, the binaries use relative paths for loading which causes
them to not be found when running binaries. Not sure why the existing
hack wasn't working, but this fixes it the proper way.
This commit is contained in:
Ben Boeckel 2016-04-17 01:15:07 -04:00 committed by Todd Gamblin
parent 375de085e2
commit 63bade7a0c

View file

@ -136,6 +136,7 @@ def install(self, spec, prefix):
source_directory = self.stage.source_path source_directory = self.stage.source_path
options.append('-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=source_directory)) options.append('-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=source_directory))
options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
if '+shared' in spec: if '+shared' in spec:
options.append('-DSHARED:BOOL=ON') options.append('-DSHARED:BOOL=ON')
@ -184,7 +185,3 @@ def install(self, spec, prefix):
fs = glob.glob(join_path(source_directory,'GKlib',"*.h")) fs = glob.glob(join_path(source_directory,'GKlib',"*.h"))
for f in fs: for f in fs:
install(f, GKlib_dist) install(f, GKlib_dist)
# The shared library is not installed correctly on Darwin; correct this
if (sys.platform == 'darwin') and ('+shared' in spec):
fix_darwin_install_name(prefix.lib)