Skip to content

Commit 616b5ec

Browse files
committed
Update qbt-nox-static.bash
1 parent be92cc5 commit 616b5ec

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

qbt-nox-static.bash

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,12 +588,22 @@ _set_cxx_standard() {
588588
[[ ${app} == "qbittorrent" ]] && qbt_app_std="${app_std}"
589589
done
590590

591-
# Validate: Prevent building incompatible ABIs like c++14 with c++17+
591+
# Validate: Prevent building incompatible ABIs like c++14 with c++17+ or c++17 with c++20+
592592
if (((qbt_libtorrent_std == 14 && qbt_app_std >= 17) || (qbt_app_std == 14 && qbt_libtorrent_std >= 17))); then
593593
printf '\n%b\n\n' " ${text_blink}${unicode_red_light_circle}${color_end} ${color_yellow}ABI Mismatch: libtorrent (c++${qbt_libtorrent_std}) and qBittorrent (c++${qbt_app_std}) cannot be built together as c++14 is incompatible with c++17+.${color_end}"
594594
if [[ -n ${GITHUB_REPOSITORY} ]]; then touch disable-qt5; fi
595595
if [[ -d ${release_info_dir} ]]; then touch "${release_info_dir}/disable-qt5"; fi
596596
exit 1
597+
elif (((qbt_libtorrent_std == 17 && qbt_app_std >= 20) || (qbt_app_std == 17 && qbt_libtorrent_std >= 20))); then
598+
printf '\n%b\n\n' " ${text_blink}${unicode_red_light_circle}${color_end} ${color_yellow}ABI Mismatch: libtorrent (c++${qbt_libtorrent_std}) and qBittorrent (c++${qbt_app_std}) cannot be built together as c++17 is incompatible with c++20+.${color_end}"
599+
if [[ -n ${GITHUB_REPOSITORY} ]]; then touch disable-qt5; fi
600+
if [[ -d ${release_info_dir} ]]; then touch "${release_info_dir}/disable-qt5"; fi
601+
exit 1
602+
elif (((qbt_libtorrent_std == 20 && qbt_app_std >= 23) || (qbt_app_std == 20 && qbt_libtorrent_std >= 23))); then
603+
printf '\n%b\n\n' " ${text_blink}${unicode_red_light_circle}${color_end} ${color_yellow}ABI Mismatch: libtorrent (c++${qbt_libtorrent_std}) and qBittorrent (c++${qbt_app_std}) cannot be built together as c++20 is incompatible with c++23+.${color_end}"
604+
if [[ -n ${GITHUB_REPOSITORY} ]]; then touch disable-qt5; fi
605+
if [[ -d ${release_info_dir} ]]; then touch "${release_info_dir}/disable-qt5"; fi
606+
exit 1
597607
fi
598608

599609
# Apply Qt version cap (Ceiling)
@@ -1611,7 +1621,13 @@ _set_module_urls() {
16111621
if [[ ${os_id} =~ ^(debian|ubuntu)$ ]]; then
16121622
github_tag[glibc]="$(_git_git ls-remote -q -t --refs "${github_url[glibc]}" | awk '/glibc-/{sub("refs/tags/", "");sub("(.*)(cvs|fedora)(.*)", ""); if($2 ~ /^glibc-[0-9]+\.[0-9]+$/) print $2 }' | awk '!/^$/' | sort -rV | head -n1)"
16131623
fi
1614-
github_tag[zlib]="develop" # same for zlib and zlib-ng
1624+
1625+
if [[ ${qbt_zlib_type} == "zlib" ]]; then
1626+
github_tag[zlib]="$(git ls-remote -q -t --refs "https://github.com/madler/zlib.git" | awk '//{sub("refs/tags/", ""); sub("-[^0-9].*", ""); print $2}' | awk '!/^$/ && !/rc/ && /^v[0-9]+[-.]?[0-9]+[-.]?[0-9][-.]?[0-9]*$/' | sort -rV | head -n1)" # same for zlib and zlib-ng
1627+
elif [[ ${qbt_zlib_type} == "zlib-ng" ]]; then
1628+
github_tag[zlib]="develop" # same for zlib and zlib-ng
1629+
fi
1630+
16151631
#github_tag[iconv]="$(_git_git ls-remote -q -t --refs "${github_url[iconv]}" | awk '{sub("refs/tags/", "");sub("(.*)(-[^0-9].*)(.*)", ""); print $2 }' | awk '!/^$/' | sort -rV | head -n 1)"
16161632
github_tag[iconv]="v$(_curl "https://github.com/userdocs/qbt-workflow-files/releases/latest/download/dependency-version.json" | sed -rn 's|(.*)"iconv": "(.*)",?|\2|p')"
16171633
github_tag[icu]="$(_git_git ls-remote -q -t --refs "${github_url[icu]}" | awk '/\/release-/{sub("refs/tags/", ""); sub("-[^0-9].*", ""); print $2}' | awk '!/^$/ && !/rc/ && /^release-[0-9]+[-.]?[0-9]+[-.]?[0-9]*$/' | sort -rV | head -n 1)"
@@ -1630,7 +1646,7 @@ _set_module_urls() {
16301646
fi
16311647

16321648
if [[ ${qbt_zlib_type} == "zlib" ]]; then
1633-
app_version[zlib]="$(_curl "https://raw.githubusercontent.com/madler/zlib/${github_tag[zlib]}/zlib.h" | sed -rn 's|#define ZLIB_VERSION "(.*)"|\1|p' | sed 's/-.*//g')"
1649+
app_version[zlib]="${github_tag[zlib]#v}"
16341650
elif [[ ${qbt_zlib_type} == "zlib-ng" ]]; then
16351651
app_version[zlib]="$(_curl "https://raw.githubusercontent.com/zlib-ng/zlib-ng/${github_tag[zlib]}/zlib.h.in" | sed -rn 's|#define ZLIB_VERSION "(.*)"|\1|p' | sed 's/\.zlib-ng//g')"
16361652
fi
@@ -1652,7 +1668,7 @@ _set_module_urls() {
16521668
fi
16531669

16541670
if [[ ${qbt_zlib_type} == "zlib" ]]; then
1655-
source_archive_url[zlib]="https://github.com/madler/zlib/archive/refs/heads/develop.tar.gz"
1671+
source_archive_url[zlib]="https://github.com/madler/zlib/releases/download/v${app_version[zlib]}/zlib-${app_version[zlib]}.tar.gz"
16561672
elif [[ ${qbt_zlib_type} == "zlib-ng" ]]; then
16571673
source_archive_url[zlib]="https://github.com/zlib-ng/zlib-ng/archive/refs/heads/develop.tar.gz"
16581674
fi

0 commit comments

Comments
 (0)