Skip to content

Commit

Permalink
Update qbittorrent-nox-static.sh
Browse files Browse the repository at this point in the history
fix: #131

a regression from the v2 update. fixed.

If no crossbuild toolchain is used, check what Alpine host arch is being used and set that for zlib-ng
  • Loading branch information
userdocs committed Dec 27, 2023
1 parent 0d4bf16 commit 9c88f49
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qbittorrent-nox-static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2268,8 +2268,8 @@ _glibc() {
_zlib() {
if [[ "${qbt_build_tool}" == "cmake" ]]; then
mkdir -p "${qbt_install_dir}/graphs/${app_name}/${app_version["${app_name}"]}"
# force set some ARCH when using zlib-ng, cmake and musl-cross since it does detect the arch correctly.
[[ "${qbt_cross_target}" =~ ^(alpine)$ ]] && printf '%b\n' "\narchfound ${qbt_zlib_arch:-x86_64}" >> "${qbt_dl_folder_path}/cmake/detect-arch.c"
# force set some ARCH when using zlib-ng, cmake and musl-cross since it does not detect the arch correctly on Alpine.
[[ "${qbt_cross_target}" =~ ^(alpine)$ ]] && printf '%b\n' "\narchfound ${qbt_zlib_arch:-$(apk --print-arch)}" >> "${qbt_dl_folder_path}/cmake/detect-arch.c"
cmake -Wno-dev -Wno-deprecated --graphviz="${qbt_install_dir}/graphs/${app_name}/${app_version["${app_name}"]}/dep-graph.dot" -G Ninja -B build \
-D CMAKE_VERBOSE_MAKEFILE="${qbt_cmake_debug}" \
-D CMAKE_CXX_STANDARD="${standard}" \
Expand All @@ -2282,8 +2282,8 @@ _zlib() {
cmake --install build |& _tee -a "${qbt_install_dir}/logs/${app_name}.log"
dot -Tpng -o "${qbt_install_dir}/completed/${app_name}-graph.png" "${qbt_install_dir}/graphs/${app_name}/${app_version["${app_name}"]}/dep-graph.dot"
else
# force set some ARCH when using zlib-ng, configure and musl-cross since it does detect the arch correctly.
[[ "${qbt_cross_target}" =~ ^(alpine)$ ]] && sed "s| CFLAGS=\"-O2 \${CFLAGS}\"| ARCH=${qbt_zlib_arch:-x86_64}\n CFLAGS=\"-O2 \${CFLAGS}\"|g" -i "${qbt_dl_folder_path}/configure"
# force set some ARCH when using zlib-ng, configure and musl-cross since it does not detect the arch correctly on Alpine.
[[ "${qbt_cross_target}" =~ ^(alpine)$ ]] && sed "s| CFLAGS=\"-O2 \${CFLAGS}\"| ARCH=${qbt_zlib_arch:-$(apk --print-arch)}\n CFLAGS=\"-O2 \${CFLAGS}\"|g" -i "${qbt_dl_folder_path}/configure"
./configure --prefix="${qbt_install_dir}" --static --zlib-compat |& _tee "${qbt_install_dir}/logs/${app_name}.log"
make -j"$(nproc)" CXXFLAGS="${CXXFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" |& _tee -a "${qbt_install_dir}/logs/${app_name}.log"
_post_command build
Expand Down

0 comments on commit 9c88f49

Please sign in to comment.