emacs: add variant treesitter for Emacs 29+ (#34134)

This commit is contained in:
Eric Berquist 2022-11-26 17:45:00 -05:00 committed by GitHub
parent 21c29ee375
commit 613d0b7e8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,7 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
)
variant("tls", default=False, description="Build Emacs with gnutls")
variant("native", default=False, description="enable native compilation of elisp")
variant("treesitter", default=False, description="Build with tree-sitter support")
depends_on("pkgconfig", type="build")
@ -53,6 +54,7 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
depends_on("gtkplus", when="+X toolkit=gtk")
depends_on("gnutls", when="+tls")
depends_on("jpeg")
depends_on("tree-sitter", when="+treesitter")
depends_on("m4", type="build", when="@master:")
depends_on("autoconf", type="build", when="@master:")
depends_on("automake", type="build", when="@master:")
@ -62,6 +64,7 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
conflicts("@:26.3", when="platform=darwin os=catalina")
conflicts("+native", when="@:27", msg="native compilation require @master")
conflicts("+treesitter", when="@:28", msg="tree-sitter support requires version 29")
@when("platform=darwin")
def setup_build_environment(self, env):
@ -92,6 +95,9 @@ def configure_args(self):
else:
args.append("--without-gnutls")
if "+treesitter" in spec:
args.append("--with-tree-sitter")
return args
def _test_check_versions(self):