summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/krb5/mit-krb5-1.17-static-libs.patch15
-rw-r--r--var/spack/repos/builtin/packages/krb5/package.py16
2 files changed, 30 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/krb5/mit-krb5-1.17-static-libs.patch b/var/spack/repos/builtin/packages/krb5/mit-krb5-1.17-static-libs.patch
new file mode 100644
index 0000000000..cdf0a097b4
--- /dev/null
+++ b/var/spack/repos/builtin/packages/krb5/mit-krb5-1.17-static-libs.patch
@@ -0,0 +1,15 @@
+--- src/lib/crypto/builtin/aes/Makefile.in.orig 2019-06-27 14:51:51.305688932 +0200
++++ src/lib/crypto/builtin/aes/Makefile.in 2019-06-27 14:52:46.428203235 +0200
+@@ -34,10 +34,10 @@
+
+ all-unix: all-libobjs # aes-gen
+
+-iaesx64@SHOBJEXT@: $(srcdir)/iaesx64.s
++iaesx64.$(OBJEXT) iaesx64@SHOBJEXT@: $(srcdir)/iaesx64.s
+ $(YASM) $(AESNI_FLAGS) -o $@ $(srcdir)/iaesx64.s
+
+-iaesx86@SHOBJEXT@: $(srcdir)/iaesx86.s
++iaesx86.$(OBJEXT) iaesx86@SHOBJEXT@: $(srcdir)/iaesx86.s
+ $(YASM) $(AESNI_FLAGS) -o $@ $(srcdir)/iaesx86.s
+
+ includes: depend
diff --git a/var/spack/repos/builtin/packages/krb5/package.py b/var/spack/repos/builtin/packages/krb5/package.py
index bdc99e1059..78fcdd1f42 100644
--- a/var/spack/repos/builtin/packages/krb5/package.py
+++ b/var/spack/repos/builtin/packages/krb5/package.py
@@ -26,6 +26,12 @@ class Krb5(AutotoolsPackage):
depends_on('bison', type='build')
depends_on('openssl')
+ variant(
+ 'shared', default=True,
+ description='install shared libraries if True, static if false'
+ )
+ patch('mit-krb5-1.17-static-libs.patch', level=0)
+
configure_directory = 'src'
build_directory = 'src'
@@ -51,4 +57,12 @@ class Krb5(AutotoolsPackage):
string=True)
def configure_args(self):
- return ['--without-system-verto']
+ args = ['--without-system-verto']
+
+ if '~shared' in self.spec:
+ args.append('--enable-static')
+ args.append('--disable-shared')
+ else:
+ args.append('--disable-static')
+
+ return args