66# Only problem is the installation from github.com
77
88# Last Update in 2024-0119
9+ # Last Update in 2025-04-28 by Kai Luo
910
1011[ " ${BASH_SOURCE[0]} " ] && SCRIPT_NAME=" ${BASH_SOURCE[0]} " || SCRIPT_NAME=$0
1112SCRIPT_DIR=" $( cd " $( dirname " $SCRIPT_NAME " ) /.." && pwd -P) "
1213
13- rapidjson_ver=" 1.1.0"
14+ rapidjson_ver=" master " # latest version, instead of " 1.1.0" fixing issue of #5518
1415rapidjson_sha256=" bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e"
1516source " ${SCRIPT_DIR} " /common_vars.sh
1617source " ${SCRIPT_DIR} " /tool_kit.sh
@@ -31,8 +32,10 @@ case "$with_rapidjson" in
3132 pkg_install_dir=" ${INSTALLDIR} /$dirname "
3233 # pkg_install_dir="${HOME}/lib/rapidjson/${rapidjson_ver}"
3334 install_lock_file=" $pkg_install_dir /install_successful"
34- url=" https://github.com/Tencent/rapidjson/archive/refs/tags/v${rapidjson_ver} .tar.gz"
35- filename=" rapidjson-${rapidjson_ver} .tar.gz"
35+ # url="https://github.com/Tencent/rapidjson/archive/refs/tags/v${rapidjson_ver}.tar.gz" # commented by Kai Luo in 2025/04/28
36+ url=" https://codeload.github.com/Tencent/rapidjson/zip/refs/heads/master"
37+ # filename="rapidjson-${rapidjson_ver}.tar.gz"
38+ filename=" rapidjson-${rapidjson_ver} .zip" # changed by Kai Luo in 2025/04/28
3639 if verify_checksums " ${install_lock_file} " ; then
3740 echo " $dirname is already installed, skipping it."
3841 else
@@ -41,14 +44,16 @@ case "$with_rapidjson" in
4144 else
4245 # download from github.com and checksum
4346 echo " ===> Notice: This version of rapidjson is downloaded in GitHub Release, which will always be out-of-date version <==="
44- download_pkg_from_url " ${rapidjson_sha256} " " ${filename} " " ${url} "
47+ # download_pkg_from_url "${rapidjson_sha256}" "${filename}" "${url}"
48+ wget " ${url} " -O " ${filename} " --no-check-certificate # use wget directly instead of download_pkg_from_url
4549 fi
4650 if [ " ${PACK_RUN} " = " __TRUE__" ]; then
4751 echo " --pack-run mode specified, skip installation"
4852 else
4953 echo " Installing from scratch into ${pkg_install_dir} "
5054 [ -d $dirname ] && rm -rf $dirname
51- tar -xzf $filename
55+ # tar -xzf $filename
56+ unzip -q $filename # downloaded file is a zip file, so use unzip instead of tar, use -q to suppress output
5257 mkdir -p " ${pkg_install_dir} "
5358 cp -r $dirname /* " ${pkg_install_dir} /"
5459 # for CMake to find rapidjson
0 commit comments