pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

add qt6-qtimageformats to pkgsrc-wip



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <nros%NetBSD.org@localhost>
Pushed By:	nros
Date:		Sun Feb 7 13:17:02 2021 +0000
Changeset:	fe438bc93587161f58ea05220fe9c07b5deec291

Modified Files:
	Makefile
	qt6-qtbase/Makefile.common
Added Files:
	qt6-qtimageformats/DESCR
	qt6-qtimageformats/Makefile
	qt6-qtimageformats/PLIST
	qt6-qtimageformats/buildlink3.mk
	qt6-qtimageformats/distinfo
	qt6-qtimageformats/files/FindWrapMNG.cmake
	qt6-qtimageformats/patches/patch-src_imageformats_configure.cmake
	qt6-qtimageformats/patches/patch-src_plugins_imageformats_CMakeLists.txt
	qt6-qtimageformats/patches/patch-src_plugins_imageformats_mng_CMakeLists.txt
	qt6-qtimageformats/patches/patch-src_plugins_imageformats_tiff_qtiffhandler.cpp

Log Message:
add qt6-qtimageformats to pkgsrc-wip

extra image handlers for qt6

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fe438bc93587161f58ea05220fe9c07b5deec291

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |  1 +
 qt6-qtbase/Makefile.common                         |  1 +
 qt6-qtimageformats/DESCR                           |  1 +
 qt6-qtimageformats/Makefile                        | 20 ++++++++
 qt6-qtimageformats/PLIST                           | 53 ++++++++++++++++++++++
 qt6-qtimageformats/buildlink3.mk                   | 14 ++++++
 qt6-qtimageformats/distinfo                        | 10 ++++
 qt6-qtimageformats/files/FindWrapMNG.cmake         | 10 ++++
 .../patches/patch-src_imageformats_configure.cmake | 24 ++++++++++
 .../patch-src_plugins_imageformats_CMakeLists.txt  | 15 ++++++
 ...tch-src_plugins_imageformats_mng_CMakeLists.txt | 14 ++++++
 ...-src_plugins_imageformats_tiff_qtiffhandler.cpp | 16 +++++++
 12 files changed, 179 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 979ec96111..3228e9941a 100644
--- a/Makefile
+++ b/Makefile
@@ -4758,6 +4758,7 @@ SUBDIR+=	qt6
 SUBDIR+=	qt6-qt5compat
 SUBDIR+=	qt6-qtbase
 SUBDIR+=	qt6-qtdeclarative
+SUBDIR+=	qt6-qtimageformats
 SUBDIR+=	qt6-qtquick3d
 SUBDIR+=	qt6-qtquickcontrols2
 SUBDIR+=	qt6-qtquicktimeline
diff --git a/qt6-qtbase/Makefile.common b/qt6-qtbase/Makefile.common
index bb4f51c132..5e5dae82dd 100644
--- a/qt6-qtbase/Makefile.common
+++ b/qt6-qtbase/Makefile.common
@@ -1,6 +1,7 @@
 # $NetBSD$
 # used by wip/qt6-qtbase/Makefile
 # used by wip/qt6-qtdeclarative/Makefile
+# used by wip/qt6-qtimageformats/Makefile
 # used by wip/qt6-qtquick3d/Makefile
 # used by wip/qt6-qtquickcontrols2/Makefile
 # used by wip/qt6-qtquicktimeline/Makefile
