diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py index ae9659c73cdaae..cc50ea1ff1ffe2 100644 --- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -92,3 +92,9 @@ def cmake_args(self): ] return args + + @run_after("install") + def darwin_fix(self): + # The shared library is not installed correctly on Darwin; fix this + if self.spec.satisfies("platform=darwin"): + fix_darwin_install_name(self.prefix.lib)