[neon/backports-jammy/kimageannotator/Neon/release_jammy] /: backport from noble for upgrade path

Carlos De Maine null at kde.org
Mon Sep 16 12:15:12 BST 2024


Git commit 9b01eedd1f5e823f2230cb246e55fb2773354da4 by Carlos De Maine.
Committed on 16/09/2024 at 11:13.
Pushed by carlosdem into branch 'Neon/release_jammy'.

backport from noble for upgrade path

M  +23   -7    debian/changelog
M  +58   -24   debian/control
A  +1    -0    debian/libkimageannotator-qt5-0.install
A  +1    -0    debian/libkimageannotator-qt5-0.shlibs
A  +1    -0    debian/libkimageannotator-qt5-dev.examples
A  +3    -0    debian/libkimageannotator-qt5-dev.install
M  +1    -3    debian/libkimageannotator-qt6-0.install
A  +1    -0    debian/libkimageannotator-qt6-0.shlibs
M  +1    -1    debian/libkimageannotator-qt6-dev.examples
M  +3    -3    debian/libkimageannotator-qt6-dev.install
A  +21   -0    debian/patches/0001-Make-Qt5-Qt6-library-coinstallable.patch
A  +1    -0    debian/patches/series
M  +15   -4    debian/rules
D  +0    -43   src/annotations/items/text/TextPositions.h
D  +0    -65   src/common/filter/KeyEventListener.cpp
D  +0    -52   src/common/filter/KeyEventListener.h

https://invent.kde.org/neon/backports-jammy/kimageannotator/-/commit/9b01eedd1f5e823f2230cb246e55fb2773354da4

diff --git a/debian/changelog b/debian/changelog
index 1aa96e7..f948be4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,12 +1,28 @@
-kimageannotator (0.7.1-0neon) jammy; urgency=medium
+kimageannotator (0.7.1-1) noble; urgency=medium
 
-  [ Jonathan Esk-Riddell ]
-  * New release with Qt 6
+  * Upload to unstable.
+
+ -- Boyuan Yang <byang at debian.org>  Sun, 05 May 2024 14:41:32 -0400
+
+kimageannotator (0.7.1-1~exp2) experimental; urgency=medium
+
+  * debian/control: Put package under Debian KDE Extras Team maintenance.
+  * debian/control: Bump Standards-Version to 4.7.0.
 
-  [ Carlos De Maine ]
-  * New release
+ -- Boyuan Yang <byang at debian.org>  Fri, 26 Apr 2024 22:00:44 -0400
+
+kimageannotator (0.7.1-1~exp1) experimental; urgency=medium
+
+  * New upstream release.
+  * debian/patches/0001-Make-Qt5-Qt6-library-coinstallable.patch:
+    Add patch to make Qt5 and Qt6 libraries coinstallable.
+  * Split package to support both Qt5 and Qt6.
+    + libkimageannotator-qt5-0
+    + libkimageannotator-qt6-0
+    + libkimageannotator-qt5-dev
+    + libkimageannotator-qt6-dev
 
- -- Carlos De Maine <carlosdemaine at gmail.com>  Tue, 02 Apr 2024 12:38:28 +1100
+ -- Boyuan Yang <byang at debian.org>  Wed, 20 Mar 2024 15:36:50 -0400
 
 kimageannotator (0.6.1-1) unstable; urgency=medium
 
