diff options
author | Axel Huebl <axel.huebl@plasma.ninja> | 2020-04-16 17:30:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 17:30:24 -0700 |
commit | 4d25632e59dda75744a618da45014e03a4f031f9 (patch) | |
tree | 325cd2edd34db1978824a1505c9b38d92edf3564 /var | |
parent | ddb6e99a28b8a1f3e17cbeaa4c029057e2a76d6c (diff) | |
download | spack-4d25632e59dda75744a618da45014e03a4f031f9.tar.gz spack-4d25632e59dda75744a618da45014e03a4f031f9.tar.bz2 spack-4d25632e59dda75744a618da45014e03a4f031f9.tar.xz spack-4d25632e59dda75744a618da45014e03a4f031f9.zip |
macOS: Fix emacs Linking (#16106)
* macOS: Fix emacs Linking
Fix linking issue of emacs on macOS (clang and gcc).
Applies the same work-around as conda-forge:
https://github.com/conda-forge/emacs-feedstock/blob/b051f6c928d8b99fed3fabd9a8d67be993f94494/recipe/build.sh
Homebrew avoids this by linking against the system ncurses lib:
https://github.com/Homebrew/homebrew-core/blob/master/Formula/emacs.rb
* ncurses: fix outdated variant comment
this comment was build on the assumption that gnutls
triggers a termlib dependency in emacs. that's not the
case, ncurses itself depends on termlib when build with
this feature.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/emacs/package.py | 7 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ncurses/package.py | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py index d073157826..6842e79043 100644 --- a/var/spack/repos/builtin/packages/emacs/package.py +++ b/var/spack/repos/builtin/packages/emacs/package.py @@ -47,6 +47,13 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage): depends_on('gnutls', when='+tls') depends_on('jpeg') + @when('platform=darwin') + def setup_build_environment(self, env): + # on macOS, emacs' config does search hard enough for ncurses' + # termlib `-ltinfo` lib, which results in linker errors + if '+termlib' in spec['ncurses']: + env.append_flags('LDFLAGS', '-ltinfo') + def configure_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py index 85fd9d68f8..cfb122623d 100644 --- a/var/spack/repos/builtin/packages/ncurses/package.py +++ b/var/spack/repos/builtin/packages/ncurses/package.py @@ -28,7 +28,8 @@ class Ncurses(AutotoolsPackage, GNUMirrorPackage): variant('symlinks', default=False, description='Enables symlinks. Needed on AFS filesystem.') variant('termlib', default=True, - description='Enables termlib needs for gnutls in emacs.') + description='Enables termlib features. This is an extra ' + 'lib and optional internal dependency.') depends_on('pkgconfig', type='build') |