[neon/extras/ktorrent/Neon/release] /: build snap with patches to make it link and not using neon archive cos the qt is too new and not using ubuntu archive qca cos the qt is too old
Jonathan Riddell
null at kde.org
Wed Jun 9 17:39:49 BST 2021
Git commit b9feb57f5b60beb0b0e977e0be4ee807256d0470 by Jonathan Riddell.
Committed on 09/06/2021 at 16:39.
Pushed by jriddell into branch 'Neon/release'.
build snap with patches to make it link and not using neon archive cos the qt is too new and not using ubuntu archive qca cos the qt is too old
A +40 -0 patches/ktorrent-link.diff
A +18 -0 patches/libktorrentlink.diff
M +40 -19 snapcraft.yaml
https://invent.kde.org/neon/extras/ktorrent/commit/b9feb57f5b60beb0b0e977e0be4ee807256d0470
diff --git a/patches/ktorrent-link.diff b/patches/ktorrent-link.diff
new file mode 100644
index 0000000..63d3fdc
--- /dev/null
+++ b/patches/ktorrent-link.diff
@@ -0,0 +1,40 @@
+--- ktorrent-21.04.1/CMakeLists.txt~ 2021-05-11 08:31:17.000000000 +0100
++++ ktorrent-21.04.1/CMakeLists.txt 2021-06-09 17:19:57.434428199 +0100
+@@ -50,6 +50,7 @@
+ CoreAddons
+ Crash
+ DBusAddons
++ GuiAddons
+ I18n
+ IconThemes
+ KIO
+--- ktorrent-21.04.1/ktupnptest/CMakeLists.txt~ 2021-05-07 19:41:03.000000000 +0100
++++ ktorrent-21.04.1/ktupnptest/CMakeLists.txt 2021-06-09 17:19:45.406322088 +0100
+@@ -9,6 +9,7 @@
+ KF5::Torrent
+ KF5::CoreAddons
+ KF5::I18n
++ KF5::GuiAddons
+ )
+ install(TARGETS ktupnptest ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+--- ktorrent-21.04.1/ktorrent/CMakeLists.txt~ 2021-05-07 19:41:03.000000000 +0100
++++ ktorrent-21.04.1/ktorrent/CMakeLists.txt 2021-06-09 17:25:26.809311960 +0100
+@@ -102,6 +102,7 @@
+ KF5::Crash
+ KF5::ConfigCore
+ KF5::ConfigGui
++ KF5::GuiAddons
+ KF5::DBusAddons
+ KF5::I18n
+ KF5::IconThemes
+--- ktorrent-21.04.1/ktmagnetdownloader/CMakeLists.txt~ 2021-05-07 19:41:03.000000000 +0100
++++ ktorrent-21.04.1/ktmagnetdownloader/CMakeLists.txt 2021-06-09 17:31:38.501327295 +0100
+@@ -1,6 +1,6 @@
+ set(magnetdownloadtest_SRCS magnetdownloader.cpp magnettest.cpp)
+ add_executable(ktmagnetdownloader ${magnetdownloadtest_SRCS})
+-target_link_libraries(ktmagnetdownloader ktcore Qt5::Widgets Qt5::Network)
++target_link_libraries(ktmagnetdownloader ktcore Qt5::Widgets Qt5::Network KF5::GuiAddons)
+ ecm_mark_nongui_executable(ktmagnetdownloader)
+ install(TARGETS ktmagnetdownloader ${INSTALL_TARGETS_DEFAULT_ARGS})
+
diff --git a/patches/libktorrentlink.diff b/patches/libktorrentlink.diff
new file mode 100644
index 0000000..ed28748
--- /dev/null
+++ b/patches/libktorrentlink.diff
@@ -0,0 +1,18 @@
+--- libktorrent-21.04.1/CMakeLists.txt~ 2021-05-11 08:31:23.000000000 +0100
++++ libktorrent-21.04.1/CMakeLists.txt 2021-06-09 17:03:45.401385290 +0100
+@@ -67,6 +67,7 @@
+ I18n
+ KIO
+ Solid
++ GuiAddons
+ )
+
+ find_package(Boost "${Boost_MIN_VERSION}" MODULE REQUIRED)
+--- libktorrent-21.04.1/examples/ktcli/CMakeLists.txt~ 2021-05-07 19:12:53.000000000 +0100
++++ libktorrent-21.04.1/examples/ktcli/CMakeLists.txt 2021-06-09 17:03:04.848968960 +0100
+@@ -4,4 +4,4 @@
+ )
+
+ add_executable(ktcli ${ktcli_SRC})
+-target_link_libraries(ktcli KF5::Torrent)
++target_link_libraries(ktcli KF5::Torrent KF5::GuiAddons)
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 20e35a1..2515999 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -24,28 +24,48 @@ slots:
name: org.kde.ktorrent
bus: session
parts:
+ patches:
+ source: patches
+ plugin: dump
+ prime:
+ - -*
+ qca:
+ source: https://invent.kde.org/libraries/qca.git
+ source-tag: "v2.3.3"
+ source-depth: 0
+ plugin: cmake
+ build-packages:
+ - libsasl2-dev
+ - libssl-dev
+ - ca-certificates
+ cmake-parameters:
+ - -DCMAKE_INSTALL_PREFIX=/usr
+ - -DCMAKE_BUILD_TYPE=Release
+ - -DBUILD_TRANSLATIONS=NO
libktorrent:
+ after:
+ - qca
+ - patches
plugin: cmake
- build-environment:
- - CMAKE_BUILD_PARALLEL_LEVEL: '4'
build-packages:
- - libboost-dev
- - libgcrypt20-dev
- - libgmp-dev
- - libqca-qt5-2-dev
+ - libboost-dev
+ - libgcrypt20-dev
+ - libgmp-dev
stage-packages:
- - libgcrypt20
- - libgmp10
- - libgmpxx4ldbl
- - libqca-qt5-2
+ - libgcrypt20
+ - libgmp10
+ - libgmpxx4ldbl
source: https://download.kde.org/stable/release-service/21.04.1/src/libktorrent-21.04.1.tar.xz
+ override-pull: |
+ snapcraftctl pull
+ patch -p1 < $SNAPCRAFT_STAGE/libktorrentlink.diff
cmake-parameters:
- - "-DCMAKE_INSTALL_PREFIX=/usr"
- - "-DCMAKE_BUILD_TYPE=Release"
- - "-DENABLE_TESTING=OFF"
- - "-DBUILD_TESTING=OFF"
- - "-DKDE_SKIP_TEST_SETTINGS=ON"
- - "-DCMAKE_FIND_ROOT_PATH=/usr\\;/root/stage\\;/snap/kde-frameworks-5-qt-5-15-core20-sdk/current"
+ - "-DCMAKE_INSTALL_PREFIX=/usr"
+ - "-DCMAKE_BUILD_TYPE=Release"
+ - "-DENABLE_TESTING=OFF"
+ - "-DBUILD_TESTING=OFF"
+ - "-DKDE_SKIP_TEST_SETTINGS=ON"
+ - "-DCMAKE_FIND_ROOT_PATH=/usr\\;/root/stage\\;/snap/kde-frameworks-5-qt-5-15-core20-sdk/current"
filesets:
exclusion:
- "-usr/lib/*/cmake/*"
@@ -58,13 +78,11 @@ parts:
- "-usr/lib/gcc/x86_64-linux-gnu/6.0.0"
- "-usr/lib/aspell/*"
prime:
- - "$exclusion"
+ - "$exclusion"
ktorrent:
after:
- libktorrent
plugin: cmake
- build-environment:
- - CMAKE_BUILD_PARALLEL_LEVEL: '4'
build-packages:
- kross-dev
- libboost-dev
@@ -79,6 +97,9 @@ parts:
- geoip-bin
- libtag1v5
source: http://download.kde.org/stable/release-service/21.04.1/src/ktorrent-21.04.1.tar.xz
+ override-pull: |
+ snapcraftctl pull
+ patch -p1 < $SNAPCRAFT_STAGE/ktorrent-link.diff
cmake-parameters:
- "-DCMAKE_INSTALL_PREFIX=/usr"
- "-DCMAKE_BUILD_TYPE=Release"
More information about the Neon-commits
mailing list