From 064e9b5a50e282f63b5009e535bf601099dcdece Mon Sep 17 00:00:00 2001 From: Luciogi Date: Sat, 9 Mar 2024 13:01:10 +0500 Subject: [PATCH] accounts-qml-modules: build with qt6, change distfiles --- .../patches/678c493a.patch | 241 ------------------ .../accounts-qml-module/patches/werror.patch | 11 - srcpkgs/accounts-qml-module/template | 30 ++- 3 files changed, 24 insertions(+), 258 deletions(-) delete mode 100644 srcpkgs/accounts-qml-module/patches/678c493a.patch delete mode 100644 srcpkgs/accounts-qml-module/patches/werror.patch diff --git a/srcpkgs/accounts-qml-module/patches/678c493a.patch b/srcpkgs/accounts-qml-module/patches/678c493a.patch deleted file mode 100644 index 7c9956cfee1..00000000000 --- a/srcpkgs/accounts-qml-module/patches/678c493a.patch +++ /dev/null @@ -1,241 +0,0 @@ -From 678c493a083a92d1fda2375f5d2e37c00c7b9a7e Mon Sep 17 00:00:00 2001 -From: Alberto Mardegan -Date: Tue, 9 Jan 2018 18:23:57 +0300 -Subject: [PATCH] Build: add qmltypes file to repository - -Generating the file at build time is troublesome when cross-compiling. -It's better to add the generated file to the repository and add a make -target to rebuild it. ---- - src/plugin.qmltypes | 187 ++++++++++++++++++++++++++++++++++++++++++++ - src/src.pro | 19 +---- - 2 files changed, 191 insertions(+), 15 deletions(-) - create mode 100644 src/plugin.qmltypes - -diff --git a/src/plugin.qmltypes b/src/plugin.qmltypes -new file mode 100644 -index 0000000..8481efe ---- /dev/null -+++ b/src/plugin.qmltypes -@@ -0,0 +1,187 @@ -+import QtQuick.tooling 1.2 -+ -+// This file describes the plugin-supplied types contained in the library. -+// It is used for QML tooling purposes only. -+// -+// This file was auto-generated by: -+// 'qmlplugindump -notrelocatable Ubuntu.OnlineAccounts 0.1 .' -+ -+Module { -+ dependencies: ["QtQuick 2.8"] -+ Component { -+ name: "OnlineAccounts::Account" -+ prototype: "QObject" -+ exports: ["Ubuntu.OnlineAccounts/Account 0.1"] -+ exportMetaObjectRevisions: [0] -+ Enum { -+ name: "RemovalOption" -+ values: { -+ "RemoveAccountOnly": 0, -+ "RemoveCredentials": 1 -+ } -+ } -+ Enum { -+ name: "RemovalOptions" -+ values: { -+ "RemoveAccountOnly": 0, -+ "RemoveCredentials": 1 -+ } -+ } -+ Property { name: "objectHandle"; type: "QObject"; isPointer: true } -+ Property { name: "enabled"; type: "bool"; isReadonly: true } -+ Property { name: "provider"; type: "QVariantMap"; isReadonly: true } -+ Property { name: "displayName"; type: "string"; isReadonly: true } -+ Property { name: "accountId"; type: "uint"; isReadonly: true } -+ Property { name: "accountServiceHandle"; type: "QObject"; isReadonly: true; isPointer: true } -+ Signal { name: "synced" } -+ Signal { name: "removed" } -+ Method { -+ name: "updateDisplayName" -+ Parameter { name: "displayName"; type: "string" } -+ } -+ Method { -+ name: "updateEnabled" -+ Parameter { name: "enabled"; type: "bool" } -+ } -+ Method { name: "sync" } -+ Method { -+ name: "remove" -+ Parameter { name: "options"; type: "RemovalOptions" } -+ } -+ Method { name: "remove" } -+ } -+ Component { -+ name: "OnlineAccounts::AccountService" -+ prototype: "QObject" -+ exports: ["Ubuntu.OnlineAccounts/AccountService 0.1"] -+ exportMetaObjectRevisions: [0] -+ Enum { -+ name: "ErrorCode" -+ values: { -+ "NoError": 0, -+ "NoAccountError": 1, -+ "UserCanceledError": 2, -+ "PermissionDeniedError": 3, -+ "NetworkError": 4, -+ "SslError": 5, -+ "InteractionRequiredError": 6 -+ } -+ } -+ Property { name: "objectHandle"; type: "QObject"; isPointer: true } -+ Property { name: "enabled"; type: "bool"; isReadonly: true } -+ Property { name: "serviceEnabled"; type: "bool"; isReadonly: true } -+ Property { name: "provider"; type: "QVariantMap"; isReadonly: true } -+ Property { name: "service"; type: "QVariantMap"; isReadonly: true } -+ Property { name: "displayName"; type: "string"; isReadonly: true } -+ Property { name: "accountId"; type: "uint"; isReadonly: true } -+ Property { name: "settings"; type: "QVariantMap"; isReadonly: true } -+ Property { name: "authData"; type: "QVariantMap"; isReadonly: true } -+ Property { name: "autoSync"; type: "bool" } -+ Property { name: "credentials"; type: "QObject"; isPointer: true } -+ Signal { -+ name: "authenticated" -+ Parameter { name: "reply"; type: "QVariantMap" } -+ } -+ Signal { -+ name: "authenticationError" -+ Parameter { name: "error"; type: "QVariantMap" } -+ } -+ Method { -+ name: "authenticate" -+ Parameter { name: "sessionData"; type: "QVariantMap" } -+ } -+ Method { name: "authenticate" } -+ Method { name: "cancelAuthentication" } -+ Method { -+ name: "updateServiceEnabled" -+ Parameter { name: "enabled"; type: "bool" } -+ } -+ Method { -+ name: "updateSettings" -+ Parameter { name: "settings"; type: "QVariantMap" } -+ } -+ } -+ Component { -+ name: "OnlineAccounts::AccountServiceModel" -+ prototype: "QAbstractListModel" -+ exports: ["Ubuntu.OnlineAccounts/AccountServiceModel 0.1"] -+ exportMetaObjectRevisions: [0] -+ Property { name: "count"; type: "int"; isReadonly: true } -+ Property { name: "includeDisabled"; type: "bool" } -+ Property { name: "accountId"; type: "uint" } -+ Property { name: "account"; type: "QObject"; isPointer: true } -+ Property { name: "applicationId"; type: "string" } -+ Property { name: "provider"; type: "string" } -+ Property { name: "serviceType"; type: "string" } -+ Property { name: "service"; type: "string" } -+ Method { -+ name: "get" -+ type: "QVariant" -+ Parameter { name: "row"; type: "int" } -+ Parameter { name: "roleName"; type: "string" } -+ } -+ } -+ Component { -+ name: "OnlineAccounts::ApplicationModel" -+ prototype: "QAbstractListModel" -+ exports: ["Ubuntu.OnlineAccounts/ApplicationModel 0.1"] -+ exportMetaObjectRevisions: [0] -+ Property { name: "count"; type: "int"; isReadonly: true } -+ Property { name: "service"; type: "string" } -+ Method { -+ name: "get" -+ type: "QVariant" -+ Parameter { name: "row"; type: "int" } -+ Parameter { name: "roleName"; type: "string" } -+ } -+ } -+ Component { -+ name: "OnlineAccounts::Credentials" -+ prototype: "QObject" -+ exports: ["Ubuntu.OnlineAccounts/Credentials 0.1"] -+ exportMetaObjectRevisions: [0] -+ Property { name: "credentialsId"; type: "uint" } -+ Property { name: "caption"; type: "string" } -+ Property { name: "userName"; type: "string" } -+ Property { name: "secret"; type: "string" } -+ Property { name: "storeSecret"; type: "bool" } -+ Property { name: "acl"; type: "QStringList" } -+ Property { name: "methods"; type: "QVariantMap" } -+ Signal { name: "synced" } -+ Signal { name: "removed" } -+ Method { name: "sync" } -+ Method { name: "remove" } -+ } -+ Component { -+ name: "OnlineAccounts::Manager" -+ prototype: "QObject" -+ exports: ["Ubuntu.OnlineAccounts/Manager 0.1"] -+ isCreatable: false -+ isSingleton: true -+ exportMetaObjectRevisions: [0] -+ Method { -+ name: "loadAccount" -+ type: "QObject*" -+ Parameter { name: "accountId"; type: "uint" } -+ } -+ Method { -+ name: "createAccount" -+ type: "QObject*" -+ Parameter { name: "providerName"; type: "string" } -+ } -+ } -+ Component { -+ name: "OnlineAccounts::ProviderModel" -+ prototype: "QAbstractListModel" -+ exports: ["Ubuntu.OnlineAccounts/ProviderModel 0.1"] -+ exportMetaObjectRevisions: [0] -+ Property { name: "applicationId"; type: "string" } -+ Property { name: "count"; type: "int"; isReadonly: true } -+ Method { -+ name: "get" -+ type: "QVariant" -+ Parameter { name: "row"; type: "int" } -+ Parameter { name: "roleName"; type: "string" } -+ } -+ } -+} -diff --git a/src/src.pro b/src/src.pro -index 8b26639..abfc851 100644 ---- a/src/src.pro -+++ b/src/src.pro -@@ -61,22 +61,11 @@ PLUGIN_INSTALL_BASE = $$[QT_INSTALL_QML]/$$replace(API_URI, \\., /) - target.path = $${PLUGIN_INSTALL_BASE} - INSTALLS += target - --qmldir.files = $${DESTDIR}/qmldir -+qmldir.files = $${DESTDIR}/qmldir plugin.qmltypes - qmldir.path = $${PLUGIN_INSTALL_BASE} - INSTALLS += qmldir - --generateQmlTypes.output = $${DESTDIR}/plugin.qmltypes --generateQmlTypes.input = QML_PLUGINS --generateQmlTypes.commands = export LD_PRELOAD=${QMAKE_FILE_IN}; $$[QT_INSTALL_BINS]/qmlplugindump -notrelocatable $${API_URI} 0.1 . > ${QMAKE_FILE_OUT} --generateQmlTypes.name = Generate ${QMAKE_FILE_OUT} --generateQmlTypes.CONFIG += no_link --generateQmlTypes.variable_out = QML_TYPES --QMAKE_EXTRA_COMPILERS += generateQmlTypes -- - QML_PLUGINS += $${DESTDIR}/lib$${TARGET}.so -- --qmltypes.path = $${PLUGIN_INSTALL_BASE} --qmltypes.files = $${DESTDIR}/plugin.qmltypes --qmltypes.depends = $${DESTDIR}/plugin.qmltypes --qmltypes.CONFIG += no_check_exist --INSTALLS += qmltypes -+qmltypes.commands = export LD_PRELOAD=$${QML_PLUGINS}; $$[QT_INSTALL_BINS]/qmlplugindump -notrelocatable $${API_URI} 0.1 . > $$PWD/plugin.qmltypes -+qmltypes.depends = $${QML_PLUGINS} -+QMAKE_EXTRA_TARGETS += qmltypes --- -GitLab - diff --git a/srcpkgs/accounts-qml-module/patches/werror.patch b/srcpkgs/accounts-qml-module/patches/werror.patch deleted file mode 100644 index 130d37e3744..00000000000 --- a/srcpkgs/accounts-qml-module/patches/werror.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/common-project-config.pri 2016-06-08 09:26:26.000000000 +0200 -+++ - 2021-06-19 10:48:56.476598499 +0200 -@@ -3,7 +3,7 @@ - #----------------------------------------------------------------------------- - - # we don't like warnings... --QMAKE_CXXFLAGS += -Werror -Wno-write-strings -+QMAKE_CXXFLAGS += -Wno-write-strings - # Disable RTTI - QMAKE_CXXFLAGS += -fno-exceptions -fno-rtti - # Use C++11 diff --git a/srcpkgs/accounts-qml-module/template b/srcpkgs/accounts-qml-module/template index da93b894e43..8eb6e9973e4 100644 --- a/srcpkgs/accounts-qml-module/template +++ b/srcpkgs/accounts-qml-module/template @@ -1,18 +1,36 @@ # Template file for 'accounts-qml-module' pkgname=accounts-qml-module version=0.7 -revision=1 +revision=2 +_commit="05e79ebbbf3784a87f72b7be571070125c10dfe3" build_style=qmake -make_install_target="install_subtargets" -hostmakedepends="qt5-qmake pkg-config qt5-host-tools" -makedepends="signond-devel libaccounts-qt5-devel qt5-declarative-devel" +build_helper=qemu +configure_args="CONFIG+=no_docs" +hostmakedepends="pkg-config qt6-base" +makedepends="signond-devel libaccounts-qt6-devel qt6-declarative-devel" short_desc="Expose the Online Accounts API to QML applications" maintainer="John " license="LGPL-2.1-only" homepage="https://gitlab.com/accounts-sso/accounts-qml-module" -distfiles="https://gitlab.com/accounts-sso/accounts-qml-module/-/archive/VERSION_$version/accounts-qml-module-VERSION_$version.tar.gz" -checksum=550a6c684bf4b4f6460a35bac0cf3afbb9090a5cf4038b880c6b86c2e9ea0195 +#distfiles="https://gitlab.com/accounts-sso/accounts-qml-module/-/archive/VERSION_$version/accounts-qml-module-VERSION_$version.tar.gz" +distfiles="https://gitlab.com/accounts-sso/accounts-qml-module/-/archive/$_commit/accounts-qml-module-$_commit.tar.gz" +checksum=1a53a6d8a3a56694244bc24bdab844d91420483744822d08ae8517ff7df84763 +export QT=qt6 + +if [ $CROSS_BUILD ]; then + hostmakedepends+=" accounts-qml-module" +fi + +post_patch() { + if [ $CROSS_BUILD ]; then + vsed -i src/src.pro -e '/^INSTALLS [+]= qmltypes_gen/d' + fi +} post_install() { rm -rf $DESTDIR/usr/bin + if [ $CROSS_BUILD ]; then + vinstall /usr/lib/qt6/qml/SSO/OnlineAccounts/plugin.qmltypes 644 \ + usr/lib/qt6/qml/SSO/OnlineAccounts/ + fi }