[mm-common/windows.prelim] Make libstdc++.tag retrieval work for Windows
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mm-common/windows.prelim] Make libstdc++.tag retrieval work for Windows
- Date: Fri, 20 Dec 2019 08:17:06 +0000 (UTC)
commit b5297cdf97ef37a2b9bb41e428e00e718798f4dd
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Dec 20 16:13:55 2019 +0800
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.
meson.build | 7 ++++---
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())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]