diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2019-12-20 16:13:55 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2019-12-20 16:13:55 +0800 |
commit | b5297cdf97ef37a2b9bb41e428e00e718798f4dd (patch) | |
tree | 8e35bf71b6d05d5e7c3abed316fdccbaa6fff886 | |
parent | ffba112d04908cd7badc7e7d39cb09bf6827ec7a (diff) | |
download | mm-common-b5297cdf97ef37a2b9bb41e428e00e718798f4dd.tar.gz |
Make libstdc++.tag retrieval work for Windows
With this, the mm-common package will now build for Windows/MSVC; it
is still a long way to go to actually make it usable for Windows
This ensures that we use the curl.exe and wget.exe that we happen to
find, and the corresponding DLLs of the libraries can be loaded.
-rw-r--r-- | meson.build | 7 | ||||
-rwxr-xr-x | util/meson_aux/libstdcxx-tag.py | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/meson.build b/meson.build index 3255328..fbc7e5e 100644 --- a/meson.build +++ b/meson.build @@ -274,10 +274,11 @@ install_data('README', install_dir: install_docdir) download_cmd = 'none' if get_option('use-network') curl = find_program('curl', required: false) - download_cmd = 'curl' - if not curl.found() + if curl.found() + download_cmd = curl.path() + else wget = find_program('wget', required: true) - download_cmd = 'wget' + download_cmd = wget.path() endif endif diff --git a/util/meson_aux/libstdcxx-tag.py b/util/meson_aux/libstdcxx-tag.py index 2873498..6a66c22 100755 --- a/util/meson_aux/libstdcxx-tag.py +++ b/util/meson_aux/libstdcxx-tag.py @@ -22,7 +22,7 @@ libstdcxx_tag_url = 'http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/' + def curl(): cmd = [ - 'curl', + subcommand, '--compressed', '--connect-timeout', '300', '--globoff', @@ -43,7 +43,7 @@ def curl(): def wget(): cmd = [ - 'wget', + subcommand, '--timestamping', '--no-directories', '--timeout=300', @@ -70,8 +70,9 @@ def dont_download_tag_file(): return 0 # ----- Main ----- -if subcommand == 'curl': +subcommand_base = os.path.splitext(os.path.basename(os.path.normpath(subcommand)))[0] +if subcommand_base == 'curl': sys.exit(curl()) -if subcommand == 'wget': +if subcommand_base == 'wget': sys.exit(wget()) sys.exit(dont_download_tag_file()) |