various fixes for macOS high sierra (#5647)

* various fixes for macOS high sierra

* add macOS_version() helper function

* flake8 fixes

* update oce and trilinos

* fix bison
This commit is contained in:
Denis Davydov
2017-10-12 20:41:57 +02:00
committed by Todd Gamblin
parent 0dad5b3ee5
commit 1b53e82348
7 changed files with 52 additions and 5 deletions

View File

@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
from spack.operating_systems.mac_os import macOS_version
import platform
@@ -61,7 +62,7 @@ class Oce(Package):
# fix build with Xcode 8 "previous definition of CLOCK_REALTIME"
# reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643
if (platform.system() == "Darwin") and (
'.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12'):
macOS_version() == Version('10.12')):
patch('sierra.patch', when='@0.17.2:0.18.0')
def install(self, spec, prefix):
@@ -91,7 +92,7 @@ def install(self, spec, prefix):
'-DOCE_OSX_USE_COCOA:BOOL=ON',
])
if '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12':
if macOS_version() >= Version('10.12'):
# use @rpath on Sierra due to limit of dynamic loader
options.append('-DCMAKE_MACOSX_RPATH=ON')
else: