diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2024-10-22 23:33:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-22 14:33:09 -0700 |
commit | 582254f891e0d00b885a91e0c485012b5f8183e9 (patch) | |
tree | 7fefc591715d190e2d37ebbf0a786eccfd613398 /var | |
parent | 31694fe9bd3d8c190bf558d4f94ec4c9a34b507a (diff) | |
download | spack-582254f891e0d00b885a91e0c485012b5f8183e9.tar.gz spack-582254f891e0d00b885a91e0c485012b5f8183e9.tar.bz2 spack-582254f891e0d00b885a91e0c485012b5f8183e9.tar.xz spack-582254f891e0d00b885a91e0c485012b5f8183e9.zip |
sox: fix build with Apple Clang 15+ (#47128)
* sox: fix build with Apple Clang 15+
---------
Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/sox/package.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/sox/package.py b/var/spack/repos/builtin/packages/sox/package.py index d830fb27d6..f21c34222c 100644 --- a/var/spack/repos/builtin/packages/sox/package.py +++ b/var/spack/repos/builtin/packages/sox/package.py @@ -14,7 +14,7 @@ class Sox(AutotoolsPackage): version("14.4.2", sha256="81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c") - depends_on("c", type="build") # generated + depends_on("c", type="build") variant("mp3", default=False, description="Build with mp3 support") @@ -24,3 +24,10 @@ class Sox(AutotoolsPackage): depends_on("opus") depends_on("lame", when="+mp3") depends_on("libmad", when="+mp3") + + def flag_handler(self, name, flags): + # https://github.com/Homebrew/homebrew-core/blob/master/Formula/s/sox.rb + if name == "cflags": + if self.spec.satisfies("%apple-clang@15:"): + flags.append("-Wno-incompatible-function-pointer-types") + return (flags, None, None) |