postgresql: Fix build with threadsafe and add variant. (#4403)
* postgresql: Fix build with threadsafe and add variant. * postgresql: Convert Package to AutotoolsPackage. Also add explicit enable flag for +threadsafe variant.
This commit is contained in:
parent
f7b8b75c12
commit
06e7708728
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user