Control: tags -1 +pending

Hi,

On Sat, Jun 17, 2023 at 09:24:07PM +0300, Dmitry Shachnev wrote:
> Dear Maintainer,
>
> openorienteering-mapper fails to build with Qt ≥ 5.15.9, which is currently
> available in experimental (but I am going to upload it to unstable soon).
>
> [...]
>
> I have created an upstream pull request that fixes this issue, see the
> Forwarded URL.

As Qt 5.15.10 is in unstable now and this package needs to be rebuilt against
the new private ABI, I have uploaded NMU to DELAYED/2.

The debdiff is attached. Also created a merge request on salsa:
https://salsa.debian.org/debian/openorienteering-mapper/-/merge_requests/2

--
Dmitry Shachnev
diff -Nru openorienteering-mapper-0.9.5/debian/changelog openorienteering-mapper-0.9.5/debian/changelog
--- openorienteering-mapper-0.9.5/debian/changelog	2021-12-28 12:45:41.000000000 +0300
+++ openorienteering-mapper-0.9.5/debian/changelog	2023-07-09 23:48:02.000000000 +0300
@@ -1,3 +1,11 @@
+openorienteering-mapper (0.9.5-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add a patch to make the QPainterTest pass with Qt 5.15.9
+    (closes: #1038402).
+
+ -- Dmitry Shachnev <mity...@debian.org>  Sun, 09 Jul 2023 23:48:02 +0300
+
 openorienteering-mapper (0.9.5-3) unstable; urgency=medium
 
   * Cherry-pick upstream commit updating expected
diff -Nru openorienteering-mapper-0.9.5/debian/patches/qt-5.15.9.patch openorienteering-mapper-0.9.5/debian/patches/qt-5.15.9.patch
--- openorienteering-mapper-0.9.5/debian/patches/qt-5.15.9.patch	1970-01-01 03:00:00.000000000 +0300
+++ openorienteering-mapper-0.9.5/debian/patches/qt-5.15.9.patch	2023-07-09 23:48:02.000000000 +0300
@@ -0,0 +1,60 @@
+Description: make QPainterTest pass with Qt 5.15.9
+ https://bugreports.qt.io/browse/QTBUG-100327 was fixed in 5.15.9,
+ so now we have a good result from the beginning and don't need
+ ImageTransparencyFixup.
+Author: Dmitry Shachnev <mity...@debian.org>
+Forwarded: https://github.com/OpenOrienteering/mapper/pull/2156
+Last-Update: 2023-07-09
+
+--- a/src/core/image_transparency_fixup.h
++++ b/src/core/image_transparency_fixup.h
+@@ -57,6 +57,9 @@ public:
+ 	 * 
+ 	 * The image must be of QImage::Format_ARGB32_Premultiplied.
+ 	 * It may be null.
++	 *
++	 * This fixup is needed for Qt5 < 5.15.9 and Qt6 < 6.2.4 which are
++	 * affected by https://bugreports.qt.io/browse/QTBUG-100327.
+ 	 */
+ 	inline ImageTransparencyFixup(QImage* image)
+ 	: dest(0), dest_end(0)
+@@ -81,11 +84,13 @@ public:
+ 	 */
+ 	inline void operator()() const
+ 	{
++#if QT_VERSION < QT_VERSION_CHECK(5, 15, 9) || (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && QT_VERSION < QT_VERSION_CHECK(6, 2, 4))
+ 		for (QRgb* px = dest; px < dest_end; px++)
+ 		{
+ 			if (*px == 0x01000000) /* qRgba(0, 0, 0, 1) */
+ 				*px = 0x00000000;  /* qRgba(0, 0, 0, 0) */
+ 		}
++#endif
+ 	}
+ 	
+ protected:
+--- a/test/qpainter_t.cpp
++++ b/test/qpainter_t.cpp
+@@ -80,9 +80,10 @@ void QPainterTest::multiplyComposition()
+ 	QCOMPARE(compose(white_img, white_img, multiply).pixel(0,0), qRgba(255, 255, 255, 255));
+ 	QCOMPARE(compose(black_img, black_img, multiply).pixel(0,0), qRgba(0, 0, 0, 255));
+ 	
++#if QT_VERSION < QT_VERSION_CHECK(5, 15, 9) || (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && QT_VERSION < QT_VERSION_CHECK(6, 2, 4))
+ 	QEXPECT_FAIL("", "CompositionMode_Multiply incorrectly composes full transparency.", Continue);
++#endif
+ 	QCOMPARE(compose(trans_img, trans_img, multiply).pixel(0,0), qRgba(0, 0, 0, 0));
+-	QCOMPARE(compose(trans_img, trans_img, multiply).pixel(0,0), qRgba(0, 0, 0, 1)); // This should fail!
+ 	
+ 	// ImageTransparencyFixup fixes the particular issue.
+ 	QImage result = compose(trans_img, trans_img, multiply);
+@@ -107,9 +108,10 @@ void QPainterTest::darkenComposition()
+ 	QCOMPARE(compose(white_img, white_img, darken).pixel(0,0), qRgba(255, 255, 255, 255));
+ 	QCOMPARE(compose(black_img, black_img, darken).pixel(0,0), qRgba(0, 0, 0, 255));
+ 	
++#if QT_VERSION < QT_VERSION_CHECK(5, 15, 9) || (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && QT_VERSION < QT_VERSION_CHECK(6, 2, 4))
+ 	QEXPECT_FAIL("", "CompositionMode_Darken incorrectly composes full transparency.", Continue);
++#endif
+ 	QCOMPARE(compose(trans_img, trans_img, darken).pixel(0,0), qRgba(0, 0, 0, 0));
+-	QCOMPARE(compose(trans_img, trans_img, darken).pixel(0,0), qRgba(0, 0, 0, 1)); // This should fail!
+ 	
+ 	// ImageTransparencyFixup fixes the particular issue.
+ 	QImage result = compose(trans_img, trans_img, darken);
diff -Nru openorienteering-mapper-0.9.5/debian/patches/series openorienteering-mapper-0.9.5/debian/patches/series
--- openorienteering-mapper-0.9.5/debian/patches/series	2021-12-28 12:06:01.000000000 +0300
+++ openorienteering-mapper-0.9.5/debian/patches/series	2023-07-09 23:48:02.000000000 +0300
@@ -1,3 +1,4 @@
 fix-help-data-dir.patch
 proj8.patch
 proj8.2.0.patch
+qt-5.15.9.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to