summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/postgresql/package.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/postgresql/package.py b/var/spack/repos/builtin/packages/postgresql/package.py
index caf3768362..f8a2894538 100644
--- a/var/spack/repos/builtin/packages/postgresql/package.py
+++ b/var/spack/repos/builtin/packages/postgresql/package.py
@@ -25,7 +25,7 @@
from spack import *
-class Postgresql(Package):
+class Postgresql(AutotoolsPackage):
"""PostgreSQL is a powerful, open source object-relational database system.
It has more than 15 years of active development and a proven architecture
that has earned it a strong reputation for reliability, data integrity, and
@@ -40,8 +40,13 @@ class Postgresql(Package):
depends_on('openssl')
depends_on('readline')
- def install(self, spec, prefix):
- configure("--prefix=%s" % prefix,
- "--with-openssl")
- make()
- make("install")
+ variant('threadsafe', default=False, description='Build with thread safe.')
+
+ def configure_arg(self):
+ config_args = ["--with-openssl"]
+ if '+threadsafe' in self.spec:
+ config_args.append("--enable-thread-safety")
+ else:
+ config_args.append("--disable-thread-safety")
+
+ return config_args