diff --git a/qt6-qtimageformats/DESCR b/qt6-qtimageformats/DESCR
new file mode 100644
index 0000000000..35fcc0836e
--- /dev/null
+++ b/qt6-qtimageformats/DESCR
@@ -0,0 +1 @@
+mng, webp, jp2 and tiff image handlers for Qt6
diff --git a/qt6-qtimageformats/Makefile b/qt6-qtimageformats/Makefile
new file mode 100644
index 0000000000..4a363442c9
--- /dev/null
+++ b/qt6-qtimageformats/Makefile
@@ -0,0 +1,20 @@
+# $NetBSD$
+
+DISTNAME=	qtimageformats-everywhere-src-${QTVERSION}
+PKGNAME=	qt6-qtimageformats-${QTVERSION}
+COMMENT=	Extra image handlers for Qt6
+CATEGORIES=	graphics
+
+QT_ADDLIB=	qtimageformats
+.include "../../wip/qt6-qtbase/Makefile.common"
+
+post-extract:
+	${CP} ${FILESDIR}/FindWrapMNG.cmake ${WRKSRC}/cmake
+
+.include "../../graphics/jasper/buildlink3.mk"
+.include "../../graphics/mng/buildlink3.mk"
+.include "../../graphics/tiff/buildlink3.mk"
+.include "../../graphics/libwebp/buildlink3.mk"
+.include "../../wip/qt6-qtbase/buildlink3.mk"
+.include "../../wip/qt6-qttools/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/qt6-qtimageformats/PLIST b/qt6-qtimageformats/PLIST
new file mode 100644
index 0000000000..6fbaab62dd
--- /dev/null
+++ b/qt6-qtimageformats/PLIST
@@ -0,0 +1,53 @@
+@comment $NetBSD$
+qt6/lib/cmake/Qt6/FindWrapJasper.cmake
+qt6/lib/cmake/Qt6/FindWrapMNG.cmake
+qt6/lib/cmake/Qt6/FindWrapWebP.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QICNSPluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QICNSPluginConfig.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QICNSPluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QICNSPluginDependencies.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QICNSPluginTargets-release.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QICNSPluginTargets.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QJp2PluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QJp2PluginConfig.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QJp2PluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QJp2PluginDependencies.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QJp2PluginTargets-release.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QJp2PluginTargets.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QMngPluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QMngPluginConfig.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QMngPluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QMngPluginDependencies.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QMngPluginTargets-release.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QMngPluginTargets.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTgaPluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTgaPluginConfig.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTgaPluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTgaPluginDependencies.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTgaPluginTargets-release.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTgaPluginTargets.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTiffPluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTiffPluginConfig.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTiffPluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTiffPluginDependencies.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTiffPluginTargets-release.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QTiffPluginTargets.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWbmpPluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWbmpPluginConfig.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWbmpPluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWbmpPluginDependencies.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWbmpPluginTargets-release.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWbmpPluginTargets.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWebpPluginAdditionalTargetInfo.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWebpPluginConfig.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWebpPluginConfigVersion.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWebpPluginDependencies.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWebpPluginTargets-release.cmake
+qt6/lib/cmake/Qt6Gui/Qt6QWebpPluginTargets.cmake
+qt6/plugins/imageformats/libqicns.so
+qt6/plugins/imageformats/libqjp2.so
+qt6/plugins/imageformats/libqmng.so
+qt6/plugins/imageformats/libqtga.so
+qt6/plugins/imageformats/libqtiff.so
+qt6/plugins/imageformats/libqwbmp.so
+qt6/plugins/imageformats/libqwebp.so
diff --git a/qt6-qtimageformats/buildlink3.mk b/qt6-qtimageformats/buildlink3.mk
new file mode 100644
index 0000000000..d00c4ce820
--- /dev/null
+++ b/qt6-qtimageformats/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD$
+
+BUILDLINK_TREE+=	qt6-qtimageformats
+
+.if !defined(QT6_QTIMAGEFORMATS_BUILDLINK3_MK)
+QT6_QTIMAGEFORMATS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.qt6-qtimageformats+=	qt6-qtimageformats>=6.0.1
+BUILDLINK_PKGSRCDIR.qt6-qtimageformats?=	../../wip/qt6-qtimageformats
+
+.include "../../wip/qt6-qtbase/buildlink3.mk"
+.endif	# QT6_QTIMAGEFORMATS_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-qt6-qtimageformats
diff --git a/qt6-qtimageformats/distinfo b/qt6-qtimageformats/distinfo
new file mode 100644
index 0000000000..4fce8a70b5
--- /dev/null
+++ b/qt6-qtimageformats/distinfo
@@ -0,0 +1,10 @@
+$NetBSD$
+
+SHA1 (qtimageformats-everywhere-src-6.0.1.tar.xz) = 29212e99d23923e9e8203abd843b42413794fc7f
+RMD160 (qtimageformats-everywhere-src-6.0.1.tar.xz) = 4893d0011841ffcd43d37c24d1144b231974a217
+SHA512 (qtimageformats-everywhere-src-6.0.1.tar.xz) = 064a185e80171cb18f4cfad2af71ab0ab1cd290771f34e9ac11a68cbb07e0cf1772ba8088f599cba2fefd81c3eabe2ae962ddfbff33f767678dfd2c2ad8ac8e0
+Size (qtimageformats-everywhere-src-6.0.1.tar.xz) = 1820636 bytes
+SHA1 (patch-src_imageformats_configure.cmake) = 68d54b612cf280927748fd3225c2eae0d547cce2
+SHA1 (patch-src_plugins_imageformats_CMakeLists.txt) = fc058933a2536a5d90ce78d9eacbb82e7772622a
+SHA1 (patch-src_plugins_imageformats_mng_CMakeLists.txt) = 3ca958e5259e6bfcd992ab3c45f25beda0178503
+SHA1 (patch-src_plugins_imageformats_tiff_qtiffhandler.cpp) = cd9f708caf836eca851f24bb696aad8a5e4b5506
diff --git a/qt6-qtimageformats/files/FindWrapMNG.cmake b/qt6-qtimageformats/files/FindWrapMNG.cmake
new file mode 100644
index 0000000000..0d87505e15
--- /dev/null
+++ b/qt6-qtimageformats/files/FindWrapMNG.cmake
@@ -0,0 +1,10 @@
+#
+# We have to do this instead of using pkgconfig directly in configure.cmake.
+# If we use it directly in configure.cmake cmake complains about 
+# CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES not being
+# set and that add_library used for imported target creation in
+# pkg_check_modules is not scriptable.
+#
+find_package(PkgConfig)
+pkg_check_modules(MNG IMPORTED_TARGET libmng>1.0.9)
+
diff --git a/qt6-qtimageformats/patches/patch-src_imageformats_configure.cmake b/qt6-qtimageformats/patches/patch-src_imageformats_configure.cmake
new file mode 100644
index 0000000000..0e474b5f1a
--- /dev/null
+++ b/qt6-qtimageformats/patches/patch-src_imageformats_configure.cmake
@@ -0,0 +1,24 @@
+$NetBSD$
+
+* enable mng
+
+--- src/imageformats/configure.cmake.orig	2021-01-28 05:17:06.000000000 +0000
++++ src/imageformats/configure.cmake
+@@ -17,7 +17,7 @@ set_property(CACHE INPUT_webp PROPERTY S
+ qt_find_package(WrapJasper PROVIDED_TARGETS WrapJasper::WrapJasper MODULE_NAME imageformats QMAKE_LIB jasper)
+ qt_find_package(TIFF PROVIDED_TARGETS TIFF::TIFF MODULE_NAME imageformats QMAKE_LIB tiff)
+ qt_find_package(WrapWebP PROVIDED_TARGETS WrapWebP::WrapWebP MODULE_NAME imageformats QMAKE_LIB webp)
+-
++qt_find_package(WrapMNG PROVIDED_TARGETS PkgConfig::MNG MODULE_NAME imageformats QMAKE_LIB mng)
+ 
+ #### Tests
+ 
+@@ -33,7 +33,7 @@ qt_feature("jasper" PRIVATE
+ qt_feature_definition("jasper" "QT_NO_IMAGEFORMAT_JASPER" NEGATE)
+ qt_feature("mng" PRIVATE
+     LABEL "MNG"
+-    CONDITION libs.mng OR FIXME
++    CONDITION TARGET PkgConfig::MNG
+     DISABLE INPUT_mng STREQUAL 'no'
+ )
+ qt_feature("tiff" PRIVATE
diff --git a/qt6-qtimageformats/patches/patch-src_plugins_imageformats_CMakeLists.txt b/qt6-qtimageformats/patches/patch-src_plugins_imageformats_CMakeLists.txt
new file mode 100644
index 0000000000..9ac15718b0
--- /dev/null
+++ b/qt6-qtimageformats/patches/patch-src_plugins_imageformats_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* enable mng
+
+--- src/plugins/imageformats/CMakeLists.txt.orig	2021-01-28 05:17:06.000000000 +0000
++++ src/plugins/imageformats/CMakeLists.txt
+@@ -24,7 +24,7 @@ endif()
+ if(QT_FEATURE_regularexpression)
+     add_subdirectory(icns)
+ endif()
+-if(QT_FEATURE_mng AND OFF) # special case: FIXME
++if(QT_FEATURE_mng) # special case: FIXME
+     add_subdirectory(mng)
+ endif()
+ if(QT_FEATURE_jasper)
diff --git a/qt6-qtimageformats/patches/patch-src_plugins_imageformats_mng_CMakeLists.txt b/qt6-qtimageformats/patches/patch-src_plugins_imageformats_mng_CMakeLists.txt
new file mode 100644
index 0000000000..62b1d04fa9
--- /dev/null
+++ b/qt6-qtimageformats/patches/patch-src_plugins_imageformats_mng_CMakeLists.txt
@@ -0,0 +1,14 @@
+$NetBSD$
+
+* enable mng
+
+--- src/plugins/imageformats/mng/CMakeLists.txt.orig	2021-01-28 05:17:06.000000000 +0000
++++ src/plugins/imageformats/mng/CMakeLists.txt
+@@ -15,6 +15,7 @@ qt_internal_add_plugin(QMngPlugin
+     PUBLIC_LIBRARIES
+         Qt::Core
+         Qt::Gui
++        PkgConfig::MNG
+ )
+ 
+ #### Keys ignored in scope 1:.:.:mng.pro:<TRUE>:
diff --git a/qt6-qtimageformats/patches/patch-src_plugins_imageformats_tiff_qtiffhandler.cpp b/qt6-qtimageformats/patches/patch-src_plugins_imageformats_tiff_qtiffhandler.cpp
new file mode 100644
index 0000000000..a85ec413ec
--- /dev/null
+++ b/qt6-qtimageformats/patches/patch-src_plugins_imageformats_tiff_qtiffhandler.cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Don't use deprecated APIs, from upstream
+https://code.qt.io/cgit/qt/qtimageformats.git/commit/?id=183e8d70a7a12f99c5a0853d7dae0026e74a91b1
+
+--- src/plugins/imageformats/tiff/qtiffhandler.cpp.orig	2021-02-07 12:11:27.458967159 +0000
++++ src/plugins/imageformats/tiff/qtiffhandler.cpp
+@@ -835,7 +835,7 @@ QVariant QTiffHandler::option(ImageOptio
+ 
+ void QTiffHandler::setOption(ImageOption option, const QVariant &value)
+ {
+-    if (option == CompressionRatio && value.type() == QVariant::Int)
++    if (option == CompressionRatio && value.metaType().id() == QMetaType::Int)
+         d->compression = qBound(0, value.toInt(), 1);
+     if (option == ImageTransformation) {
+         int transformation = value.toInt();


Home | Main Index | Thread Index | Old Index