+ Add a validate function that refuses to build numdiff if arch is darwin-x86_64.
This commit is contained in:
parent
6e0e6d2654
commit
1eb7b8cf46
1 changed files with 15 additions and 0 deletions
|
@ -34,7 +34,22 @@ class Numdiff(Package):
|
|||
|
||||
version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e')
|
||||
|
||||
def validate(self, spec):
|
||||
"""
|
||||
Checks if we are attempting to build on an incompatible
|
||||
architecture.
|
||||
|
||||
Ref. https://github.com/davydden/homebrew-dealiisuite/blob/master/numdiff.rb#L13-L15.
|
||||
|
||||
:param spec: spec of the package
|
||||
:raises RuntimeError: in case of inconsistencies.
|
||||
"""
|
||||
|
||||
if spec.satisfies("=darwin-x86_64"):
|
||||
raise RuntimeError(msg)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
self.validate(spec)
|
||||
options = ['--prefix=%s' % prefix]
|
||||
configure(*options)
|
||||
make()
|
||||
|
|
Loading…
Reference in a new issue