summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cerbero/utils/shell.py10
-rw-r--r--config/windows.config5
-rw-r--r--recipes/openssl.recipe10
3 files changed, 11 insertions, 14 deletions
diff --git a/cerbero/utils/shell.py b/cerbero/utils/shell.py
index f5991cac..15d896cc 100644
--- a/cerbero/utils/shell.py
+++ b/cerbero/utils/shell.py
@@ -500,12 +500,14 @@ def which(pgm, path=None):
return pext
def check_perl_version(needed):
+ perl = which('perl')
try:
- out = check_call(['perl', '--version'])
+ out = check_call([perl, '--version'])
except FatalError:
- return None, None
+ return None, None, None
m = re.search('v[0-9]+\.[0-9]+(\.[0-9]+)?', out)
if not m:
raise FatalError('Could not detect perl version')
- newer = StrictVersion(m.group()[1:]) >= StrictVersion(needed)
- return which('perl'), newer
+ found = m.group()[1:]
+ newer = StrictVersion(found) >= StrictVersion(needed)
+ return perl, found, newer
diff --git a/config/windows.config b/config/windows.config
index 8da98c06..f36fc52e 100644
--- a/config/windows.config
+++ b/config/windows.config
@@ -67,11 +67,6 @@ toolchainbin = os.path.join(toolchain_prefix, 'bin')
if os.path.isdir(toolchainbin) and not toolchainbin in os.environ['PATH']:
os.environ['PATH'] = '%s%s%s' % (toolchainbin, separator, os.environ['PATH'])
-# This perl is only used by openssl; we can't use it everywhere else because it
-# is incapable of detecting msys tools, and so perl scripts like autom4te fail
-# to detect msys tools like m4. Lucky for us, openssl doesn't use those.
-os.environ['CERBERO_OPENSSL_PERL_PATH'] = os.path.join(mingw_perl_prefix, 'bin')
-
os.environ['ne_cv_libsfor_socket'] = '-lws2_32'
os.environ['ne_cv_libsfor_gethostbyname'] = '-lws2_32'
os.environ['ac_cv_func_malloc_0_nonnull'] ='yes'
diff --git a/recipes/openssl.recipe b/recipes/openssl.recipe
index 44b59d0e..7ababdf7 100644
--- a/recipes/openssl.recipe
+++ b/recipes/openssl.recipe
@@ -94,15 +94,15 @@ class Recipe(recipe.Recipe):
if self.config.platform == Platform.WINDOWS:
# Msys ships with a too-old perl, so we modify PATH to use the
# mingw-perl that was downloaded and installed by bootstrap.
- openssl_path = os.environ['CERBERO_OPENSSL_PERL_PATH']
- os.environ['PATH'] = openssl_path + ';' + os.environ['PATH']
- perl, newer = shell.check_perl_version('5.10.0')
+ openssl_path = os.path.join(self.config.mingw_perl_prefix, 'bin')
+ os.environ['PATH'] = openssl_path + ';' + os.environ['PATH']
+ perl, found, newer = shell.check_perl_version('5.10.0')
m = 'please run bootstrap again'
if newer is None:
raise FatalError('Perl not found, ' + m)
if newer is False:
- raise FatalError('Configured Perl {!r} is too old, {}'
- ''.format(perl, m))
+ raise FatalError('Configured Perl {!r} is {} which is too old, {}'
+ ''.format(perl, found, m))
# OpenSSL guesses the libdir incorrectly on x86_64
config_sh = 'perl ./Configure --prefix=' + self.config.prefix + \
' --libdir=lib' + self.config.lib_suffix + ' '