Accepting request 1330114 from home:avindra:branches:X11:LXQt:Other
- compile against Qt6 using latest revision * 100 files changed across 127 commits - drop 0001-Fix-build-against-kImageAnnotator-and-kColorPicker-t.patch OBS-URL: https://build.opensuse.org/request/show/1330114 OBS-URL: https://build.opensuse.org/package/show/X11:LXQt:Other/ksnip?expand=0&rev=31
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 31 00:15:31 UTC 2026 - Avindra Goolcharan <avindra@opensuse.org>
|
||||
|
||||
- compile against Qt6 using latest revision
|
||||
* 100 files changed across 127 commits
|
||||
- drop 0001-Fix-build-against-kImageAnnotator-and-kColorPicker-t.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 15 17:45:34 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
|
||||
+23
-19
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ksnip
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2026 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,6 +16,8 @@
|
||||
#
|
||||
|
||||
|
||||
%define rev ac15aa97ead20ff25ccadfce8981cf8601c2dc4e
|
||||
|
||||
Name: ksnip
|
||||
Version: 1.10.1
|
||||
Release: 0
|
||||
@@ -23,29 +25,27 @@ Summary: Screenshot tool
|
||||
License: GPL-2.0-or-later
|
||||
Group: Productivity/Graphics/Other
|
||||
URL: https://github.com/ksnip/ksnip
|
||||
Source: https://github.com/ksnip/ksnip/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch0: 0001-Fix-build-against-kImageAnnotator-and-kColorPicker-t.patch
|
||||
Source: https://github.com/ksnip/ksnip/archive/%{rev}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
BuildRequires: cmake
|
||||
BuildRequires: extra-cmake-modules
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: qt6-gui-private-devel
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: xvfb-run
|
||||
BuildRequires: cmake(Qt5Concurrent)
|
||||
BuildRequires: cmake(Qt5Core)
|
||||
BuildRequires: cmake(Qt5DBus)
|
||||
BuildRequires: cmake(Qt5LinguistTools)
|
||||
BuildRequires: cmake(Qt5Network)
|
||||
BuildRequires: cmake(Qt5PrintSupport)
|
||||
BuildRequires: cmake(Qt5Svg)
|
||||
BuildRequires: cmake(Qt5Test)
|
||||
BuildRequires: cmake(Qt5Widgets)
|
||||
BuildRequires: cmake(Qt5X11Extras)
|
||||
BuildRequires: cmake(Qt5Xml)
|
||||
BuildRequires: cmake(kColorPicker-Qt5) >= 0.3.1
|
||||
BuildRequires: cmake(kImageAnnotator-Qt5) >= 0.7.1
|
||||
BuildRequires: cmake(Qt6Concurrent)
|
||||
BuildRequires: cmake(Qt6Core)
|
||||
BuildRequires: cmake(Qt6DBus)
|
||||
BuildRequires: cmake(Qt6LinguistTools)
|
||||
BuildRequires: cmake(Qt6Network)
|
||||
BuildRequires: cmake(Qt6PrintSupport)
|
||||
BuildRequires: cmake(Qt6Svg)
|
||||
BuildRequires: cmake(Qt6Test)
|
||||
BuildRequires: cmake(Qt6Widgets)
|
||||
BuildRequires: cmake(Qt6Xml)
|
||||
BuildRequires: cmake(kColorPicker-Qt6) >= 0.3.1
|
||||
BuildRequires: cmake(kImageAnnotator-Qt6) >= 0.7.1
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xcb-xfixes)
|
||||
|
||||
@@ -56,10 +56,14 @@ annotation features for your screenshots.
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup -p1 -n %{name}-%{rev}
|
||||
|
||||
# Qt 6.10.1 fix
|
||||
sed -E -e '/QT_COMPONENTS/s&(Widgets)&\1 GuiPrivate&' -i CMakeLists.txt
|
||||
|
||||
%build
|
||||
%cmake
|
||||
|
||||
%cmake -DBUILD_WITH_QT6=ON
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
From 76f4b381971eead6ff31b8bf3bb64bb5717469c3 Mon Sep 17 00:00:00 2001
|
||||
From: Damir Porobic <damir_porobic@live.com>
|
||||
Date: Thu, 22 Feb 2024 12:18:14 +0100
|
||||
Subject: [PATCH] Fix build against kImageAnnotator and kColorPicker that use
|
||||
qt5 and qt6
|
||||
|
||||
---
|
||||
CMakeLists.txt | 18 +++++++++++++-----
|
||||
src/CMakeLists.txt | 2 +-
|
||||
src/gui/operations/CopyAsDataUriOperation.cpp | 9 ++++-----
|
||||
tests/CMakeLists.txt | 2 +-
|
||||
4 files changed, 19 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2613ac42..f8088dd7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -44,6 +44,14 @@ endif ()
|
||||
set(QT_COMPONENTS Core Widgets Network Xml PrintSupport DBus Svg)
|
||||
set(QT_MIN_VERSION 5.9.4)
|
||||
|
||||
+option(BUILD_WITH_QT6 "Build against Qt6" OFF)
|
||||
+
|
||||
+if (BUILD_WITH_QT6)
|
||||
+ set(QT_MAJOR_VERSION 6)
|
||||
+else()
|
||||
+ set(QT_MAJOR_VERSION 5)
|
||||
+endif()
|
||||
+
|
||||
if (UNIX AND NOT APPLE)
|
||||
list(APPEND QT_COMPONENTS Concurrent)
|
||||
endif()
|
||||
@@ -58,13 +66,13 @@ if (BUILD_TESTS)
|
||||
list(APPEND QT_COMPONENTS Test)
|
||||
endif()
|
||||
|
||||
-find_package(Qt5 ${QT_MIN_VERSION} REQUIRED ${QT_COMPONENTS})
|
||||
+find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED ${QT_COMPONENTS})
|
||||
|
||||
-set(KIMAGEANNOTATOR_MIN_VERSION 0.6.1)
|
||||
-find_package(kImageAnnotator ${KIMAGEANNOTATOR_MIN_VERSION} REQUIRED)
|
||||
+set(KIMAGEANNOTATOR_MIN_VERSION 0.7.0)
|
||||
+find_package(kImageAnnotator-Qt${QT_MAJOR_VERSION} ${KIMAGEANNOTATOR_MIN_VERSION} REQUIRED)
|
||||
|
||||
-set(KCOLORPICKER_MIN_VERSION 0.2.0)
|
||||
-find_package(kColorPicker ${KCOLORPICKER_MIN_VERSION} REQUIRED)
|
||||
+set(KCOLORPICKER_MIN_VERSION 0.3.0)
|
||||
+find_package(kColorPicker-Qt${QT_MAJOR_VERSION} ${KCOLORPICKER_MIN_VERSION} REQUIRED)
|
||||
|
||||
set(BASEPATH "${CMAKE_SOURCE_DIR}")
|
||||
include_directories("${BASEPATH}")
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index e60d4bba..5a637411 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -293,7 +293,7 @@ elseif (UNIX)
|
||||
elseif (WIN32)
|
||||
list(APPEND DEPENDENCY_LIBRARIES
|
||||
Qt5::WinExtras
|
||||
- kImageAnnotator
|
||||
+ kImageAnnotator::kImageAnnotator
|
||||
kColorPicker
|
||||
Dwmapi
|
||||
)
|
||||
diff --git a/src/gui/operations/CopyAsDataUriOperation.cpp b/src/gui/operations/CopyAsDataUriOperation.cpp
|
||||
index 7c9b6eef..100aa4fd 100644
|
||||
--- a/src/gui/operations/CopyAsDataUriOperation.cpp
|
||||
+++ b/src/gui/operations/CopyAsDataUriOperation.cpp
|
||||
@@ -34,14 +34,13 @@ CopyAsDataUriOperation::CopyAsDataUriOperation(
|
||||
bool CopyAsDataUriOperation::execute()
|
||||
{
|
||||
QByteArray byteArray;
|
||||
-
|
||||
QBuffer buffer(&byteArray);
|
||||
buffer.open(QIODevice::WriteOnly);
|
||||
- auto saved = mImage.save(&buffer, "PNG");
|
||||
+ auto isSaved = mImage.save(&buffer, mConfig->saveFormat().toLatin1());
|
||||
buffer.close();
|
||||
|
||||
- if (saved) {
|
||||
- QByteArray output = "data:image/png;base64,";
|
||||
+ if (isSaved) {
|
||||
+ QByteArray output = "data:image/" + mConfig->saveFormat().toLatin1() +";base64,";
|
||||
output.append(byteArray.toBase64());
|
||||
mClipboardService->setText(output);
|
||||
notifySuccess();
|
||||
@@ -49,7 +48,7 @@ bool CopyAsDataUriOperation::execute()
|
||||
notifyFailure();
|
||||
}
|
||||
|
||||
- return saved;
|
||||
+ return isSaved;
|
||||
}
|
||||
|
||||
void CopyAsDataUriOperation::notifyFailure() const
|
||||
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
||||
index f4a49ffd..da19ce93 100644
|
||||
--- a/tests/CMakeLists.txt
|
||||
+++ b/tests/CMakeLists.txt
|
||||
@@ -73,6 +73,6 @@ endif ()
|
||||
foreach (UnitTest ${UNITTEST_SRC})
|
||||
get_filename_component(UnitTestName ${UnitTest} NAME_WE)
|
||||
add_executable(${UnitTestName} ${UnitTest} ${TESTUTILS_SRC})
|
||||
- target_link_libraries(${UnitTestName} KSNIP_STATIC GTest::gmock Qt5::Test)
|
||||
+ target_link_libraries(${UnitTestName} KSNIP_STATIC GTest::gmock Qt${QT_MAJOR_VERSION}::Test)
|
||||
add_test(${UnitTestName} ${UnitTestName})
|
||||
endforeach (UnitTest)
|
||||
--
|
||||
2.44.0
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:41fa6a54b0a88095ccdf7f8f3a96617e91fb15dcedae2aadaf2ee24677e9a88c
|
||||
size 690500
|
||||
oid sha256:687cf457ed8c96379f30ab49ba2b067f3a2af6e7c714469a41d65800a2b451cc
|
||||
size 739504
|
||||
|
||||
Reference in New Issue
Block a user