From a8506f9022464ac15d0db6a22b52eba79a73cfd8 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Thu, 25 Apr 2024 20:18:00 +0200 Subject: [PATCH] glew package: add ld flags when compiling with ^apple-gl (#43429) --- var/spack/repos/builtin/packages/glew/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/glew/package.py b/var/spack/repos/builtin/packages/glew/package.py index 7004b9b298..6e2e41779f 100644 --- a/var/spack/repos/builtin/packages/glew/package.py +++ b/var/spack/repos/builtin/packages/glew/package.py @@ -72,3 +72,8 @@ def cmake_args(self): args.append(self.define("OPENGL_egl_LIBRARY", "IGNORE")) return args + + def flag_handler(self, name, flags): + if name == "ldflags" and self.spec.satisfies("platform=darwin ^apple-gl"): + flags.append("-framework OpenGL") + return (flags, None, None)