From af1871a2250fb89c657168a1e65f8d977fa7eb8b2b4e22ab402b4ee35ae8a888 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Tue, 19 Dec 2023 08:35:13 +0000 Subject: [PATCH] Accepting request 1133407 from home:krop:Appstream Update to 1.0.0 OBS-URL: https://build.opensuse.org/request/show/1133407 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/AppStream?expand=0&rev=108 --- 0001-Fix-lib-name-for-Qt5-link-target.patch | 27 +++ ...ix-missing-or-wrong-value-descriptio.patch | 79 ++++++++ ...-developer-name-tag-deprecated-to-in.patch | 41 ++++ AppStream-0.16.4.tar.xz | 3 - AppStream-0.16.4.tar.xz.asc | 16 -- AppStream-1.0.0.tar.xz | 3 + AppStream-1.0.0.tar.xz.asc | 16 ++ AppStream.changes | 121 ++++++++++++ AppStream.spec | 177 +++++++++++++----- _multibuild | 3 + support-meson0.59.patch | 68 +++---- 11 files changed, 450 insertions(+), 104 deletions(-) create mode 100644 0001-Fix-lib-name-for-Qt5-link-target.patch create mode 100644 0001-content-rating-Fix-missing-or-wrong-value-descriptio.patch create mode 100644 0001-validator-Demote-developer-name-tag-deprecated-to-in.patch delete mode 100644 AppStream-0.16.4.tar.xz delete mode 100644 AppStream-0.16.4.tar.xz.asc create mode 100644 AppStream-1.0.0.tar.xz create mode 100644 AppStream-1.0.0.tar.xz.asc create mode 100644 _multibuild diff --git a/0001-Fix-lib-name-for-Qt5-link-target.patch b/0001-Fix-lib-name-for-Qt5-link-target.patch new file mode 100644 index 0000000..5fc489a --- /dev/null +++ b/0001-Fix-lib-name-for-Qt5-link-target.patch @@ -0,0 +1,27 @@ +From fed92f2a5420b3f2609007a44be7251e9602459e Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Sun, 12 Nov 2023 13:07:13 +0100 +Subject: [PATCH] Fix lib name for Qt5 link target + +--- + qt/cmake/AppStreamQt5Config.cmake.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/qt/cmake/AppStreamQt5Config.cmake.in b/qt/cmake/AppStreamQt5Config.cmake.in +index 0bef7e80..1d66c566 100644 +--- a/qt/cmake/AppStreamQt5Config.cmake.in ++++ b/qt/cmake/AppStreamQt5Config.cmake.in +@@ -32,8 +32,8 @@ add_library(AppStreamQt SHARED IMPORTED) + set_target_properties(AppStreamQt PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/include/" + INTERFACE_LINK_LIBRARIES "Qt5::Core" +- IMPORTED_LOCATION "@LIBDIR_FULL@/libAppStreamQt5.so.${AppStreamQt_VERSION}" +- IMPORTED_SONAME "libAppStreamQt5.${AppStreamQt_VERSION_MAJOR}" ++ IMPORTED_LOCATION "@LIBDIR_FULL@/libAppStreamQt5.so.${AppStreamQt5_VERSION}" ++ IMPORTED_SONAME "libAppStreamQt5.${AppStreamQt5_VERSION_MAJOR}" + ) + + #################################################################################### +-- +2.43.0 + diff --git a/0001-content-rating-Fix-missing-or-wrong-value-descriptio.patch b/0001-content-rating-Fix-missing-or-wrong-value-descriptio.patch new file mode 100644 index 0000000..7fda496 --- /dev/null +++ b/0001-content-rating-Fix-missing-or-wrong-value-descriptio.patch @@ -0,0 +1,79 @@ +From e747fb81715505fc6cf6a6cc36a6dcede34aafb3 Mon Sep 17 00:00:00 2001 +From: Matthias Klumpp +Date: Mon, 27 Nov 2023 15:59:08 +0100 +Subject: [PATCH] content-rating: Fix missing or wrong value descriptions for + rating IDs + +Resolves: #563 +--- + src/as-content-rating.c | 20 +++++++++++--------- + 1 file changed, 11 insertions(+), 9 deletions(-) + +diff --git a/src/as-content-rating.c b/src/as-content-rating.c +index 5046f79d..9fd832ba 100644 +--- a/src/as-content-rating.c ++++ b/src/as-content-rating.c +@@ -877,10 +877,10 @@ static const struct { + "violence-sexual", + /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ + N_("No sexual violence"), +- /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ +- N_("Rape or other violent sexual behavior"), + NULL, + NULL, ++ /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ ++ N_("Rape or other violent sexual behavior"), + }, + { + "drugs-alcohol", +@@ -920,7 +920,8 @@ static const struct { + N_("Brief artistic nudity"), + /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ + N_("Prolonged nudity"), +- NULL, ++ /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ ++ N_("Explicit nudity involving visible sexual organs"), + }, + { + "sex-themes", +@@ -1013,19 +1014,20 @@ static const struct { + "social-audio", + /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ + N_("No way to talk with other users"), ++ NULL, ++ /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ ++ N_("Moderated audio or video chat functionality between users"), + /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ + N_("Uncontrolled audio or video chat functionality between users"), +- NULL, +- NULL, + }, + { + "social-contacts", + /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ + N_("No sharing of social network usernames or email addresses"), +- /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ +- N_("Sharing social network usernames or email addresses"), + NULL, + NULL, ++ /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ ++ N_("Sharing social network usernames or email addresses"), + }, + { + "social-info", +@@ -1042,10 +1044,10 @@ static const struct { + "social-location", + /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ + N_("No sharing of physical location with other users"), +- /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ +- N_("Sharing physical location with other users"), + NULL, + NULL, ++ /* TRANSLATORS: content rating description, see https://hughsie.github.io/oars/ */ ++ N_("Sharing physical location with other users"), + }, + + /* v1.1 */ +-- +2.43.0 + diff --git a/0001-validator-Demote-developer-name-tag-deprecated-to-in.patch b/0001-validator-Demote-developer-name-tag-deprecated-to-in.patch new file mode 100644 index 0000000..bc5e839 --- /dev/null +++ b/0001-validator-Demote-developer-name-tag-deprecated-to-in.patch @@ -0,0 +1,41 @@ +From 6a8306178dabf3d650e2ad794d8b0a316e7ccb50 Mon Sep 17 00:00:00 2001 +From: Matthias Klumpp +Date: Sat, 25 Nov 2023 02:42:10 +0100 +Subject: [PATCH] validator: Demote developer-name-tag-deprecated to info + severity for now + +Resolves: #560 +--- + src/as-validator-issue-tag.h | 2 +- + src/as-validator.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/as-validator-issue-tag.h b/src/as-validator-issue-tag.h +index 48f0bec..3c40c01 100644 +--- a/src/as-validator-issue-tag.h ++++ b/src/as-validator-issue-tag.h +@@ -566,7 +566,7 @@ AsValidatorIssueTag as_validator_issue_tag_list[] = { + }, + + { "developer-name-tag-deprecated", +- AS_ISSUE_SEVERITY_WARNING, ++ AS_ISSUE_SEVERITY_INFO, + /* TRANSLATORS: Please do not translate AppStream tag and property names (in backticks). */ + N_("The toplevel `developer_name` element is deprecated. Please use the `name` element in a " + "`developer` block instead."), +diff --git a/src/as-validator.c b/src/as-validator.c +index 1c3bc8f..dadb51e 100644 +--- a/src/as-validator.c ++++ b/src/as-validator.c +@@ -645,6 +645,8 @@ as_validator_add_override (AsValidator *validator, + "tag-empty", + /* allow GNOME to validate metadata using its new versioning scheme (until a better solution is found) */ + "releases-not-in-order", ++ /* allowed for a while, as part of the deprecation phase */ ++ "developer-name-tag-deprecated", + NULL + }; + +-- +2.43.0 + diff --git a/AppStream-0.16.4.tar.xz b/AppStream-0.16.4.tar.xz deleted file mode 100644 index 6d269fb..0000000 --- a/AppStream-0.16.4.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d4f722d79c6a2f29d9dc5c6f464927469543353f386581c778c9bed7c60a54ed -size 2570176 diff --git a/AppStream-0.16.4.tar.xz.asc b/AppStream-0.16.4.tar.xz.asc deleted file mode 100644 index 4be04a4..0000000 --- a/AppStream-0.16.4.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCAAdFiEE0zo/DKFrCsxRpgc4SUyKX79N7OsFAmVOkngACgkQSUyKX79N -7OuRxA//fS7F5jcyleq33ki3y9G3TJhHpNHRE09Jm8xOgFzibJTLg9XUOF05/jjb -ZYFMPRprcuQ+svUpvDe710+5l2QuJG7u+88AdpO2qE1ZT7FUMV7vGhmRiv9uhZLB -6IkyZzycZV1Lxyx9o9697Xllw0Uu7Ei23JOUz36l16YkPLKkEJOC9TJtjLk2qf63 -EAIiEZ3maX14k6dyQdXdq2e15uqclgu0Mr3RVAKzOSwkZEFTZDNC7/BTT1sX3+aJ -opMflbWsHPKl7hZmv+xvIVTcK4KMGENJpKVzosg/AYawD/i9v/Z+pS7Nie9+jLBP -6RcSJIYHTioPWkElzWgky10dpIKdl/1Cg1rirsJX/JrRvbyMg012TtlZBNtpyyJo -IL+dQoJrR0GyiuikgJ/3lf47aZKNoIDKu1SJ8Mjjb4QVM8CVuQ0LvREQ2AlTk2mQ -5TvYW2PjsUhOzDC1INZ27sCB/+oYgSi4HdhWt8xQdpBznn2FsPgFK0KDJVofgO5r -1H+IydG/7gVK1ujKkxcX/vVIxcR8tohk1sUr4PzxFy2eURAP+Ji99MmjmVoOKsuU -XXA2CPYSiodwAEGqk9MfK4IK6CCPR605n7XfKRw5oWOFgyYx1pIq2S8h1rHs0E9E -+j6lRg00o0Ss4RmlorWthBytB5RoKQIeKHlvhLXVZ71N13O2wbo= -=Fd8i ------END PGP SIGNATURE----- diff --git a/AppStream-1.0.0.tar.xz b/AppStream-1.0.0.tar.xz new file mode 100644 index 0000000..ea7ccb1 --- /dev/null +++ b/AppStream-1.0.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef23477a380e8b525e92cfa87687f1146b9cef74c641349a1ae11250be5401d0 +size 2683916 diff --git a/AppStream-1.0.0.tar.xz.asc b/AppStream-1.0.0.tar.xz.asc new file mode 100644 index 0000000..e0a4b20 --- /dev/null +++ b/AppStream-1.0.0.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEE0zo/DKFrCsxRpgc4SUyKX79N7OsFAmVPzIYACgkQSUyKX79N +7Ov/Ng//YSZb/6TmVJQIoiulT8rFUlAmWgYVRzdPvbxLvvFmxV5SODkJ2jlOWUGz +tv38vU2Wl0vTxYoNMIOWuZo+sUk8IUw/02KfPVlllXqlyuXDW/Kgaww2HKifJhm1 +tEgxZ53CoNVP+GgOWhhN8IzBWFCbczHeOgsT1GsbJQuGP3HXBRx6oBzMkild6TxT +7WEnTTAndQ0+pyCvM6hR1W982fz2PFeK1JcrXVEbzlPLTBCx8LCy2IWOT9aNv+mC +HXXfrCRaA9SDK1egxTHupIR3u36YudE7x+IitAs9P6x18QvWFZrK4Sj/mZz0HcK9 +HrLDcb0zDne904ZN80Qojqb8Rn3bVYh31F1Wf6C9p5HrvGM7+onVj8KT/k7nDq11 +xSE202mQEhPZHwwoNTiJ9DDDK853vDaeqqsNh8190MqIsau4O3VelODV7ot825hA +URUiYc+lhYM67UKv8RdEQ1lP0F0MPH9vyeQUIjpnWLf6lZA5wCRv5G7wRq3YPAUp +muX/t6B5FJ6PW6THqIBqwxDInqgqPPVMHQh3WJzyfj2W3o8CN/tWRyjK9G025XqD +CxRwQ7UMeW5Pb7Trn/Y1oPWQZqywQ6njawAOdGCzdt+PGLzkMoEOdY/8GL6atCCA +l5FTk/8crtYUZTOEUSaArFTg5JQzafjElefXHkZU4DAkmeshlPE= +=Fujg +-----END PGP SIGNATURE----- diff --git a/AppStream.changes b/AppStream.changes index 724c2cf..71bc2b8 100644 --- a/AppStream.changes +++ b/AppStream.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Fri Dec 15 11:12:14 UTC 2023 - Christophe Marin + +- Use GCC 12 for building on Leap + +------------------------------------------------------------------- +Wed Dec 13 09:30:30 UTC 2023 - Christophe Marin + +- Add upstream change to fix a couple test issues (related to boo#1217047) + * 0001-validator-Demote-developer-name-tag-deprecated-to-in.patch +- Add more changes: + * 0001-content-rating-Fix-missing-or-wrong-value-descriptio.patch + * 0001-Fix-lib-name-for-Qt5-link-target.patch +- Add a Qt6 multibuild flavor + ------------------------------------------------------------------- Mon Dec 11 09:13:59 UTC 2023 - Frederic Crozat @@ -9,6 +24,112 @@ Tue Dec 5 15:53:26 UTC 2023 - Antonio Larrosa - Make AppStream-compose-devel require the same version of libappstream-compose0. +------------------------------------------------------------------- +Wed Nov 22 09:02:34 UTC 2023 - Christophe Marin + +- Update to 1.0.0. Note that this release has some breaking API + changes. + Features: + * Autoformat C and C++ sources + * Remove all deprecated symbols + * Drop support for many deprecated AppStream XML features + * Use GPtrArray to expose keywords list + * Add length argument to raw metadata parsing functions + * Add component array container class + * Remove named values for display_length relations + * Make AsPool only accept/return component boxes + * Port all API away from per-entity locale overrides + * Reduce appstream.conf to its essentials, make it work on stateless systems + * Hide search engine details from public API + * Wrap release entries in AsReleaseList container class + * Make AsMetadata handle AsReleaseList objects + * Refactor is_satisfied result into new RelationCheckResult class + * Add a method to check all relations of a component and get the result + * Add algorithm to score compatibility with a system, add chassis templates + * ascli: Add new check-syscompat command to check chassis compatibility + * Implement environment property for component screenshots + * Autogenerate translatable DE and gui-environment-style C arrays + * Expose more advanced markup conversion function, update function names + * Allow BLAKE3 and SHA512 checksums for release artifacts + * Stop supporting mailto: URLs in tags + * validator: Improve API and simplify it + * validator: Parse XML in pedantic mode when validating + * validator: Check screenshot environment property + * validator: Only apply summary-has-dot-suffix check to untranslated strings + * compose: Allow creating metadata with complete URLs and no base URL + * spdx: Add API to retrieve a translated license name from an SPDX ID + * qt: Switch to building with Qt6 + * qt: Make it possible to iterate ComponentBox + * qt: Implement AppStream::ComponentBox::erase + * qt: Allow concatenating two ComponentBoxes + * qt: Allow loading Pool asynchronously + * qt: Use ComponentBox/Releases in Qt bindings as well + * qt: Add support for the new API to check relation satisfaction + * qt: Maintenance and namespace fixes, use cPtr() to get C pointers everywhere + * bundle: Add linglong as a new type of bundle + * Add GUI environment IDs for macOS and Microsoft Windows + * validator: Check if Release Description is inside description tag + * validator: Add validation for content_rating + * Add support for building on Win32 + * win32: change some file/path-related code for portability + * Implement the developer element for unique developer IDs + * Implement scaling factor for screenshots + * component-box: Allow removal of components by-index + * Implement support for external references and citations + * Implement usertags for release data as well + * Move ValueFlags to the context, instead of tieing them to components + * pool: search: Add additional weight for exact substring matches on names + * sysinfo: Add memory size detection support for macOS + * Add support for Zstd for on-disk data compression + * utils: Make tar unpacker independent of zstd binary presence + * Drop Python2 provided tag support + * data: Add ‘Endless’ to the list of desktops + * Add NetBSD support + + Specification: + * Drop (most) deprecated information + * docs: Clarify environment-based screenshot ordering + * Add new 'snapshot' release kind + * docs: Build all API documentation with gi-docgen + * spec: Document the new "developer" element + * spec: Document the "reference" tag for registry references + * docs: Add example of YAML for references elements + * Allow hyphens in the last segment of a component-ID + * docs: Drop outdated information from l10n quickstart guide + + Bugfixes: + * meson: check for docbook xsl stylesheets + * Fix tweaking of appstream.pc when building as subproject + * Fix crash in asc_l10n_search_translations_qt() + * qt: Make Qt6 dependency a system dependency. + * meson: do not rely on an exe wrapper + * meson: do not -I/usr/include when !stemmer + * meson: Prevent building attempts with MSVC + * meson: Use an SPDX license indentifier in project(license:) + * Add meson overrides + * compose: Set lower-cased CID for synthesized components again + * compose: Set lower-cased CID in desktop-entry parse function + * compose: Honor prefix in font search + * compose: Select the correct default icon glyphs for fonts + * Don't crash when non-YAML documents are read as YAML + * Do not override default-priority when parsing multiple metadata files + * Ensure stemmer always has the right locale and token-search works + * Require a more recent libxmlb to avoid crashes + * Rename component get_releases to indicate that releases may not be loaded from the web + * Prevent string-id validation functions from matching source comments + * Don't define _POSIX_C_SOURCE when building for NetBSD + + Miscellaneous: + * Explain metainfo-ancient error in more detail + * Make sed invocation more portable + * Add FreeBSD CI + * Allow variable shadowing in C++ code + * Drop the catchall as-enums unit + * vapi: Drop unneeded metadata + * Make AsMetadata return a component box for multiple components + * apt: Make item descriptions more human-friendly + * Streamline README + ------------------------------------------------------------------- Wed Nov 15 12:08:06 UTC 2023 - Bjørn Lie diff --git a/AppStream.spec b/AppStream.spec index 027518a..37a3e7f 100644 --- a/AppStream.spec +++ b/AppStream.spec @@ -15,26 +15,46 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # - -%define libappstream_sover 4 -%define libAppStreamQt_sover 2 -%define libappstream_compose_sover 0 -%if 0%{?sle_version} >= 150300 && 0%{?is_opensuse} || 0%{?sle_version} >= 150600 || 0%{?suse_version} > 1500 +%global flavor @BUILD_FLAVOR@%{nil} +%if "%flavor" == "qt6" +%define pkg_suffix -qt6 +%define qt6 1 +%define min_qt_version 6.2.4 +%else +%define min_qt_version 5.15 +%if 0%{?sle_version} >= 150400 && 0%{?is_opensuse} || 0%{?sle_version} >= 150600 || 0%{?suse_version} > 1500 %bcond_without vala %endif -Name: AppStream -Version: 0.16.4 +%endif +# The default Leap compiler is too old for building AppStream-qt6. use the same compiler for both flavors +%if 0%{?suse_version} == 1500 +%bcond_without gcc12 +%endif +%define rname AppStream +%define libappstream_sover 5 +%define libAppStreamQt_sover 3 +%define libappstream_compose_sover 0 +Name: AppStream%{?pkg_suffix} +Version: 1.0.0 Release: 0 Summary: Tools and libraries to work with AppStream metadata License: LGPL-2.1-or-later -Group: Development/Libraries/C and C++ URL: https://www.freedesktop.org/software/appstream/docs/ -Source0: http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz -Source1: http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz.asc -Source2: %{name}.keyring +Source0: http://www.freedesktop.org/software/appstream/releases/%{rname}-%{version}.tar.xz +Source1: http://www.freedesktop.org/software/appstream/releases/%{rname}-%{version}.tar.xz.asc +Source2: AppStream.keyring +# PATCH-FIX-OPENSUSE Patch0: support-meson0.59.patch +# PATCH-FIX-UPSTREAM +Patch1: 0001-validator-Demote-developer-name-tag-deprecated-to-in.patch +Patch2: 0001-content-rating-Fix-missing-or-wrong-value-descriptio.patch +Patch3: 0001-Fix-lib-name-for-Qt5-link-target.patch BuildRequires: cairo-devel BuildRequires: docbook-xsl-stylesheets +%if %{with gcc12} +BuildRequires: gcc12 +BuildRequires: gcc12-c++ +%endif BuildRequires: gdk-pixbuf-loader-rsvg BuildRequires: gettext BuildRequires: gperf @@ -42,8 +62,13 @@ BuildRequires: itstool BuildRequires: meson >= 0.59 BuildRequires: pkgconfig BuildRequires: xsltproc -BuildRequires: pkgconfig(Qt5Core) -BuildRequires: pkgconfig(Qt5Test) +%if 0%{?qt6} +BuildRequires: pkgconfig(Qt6Core) >= %{min_qt_version} +BuildRequires: pkgconfig(Qt6Test) >= %{min_qt_version} +%else +BuildRequires: pkgconfig(Qt5Core) >= %{min_qt_version} +BuildRequires: pkgconfig(Qt5Test) >= %{min_qt_version} +%endif BuildRequires: pkgconfig(gdk-pixbuf-2.0) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(glib-2.0) >= 2.62 @@ -64,30 +89,49 @@ BuildRequires: vala AppStream-Core makes it easy to access application information from the AppStream database over a nice GObject-based interface. +%if 0%{?qt6} +%package -n libAppStreamQt%{libAppStreamQt_sover} +Summary: Qt 6 bindings for AppStream +License: GPL-2.0-or-later AND LGPL-2.1-or-later + +%description -n libAppStreamQt%{libAppStreamQt_sover} +The Qt 6 bindings for AppStream. + +%package -n appstream-qt6-devel +Summary: Header files for AppStream's Qt 6 bindings +License: GPL-2.0-or-later AND LGPL-2.1-or-later +Requires: libAppStreamQt%{libAppStreamQt_sover} = %{version} +Requires: libappstream%{libappstream_sover} = %{version} + +%description -n appstream-qt6-devel +This package contains all necessary include files, libraries, +configuration files and development tools (with manual pages) needed to +compile and link applications using the Qt bindings for AppStream. +%else %package -n libappstream%{libappstream_sover} Summary: The main library for AppStream License: GPL-2.0-or-later AND LGPL-2.1-or-later -Group: System/Libraries %description -n libappstream%{libappstream_sover} The main library for AppStream. -%package -n libAppStreamQt%{libAppStreamQt_sover} -Summary: Qt5 bindings for AppStream +%package -n libAppStreamQt5-%{libAppStreamQt_sover} +Summary: Qt 5 bindings for AppStream License: GPL-2.0-or-later AND LGPL-2.1-or-later -Group: System/Libraries -%description -n libAppStreamQt%{libAppStreamQt_sover} -The Qt5 bindings for AppStream. +%description -n libAppStreamQt5-%{libAppStreamQt_sover} +The Qt 5 bindings for AppStream. -%package -n libAppStreamQt-devel -Summary: Header files for AppStream's Qt5 bindings +%package -n appstream-qt5-devel +Summary: Header files for AppStream's Qt 5 bindings License: GPL-2.0-or-later AND LGPL-2.1-or-later -Group: Development/Libraries/C and C++ -Requires: libAppStreamQt%{libAppStreamQt_sover} = %{version} +Requires: libAppStreamQt5-%{libAppStreamQt_sover} = %{version} Requires: libappstream%{libappstream_sover} = %{version} +# Renamed after the 1.0.0 release +Provides: libAppStreamQt-devel = %{version} +Obsoletes: libAppStreamQt-devel < %{version} -%description -n libAppStreamQt-devel +%description -n appstream-qt5-devel This package contains all necessary include files, libraries, configuration files and development tools (with manual pages) needed to compile and link applications using the Qt bindings for AppStream. @@ -95,8 +139,7 @@ compile and link applications using the Qt bindings for AppStream. %package compose Summary: Support for appstreamcli compose License: GPL-2.0-or-later AND LGPL-2.1-or-later -Group: System/Libraries -Requires: %{name} = %{version} +Requires: AppStream = %{version} Requires: gdk-pixbuf-loader-rsvg %description compose @@ -106,7 +149,6 @@ configuration files to add compose support to appstreamcli. %package -n libappstream-compose%{libappstream_compose_sover} Summary: Libraries for appstream compose support License: GPL-2.0-or-later AND LGPL-2.1-or-later -Group: System/Libraries %description -n libappstream-compose%{libappstream_compose_sover} The library for AppStream compose support. @@ -114,8 +156,7 @@ The library for AppStream compose support. %package compose-devel Summary: Header files for AppStream Compose support License: GPL-2.0-or-later AND LGPL-2.1-or-later -Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} +Requires: AppStream = %{version} Requires: AppStream-compose = %{version} Requires: libappstream-compose%{libappstream_compose_sover} = %{version} @@ -126,8 +167,7 @@ configuration files to add compose support using compose. %package devel Summary: Header files for AppStream development License: GPL-2.0-or-later -Group: Development/Libraries/C and C++ -Requires: %{name} = %{version} +Requires: AppStream = %{version} Requires: libappstream%{libappstream_sover} = %{version} %description devel @@ -140,7 +180,6 @@ This package contains the documentation for AppStream. %package doc Summary: Documentation for AppStream License: GPL-2.0-or-later -Group: Documentation/HTML BuildArch: noarch %description doc @@ -166,21 +205,31 @@ Group: System/Libraries GObject introspection bindings for interfaces provided by AppStream. %lang_package +%endif %prep -%autosetup -p1 +%autosetup -p1 -n %{rname}-%{version} %build -%meson -Dqt=true \ - -Dcompose=true \ +%define common_options -Ddocs=false -Dapidocs=false -Dstemming=false %if %{with vala} - -Dvapi=true \ +%define build_vapi true %else - -Dvapi=false \ +%define build_vapi false %endif - -Ddocs=false \ - -Dapidocs=false \ - -Dstemming=false + +%if 0%{?qt6} +%define options -Dqt=true -Dvapi=false -Dcompose=false -Dgir=false +%else +%define options -Dqt5=true -Dcompose=true -Dvapi=%{build_vapi} +%endif + +%if %{with gcc12} +export CC=gcc-12 CXX=g++-12 +%endif + +%meson %{common_options} %{options} + %meson_build %install @@ -189,21 +238,46 @@ GObject introspection bindings for interfaces provided by AppStream. # Unneeded test file rm -r %{buildroot}%{_datadir}/installed-tests +# Only keep the Qt6 library when using the qt6 flavor +%if 0%{?qt6} +rm %{buildroot}%{_bindir}/appstreamcli +rm %{buildroot}%{_libdir}/libappstream.so* +rm -r %{buildroot}%{_datadir}/{appstream,doc,gettext,locale,man,metainfo} +rm -r %{buildroot}%{_includedir}/appstream +rm -r %{buildroot}%{_libdir}/pkgconfig +%else +%find_lang appstream %{name}.lang +%endif + %check %meson_test -%find_lang appstream %{name}.lang - -%ldconfig_scriptlets -n libappstream%{libappstream_sover} +%if 0%{?qt6} %ldconfig_scriptlets -n libAppStreamQt%{libAppStreamQt_sover} +%else +%ldconfig_scriptlets -n libappstream%{libappstream_sover} +%ldconfig_scriptlets -n libAppStreamQt5-%{libAppStreamQt_sover} %ldconfig_scriptlets -n libappstream-compose%{libappstream_compose_sover} +%endif +%if 0%{?qt6} +%files -n libAppStreamQt%{libAppStreamQt_sover} +%{_libdir}/libAppStreamQt.so.%{libAppStreamQt_sover} +%{_libdir}/libAppStreamQt.so.%{version} + +%files -n appstream-qt6-devel +%{_includedir}/AppStreamQt/ +%{_libdir}/cmake/AppStreamQt/ +%{_libdir}/libAppStreamQt.so + +%else %files lang -f %{name}.lang %files %doc NEWS %{_bindir}/appstreamcli -%config(noreplace) %{_sysconfdir}/appstream.conf +%dir %{_datadir}/appstream +%{_datadir}/appstream/appstream.conf %dir %{_datadir}/metainfo %{_datadir}/metainfo/org.freedesktop.appstream.cli.metainfo.xml %{_mandir}/man1/appstreamcli.* @@ -213,14 +287,14 @@ rm -r %{buildroot}%{_datadir}/installed-tests %{_libdir}/libappstream.so.%{libappstream_sover} %{_libdir}/libappstream.so.%{version} -%files -n libAppStreamQt%{libAppStreamQt_sover} -%{_libdir}/libAppStreamQt.so.%{libAppStreamQt_sover} -%{_libdir}/libAppStreamQt.so.%{version} +%files -n libAppStreamQt5-%{libAppStreamQt_sover} +%{_libdir}/libAppStreamQt5.so.%{libAppStreamQt_sover} +%{_libdir}/libAppStreamQt5.so.%{version} -%files -n libAppStreamQt-devel -%{_includedir}/AppStreamQt/ -%{_libdir}/cmake/AppStreamQt/ -%{_libdir}/libAppStreamQt.so +%files -n appstream-qt5-devel +%{_includedir}/AppStreamQt5/ +%{_libdir}/cmake/AppStreamQt5/ +%{_libdir}/libAppStreamQt5.so %files compose %{_datadir}/metainfo/org.freedesktop.appstream.compose.metainfo.xml @@ -258,5 +332,6 @@ rm -r %{buildroot}%{_datadir}/installed-tests %files -n typelib-1_0-AppStream-compose-1.0 %{_libdir}/girepository-1.0/AppStreamCompose-1.0.typelib +%endif %changelog diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..0467171 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + qt6 + diff --git a/support-meson0.59.patch b/support-meson0.59.patch index fa9feae..3594eac 100644 --- a/support-meson0.59.patch +++ b/support-meson0.59.patch @@ -1,11 +1,20 @@ -Index: AppStream-0.16.4/data/meson.build -=================================================================== ---- AppStream-0.16.4.orig/data/meson.build -+++ AppStream-0.16.4/data/meson.build -@@ -17,6 +17,17 @@ metainfo_with_relinfo = custom_target('g +Add patch to support meson 0.59 which is the only version available in SLE 15 SP5 +Author: Antonio Larrosa + +--- + data/meson.build | 12 ++++++++++++ + meson.build | 4 ++-- + po/meson.build | 15 +++++++++++++++ + 3 files changed, 29 insertions(+), 2 deletions(-) + +diff --git a/data/meson.build b/data/meson.build +index 7ae7a9b3..b9208821 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -24,6 +24,17 @@ metainfo_with_relinfo = custom_target('gen-output', command : [ascli_exe, 'news-to-metainfo', '--limit=6', '@INPUT0@', '@INPUT1@', '@OUTPUT@'] ) - + +if meson.version().version_compare('<0.62') +metainfo_i18n = i18n.merge_file ( + input: metainfo_with_relinfo, @@ -20,26 +29,26 @@ Index: AppStream-0.16.4/data/meson.build metainfo_i18n = i18n.itstool_join( input: metainfo_with_relinfo, output: 'org.freedesktop.appstream.cli.metainfo.xml', -@@ -25,6 +36,7 @@ metainfo_i18n = i18n.itstool_join( +@@ -32,6 +43,7 @@ metainfo_i18n = i18n.itstool_join( install: true, install_dir: metainfo_dir, ) +endif - + test('as-validate_metainfo.cli', ascli_exe, -Index: AppStream-0.16.4/meson.build -=================================================================== ---- AppStream-0.16.4.orig/meson.build -+++ AppStream-0.16.4/meson.build +diff --git a/meson.build b/meson.build +index 4636789f..6742fc7c 100644 +--- a/meson.build ++++ b/meson.build @@ -1,5 +1,5 @@ project('AppStream', 'c', - meson_version: '>=0.62', + meson_version: '>=0.59', - default_options: ['c_std=c11', 'cpp_std=gnu++14'], - - license: 'LGPL-2.1+', -@@ -113,7 +113,7 @@ add_project_arguments( + default_options: ['c_std=c11', 'cpp_std=gnu++17'], + + license: 'LGPL-2.1-or-later', +@@ -107,7 +107,7 @@ add_project_arguments( '-Werror=missing-include-dirs', '-Werror=declaration-after-statement', '-Werror=format-security', @@ -48,23 +57,12 @@ Index: AppStream-0.16.4/meson.build '-Wno-missing-field-initializers', '-Wno-error=missing-field-initializers', '-Wno-unused-parameter', -@@ -131,9 +131,7 @@ add_project_arguments( - '-Werror=return-type', - '-Werror=misleading-indentation', - '-Werror=format-security', -- -- # NOTE: Can be removed with AppStream 1.0 -- '-Wno-error=c++20-compat', -+ '-Werror=format', - language: 'cpp' - ) - -Index: AppStream-0.16.4/po/meson.build -=================================================================== ---- AppStream-0.16.4.orig/po/meson.build -+++ AppStream-0.16.4/po/meson.build +diff --git a/po/meson.build b/po/meson.build +index e9ede195..f7c1d842 100644 +--- a/po/meson.build ++++ b/po/meson.build @@ -1,5 +1,19 @@ - + as_gettext_domain = 'appstream' +if meson.version().version_compare('<0.62') +i18n.gettext(as_gettext_domain, @@ -83,11 +81,13 @@ Index: AppStream-0.16.4/po/meson.build i18n_result = i18n.gettext(as_gettext_domain, preset : 'glib', data_dirs: [join_paths(source_root, 'data')], -@@ -12,6 +26,7 @@ i18n_result = i18n.gettext(as_gettext_do +@@ -12,6 +26,7 @@ i18n_result = i18n.gettext(as_gettext_domain, '--msgid-bugs-address=appstream@lists.freedesktop.org' ] ) +endif - + run_target ('make-linguas', command: ['sh', +-- +2.42.1