diff options
author | snehring <7978778+snehring@users.noreply.github.com> | 2022-08-25 17:29:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 16:29:40 -0600 |
commit | 4d10cdb7e8e9fc8ef410b7cb7f8712683a0e3dd5 (patch) | |
tree | 275d9b09431289303c645b2cf9eb31111ddeba13 | |
parent | 1bffa46d4dc2f3782542e65961595ae00d4b06c5 (diff) | |
download | spack-4d10cdb7e8e9fc8ef410b7cb7f8712683a0e3dd5.tar.gz spack-4d10cdb7e8e9fc8ef410b7cb7f8712683a0e3dd5.tar.bz2 spack-4d10cdb7e8e9fc8ef410b7cb7f8712683a0e3dd5.tar.xz spack-4d10cdb7e8e9fc8ef410b7cb7f8712683a0e3dd5.zip |
phylip: adding workarounds for gcc10+ (#32376)
* phylip: adding workarounds for gcc10+
* phylip: switch to spec.satisfies
-rw-r--r-- | var/spack/repos/builtin/packages/phylip/package.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/phylip/package.py b/var/spack/repos/builtin/packages/phylip/package.py index 05170e3945..976f754105 100644 --- a/var/spack/repos/builtin/packages/phylip/package.py +++ b/var/spack/repos/builtin/packages/phylip/package.py @@ -12,9 +12,25 @@ class Phylip(Package): homepage = "https://evolution.genetics.washington.edu/phylip/" url = "https://evolution.gs.washington.edu/phylip/download/phylip-3.697.tar.gz" + maintainers = ["snehring"] 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): with working_dir("src"): if self.spec.satisfies("platform=darwin"): |