summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2021-09-29 10:21:43 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2022-03-04 11:07:22 +0100
commit235ffdf123811513c5e73a04c997ed8dffa53682 (patch)
treed7cfe2587fbeb5fdb0d33e6105bd92a688780b2d /config
parent77839490bf79659682ed87b8a45752754a0d87df (diff)
Add support for MSYS2
This is the initial commit to start supporting MSYS2 (https://www.msys2.org/) in favor of the old MSYS/MinGW. MSYS2 brings several important improvements: * Project with active development * In sync with latest Cygwin * Up-to-date packages * Package manager Here is a more detailed writeup of MSYS2 from Git's migration https://github.com/git/git/commit/df5218b4c30b2fa1ba0d1ada4166ad85bc83be26 The old msys will still be supported to ease the migration but a deprecation warning will be shown to migrate to MSYS2 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/743>
Diffstat (limited to 'config')
-rw-r--r--config/windows.config16
1 files changed, 7 insertions, 9 deletions
diff --git a/config/windows.config b/config/windows.config
index 7412bbba..0dad44aa 100644
--- a/config/windows.config
+++ b/config/windows.config
@@ -3,7 +3,7 @@
# shouldn't be modified unless you now what you are doing.
# PLEASE, DO NOT EDIT THIS FILE
-from cerbero.config import Architecture, Platform, FatalError
+from cerbero.config import Architecture, Platform, Distro, FatalError
from cerbero.utils import EnvValue, EnvValueArg, EnvValueCmd, EnvValuePath
# We don't want anything from mingw or msys detected in configure and
@@ -36,7 +36,6 @@ msvc_env_for_build_system = dict()
if platform == Platform.WINDOWS:
- separator = ';'
if target_arch == Architecture.X86:
build = 'i686-w64-mingw32'
if target_arch == Architecture.X86_64:
@@ -47,7 +46,6 @@ else:
# .cerbero deps CI job otherwise we will tar up ~1GB of generated data.
env['WINEPREFIX'] = os.path.join(build_tools_prefix, 'var', 'tmp', 'wine')
env['WINEDEBUG'] = 'fixme-all'
- separator = ':'
if target_arch == Architecture.X86:
buildname = 'windows_x86'
@@ -68,8 +66,6 @@ target = host
if not toolchain_prefix:
toolchain_prefix = os.path.join(home_dir, 'mingw', _path)
-if not mingw_perl_prefix:
- mingw_perl_prefix = os.path.join(home_dir, 'mingw', 'perl')
if not tools_prefix:
tools_prefix = 'x86_64-w64-mingw32-'
@@ -168,16 +164,18 @@ env['GENDEF'] = 'gendef'
env['DLLTOOL'] = cmd('dlltool', dlltool_flags).get()
# MinGW Perl PATH, only needed when building on Windows with MSYS
-if platform == Platform.WINDOWS:
+if distro == Distro.MSYS:
+ if not mingw_perl_prefix:
+ mingw_perl_prefix = os.path.join(home_dir, 'mingw', 'perl')
perlbin = os.path.join(mingw_perl_prefix, 'bin')
- env['PATH'] = '%s%s%s' % (perlbin, separator, env['PATH'])
+ env['PATH'] = '%s%s%s' % (perlbin, os.pathsep, env['PATH'])
# MinGW toolchain PATH
toolchainbin = os.path.join(toolchain_prefix, 'bin')
if toolchainbin not in env['PATH']:
- env['PATH'] = '%s%s%s' % (toolchainbin, separator, env['PATH'])
+ env['PATH'] = '%s%s%s' % (toolchainbin, os.pathsep, env['PATH'])
libexecdir = os.path.join(toolchain_prefix, "libexec/gcc/x86_64-w64-mingw32/8.2.0/")
- env['PATH'] = '%s%s%s' % (libexecdir, separator, env['PATH'])
+ env['PATH'] = '%s%s%s' % (libexecdir, os.pathsep, env['PATH'])
# These only have meaning for autotools, so let's just leave it in the general env
env['ne_cv_libsfor_socket'] = '-lws2_32'