[neon/backports-jammy/snapd-glib/Neon/stable] debian/patches: refresh patch
Carlos De Maine
null at kde.org
Sun Mar 31 11:12:05 BST 2024
Git commit 93b9428b867464bf356c4fea4793aa56f51f1229 by Carlos De Maine.
Committed on 31/03/2024 at 10:11.
Pushed by carlosdem into branch 'Neon/stable'.
refresh patch
(cherry picked from commit 85bf3fe4bb98cd763e24c6b23600200b7beb1362)
M +83 -73 debian/patches/allow_dual_build_of_qt5_and_qt6_upstream_147
https://invent.kde.org/neon/backports-jammy/snapd-glib/-/commit/93b9428b867464bf356c4fea4793aa56f51f1229
diff --git a/debian/patches/allow_dual_build_of_qt5_and_qt6_upstream_147 b/debian/patches/allow_dual_build_of_qt5_and_qt6_upstream_147
index de94adf..eda9efb 100644
--- a/debian/patches/allow_dual_build_of_qt5_and_qt6_upstream_147
+++ b/debian/patches/allow_dual_build_of_qt5_and_qt6_upstream_147
@@ -1,8 +1,6 @@
-diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
-index 8a8668f2..c7bbd190 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
-@@ -55,7 +55,7 @@ jobs:
+@@ -55,7 +55,7 @@
- name: Install dependencies (Fedora)
if: startsWith(matrix.image, 'fedora:')
run: |
@@ -11,13 +9,11 @@ index 8a8668f2..c7bbd190 100644
- name: Install meson
if: matrix.image != 'ubuntu:rolling'
-diff --git a/meson.build b/meson.build
-index b9f98d37..76637a7a 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,8 @@
project ('snapd-glib', [ 'c', 'cpp' ],
- version: '1.65',
+ version: '1.64',
- meson_version: '>= 0.43.0',
- default_options : [ 'c_std=c11', 'cpp_std=c++11' ])
+ meson_version: '>= 0.58.0',
@@ -26,7 +22,7 @@ index b9f98d37..76637a7a 100644
glib_dep = dependency ('glib-2.0', version: '>= 2.46')
gio_dep = dependency ('gio-2.0', version: '>= 2.46')
-@@ -13,18 +14,14 @@ else
+@@ -13,18 +14,14 @@
endif
json_glib_dep = dependency ('json-glib-1.0', version: '>= 1.1.2')
@@ -48,11 +44,9 @@ index b9f98d37..76637a7a 100644
subdir ('tests')
subdir ('examples')
subdir ('doc')
-diff --git a/meson_options.txt b/meson_options.txt
-index ad9ac9ca..7700d929 100644
--- a/meson_options.txt
+++ b/meson_options.txt
-@@ -7,9 +7,14 @@ option('docs',
+@@ -7,9 +7,14 @@
option('vala-bindings',
type: 'boolean', value: true,
description: 'Build the Vala bindings (requires introspection)')
@@ -70,17 +64,6 @@ index ad9ac9ca..7700d929 100644
option('qml-bindings',
type: 'boolean', value: true,
description: 'Build the QML bindings (requires the Qt bindings)')
-diff --git a/snapd-qt/SnapdConfig.cmake.in b/snapd-qt/SnapdQt5Config.cmake.in
-similarity index 100%
-rename from snapd-qt/SnapdConfig.cmake.in
-rename to snapd-qt/SnapdQt5Config.cmake.in
-diff --git a/snapd-qt/SnapdConfigVersion.cmake.in b/snapd-qt/SnapdQt5ConfigVersion.cmake.in
-similarity index 100%
-rename from snapd-qt/SnapdConfigVersion.cmake.in
-rename to snapd-qt/SnapdQt5ConfigVersion.cmake.in
-diff --git a/snapd-qt/SnapdQt6Config.cmake.in b/snapd-qt/SnapdQt6Config.cmake.in
-new file mode 100644
-index 00000000..69afb05b
--- /dev/null
+++ b/snapd-qt/SnapdQt6Config.cmake.in
@@ -0,0 +1,14 @@
@@ -98,9 +81,6 @@ index 00000000..69afb05b
+ )
+
+set_property(TARGET Snapd::Core PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SNAPD_INCLUDE_DIRS})
-diff --git a/snapd-qt/SnapdQt6ConfigVersion.cmake.in b/snapd-qt/SnapdQt6ConfigVersion.cmake.in
-new file mode 100644
-index 00000000..e6719826
--- /dev/null
+++ b/snapd-qt/SnapdQt6ConfigVersion.cmake.in
@@ -0,0 +1,10 @@
@@ -114,11 +94,9 @@ index 00000000..e6719826
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
-diff --git a/snapd-qt/markdown-node.cpp b/snapd-qt/markdown-node.cpp
-index 2be1751e..2e87707b 100644
--- a/snapd-qt/markdown-node.cpp
+++ b/snapd-qt/markdown-node.cpp
-@@ -62,3 +62,14 @@ QSnapdMarkdownNode *QSnapdMarkdownNode::child (int n) const
+@@ -62,3 +62,14 @@
return NULL;
return new QSnapdMarkdownNode (children->pdata[n]);
}
@@ -133,11 +111,9 @@ index 2be1751e..2e87707b 100644
+ g_object_ref(wrapped_object);
+ return *this;
+}
-diff --git a/snapd-qt/markdown-parser.cpp b/snapd-qt/markdown-parser.cpp
-index 751592c3..1a305ad9 100644
--- a/snapd-qt/markdown-parser.cpp
+++ b/snapd-qt/markdown-parser.cpp
-@@ -56,7 +56,7 @@ bool QSnapdMarkdownParser::preserveWhitespace () const
+@@ -56,7 +56,7 @@
QList<QSnapdMarkdownNode> QSnapdMarkdownParser::parse (const QString &text) const
{
Q_D(const QSnapdMarkdownParser);
@@ -146,8 +122,6 @@ index 751592c3..1a305ad9 100644
QList<QSnapdMarkdownNode> nodes_list;
for (uint i = 0; i < nodes->len; i++) {
SnapdMarkdownNode *node = (SnapdMarkdownNode *) g_ptr_array_index (nodes, i);
-diff --git a/snapd-qt/meson.build b/snapd-qt/meson.build
-index 74687852..7484870f 100644
--- a/snapd-qt/meson.build
+++ b/snapd-qt/meson.build
@@ -1,15 +1,47 @@
@@ -168,9 +142,8 @@ index 74687852..7484870f 100644
+ qt_core_dep = dependency ('qt5', modules: [ 'Core' ])
+ qt_network_dep = dependency ('qt5', modules: [ 'Network' ])
+ qml_dep = dependency ('qt5', modules: [ 'Qml' ])
- endif
-
--qt_name= 'Snapd'
++endif
++
+if get_option('qt6')
+ qt_min_version = '6.2.4'
+ qt_version = 'qt6'
@@ -181,8 +154,9 @@ index 74687852..7484870f 100644
+ qt6_core_dep = dependency ('qt6', modules: [ 'Core' ])
+ qt6_network_dep = dependency ('qt6', modules: [ 'Network' ])
+ qml_dep = dependency ('qt6', modules: [ 'Qml' ])
-+endif
-+
+ endif
+
+-qt_name= 'Snapd'
+qt_name = 'Snapd'
if not get_option('soup2')
- qt_name += '2'
@@ -204,7 +178,7 @@ index 74687852..7484870f 100644
cmake_dir = join_paths (libdir, 'cmake', qt_name)
source_cpp = [
-@@ -113,60 +145,59 @@ source_private_h = [
+@@ -113,60 +145,59 @@
'variant.h',
]
@@ -313,11 +287,9 @@ index 74687852..7484870f 100644
+ install_dir: qml_dir)
endif
-endif
-diff --git a/snapd-qt/snapd-qt.pc.in b/snapd-qt/snapd-qt.pc.in
-index 60bc7d6e..fe4747ff 100644
--- a/snapd-qt/snapd-qt.pc.in
+++ b/snapd-qt/snapd-qt.pc.in
-@@ -4,8 +4,8 @@ libdir=@libdir@
+@@ -4,8 +4,8 @@
includedir=@includedir@
Name: Snapd Qt
@@ -328,11 +300,9 @@ index 60bc7d6e..fe4747ff 100644
Cflags: -I${includedir}/snapd-qt
-Requires: Qt5Core
+Requires: @pc_required_qt@
-diff --git a/tests/meson.build b/tests/meson.build
-index dd4ac7ef..bc7882e6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
-@@ -38,31 +38,31 @@ test_file = configure_file (input: 'test-markdown-glib.test.in',
+@@ -38,31 +38,31 @@
configuration: test_data_conf)
install_data (test_file, install_dir: installed_tests_data_dir)
@@ -374,35 +344,24 @@ index dd4ac7ef..bc7882e6 100644
configuration: test_data_conf)
install_data (test_file, install_dir: installed_tests_data_dir)
endif
-diff --git a/tests/test-markdown-qt.test.in b/tests/test-markdown-qt.test.in
-deleted file mode 100644
-index 31d23f42..00000000
--- a/tests/test-markdown-qt.test.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[Test]
-Type=session
-Exec=@installed_tests_exec_dir@/test-markdown-qt
-diff --git a/tests/test-markdown-qt5.test.in b/tests/test-markdown-qt5.test.in
-new file mode 100644
-index 00000000..8ca657da
--- /dev/null
+++ b/tests/test-markdown-qt5.test.in
@@ -0,0 +1,3 @@
+[Test]
+Type=session
+Exec=@installed_tests_exec_dir@/test-markdown-qt5
-diff --git a/tests/test-markdown-qt6.test.in b/tests/test-markdown-qt6.test.in
-new file mode 100644
-index 00000000..7482ba7a
--- /dev/null
+++ b/tests/test-markdown-qt6.test.in
@@ -0,0 +1,3 @@
+[Test]
+Type=session
+Exec=@installed_tests_exec_dir@/test-markdown-qt6
-diff --git a/tests/test-qt.cpp b/tests/test-qt.cpp
-index 04243a51..105f3fb2 100644
--- a/tests/test-qt.cpp
+++ b/tests/test-qt.cpp
@@ -10,6 +10,7 @@
@@ -413,7 +372,7 @@ index 04243a51..105f3fb2 100644
#include <Snapd/Client>
#include <Snapd/Assertion>
-@@ -2918,32 +2919,32 @@ test_get_connections_attributes ()
+@@ -2918,32 +2919,32 @@
check_names_match (connection->plugAttributeNames (), QStringList () << "plug-string-key" << "plug-int-key" << "plug-bool-key" << "plug-number-key");
g_assert_true (connection->hasPlugAttribute ("plug-string-key"));
@@ -454,7 +413,7 @@ index 04243a51..105f3fb2 100644
g_assert_cmpfloat (connection->slotAttribute ("slot-number-key").toDouble (), ==, 1.25);
g_assert_false (connection->hasSlotAttribute ("slot-invalid-key"));
g_assert_false (connection->slotAttribute ("slot-invalid-key").isValid ());
-@@ -2952,16 +2953,16 @@ test_get_connections_attributes ()
+@@ -2952,16 +2953,16 @@
QScopedPointer<QSnapdPlug> plug (getConnectionsRequest->plug (0));
check_names_match (plug->attributeNames (), QStringList () << "plug-string-key" << "plug-int-key" << "plug-bool-key" << "plug-number-key");
g_assert_true (plug->hasAttribute ("plug-string-key"));
@@ -475,7 +434,7 @@ index 04243a51..105f3fb2 100644
g_assert_cmpfloat (plug->attribute ("plug-number-key").toDouble (), ==, 1.25);
g_assert_false (plug->hasAttribute ("plug-invalid-key"));
g_assert_false (plug->attribute ("plug-invalid-key").isValid ());
-@@ -2970,16 +2971,16 @@ test_get_connections_attributes ()
+@@ -2970,16 +2971,16 @@
QScopedPointer<QSnapdSlot> slot (getConnectionsRequest->slot (0));
check_names_match (slot->attributeNames (), QStringList () << "slot-string-key" << "slot-int-key" << "slot-bool-key" << "slot-number-key");
g_assert_true (slot->hasAttribute ("slot-string-key"));
@@ -496,7 +455,7 @@ index 04243a51..105f3fb2 100644
g_assert_cmpfloat (slot->attribute ("slot-number-key").toDouble (), ==, 1.25);
g_assert_false (slot->hasAttribute ("slot-invalid-key"));
g_assert_false (slot->attribute ("slot-invalid-key").isValid ());
-@@ -3123,13 +3124,13 @@ test_get_interfaces_attributes ()
+@@ -3123,13 +3124,13 @@
QScopedPointer<QSnapdPlug> plug (getInterfacesRequest->plug (0));
check_names_match (plug->attributeNames (), QStringList () << "plug-string-key" << "plug-int-key" << "plug-bool-key");
g_assert_true (plug->hasAttribute ("plug-string-key"));
@@ -513,7 +472,7 @@ index 04243a51..105f3fb2 100644
g_assert_true (plug->attribute ("plug-bool-key").toBool ());
g_assert_false (plug->hasAttribute ("plug-invalid-key"));
g_assert_false (plug->attribute ("plug-invalid-key").isValid ());
-@@ -3138,13 +3139,13 @@ test_get_interfaces_attributes ()
+@@ -3138,13 +3139,13 @@
QScopedPointer<QSnapdSlot> slot (getInterfacesRequest->slot (0));
check_names_match (slot->attributeNames (), QStringList () << "slot-string-key" << "slot-int-key" << "slot-bool-key");
g_assert_true (slot->hasAttribute ("slot-string-key"));
@@ -530,7 +489,7 @@ index 04243a51..105f3fb2 100644
g_assert_true (slot->attribute ("slot-bool-key").toBool ());
g_assert_false (slot->hasAttribute ("slot-invalid-key"));
g_assert_false (slot->attribute ("slot-invalid-key").isValid ());
-@@ -3894,7 +3895,7 @@ test_find_channels ()
+@@ -3894,7 +3895,7 @@
if (channel->name () == "stable") {
g_assert_true (channel->track () == "latest");
g_assert_true (channel->risk () == "stable");
@@ -539,7 +498,7 @@ index 04243a51..105f3fb2 100644
g_assert_true (channel->revision () == "REVISION");
g_assert_true (channel->version () == "VERSION");
g_assert_true (channel->epoch () == "0");
-@@ -3907,7 +3908,7 @@ test_find_channels ()
+@@ -3907,7 +3908,7 @@
g_assert_true (channel->name () == "beta");
g_assert_true (channel->track () == "latest");
g_assert_true (channel->risk () == "beta");
@@ -548,7 +507,7 @@ index 04243a51..105f3fb2 100644
g_assert_true (channel->revision () == "BETA-REVISION");
g_assert_true (channel->version () == "BETA-VERSION");
g_assert_true (channel->epoch () == "1");
-@@ -3926,7 +3927,7 @@ test_find_channels ()
+@@ -3926,7 +3927,7 @@
if (channel->name () == "insider/stable") {
g_assert_true (channel->track () == "insider");
g_assert_true (channel->risk () == "stable");
@@ -557,30 +516,81 @@ index 04243a51..105f3fb2 100644
g_assert_true (channel->releasedAt ().isNull ());
matched_track = TRUE;
}
-diff --git a/tests/test-qt.test.in b/tests/test-qt.test.in
-deleted file mode 100644
-index cb2463bd..00000000
--- a/tests/test-qt.test.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[Test]
-Type=session
-Exec=@installed_tests_exec_dir@/test-qt
-diff --git a/tests/test-qt5.test.in b/tests/test-qt5.test.in
-new file mode 100644
-index 00000000..628fdb27
--- /dev/null
+++ b/tests/test-qt5.test.in
@@ -0,0 +1,3 @@
+[Test]
+Type=session
+Exec=@installed_tests_exec_dir@/test-qt5
-diff --git a/tests/test-qt6.test.in b/tests/test-qt6.test.in
-new file mode 100644
-index 00000000..d1109649
--- /dev/null
+++ b/tests/test-qt6.test.in
@@ -0,0 +1,3 @@
+[Test]
+Type=session
-+Exec=@installed_tests_exec_dir@/test-qt6
\ No newline at end of file
++Exec=@installed_tests_exec_dir@/test-qt6
+--- a/snapd-qt/SnapdConfig.cmake.in
++++ /dev/null
+@@ -1,14 +0,0 @@
+-# SNAPD_INCLUDE_DIRS - The snapd-qt include directories
+-# SNAPD_LIBRARIES - The libraries needed to use snapd-qt
+-
+-set(SNAPD_LIBRARIES @libdir@/lib at library_name@.so)
+-set(SNAPD_INCLUDE_DIRS @includedir@/@library_name@/)
+-
+-add_library(Snapd::Core SHARED IMPORTED)
+-set_target_properties(Snapd::Core PROPERTIES
+- IMPORTED_LINK_DEPENDENT_LIBRARIES "Qt5::Core"
+- IMPORTED_LOCATION "${SNAPD_LIBRARIES}"
+- IMPORTED_SONAME "lib at library_name@.so"
+- )
+-
+-set_property(TARGET Snapd::Core PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SNAPD_INCLUDE_DIRS})
+--- a/snapd-qt/SnapdConfigVersion.cmake.in
++++ /dev/null
+@@ -1,10 +0,0 @@
+-set(PACKAGE_VERSION @version@)
+-
+-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+- set(PACKAGE_VERSION_COMPATIBLE FALSE)
+-else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+- set(PACKAGE_VERSION_COMPATIBLE TRUE)
+- if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+- set(PACKAGE_VERSION_EXACT TRUE)
+- endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+-endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
+--- /dev/null
++++ b/snapd-qt/SnapdQt5Config.cmake.in
+@@ -0,0 +1,14 @@
++# SNAPD_INCLUDE_DIRS - The snapd-qt include directories
++# SNAPD_LIBRARIES - The libraries needed to use snapd-qt
++
++set(SNAPD_LIBRARIES @libdir@/lib at library_name@.so)
++set(SNAPD_INCLUDE_DIRS @includedir@/@library_name@/)
++
++add_library(Snapd::Core SHARED IMPORTED)
++set_target_properties(Snapd::Core PROPERTIES
++ IMPORTED_LINK_DEPENDENT_LIBRARIES "Qt5::Core"
++ IMPORTED_LOCATION "${SNAPD_LIBRARIES}"
++ IMPORTED_SONAME "lib at library_name@.so"
++ )
++
++set_property(TARGET Snapd::Core PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SNAPD_INCLUDE_DIRS})
+--- /dev/null
++++ b/snapd-qt/SnapdQt5ConfigVersion.cmake.in
+@@ -0,0 +1,10 @@
++set(PACKAGE_VERSION @version@)
++
++if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
++ set(PACKAGE_VERSION_COMPATIBLE FALSE)
++else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
++ set(PACKAGE_VERSION_COMPATIBLE TRUE)
++ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
++ set(PACKAGE_VERSION_EXACT TRUE)
++ endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
++endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
More information about the Neon-commits
mailing list