@@ -145,4 +161,4 @@ kimageannotator (0.2.1-1) unstable; urgency=medium
 
   * Initial release. (Closes: #956322)
 
- -- Boyuan Yang <byang at debian.org>  Thu, 09 Apr 2020 16:41:00 -0400
+ -- Boyuan Yang <byang at debian.org>  Thu, 09 Apr 2020 16:41:00 -0400
\ No newline at end of file
diff --git a/debian/control b/debian/control
index 4e79364..5c1c9e1 100644
--- a/debian/control
+++ b/debian/control
@@ -1,58 +1,92 @@
 Source: kimageannotator
 Section: libs
 Priority: optional
-Maintainer: Boyuan Yang <byang at debian.org>
+Maintainer: Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org>
+Uploaders:
+ Boyuan Yang <byang at debian.org>,
 Build-Depends:
- debhelper-compat (= 13),
  cmake,
+ debhelper-compat (= 13),
+ libkcolorpicker-qt5-dev (>= 0.3.1~),
+ libkcolorpicker-qt6-dev (>= 0.3.1~),
+ libqt5svg5-dev,
  qt6-base-dev,
- libkcolorpicker-qt6-dev,
- qt6-tools-dev,
  qt6-svg-dev,
-Standards-Version: 4.6.2
+ qt6-tools-dev,
+ qtbase5-dev,
+ qttools5-dev,
+ qttools5-dev-tools,
+Standards-Version: 4.7.0
 Rules-Requires-Root: no
 Homepage: https://github.com/ksnip/kImageAnnotator
 Vcs-Git: https://salsa.debian.org/debian/kimageannotator.git
 Vcs-Browser: https://salsa.debian.org/debian/kimageannotator
 
-Package: libkimageannotator-qt6-dev
+Package: libkimageannotator-qt5-dev
 Section: libdevel
 Architecture: any
 Multi-Arch: same
 Depends:
- libkcolorpicker-qt6-dev,
- libkimageannotator-qt6-0 (= ${binary:Version}),
- qt6-base-dev,
+ libkcolorpicker-qt5-dev,
+ libkimageannotator-qt5-0 (= ${binary:Version}),
  ${misc:Depends},
-Description: Image Annotating Library (dev)
+Description: Image Annotating Library (Qt5 dev)
  The kImageAnnotator library provides tools to annotate
  images. This library is used by the ksnip project.
  .
- This package provides the development files.
+ This package provides the Qt5 development files.
 
-Package: libkimageannotator-qt6-0
+Package: libkimageannotator-common
+Architecture: all
+Depends:
+ ${misc:Depends},
+Breaks:
+ libkimageannotator0 (<< 0.3.1-3),
+Replaces:
+ libkimageannotator0 (<< 0.3.1-3),
+Description: Image Annotating Library (common data files)
+ The kImageAnnotator library provides tools to annotate
+ images. This library is used by the ksnip project.
+ .
+ This package provides the architecture-independent files used by
+ the library, including the translation files.
+
+Package: libkimageannotator-qt5-0
 Architecture: any
 Multi-Arch: same
 Depends:
+ libkimageannotator-common (= ${source:Version}),
+ ${misc:Depends},
  ${shlibs:Depends},
- ${misc:Depends}
-Replaces: libkimageannotator-common (<< 0.7)
-Conflicts: libkimageannotator-common (<< 0.7)
-Description: Image Annotating Library (lib)
+Description: Image Annotating Library (Qt5 lib)
  The kImageAnnotator library provides tools to annotate
  images. This library is used by the ksnip project.
  .
- This package provides the shared library.
+ This package provides the Qt5 shared library.
 
-Package: libkimageannotator-common
-Architecture: all
+Package: libkimageannotator-qt6-0
+Architecture: any
+Multi-Arch: same
 Depends:
+ libkimageannotator-common (= ${source:Version}),
+ ${misc:Depends},
  ${shlibs:Depends},
- ${misc:Depends}
-Priority: extra
-Section: oldlibs
-Description: Image Annotating Library (dummy package)
+Description: Image Annotating Library (Qt6 lib)
+ The kImageAnnotator library provides tools to annotate
+ images. This library is used by the ksnip project.
+ .
+ This package provides the Qt6 shared library.
+
+Package: libkimageannotator-qt6-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends:
+ libkcolorpicker-qt6-dev,
+ libkimageannotator-qt6-0 (= ${binary:Version}),
+ ${misc:Depends},
+Description: Image Annotating Library (Qt6 dev)
  The kImageAnnotator library provides tools to annotate
  images. This library is used by the ksnip project.
  .
- This package is an empty transitional.
+ This package provides the Qt6 development files.
\ No newline at end of file
diff --git a/debian/libkimageannotator-qt5-0.install b/debian/libkimageannotator-qt5-0.install
new file mode 100644
index 0000000..aeff10e
--- /dev/null
+++ b/debian/libkimageannotator-qt5-0.install
@@ -0,0 +1 @@
+usr/lib/*/libkImageAnnotator-Qt5.so.0*
diff --git a/debian/libkimageannotator-qt5-0.shlibs b/debian/libkimageannotator-qt5-0.shlibs
new file mode 100644
index 0000000..cf3983c
--- /dev/null
+++ b/debian/libkimageannotator-qt5-0.shlibs
@@ -0,0 +1 @@
+libkImageAnnotator-Qt5 0 libkimageannotator-qt5-0 (>= 0.7.1)
diff --git a/debian/libkimageannotator-qt5-dev.examples b/debian/libkimageannotator-qt5-dev.examples
new file mode 100644
index 0000000..4949f09
--- /dev/null
+++ b/debian/libkimageannotator-qt5-dev.examples
@@ -0,0 +1 @@
+example/
\ No newline at end of file
diff --git a/debian/libkimageannotator-qt5-dev.install b/debian/libkimageannotator-qt5-dev.install
new file mode 100644
index 0000000..0d0cb4e
--- /dev/null
+++ b/debian/libkimageannotator-qt5-dev.install
@@ -0,0 +1,3 @@
+usr/include/kImageAnnotator-Qt5/
+usr/lib/*/cmake/kImageAnnotator-Qt5/
+usr/lib/*/libkImageAnnotator-Qt5.so
diff --git a/debian/libkimageannotator-qt6-0.install b/debian/libkimageannotator-qt6-0.install
index 6b3423e..0c60bb9 100644
--- a/debian/libkimageannotator-qt6-0.install
+++ b/debian/libkimageannotator-qt6-0.install
@@ -1,3 +1 @@
-usr/lib/*/libkImageAnnotator.so.0
-usr/lib/*/libkImageAnnotator.so.0.*
-usr/share/kImageAnnotator/
+usr/lib/*/libkImageAnnotator-Qt6.so.0*
\ No newline at end of file
diff --git a/debian/libkimageannotator-qt6-0.shlibs b/debian/libkimageannotator-qt6-0.shlibs
new file mode 100644
index 0000000..8ed844c
--- /dev/null
+++ b/debian/libkimageannotator-qt6-0.shlibs
@@ -0,0 +1 @@
+libkImageAnnotator-Qt6 0 libkimageannotator-qt6-0 (>= 0.7.1)
diff --git a/debian/libkimageannotator-qt6-dev.examples b/debian/libkimageannotator-qt6-dev.examples
index 90c978b..4949f09 100644
--- a/debian/libkimageannotator-qt6-dev.examples
+++ b/debian/libkimageannotator-qt6-dev.examples
@@ -1 +1 @@
-example/
+example/
\ No newline at end of file
diff --git a/debian/libkimageannotator-qt6-dev.install b/debian/libkimageannotator-qt6-dev.install
index e8ea616..4e09c97 100644
--- a/debian/libkimageannotator-qt6-dev.install
+++ b/debian/libkimageannotator-qt6-dev.install
@@ -1,3 +1,3 @@
-usr/include/*
-usr/lib/*/cmake/*
-usr/lib/*/libkImageAnnotator.so
+usr/include/kImageAnnotator-Qt6/
+usr/lib/*/cmake/kImageAnnotator-Qt6/
+usr/lib/*/libkImageAnnotator-Qt6.so
\ No newline at end of file
diff --git a/debian/patches/0001-Make-Qt5-Qt6-library-coinstallable.patch b/debian/patches/0001-Make-Qt5-Qt6-library-coinstallable.patch
new file mode 100644
index 0000000..2b9c93e
--- /dev/null
+++ b/debian/patches/0001-Make-Qt5-Qt6-library-coinstallable.patch
@@ -0,0 +1,21 @@
+From: Boyuan Yang <byang at debian.org>
+Date: Wed, 20 Mar 2024 15:36:10 -0400
+Subject: Make Qt5 Qt6 library coinstallable
+
+Bug: https://github.com/ksnip/kColorPicker/issues/13
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8f3516e..6a12399 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -97,6 +97,7 @@ set_target_properties(kImageAnnotator
+ 					  RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin
+ 					  VERSION ${PROJECT_VERSION}
+ 					  SOVERSION 0
++					  OUTPUT_NAME kImageAnnotator-Qt${QT_MAJOR_VERSION}
+ 					  )
+ 
+ install(TARGETS kImageAnnotator
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7e420d2
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Make-Qt5-Qt6-library-coinstallable.patch
diff --git a/debian/rules b/debian/rules
index 27787d3..3ce4750 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,9 +13,20 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_LDFLAGS_MAINT_APPEND =
 
 %:
-	dh $@ --with kf6 --buildsystem kf6
+	dh $@ --buildsystem=cmake
 
 override_dh_auto_configure:
-	dh_auto_configure -- \
-	        -DBUILD_SHARED_LIBS=ON \
-	        -DBUILD_WITH_QT6=6
+	dh_auto_configure --builddirectory=qt5 -- -DBUILD_SHARED_LIBS=ON -DBUILD_WITH_QT6=OFF
+	dh_auto_configure --builddirectory=qt6 -- -DBUILD_SHARED_LIBS=ON -DBUILD_WITH_QT6=ON
+
+override_dh_auto_build:
+	dh_auto_build --builddirectory=qt5
+	dh_auto_build --builddirectory=qt6
+
+override_dh_auto_install:
+	dh_auto_install --builddirectory=qt5
+	dh_auto_install --builddirectory=qt6
+
+override_dh_auto_test:
+	dh_auto_test --builddirectory=qt5
+	dh_auto_test --builddirectory=qt6
\ No newline at end of file
diff --git a/src/annotations/items/text/TextPositions.h b/src/annotations/items/text/TextPositions.h
deleted file mode 100644
index 0cb60a6..0000000
--- a/src/annotations/items/text/TextPositions.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2018 Damir Porobic <damir.porobic at gmx.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef KIMAGEANNOTATOR_TEXTPOSITIONS_H
-#define KIMAGEANNOTATOR_TEXTPOSITIONS_H
-
-#include <QMetaType>
-
-namespace kImageAnnotator {
-
-enum class TextPositions
-{
-    Beginning,
-    End,
-    PreviousWordBeginning,
-    NextWordBeginning,
-    Next,
-    Previous,
-    Up,
-    Down
-};
-
-} // namespace kImageAnnotator
-
-Q_DECLARE_METATYPE(kImageAnnotator::TextPositions)
-
-#endif //KIMAGEANNOTATOR_TEXTPOSITIONS_H
diff --git a/src/common/filter/KeyEventListener.cpp b/src/common/filter/KeyEventListener.cpp
deleted file mode 100644
index a34ef22..0000000
--- a/src/common/filter/KeyEventListener.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2020 Damir Porobic <damir.porobic at gmx.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "KeyEventListener.h"
-
-namespace kImageAnnotator {
-
-KeyEventListener::KeyEventListener()
-{
-	QCoreApplication::instance()->installEventFilter(this);
-}
-
-KeyEventListener::~KeyEventListener()
-{
-	QCoreApplication::instance()->removeEventFilter(this);
-}
-
-bool KeyEventListener::eventFilter(QObject *watched, QEvent *event)
-{
-	if (event->type() == QEvent::KeyPress) {
-		handleKeyPressed(event);
-	} else if (event->type() == QEvent::KeyRelease) {
-		handleKeyReleased(event);
-	}
-
-	return QObject::eventFilter(watched, event);
-}
-
-void KeyEventListener::handleKeyReleased(QEvent *event)
-{
-	auto keyEvent = dynamic_cast<QKeyEvent *>(event);
-
-	if(mPressedKeyCodes.contains(keyEvent->key())) {
-		mPressedKeyCodes.removeAll(keyEvent->key());
-		emit keyReleased(keyEvent);
-	}
-}
-
-void KeyEventListener::handleKeyPressed(QEvent *event)
-{
-	auto keyEvent = dynamic_cast<QKeyEvent *>(event);
-
-	if(!mPressedKeyCodes.contains(keyEvent->key())) {
-		mPressedKeyCodes.append(keyEvent->key());
-		emit keyPressed(keyEvent);
-	}
-}
-
-} // namespace kImageAnnotator
\ No newline at end of file
diff --git a/src/common/filter/KeyEventListener.h b/src/common/filter/KeyEventListener.h
deleted file mode 100644
index 10fb6d9..0000000
--- a/src/common/filter/KeyEventListener.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2020 Damir Porobic <damir.porobic at gmx.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef KIMAGEANNOTATOR_KEYEVENTLISTENER_H
-#define KIMAGEANNOTATOR_KEYEVENTLISTENER_H
-
-#include <QObject>
-#include <QKeyEvent>
-#include <QCoreApplication>
-#include <QList>
-
-namespace kImageAnnotator {
-
-class KeyEventListener : public QObject
-{
-	Q_OBJECT
-public:
-	explicit KeyEventListener();
-	~KeyEventListener() override;
-
-signals:
-	void keyPressed(QKeyEvent *event);
-	void keyReleased(QKeyEvent *event);
-
-protected:
-	bool eventFilter(QObject *watched, QEvent *event) override;
-
-private:
-	QList<int> mPressedKeyCodes;
-	void handleKeyPressed(QEvent *event);
-	void handleKeyReleased(QEvent *event);
-};
-
-} // namespace kImageAnnotator
-
-#endif //KIMAGEANNOTATOR_KEYEVENTLISTENER_H



More information about the Neon-commits mailing list