OpenSSL package: fix ./configure error; restore parallel build (#29928)

* The configure script on Windows requires that CC/CXX be enclosed
  in quotes if the paths to those compiler executables contain
  spaces (so unlike most instances of Executable, the arguments
  need to contain the quotes)
* OpenSSL requires the nasm package on Windows
* Restore parallel build from 075e942 (accidentally reverted in
  #27021)
This commit is contained in:
John W. Parent 2022-04-19 14:04:26 -04:00 committed by GitHub
parent 75638c1e88
commit dc3cf5c6b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,6 +100,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
depends_on('zlib')
depends_on('perl@5.14.0:', type=('build', 'test'))
depends_on('ca-certificates-mozilla', type=('build', 'run'), when='certs=mozilla')
depends_on('nasm', when='platform=windows')
@classmethod
def determine_version(cls, exe):
@ -147,8 +148,8 @@ def install(self, spec, prefix):
% join_path(prefix, 'etc', 'openssl')]
if spec.satisfies('platform=windows'):
base_args.extend([
'CC=%s' % os.environ.get('CC'),
'CXX=%s' % os.environ.get('CXX'),
'CC=\"%s\"' % os.environ.get('CC'),
'CXX=\"%s\"' % os.environ.get('CXX'),
'VC-WIN64A',
])
if spec.satisfies('~shared'):
@ -164,7 +165,9 @@ def install(self, spec, prefix):
# On Windows, we use perl for configuration and build through MSVC
# nmake.
if spec.satisfies('platform=windows'):
Executable('perl')('Configure', *base_args)
# The configure executable requires that paths with spaces
# on Windows be wrapped in quotes
Executable('perl')('Configure', *base_args, ignore_quotes=True)
else:
Executable('./config')(*base_args)
@ -183,6 +186,8 @@ def install(self, spec, prefix):
else:
host_make = make
host_make()
if self.run_tests:
host_make('test', parallel=False) # 'VERBOSE=1'