summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorNicolas Richart <nicolas.richart@epfl.ch>2016-06-01 03:00:03 +0200
committerNicolas Richart <nicolas.richart@epfl.ch>2016-06-01 03:00:03 +0200
commit0df0677d5bb4c5d5dce6bb9371c356af4b299170 (patch)
tree1ec7c96357d1a8de5ca52d1a3969b33baa000a41 /var
parent1eed2ee985ea2dfb8bce77d437728d8d7b7ad6ef (diff)
downloadspack-0df0677d5bb4c5d5dce6bb9371c356af4b299170.tar.gz
spack-0df0677d5bb4c5d5dce6bb9371c356af4b299170.tar.bz2
spack-0df0677d5bb4c5d5dce6bb9371c356af4b299170.tar.xz
spack-0df0677d5bb4c5d5dce6bb9371c356af4b299170.zip
Adding a variant to link against the spack libraries instead of the system ones
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/emacs/package.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py
index 4b05864a1e..b1177d6339 100644
--- a/var/spack/repos/builtin/packages/emacs/package.py
+++ b/var/spack/repos/builtin/packages/emacs/package.py
@@ -31,15 +31,27 @@ class Emacs(Package):
version('24.5', 'd74b597503a68105e61b5b9f6d065b44')
+ variant('use-system-deps', default=True, description='Uses the library on the system to compile')
+
depends_on('ncurses')
# Emacs also depends on:
# GTK or other widget library
# libtiff, png, etc.
# For now, we assume the system provides all that stuff.
# For Ubuntu 14.04 LTS:
- # sudo apt-get install libgtk-3-dev libxpm-dev libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev
+ # sudo apt-get install libgtk-3-dev libxpm-dev libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev
+ depends_on('libtiff', when='~use-system-deps')
+ depends_on('libpng', when='~use-system-deps')
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
+ if '~use-system-deps' in self.spec:
+ args = [
+ '--with-xpm=no',
+ '--with-gif=no',
+ ]
+ else:
+ args = []
+
+ configure('--prefix=%s' % prefix, *args)
make()
make("install")