diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 538b037538e..bdf79e8447e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ name: GitHub Actions CI on: [pull_request, push] env: - VCPKG_COMMIT: e4ce66eecfd3e5cca5eac06c971921bf8e37cf88 + VCPKG_COMMIT: 8f03e2264da6b95fa5b01dd89cdd5b499458d428 VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg VCPKG_DEST_WIN: C:\qbt_tools\vcpkg LIBTORRENT_VERSION_TAG: v1.2.13 @@ -63,7 +63,7 @@ jobs: cmake --build build - name: install qBittorrent - run: sudo cmake --build build --target install + run: sudo cmake --install build --prefix /usr/local - name: upload artifact as zip uses: actions/upload-artifact@v2 @@ -71,6 +71,7 @@ jobs: name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }} path: | build/compile_commands.json + build/install_manifest.txt build/target_graph.dot build/qbittorrent build/qbittorrent-nox @@ -90,13 +91,13 @@ jobs: - name: checkout repository uses: actions/checkout@v2 - # - ninja is needed for building qBittorrent (because it's preferrable, not a hard requirement) + # - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement) - name: install additional required packages with chocolatey run: | choco install ninja - name: setup vcpkg (cached, if possible) - uses: lukka/run-vcpkg@v4 + uses: lukka/run-vcpkg@v7 with: vcpkgDirectory: ${{ env.VCPKG_DEST_WIN }} vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }} @@ -123,13 +124,11 @@ jobs: "qt5-winextras:x64-windows-static-release" ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade ` --overlay-triplets=${{ github.workspace }}/triplets_overlay ` - --overlay-ports=${{ github.workspace }}/vcpkg ` --no-dry-run foreach($package in $packages) { ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install $package ` --overlay-triplets=${{ github.workspace }}/triplets_overlay ` - --overlay-ports=${{ github.workspace }}/vcpkg ` --clean-after-build } @@ -178,7 +177,7 @@ jobs: - name: checkout repository uses: actions/checkout@v2 - # - ninja is needed for building qBittorrent (because it's preferrable, not a hard requirement) + # - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement) # - automake is needed for the installation the vcpkg installation of fontconfig, a dependency of qt5-base - name: install additional required packages with homebrew shell: bash @@ -186,7 +185,7 @@ jobs: brew install automake ninja - name: setup vcpkg (cached, if possible) - uses: lukka/run-vcpkg@v4 + uses: lukka/run-vcpkg@v7 with: vcpkgDirectory: ${{ env.VCPKG_DEST_MACOS }} vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }} @@ -200,6 +199,13 @@ jobs: Add-Content ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake ` -Value "set(VCPKG_BUILD_TYPE release)","set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)" + # NOTE: Avoids a libtorrent ABI issue. See https://github.com/arvidn/libtorrent/issues/4965 + - name: force AppleClang to compile libtorrent with the same C++ standard as qBittorrent + run: | + (Get-Content -path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( ` + '${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=17') ` + | Set-Content -Path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake + - name: install dependencies via vcpkg run: | $packages = ` @@ -211,13 +217,11 @@ jobs: "qt5-macextras:x64-osx-release" ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg upgrade ` --overlay-triplets=${{ github.workspace }}/triplets_overlay ` - --overlay-ports=${{ github.workspace }}/vcpkg ` --no-dry-run foreach($package in $packages) { ${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg install $package ` --overlay-triplets=${{ github.workspace }}/triplets_overlay ` - --overlay-ports=${{ github.workspace }}/vcpkg ` --clean-after-build } diff --git a/vcpkg/libtorrent/CONTROL b/vcpkg/libtorrent/CONTROL deleted file mode 100644 index 1ff88ab6e49..00000000000 --- a/vcpkg/libtorrent/CONTROL +++ /dev/null @@ -1,26 +0,0 @@ -Source: libtorrent -Version: 1.2.13 -Homepage: https://github.com/arvidn/libtorrent -Description: An efficient feature complete C++ BitTorrent implementation -Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config, boost-iterator, boost-scope-exit, boost-multiprecision, boost-pool, boost-variant -Supports: !uwp&!(windows&arm) - -Feature: deprfun -Description: build with deprecated functions enabled - -Feature: examples -Description: build the examples in the examples directory - -Feature: iconv -Build-Depends: libiconv (windows) -Description: build with libiconv on Windows - -Feature: python -Build-Depends: boost-python -Description: build the python bindings in bindings/python directory - -Feature: test -Description: build the libtorrent tests - -Feature: tools -Description: build the tools in the tools directory diff --git a/vcpkg/libtorrent/no_use_iconv.patch b/vcpkg/libtorrent/no_use_iconv.patch deleted file mode 100644 index 8bd518274eb..00000000000 --- a/vcpkg/libtorrent/no_use_iconv.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9efd451fb..05066be82 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -643,26 +643,6 @@ target_optional_compile_definitions(torrent-rasterbar PUBLIC FEATURE NAME mutabl - target_optional_compile_definitions(torrent-rasterbar PUBLIC FEATURE NAME streaming DEFAULT ON - DESCRIPTION "Enables support for piece deadline" DISABLED TORRENT_DISABLE_STREAMING) - --find_public_dependency(Iconv) --if(MSVC) -- set(iconv_package_type OPTIONAL) --else() -- set(iconv_package_type RECOMMENDED) --endif() -- --set_package_properties(Iconv -- PROPERTIES -- URL "https://www.gnu.org/software/libiconv/" -- DESCRIPTION "GNU encoding conversion library" -- TYPE ${iconv_package_type} -- PURPOSE "Convert strings between various encodings" --) -- --if(Iconv_FOUND) -- target_compile_definitions(torrent-rasterbar PUBLIC TORRENT_USE_ICONV) -- target_link_libraries(torrent-rasterbar PRIVATE Iconv::Iconv) --endif() -- - find_public_dependency(OpenSSL) - set_package_properties(OpenSSL - PROPERTIES diff --git a/vcpkg/libtorrent/portfile.cmake b/vcpkg/libtorrent/portfile.cmake deleted file mode 100644 index 5c5f2cdb90a..00000000000 --- a/vcpkg/libtorrent/portfile.cmake +++ /dev/null @@ -1,66 +0,0 @@ -vcpkg_fail_port_install(ON_TARGET "uwp") - -if(VCPKG_TARGET_IS_WINDOWS) - # Building python bindings is currently broken on Windows - if("python" IN_LIST FEATURES) - message(FATAL_ERROR "The python feature is currently broken on Windows") - endif() - - if(NOT "iconv" IN_LIST FEATURES) - # prevent picking up libiconv if it happens to already be installed - set(ICONV_PATCH "no_use_iconv.patch") - endif() - - if(VCPKG_CRT_LINKAGE STREQUAL "static") - set(_static_runtime ON) - endif() -endif() - -vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - deprfun deprecated-functions - examples build_examples - python python-bindings - test build_tests - tools build_tools -) - -# Note: the python feature currently requires `python3-dev` and `python3-setuptools` installed on the system -if("python" IN_LIST FEATURES) - vcpkg_find_acquire_program(PYTHON3) - get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) - vcpkg_add_to_path(${PYTHON3_PATH}) - - file(GLOB BOOST_PYTHON_LIB "${CURRENT_INSTALLED_DIR}/lib/*boost_python*") - string(REGEX REPLACE ".*(python)([0-9])([0-9]+).*" "\\1\\2\\3" _boost-python-module-name "${BOOST_PYTHON_LIB}") -endif() - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO arvidn/libtorrent - REF v1.2.13 - SHA512 1f295303c93c5525e0e40d3d0a7543b3a1fb99d53078dc7cdb70790e57898270df6292cc37348bb87906529568fb8fe3e32f5472afa620d597c8d149201bb1f0 - HEAD_REF RC_1_2 - PATCHES - ${ICONV_PATCH} -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - ${FEATURE_OPTIONS} - -DCMAKE_CXX_STANDARD=17 - -Dboost-python-module-name=${_boost-python-module-name} - -Dstatic_runtime=${_static_runtime} - -DPython3_USE_STATIC_LIBS=ON -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/LibtorrentRasterbar TARGET_PATH share/LibtorrentRasterbar) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -# Do not duplicate include files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/cmake) diff --git a/vcpkg/libtorrent/readme.md b/vcpkg/libtorrent/readme.md deleted file mode 100644 index beda853e6d9..00000000000 --- a/vcpkg/libtorrent/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -Files are taken from upstream repository: https://github.com/microsoft/vcpkg/tree/master/ports/libtorrent -This port is for satisfying CI needs, NOT recommended for general use.