p7zip: fix %clang (#30843)
This commit is contained in:
parent
b29f27aec7
commit
aba9149b71
@ -23,12 +23,23 @@ class P7zip(MakefilePackage):
|
|||||||
# all3 includes 7z, 7za, and 7zr
|
# all3 includes 7z, 7za, and 7zr
|
||||||
build_targets = ['all3']
|
build_targets = ['all3']
|
||||||
|
|
||||||
|
depends_on('yasm', type='build', when='%clang')
|
||||||
|
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
if 'platform=darwin' in self.spec:
|
# Use the suggested makefile
|
||||||
if '%gcc' in self.spec:
|
for tgt, makefile in {
|
||||||
copy('makefile.macosx_gcc_64bits', 'makefile.machine')
|
'platform=linux %clang': 'makefile.linux_clang_amd64_asm',
|
||||||
elif '%apple-clang' in self.spec or '%clang' in self.spec:
|
'platform=darwin %gcc': 'makefile.macosx_gcc_64bits',
|
||||||
copy('makefile.macosx_llvm_64bits', 'makefile.machine')
|
'platform=darwin %apple-clang': 'makefile.macosx_llvm_64bits',
|
||||||
|
'platform=darwin %clang': 'makefile.macosx_llvm_64bits',
|
||||||
|
}.items():
|
||||||
|
if tgt in self.spec:
|
||||||
|
copy(makefile, 'makefile.machine')
|
||||||
|
break
|
||||||
|
# Silence an error about -Wc++11-narrowing in clang.
|
||||||
|
if '@16.02 %clang' in spec:
|
||||||
|
with open('makefile.machine', 'a') as f:
|
||||||
|
f.write("ALLFLAGS += -Wno-c++11-narrowing")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def install_targets(self):
|
def install_targets(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user