mirror of
https://github.com/transmission/transmission
synced 2025-01-30 10:52:00 +00:00
fix: FTBFS in Ubuntu 20.04 / Qt 5.13 (#5238)
This commit is contained in:
parent
8dccc290d7
commit
f5a24862db
2 changed files with 80 additions and 4 deletions
74
.github/workflows/actions.yml
vendored
74
.github/workflows/actions.yml
vendored
|
@ -722,3 +722,77 @@ jobs:
|
|||
with:
|
||||
name: binaries-${{ github.job }}
|
||||
path: pfx/**/*
|
||||
|
||||
ubuntu-20-04-from-tarball:
|
||||
needs: [ make-source-tarball, what-to-make ]
|
||||
if: ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }}
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Show Configuration
|
||||
run: |
|
||||
echo '${{ toJSON(needs) }}'
|
||||
echo '${{ toJSON(runner) }}'
|
||||
cat /etc/os-release
|
||||
- name: Get Dependencies
|
||||
run: |
|
||||
set -ex
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
clang \
|
||||
cmake \
|
||||
gettext \
|
||||
libcurl4-openssl-dev \
|
||||
libdeflate-dev \
|
||||
libevent-dev \
|
||||
libfmt-dev \
|
||||
libminiupnpc-dev \
|
||||
libnatpmp-dev \
|
||||
libpsl-dev \
|
||||
libssl-dev \
|
||||
ninja-build \
|
||||
npm
|
||||
- name: Get Dependencies (GTK)
|
||||
if: ${{ needs.what-to-make.outputs.make-gtk == 'true' }}
|
||||
run: sudo apt-get install -y --no-install-recommends libglibmm-2.4-dev libgtkmm-3.0-dev
|
||||
- name: Get Dependencies (Qt)
|
||||
if: ${{ needs.what-to-make.outputs.make-qt == 'true' }}
|
||||
run: sudo apt-get install -y --no-install-recommends qtbase5-dev libqt5svg5-dev qttools5-dev
|
||||
- name: Get Source
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: source-tarball
|
||||
- name: Extract Source
|
||||
run: mkdir src && tar xf transmission*.tar.* -C src --strip-components 1
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-S src \
|
||||
-B obj \
|
||||
-G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX=pfx \
|
||||
-DCMAKE_PREFIX_PATH=`brew --prefix`/opt/qt@5 \
|
||||
-DENABLE_CLI=${{ (needs.what-to-make.outputs.make-cli == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_DAEMON=${{ (needs.what-to-make.outputs.make-daemon == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_GTK=${{ (needs.what-to-make.outputs.make-gtk == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_MAC=OFF \
|
||||
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_TESTS=OFF \
|
||||
-DENABLE_UTILS=${{ (needs.what-to-make.outputs.make-utils == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \
|
||||
-DENABLE_WERROR=ON \
|
||||
-DRUN_CLANG_TIDY=OFF
|
||||
- name: Make
|
||||
run: cmake --build obj --config RelWithDebInfo
|
||||
- name: Test
|
||||
if: ${{ needs.what-to-make.outputs.make-tests == 'true' }}
|
||||
env:
|
||||
TMPDIR: /private/tmp
|
||||
run: cmake -E chdir obj ctest -j $(nproc) --build-config RelWithDebInfo --output-on-failure
|
||||
- name: Install
|
||||
run: cmake --build obj --config RelWithDebInfo --target install/strip
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: binaries-${{ github.job }}
|
||||
path: pfx/**/*
|
||||
|
|
|
@ -1389,10 +1389,12 @@ void DetailsDialog::onAddTrackerClicked()
|
|||
{
|
||||
for (auto const& [ids, urls] : ids_to_urls)
|
||||
{
|
||||
torrentSet(
|
||||
torrent_ids_t{ std::begin(ids), std::end(ids) },
|
||||
TR_KEY_trackerAdd,
|
||||
QList<QString>{ std::begin(urls), std::end(urls) });
|
||||
auto urls_list = QList<QString>{};
|
||||
urls_list.reserve(std::size(urls));
|
||||
for (auto const& url : urls)
|
||||
urls_list << url;
|
||||
|
||||
torrentSet(torrent_ids_t{ std::begin(ids), std::end(ids) }, TR_KEY_trackerAdd, urls_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue