p7zip: fix build on macOS
This commit is contained in:
parent
e760f16cf8
commit
db794ea201
1 changed files with 7 additions and 2 deletions
|
@ -3,8 +3,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class P7zip(MakefilePackage):
|
||||
"""A Unix port of the 7z file archiver"""
|
||||
|
@ -17,6 +15,13 @@ class P7zip(MakefilePackage):
|
|||
# all3 includes 7z, 7za, and 7zr
|
||||
build_targets = ['all3']
|
||||
|
||||
def edit(self, spec, prefix):
|
||||
if 'platform=darwin' in self.spec:
|
||||
if '%gcc' in self.spec:
|
||||
copy('makefile.macosx_gcc_64bits', 'makefile.machine')
|
||||
elif '%apple-clang' in self.spec or '%clang' in self.spec:
|
||||
copy('makefile.macosx_llvm_64bits', 'makefile.machine')
|
||||
|
||||
@property
|
||||
def install_targets(self):
|
||||
return ['DEST_HOME={0}'.format(self.prefix), 'install']
|
||||
|
|
Loading…
Reference in a new issue