phylip: adding workarounds for gcc10+ (#32376)
* phylip: adding workarounds for gcc10+ * phylip: switch to spec.satisfies
This commit is contained in:
parent
1bffa46d4d
commit
4d10cdb7e8
@ -12,9 +12,25 @@ class Phylip(Package):
|
|||||||
|
|
||||||
homepage = "https://evolution.genetics.washington.edu/phylip/"
|
homepage = "https://evolution.genetics.washington.edu/phylip/"
|
||||||
url = "https://evolution.gs.washington.edu/phylip/download/phylip-3.697.tar.gz"
|
url = "https://evolution.gs.washington.edu/phylip/download/phylip-3.697.tar.gz"
|
||||||
|
maintainers = ["snehring"]
|
||||||
|
|
||||||
version("3.697", sha256="9a26d8b08b8afea7f708509ef41df484003101eaf4beceb5cf7851eb940510c1")
|
version("3.697", sha256="9a26d8b08b8afea7f708509ef41df484003101eaf4beceb5cf7851eb940510c1")
|
||||||
|
|
||||||
|
def patch(self):
|
||||||
|
with working_dir("src"):
|
||||||
|
for f in ["Makefile.unx", "Makefile.osx"]:
|
||||||
|
filter_file(r"CC\s*= gcc", "", f)
|
||||||
|
filter_file(r"CFLAGS\s*=.*$", "", f)
|
||||||
|
|
||||||
|
def flag_handler(self, name, flags):
|
||||||
|
if (
|
||||||
|
self.spec.satisfies("%gcc@10:") or self.spec.satisfies("%clang@11:")
|
||||||
|
) and name.lower() == "cflags":
|
||||||
|
flags.append("-fcommon")
|
||||||
|
if self.spec.satisfies("platform=darwin") and name.lower() == "cflags":
|
||||||
|
flags.append("-DMACOS10")
|
||||||
|
return (None, flags, None)
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
with working_dir("src"):
|
with working_dir("src"):
|
||||||
if self.spec.satisfies("platform=darwin"):
|
if self.spec.satisfies("platform=darwin"):
|
||||||
|
Loading…
Reference in New Issue
Block a user