emacs: add support for native compilation on master (#23493)

* Emacs native compilation on master

* emacs: Mark tools correctly as build dependency
This commit is contained in:
miheer vaidya 2021-05-14 01:33:32 -06:00 committed by GitHub
parent 0d92c39d47
commit 702f343fb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,6 +33,7 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
description="Select an X toolkit (gtk, athena)"
)
variant('tls', default=False, description="Build Emacs with gnutls")
variant('native', default=False, description="enable native compilation of elisp")
depends_on('pkgconfig', type='build')
@ -49,12 +50,14 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
depends_on('gtkplus', when='+X toolkit=gtk')
depends_on('gnutls', when='+tls')
depends_on('jpeg')
depends_on('m4', when="@master:")
depends_on('autoconf', when="@master:")
depends_on('automake', when="@master:")
depends_on('libtool', when="@master:")
depends_on('m4', type='build', when="@master:")
depends_on('autoconf', type='build', when="@master:")
depends_on('automake', type='build', when="@master:")
depends_on('libtool', type='build', when="@master:")
depends_on('gcc@11: +strip languages=jit', when="+native")
conflicts('@:26.3', when='platform=darwin os=catalina')
conflicts('+native', when='@:27.99.99', msg="native compilation require @master")
@when('platform=darwin')
def setup_build_environment(self, env):
@ -80,6 +83,9 @@ def configure_args(self):
if sys.platform == 'darwin':
args.append('--without-ns')
if '+native' in spec:
args.append('--with-native-compilation')
if '+tls' in spec:
args.append('--with-gnutls')
else: