summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-12-20 16:13:55 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2019-12-20 16:13:55 +0800
commitb5297cdf97ef37a2b9bb41e428e00e718798f4dd (patch)
tree8e35bf71b6d05d5e7c3abed316fdccbaa6fff886
parentffba112d04908cd7badc7e7d39cb09bf6827ec7a (diff)
downloadmm-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.build7
-rwxr-xr-xutil/meson_aux/libstdcxx-tag.py9
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())