[SCM] akonadi-contacts packaging branch, master, updated. debian/4%17.08.0-1-9-ga215ce2

Pino Toscano pino at moszumanska.debian.org
Mon Dec 11 20:25:40 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/akonadi-contacts.git;a=commitdiff;h=a215ce2

The following commit has been merged in the master branch:
commit a215ce2f56eff0cf7094bfcc77fb8eaf1de9ff78
Author: Pino Toscano <pino at debian.org>
Date:   Mon Dec 11 21:25:25 2017 +0100

    allow to build without qtwebengine
---
 debian/changelog                         |   4 +
 debian/control                           |   2 +-
 debian/patches/optional-qtwebengine.diff | 242 +++++++++++++++++++++++++++++++
 debian/patches/series                    |   1 +
 4 files changed, 248 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index eb0adcc..5759fe4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,10 @@ akonadi-contacts (4:17.08.0-2~) UNRELEASED; urgency=medium
     - remove the unused kdoctools-dev, and kio-dev
   * Remove the wrong Multi-Arch: foreign from libkf5akonadicontact-dev, and
     libkf5contacteditor-dev. (Closes: #872139)
+  * Make akonadi-contact buildable also without QtWebEngine:
+    - build the code using it conditionally; patch optional-qtwebengine.diff
+    - restrict the qtwebengine5-dev on the architectures where it is
+      available: amd64 arm64 armhf i386 mipsel.
 
  -- Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Tue, 31 Oct 2017 17:57:42 +0100
 
diff --git a/debian/control b/debian/control
index 70f702e..d3e3765 100644
--- a/debian/control
+++ b/debian/control
@@ -49,7 +49,7 @@ Build-Depends: cmake (>= 3.0~),
                pkg-kde-tools (>= 0.12),
                qtbase5-dev (>= 5.7.0~),
                qttools5-dev,
-               qtwebengine5-dev,
+               qtwebengine5-dev [amd64 arm64 armhf i386 mipsel],
                shared-mime-info (>= 0.30),
                xsltproc,
 Standards-Version: 4.1.2
diff --git a/debian/patches/optional-qtwebengine.diff b/debian/patches/optional-qtwebengine.diff
new file mode 100644
index 0000000..0042af6
--- /dev/null
+++ b/debian/patches/optional-qtwebengine.diff
@@ -0,0 +1,242 @@
+Author: Pino Toscano <pino at debian.org>
+Description: Make QtWebEngine optional
+ akonadi-contact is a library used by other PIM components, so turn the
+ QtWebEngine dependency as optional, since QtWebEngine is available only on
+ few architectures.
+ .
+ The affected code is an address location editor.
+ .
+ The QtWebEngine usage is removed in Applications 17.12.
+Last-Update: 2017-12-11
+Forwarded: not-needed
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -30,7 +30,12 @@ set(KMIMELIB_VERSION "5.6.0")
+ set(AKONADI_VERSION "5.6.0")
+ 
+ set(QT_REQUIRED_VERSION "5.7.0")
+-find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test WebEngine WebEngineWidgets)
++find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test)
++find_package(Qt5WebEngine ${QT_REQUIRED_VERSION} CONFIG)
++find_package(Qt5WebEngineWidgets ${QT_REQUIRED_VERSION} CONFIG)
++if (Qt5WebEngine_FOUND)
++    add_definitions(-DHAVE_WEBENGINE)
++endif()
+ ########### Find packages ###########
+ find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
+--- a/src/contact-editor/CMakeLists.txt
++++ b/src/contact-editor/CMakeLists.txt
+@@ -89,10 +89,13 @@ set(contacteditor_editor_generalinfo_SRC
+     ${contacteditor_editor_generalinfo_mail_SRCS}
+     )
+ 
+-set(contacteditor_addresslocation_web_editor_SRCS
+-    editor/addresseditor/webengine/addresseslocationengineviewer.cpp
+-    editor/addresseditor/webengine/addresseslocationenginepage.cpp
+-    )
++if (TARGET Qt5::WebEngine)
++    set(contacteditor_addresslocation_web_editor_SRCS
++        editor/addresseditor/webengine/addresseslocationengineviewer.cpp
++        editor/addresseditor/webengine/addresseslocationenginepage.cpp
++        editor/addresseditor/addresseslocationwidget.cpp
++        )
++endif()
+ 
+ set(contacteditor_addresslocation_editor_SRCS
+     ${contacteditor_addresslocation_web_editor_SRCS}
+@@ -100,7 +103,6 @@ set(contacteditor_addresslocation_editor
+     editor/addresseditor/addresseslocationgrantleeformater.cpp
+     editor/addresseditor/addressgrantleeobject.cpp
+     editor/addresseditor/iconnamecache.cpp
+-    editor/addresseditor/addresseslocationwidget.cpp
+     editor/addresseditor/selectaddresstypecombobox.cpp
+     editor/addresseditor/addresstypedialog.cpp
+     )
+@@ -176,9 +178,14 @@ target_link_libraries(KF5ContactEditor
+     KF5::TextWidgets
+     KF5::WidgetsAddons
+     Grantlee5::Templates
+-    Qt5::WebEngine
+-    Qt5::WebEngineWidgets
+     )
++if (TARGET Qt5::WebEngine)
++    target_link_libraries(KF5ContactEditor
++        PRIVATE
++        Qt5::WebEngine
++        Qt5::WebEngineWidgets
++        )
++endif()
+ 
+ set_target_properties(KF5ContactEditor PROPERTIES
+     VERSION ${AKONADICONTACT_VERSION_STRING}
+--- a/src/contact-editor/editor/addresseditor/autotests/CMakeLists.txt
++++ b/src/contact-editor/editor/addresseditor/autotests/CMakeLists.txt
+@@ -8,13 +8,15 @@ set(contacteditor_webengine_LIB Qt5::Web
+ 
+ ecm_qt_declare_logging_category(contacteditor_addresslocation_web_editor_SRCS HEADER contacteditor_debug.h IDENTIFIER CONTACTEDITOR_LOG CATEGORY_NAME org.kde.pim.contacteditor)
+ 
+-set(addresseslocationviewer_SRCS addresseslocationviewertest.cpp ${contacteditor_addresslocation_web_editor_SRCS} ../addresseslocationgrantleeformater.cpp
+-    ../addressgrantleeobject.cpp ../iconnamecache.cpp)
+-add_executable(addresseslocationviewer ${addresseslocationviewer_SRCS})
+-add_test(addresseslocationviewer addresseslocationviewer)
+-ecm_mark_as_test(addresseslocationviewer)
+-target_link_libraries(addresseslocationviewer Qt5::Test  Qt5::Widgets KF5::ContactEditor KF5::Contacts KF5::I18n ${contacteditor_webengine_LIB} Grantlee5::Templates
+-    KF5::IconThemes KF5::WidgetsAddons)
++if (TARGET Qt5::WebEngine)
++    set(addresseslocationviewer_SRCS addresseslocationviewertest.cpp ${contacteditor_addresslocation_web_editor_SRCS} ../addresseslocationgrantleeformater.cpp
++        ../addressgrantleeobject.cpp ../iconnamecache.cpp)
++    add_executable(addresseslocationviewer ${addresseslocationviewer_SRCS})
++    add_test(addresseslocationviewer addresseslocationviewer)
++    ecm_mark_as_test(addresseslocationviewer)
++    target_link_libraries(addresseslocationviewer Qt5::Test  Qt5::Widgets KF5::ContactEditor KF5::Contacts KF5::I18n ${contacteditor_webengine_LIB} Grantlee5::Templates
++        KF5::IconThemes KF5::WidgetsAddons)
++endif()
+ 
+ set(addresslocationwidget_SRCS addresslocationwidgettest.cpp ../addresslocationwidget.cpp ../selectaddresstypecombobox.cpp ../addresstypedialog.cpp)
+ add_executable(addresslocationwidget ${addresslocationwidget_SRCS})
+@@ -22,10 +24,12 @@ add_test(addresslocationwidget addresslo
+ ecm_mark_as_test(addresslocationwidget)
+ target_link_libraries(addresslocationwidget Qt5::Test  Qt5::Widgets KF5::ContactEditor KF5::Contacts KF5::I18n KF5::Completion)
+ 
+-set(addresseslocationwidget_SRCS addresseslocationwidgettest.cpp ../addresseslocationwidget.cpp ${contacteditor_addresslocation_web_editor_SRCS} ../addresseslocationgrantleeformater.cpp
+-    ../addressgrantleeobject.cpp ../iconnamecache.cpp ../addresslocationwidget.cpp ../selectaddresstypecombobox.cpp ../addresstypedialog.cpp)
+-add_executable(addresseslocationwidget ${addresseslocationwidget_SRCS})
+-add_test(addresseslocationwidget addresseslocationwidget)
+-ecm_mark_as_test(addresseslocationwidget)
+-target_link_libraries(addresseslocationwidget Qt5::Test  Qt5::Widgets KF5::ContactEditor KF5::Contacts KF5::I18n KF5::Completion ${contacteditor_webengine_LIB}
+-    Grantlee5::Templates KF5::IconThemes KF5::WidgetsAddons)
++if (TARGET Qt5::WebEngine)
++    set(addresseslocationwidget_SRCS addresseslocationwidgettest.cpp ../addresseslocationwidget.cpp ${contacteditor_addresslocation_web_editor_SRCS} ../addresseslocationgrantleeformater.cpp
++        ../addressgrantleeobject.cpp ../iconnamecache.cpp ../addresslocationwidget.cpp ../selectaddresstypecombobox.cpp ../addresstypedialog.cpp)
++    add_executable(addresseslocationwidget ${addresseslocationwidget_SRCS})
++    add_test(addresseslocationwidget addresseslocationwidget)
++    ecm_mark_as_test(addresseslocationwidget)
++    target_link_libraries(addresseslocationwidget Qt5::Test  Qt5::Widgets KF5::ContactEditor KF5::Contacts KF5::I18n KF5::Completion ${contacteditor_webengine_LIB}
++        Grantlee5::Templates KF5::IconThemes KF5::WidgetsAddons)
++endif()
+--- a/src/contact-editor/editor/addresseditor/tests/CMakeLists.txt
++++ b/src/contact-editor/editor/addresseditor/tests/CMakeLists.txt
+@@ -6,29 +6,31 @@ set(akonadicontact_webengine_LIB Qt5::We
+ 
+ ecm_qt_declare_logging_category(akonadicontact_addresslocation_web_editor_SRCS HEADER contacteditor_debug.h IDENTIFIER CONTACTEDITOR_LOG CATEGORY_NAME org.kde.pim.akonadi_contact)
+ 
+-set(addresseditor_SRCS
+-    ${akonadicontact_addresslocation_web_editor_SRCS}
+-    main.cpp
+-    ../addresseslocationwidget.cpp
+-    ../addresseslocationgrantleeformater.cpp
+-    ../addressgrantleeobject.cpp
+-    ../iconnamecache.cpp
+-    ../addresslocationwidget.cpp
+-    ../selectaddresstypecombobox.cpp
+-    ../addresstypedialog.cpp
+-    )
++if (TARGET Qt5::WebEngine)
++    set(addresseditor_SRCS
++        ${akonadicontact_addresslocation_web_editor_SRCS}
++        main.cpp
++        ../addresseslocationwidget.cpp
++        ../addresseslocationgrantleeformater.cpp
++        ../addressgrantleeobject.cpp
++        ../iconnamecache.cpp
++        ../addresslocationwidget.cpp
++        ../selectaddresstypecombobox.cpp
++        ../addresstypedialog.cpp
++        )
+ 
+-add_executable(addresseditortest ${addresseditor_SRCS})
++    add_executable(addresseditortest ${addresseditor_SRCS})
+ 
+-target_link_libraries(addresseditortest
+-    Qt5::Widgets
+-    KF5::AkonadiContact
+-    KF5::Contacts
+-    KF5::I18n
+-    KF5::Completion
+-    Grantlee5::Templates
+-    KF5::IconThemes
+-    KF5::WidgetsAddons
+-    ${akonadicontact_webengine_LIB}
+-    )
++    target_link_libraries(addresseditortest
++        Qt5::Widgets
++        KF5::AkonadiContact
++        KF5::Contacts
++        KF5::I18n
++        KF5::Completion
++        Grantlee5::Templates
++        KF5::IconThemes
++        KF5::WidgetsAddons
++        ${akonadicontact_webengine_LIB}
++        )
++endif()
+ 
+--- a/src/contact-editor/editor/contacteditorwidget.cpp
++++ b/src/contact-editor/editor/contacteditorwidget.cpp
+@@ -35,7 +35,9 @@
+ #include <QDirIterator>
+ #include <QPluginLoader>
+ #include <QVBoxLayout>
++#ifdef HAVE_WEBENGINE
+ #include "addresseditor/addresseslocationwidget.h"
++#endif
+ #include "customfieldeditor/customfieldswidget.h"
+ #include "businesseditor/businesseditorwidget.h"
+ #include "generalinfoeditor/generalinfowidget.h"
+@@ -69,8 +71,10 @@ public:
+ 
+     ContactEditor::GeneralInfoWidget *mGeneralInfoWidget;
+ 
++#ifdef HAVE_WEBENGINE
+     // widgets from addresses group
+     ContactEditor::AddressesLocationWidget *mAddressesLocationWidget;
++#endif
+ 
+     ContactEditor::BusinessEditorWidget *mBusinessEditorWidget;
+ 
+@@ -113,8 +117,10 @@ void ContactEditorWidget::Private::initG
+ 
+ void ContactEditorWidget::Private::initGuiLocationTab()
+ {
++#ifdef HAVE_WEBENGINE
+     mAddressesLocationWidget = new ContactEditor::AddressesLocationWidget;
+     mTabWidget->addTab(mAddressesLocationWidget, i18nc("@title:tab", "Location"));
++#endif
+ }
+ 
+ void ContactEditorWidget::Private::initGuiBusinessTab()
+@@ -211,8 +217,10 @@ void ContactEditorWidget::loadContact(co
+ {
+     d->mGeneralInfoWidget->loadContact(contact);
+ 
++#ifdef HAVE_WEBENGINE
+     // address group
+     d->mAddressesLocationWidget->loadContact(contact);
++#endif
+ 
+     // general group
+     d->mBusinessEditorWidget->loadContact(contact);
+@@ -237,8 +245,10 @@ void ContactEditorWidget::storeContact(K
+ {
+     d->mGeneralInfoWidget->storeContact(contact);
+ 
++#ifdef HAVE_WEBENGINE
+     // address group
+     d->mAddressesLocationWidget->storeContact(contact);
++#endif
+ 
+     // general group
+     d->mBusinessEditorWidget->storeContact(contact);
+@@ -264,8 +274,10 @@ void ContactEditorWidget::storeContact(K
+ void ContactEditorWidget::setReadOnly(bool readOnly)
+ {
+     d->mGeneralInfoWidget->setReadOnly(readOnly);
++#ifdef HAVE_WEBENGINE
+     // widgets from addresses group
+     d->mAddressesLocationWidget->setReadOnly(readOnly);
++#endif
+ 
+     // widgets from general group
+     d->mBusinessEditorWidget->setReadOnly(readOnly);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3e3084e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+optional-qtwebengine.diff

-- 
akonadi-contacts packaging



More information about the pkg-kde-commits mailing list