|
19 | 19 | ################################################################################################################################################# |
20 | 20 | # Script version = Major minor patch |
21 | 21 | ################################################################################################################################################# |
22 | | -script_version="2.0.13" |
| 22 | +script_version="2.0.14" |
23 | 23 | ################################################################################################################################################# |
24 | 24 | # Set some script features - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html |
25 | 25 | ################################################################################################################################################# |
@@ -176,7 +176,7 @@ _set_default_values() { |
176 | 176 | qbt_skip_icu="${qbt_skip_icu:-yes}" |
177 | 177 |
|
178 | 178 | # Env setting for the boost tag |
179 | | - if [[ "${qbt_libtorrent_version}" == "1.2" ]]; then |
| 179 | + if [[ "${qbt_libtorrent_version}" == "1.2" || "${qbt_libtorrent_tag}" =~ ^(v1\.2\.|RC_1_2) ]]; then |
180 | 180 | qbt_boost_tag="${qbt_boost_tag:-boost-1.86.0}" |
181 | 181 | else |
182 | 182 | qbt_boost_tag="${qbt_boost_tag:-}" |
@@ -626,7 +626,7 @@ _boost_url() { |
626 | 626 | fi |
627 | 627 |
|
628 | 628 | local boost_url_array=( |
629 | | - "https://boostorg.jfrog.io/artifactory/main/${boost_asset_type}/${github_tag[boost]/boost-/}/source/${boost_asset//[-\.]/_}.tar.gz" |
| 629 | + "https://github.com/boostorg/boost/${boost_asset_type}s/download/${github_tag[boost]}/${github_tag[boost]}-b2-nodocs.tar.xz" |
630 | 630 | "https://archives.boost.io/${boost_asset_type}/${github_tag[boost]/boost-/}/source/${boost_asset//[-\.]/_}.tar.gz" |
631 | 631 | ) |
632 | 632 |
|
@@ -1038,11 +1038,13 @@ _apply_patches() { |
1038 | 1038 | patch_file="${patch_dir}/patch" |
1039 | 1039 | patch_url_file="${patch_dir}/url" # A file with a url to raw patch info |
1040 | 1040 | # remote |
1041 | | - patch_file_remote="https://raw.githubusercontent.com/${qbt_patches_url}/master/patches/${app_name}/${app_version[${app_name}]}" |
| 1041 | + qbt_patches_url_branch="$(_git_git ls-remote -q --symref "https://github.com/${qbt_patches_url}" HEAD | awk '/^ref:/{sub("refs/heads/", "", $2); print $2}')" |
| 1042 | + # qbt_patches_url_branch="$(_curl -sL "https://github.com/${qbt_patches_url}" | sed -n 's/.*"defaultBranch":"\([^"]*\)".*/\1/p')" |
| 1043 | + patch_file_remote="https://raw.githubusercontent.com/${qbt_patches_url}/${qbt_patches_url_branch}/patches/${app_name}/${app_version[${app_name}]}" |
1042 | 1044 |
|
1043 | 1045 | if [[ "${app_name}" == "libtorrent" ]]; then |
1044 | 1046 | patch_jamfile="${patch_dir}/Jamfile" |
1045 | | - patch_jamfile_url="https://raw.githubusercontent.com/${qbt_patches_url}/master/patches/${app_name}/${app_version[${app_name}]}/Jamfile" |
| 1047 | + patch_jamfile_url="https://raw.githubusercontent.com/${qbt_patches_url}/${qbt_patches_url_branch}/patches/${app_name}/${app_version[${app_name}]}/Jamfile" |
1046 | 1048 | fi |
1047 | 1049 |
|
1048 | 1050 | # Order of patch file preference |
@@ -1090,7 +1092,9 @@ _apply_patches() { |
1090 | 1092 | fi |
1091 | 1093 |
|
1092 | 1094 | # Patch files |
1093 | | - [[ -f "${patch_file}" ]] && patch -p1 < "${patch_file}" |
| 1095 | + if [[ -f "${patch_file}" ]]; then |
| 1096 | + patch -p1 < "${patch_file}" |
| 1097 | + fi |
1094 | 1098 |
|
1095 | 1099 | # Copy modified files from source directory |
1096 | 1100 | if [[ -d "${patch_dir}/source" && "$(ls -A "${patch_dir}/source")" ]]; then |
@@ -1227,7 +1231,7 @@ _download_file() { |
1227 | 1231 | fi |
1228 | 1232 |
|
1229 | 1233 | if [[ "${qbt_cache_dir_options}" != "bs" && ! -f "${qbt_dl_file_path}" ]]; then |
1230 | | - printf '\n%b\n\n' " ${unicode_blue_light_circle} Dowloading ${color_magenta_light}${app_name}${color_end} using ${color_yellow_light}${source_type}${color_end} files to ${color_cyan_light}${qbt_dl_file_path}${color_end} - ${color_yellow_light}${qbt_dl_source_url}${color_end}" |
| 1234 | + printf '\n%b\n\n' " ${unicode_blue_light_circle} Downloading ${color_magenta_light}${app_name}${color_end} using ${color_yellow_light}${source_type}${color_end} files to ${color_cyan_light}${qbt_dl_file_path}${color_end} - ${color_yellow_light}${qbt_dl_source_url}${color_end}" |
1231 | 1235 | elif [[ -n "${qbt_cache_dir}" && "${qbt_cache_dir_options}" == "bs" && ! -f "${qbt_dl_file_path}" ]]; then |
1232 | 1236 | printf '\n%b\n' " ${unicode_blue_light_circle} Caching ${color_magenta_light}${app_name}${color_end} ${color_yellow_light}${source_type}${color_end} files to ${color_cyan_light}${qbt_cache_dir}/${app_name}.tar.xz${color_end} - ${color_yellow_light}${qbt_dl_source_url}${color_end}" |
1233 | 1237 | elif [[ -n "${qbt_cache_dir}" && "${qbt_cache_dir_options}" == "bs" && -f "${qbt_dl_file_path}" ]]; then |
@@ -1274,7 +1278,7 @@ _fix_static_links() { |
1274 | 1278 | for file in "${library_list[@]}"; do |
1275 | 1279 | if [[ "$(readlink "${lib_dir}/${file}.so")" != "${file}.a" ]]; then |
1276 | 1280 | ln -fsn "${file}.a" "${lib_dir}/${file}.so" |
1277 | | - printf 's%b\n' "${lib_dir}${file}.so changed to point to ${file}.a" |& _tee -a "${qbt_install_dir}/logs/${log_name}-fix-static-links.log" > /dev/null |
| 1281 | + printf '%b\n' "${lib_dir}${file}.so changed to point to ${file}.a" |& _tee -a "${qbt_install_dir}/logs/${log_name}-fix-static-links.log" > /dev/null |
1278 | 1282 | fi |
1279 | 1283 | done |
1280 | 1284 | return |
|
0 commit comments