From 10059156ae82f00be4b2258d64aef0adb0eed21b6a2ed027d19fade37529693e Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 26 Jun 2024 09:36:49 +0000 Subject: [PATCH] Qt6 version of QtPBFImagePlugin OBS-URL: https://build.opensuse.org/package/show/graphics/qt6-qtpbfimageformat?expand=0&rev=1 --- .gitattributes | 23 +++++++++ .gitignore | 1 + QtPBFImagePlugin-3.0.tar.gz | 3 ++ debian.changelog | 85 +++++++++++++++++++++++++++++++++ debian.compat | 1 + debian.control | 11 +++++ debian.rules | 84 +++++++++++++++++++++++++++++++++ pkgconfig.patch | 15 ++++++ qt6-qtpbfimageformat.changes | 91 ++++++++++++++++++++++++++++++++++++ qt6-qtpbfimageformat.spec | 87 ++++++++++++++++++++++++++++++++++ qtpbfplugin.dsc | 9 ++++ 11 files changed, 410 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 QtPBFImagePlugin-3.0.tar.gz create mode 100644 debian.changelog create mode 100644 debian.compat create mode 100644 debian.control create mode 100644 debian.rules create mode 100644 pkgconfig.patch create mode 100644 qt6-qtpbfimageformat.changes create mode 100644 qt6-qtpbfimageformat.spec create mode 100644 qtpbfplugin.dsc diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/QtPBFImagePlugin-3.0.tar.gz b/QtPBFImagePlugin-3.0.tar.gz new file mode 100644 index 0000000..912df2a --- /dev/null +++ b/QtPBFImagePlugin-3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eeeabf61f60c559f536537105741dfa78dd39adbb1b266061cb3b7351b327da3 +size 197675 diff --git a/debian.changelog b/debian.changelog new file mode 100644 index 0000000..0b3fbb6 --- /dev/null +++ b/debian.changelog @@ -0,0 +1,85 @@ +qt5-pbf-image-plugin (3.0) stable; urgency=low + + * Added support for overzoom. + + -- Martin Tuma Sun, 10 Dec 2023 18:24:24 +0100 + +qt5-pbf-image-plugin (2.6) stable; urgency=low + + * Fixed/improved path label layout algorithm. + + -- Martin Tuma Sun, 29 Oct 2023 00:15:51 +0200 + +qt5-pbf-image-plugin (2.5) stable; urgency=low + + * Fixed/improved path label layout algorithm. + * Added Windows dll info. + + -- Martin Tuma Tue, 10 Oct 2023 23:15:30 +0200 + +qt5-pbf-image-plugin (2.4) stable; urgency=low + + * Fixed tile transparency issue. + + -- Martin Tuma Sat, 13 May 2023 08:48:44 +0200 + +qt5-pbf-image-plugin (2.3) stable; urgency=low + + * Added support for Qt6. + * Improved street names layout. + * Added support for layout visibility style option. + + -- Martin Tuma Tue, 29 Dec 2020 10:42:53 +0100 + +qt5-pbf-image-plugin (2.2) stable; urgency=low + + * Do not claim to support all GZIP files, just MVT (protobuf). + + -- Martin Tuma Wed, 15 Apr 2020 23:10:37 +0200 + +qt5-pbf-image-plugin (2.1) stable; urgency=low + + * Fixed broken interpolation of grayscale colors. + + -- Martin Tuma Sun, 26 Jan 2020 16:21:16 +0100 + +qt5-pbf-image-plugin (2.0) stable; urgency=low + + * Now using a tile size of 512px to fit the data and styles. + * Fixed broken downscaling. + * Improved text layout and rendering. + + -- Martin Tuma Sat, 05 Oct 2019 18:57:56 +0200 + +qt5-pbf-image-plugin (1.4) stable; urgency=low + + * Added support for text halo (outline). + + -- Martin Tuma Sun, 28 Apr 2019 09:19:23 +0200 + +qt5-pbf-image-plugin (1.3) stable; urgency=low + + * Added missing support for named (HTML) colors. + * Use the official IANA MIME-type and extension (MVT). + + -- Martin Tuma Sat, 09 Mar 2019 16:13:46 +0100 + +qt5-pbf-image-plugin (1.2) stable; urgency=low + + * Improved text layout and rendering. + * Improved rendering performance. + * Minimal Qt version is now 5.4 (5.6 for HiDPI support) + + -- Martin Tuma Tue, 01 Jan 2019 23:08:40 +0100 + +qt5-pbf-image-plugin (1.1) stable; urgency=low + + * Fixed build on some Qt versions. + + -- Martin Tuma Wed, 05 Dec 2018 22:37:22 +0100 + +qt5-pbf-image-plugin (1.0) stable; urgency=low + + * Initial version. + + -- Martin Tuma Wed, 05 Dec 2018 22:09:57 +0100 diff --git a/debian.compat b/debian.compat new file mode 100644 index 0000000..4511376 --- /dev/null +++ b/debian.compat @@ -0,0 +1 @@ +9 diff --git a/debian.control b/debian.control new file mode 100644 index 0000000..1752334 --- /dev/null +++ b/debian.control @@ -0,0 +1,11 @@ +Source: qt5-pbf-image-plugin +Section: libs +Priority: optional +Maintainer: Martin Tuma +Build-Depends: debhelper (>= 9), qtbase5-dev, qtbase5-dev-tools, qt5-qmake, libprotobuf-dev, protobuf-compiler, zlib1g-dev +Homepage: https://github.com/tumic0/QtPBFImagePlugin + +Package: qt5-pbf-image-plugin +Architecture: any +Depends: ${shlibs:Depends} +Description: Qt image plugin for displaying Mapbox vector tiles. diff --git a/debian.rules b/debian.rules new file mode 100644 index 0000000..019279d --- /dev/null +++ b/debian.rules @@ -0,0 +1,84 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +export QT_SELECT := qt5 + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# Multi-arch +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + qmake pbfplugin.pro + make + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + make clean || true + # --- end custom part for cleaning up + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package + # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/ + mkdir -p /usr/src/packages/BUILD/debian/qt5-pbf-image-plugin/usr/lib/$(DEB_HOST_MULTIARCH)/qt5/plugins/imageformats/ + mkdir -p /usr/src/packages/BUILD/debian/qt5-pbf-image-plugin/usr/share/mime/packages + cp libpbf.so /usr/src/packages/BUILD/debian/qt5-pbf-image-plugin/usr/lib/$(DEB_HOST_MULTIARCH)/qt5/plugins/imageformats/ + cp pkg/pbfplugin.xml /usr/src/packages/BUILD/debian/qt5-pbf-image-plugin/usr/share/mime/packages + # --- end custom part for installing + +# Build architecture-independent files here. +binary-indep: build install + # We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_installexamples + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam + dh_installmime +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/pkgconfig.patch b/pkgconfig.patch new file mode 100644 index 0000000..1c766a7 --- /dev/null +++ b/pkgconfig.patch @@ -0,0 +1,15 @@ +diff --git pbfplugin.pro pbfplugin.pro +index 49e9875..8ba7e8e 100644 +--- pbfplugin.pro ++++ pbfplugin.pro +@@ -39,8 +39,8 @@ RESOURCES += pbfplugin.qrc + DEFINES += QT_NO_DEPRECATED_WARNINGS + + unix:!macx{ +- LIBS += -lprotobuf-lite \ +- -lz ++ CONFIG += link_pkgconfig ++ PKGCONFIG += protobuf-lite zlib + } + win32 { + INCLUDEPATH += $$PROTOBUF/include \ diff --git a/qt6-qtpbfimageformat.changes b/qt6-qtpbfimageformat.changes new file mode 100644 index 0000000..7ff935c --- /dev/null +++ b/qt6-qtpbfimageformat.changes @@ -0,0 +1,91 @@ +------------------------------------------------------------------- +Thu May 23 18:22:49 CEST 2024 - tumic@cbox.cz + +- Qt6 version + * Switched to Qt6. + +------------------------------------------------------------------- +Sun Dec 10 18:22:33 CET 2023 - tumic@cbox.cz + +- Update to version 3.0 + * Added support for overzoom. + +------------------------------------------------------------------- +Sun Oct 29 00:14:40 CEST 2023 - tumic@cbox.cz + +- Update to version 2.6 + * Fixed/improved path label layout algorithm. + +------------------------------------------------------------------- +Tue Oct 10 23:11:44 CEST 2023 - tumic@cbox.cz + +- Update to version 2.5 + * Fixed/improved path label layout algorithm. + * Added Windows dll info. + +------------------------------------------------------------------- +Sat May 13 08:47:13 CEST 2023 - tumic@cbox.cz + +- Update to version 2.4 + * Fixed tile transparency issue. + +------------------------------------------------------------------- +Tue Dec 29 10:38:04 CET 2020 - tumic@cbox.cz + +- Update to version 2.3 + * Added support for Qt6. + * Improved street names layout. + * Added support for layout visibility style option. + +------------------------------------------------------------------- +Wed Apr 15 23:07:35 CEST 2020 - tumic@cbox.cz + +- Update to version 2.2 + * Do not claim to support all GZIP files, just MVT (protobuf). + +------------------------------------------------------------------- +Sun Jan 26 16:21:02 CET 2020 - tumic@cbox.cz + +- Update to version 2.1 + * Fixed broken interpolation of grayscale colors. + +------------------------------------------------------------------- +Sat Oct 5 18:54:25 CEST 2019 - tumic@cbox.cz + +- Update to version 2.0 + * Now using a tile size of 512px to fit the data and styles. + * Fixed broken downscaling. + * Improved text layout and rendering. + +------------------------------------------------------------------- +Sun Apr 28 09:16:42 CEST 2019 - tumic@cbox.cz + +- Update to version 1.4 + * Added support for text halo (outline). + +------------------------------------------------------------------- +Sat Mar 9 16:11:01 CET 2019 - tumic@cbox.cz + +- Update to version 1.3 + * Added missing support for named (HTML) colors. + * Use the official IANA MIME-type and extension (MVT). + +------------------------------------------------------------------- +Tue Jan 1 23:05:36 CET 2019 - tumic@cbox.cz + +- Update to version 1.2 + * Improved text layout and rendering. + * Improved rendering performance. + * Minimal Qt version is now 5.4 (5.6 for HiDPI support) + +------------------------------------------------------------------- +Wed Dec 5 22:37:00 CET 2018 - tumic@cbox.cz + +- Update to version 1.1 + * Fixed build on some Qt versions. + +------------------------------------------------------------------- +Wed Dec 5 22:09:22 CET 2018 - tumic@cbox.cz + +- Update to version 1.0 + * Initial version. diff --git a/qt6-qtpbfimageformat.spec b/qt6-qtpbfimageformat.spec new file mode 100644 index 0000000..621f554 --- /dev/null +++ b/qt6-qtpbfimageformat.spec @@ -0,0 +1,87 @@ +# +# spec file for package libqt5-qtpbfimageformat +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +# See also http://en.opensuse.org/openSUSE:Specfile_guidelines + +Name: qt6-qtpbfimageformat +Version: 3.0 +Release: 1 +Summary: Qt6 PBF Image Format Plugin +License: LGPL-3.0-only +Group: Development/Libraries/X11 +Url: https://github.com/tumic0/QtPBFImagePlugin +Source0: https://github.com/tumic0/QtPBFImagePlugin/archive/%{version}/QtPBFImagePlugin-%{version}.tar.gz +Patch0: pkgconfig.patch + +BuildRequires: gcc-c++ +BuildRequires: make +%if 0%{?suse_version} +BuildRequires: qt6-core-devel +BuildRequires: qt6-gui-devel +BuildRequires: protobuf-devel +BuildRequires: zlib-devel +%else +%if 0%{?fedora_version} +BuildRequires: qt6-qtbase +BuildRequires: qt6-qtbase-gui +BuildRequires: qt6-qtbase-devel +BuildRequires: zlib-devel +BuildRequires: protobuf-lite-devel +%else +# Mageia +BuildRequires: libqt6core-devel +BuildRequires: libqt6gui-devel +%ifarch x86_64 +BuildRequires: lib64protobuf-devel +BuildRequires: lib64zlib-devel +%else +BuildRequires: libprotobuf-devel +BuildRequires: libzlib-devel +%endif +%endif +%endif + +%description +Qt image plugin for displaying Mapbox vector tiles. + +%prep +%setup -q -n QtPBFImagePlugin-%{version} +%patch0 + +%build +%if 0%{?suse_version} +%{qmake6} pbfplugin.pro +%else +%{qmake_qt6} pbfplugin.pro +%endif +make %{?_smp_mflags} + +%install +make install INSTALL_ROOT=%{buildroot} +install -d 755 %{buildroot}/%{_datadir}/mime/packages +install -m 644 pkg/pbfplugin.xml %{buildroot}/%{_datadir}/mime/packages/%{name}.xml + +%files +%if 0%{?suse_version} +%{_qt6_pluginsdir}/imageformats/libpbf.so +%else +%{_qt6_plugindir}/imageformats/libpbf.so +%endif +%{_datadir}/mime/packages/* + +%changelog diff --git a/qtpbfplugin.dsc b/qtpbfplugin.dsc new file mode 100644 index 0000000..38503e7 --- /dev/null +++ b/qtpbfplugin.dsc @@ -0,0 +1,9 @@ +Format: 1.0 +Source: qt5-pbf-image-plugin +Version: 3.0-1 +Binary: qt5-pbf-image-plugin +Maintainer: Martin Tuma +Architecture: any +Build-Depends: debhelper (>= 9), qtbase5-dev, qtbase5-dev-tools, qt5-qmake, libprotobuf-dev, protobuf-compiler, zlib1g-dev +Files: + 00000000000000000000000000000000 0 QtPBFImagePlugin-3.0.tar.gz