Add option to not build GUI for WxWidgets. (#47526)

This commit is contained in:
green-br 2024-11-18 20:43:23 +00:00 committed by GitHub
parent 7f76490b31
commit 2c4ac02adf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,11 +35,12 @@ class Wxwidgets(AutotoolsPackage):
depends_on("cxx", type="build") # generated depends_on("cxx", type="build") # generated
variant("opengl", default=False, description="Enable OpenGL support") variant("opengl", default=False, description="Enable OpenGL support")
variant("gui", default=True, description="Enable GUI support.")
patch("math_include.patch", when="@3.0.1:3.0.2") patch("math_include.patch", when="@3.0.1:3.0.2")
depends_on("pkgconfig", type="build") depends_on("pkgconfig", type="build")
depends_on("gtkplus") depends_on("gtkplus", when="+gui")
depends_on("mesa-glu", when="+opengl") depends_on("mesa-glu", when="+opengl")
@when("@:3.0.2") @when("@:3.0.2")
@ -52,6 +53,8 @@ def configure_args(self):
if self.spec.satisfies("+opengl"): if self.spec.satisfies("+opengl"):
options.append("--with-opengl") options.append("--with-opengl")
if not self.spec.satisfies("+gui"):
options.append("--disable-gui")
# see https://trac.wxwidgets.org/ticket/17639 # see https://trac.wxwidgets.org/ticket/17639
if spec.satisfies("@:3.1.0") and sys.platform == "darwin": if spec.satisfies("@:3.1.0") and sys.platform == "darwin":