aboutsummaryrefslogtreecommitdiffstats
path: root/community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch')
-rw-r--r--community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch230
1 files changed, 140 insertions, 90 deletions
diff --git a/community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch b/community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch
index c44261d100b..faa1a910f83 100644
--- a/community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch
+++ b/community/nemo-qml-plugin-calendar/0001-Port-to-CMake.patch
@@ -1,74 +1,18 @@
-From 676285b18b11055eca4481434934c5d5d816ac4f Mon Sep 17 00:00:00 2001
-From: Bart Ribbers <bribbers@disroot.org>
-Date: Sun, 18 Apr 2021 17:22:02 +0200
-Subject: [PATCH] Port to CMake
-
-This project uses KDE's KCalendarCore. However, that package can only be
-used with build systems that support CMake dependencies, which QMake is
-not one of. KCalendarCore probably shipped a pkgconfig file in the past,
-but this has not been the case for a quite a while as far as I can see.
-
-Since using QMake thus prevents using a current KCalendarCore, switch
-the build system to CMake instead
----
- .gitignore | 5 +-
- CMakeLists.txt | 51 ++++++++++++++
- calendar.pro | 7 --
- lightweight/CMakeLists.txt | 2 +
- .../calendardataservice/CMakeLists.txt | 23 ++++++
- .../calendardataservice.pro | 45 ------------
- .../calendareventsmodel/CMakeLists.txt | 23 ++++++
- .../calendareventsmodel.pro | 34 ---------
- lightweight/lightweight.pro | 2 -
- src/CMakeLists.txt | 62 ++++++++++++++++
- src/src.pro | 70 -------------------
- tests/CMakeLists.txt | 4 ++
- tests/common.pri | 9 ---
- tests/tests.pro | 10 ---
- tests/tst_calendarevent/CMakeLists.txt | 15 ++++
- tests/tst_calendarevent/tst_calendarevent.pro | 4 --
- tests/tst_calendarmanager/CMakeLists.txt | 15 ++++
- .../tst_calendarmanager.pro | 4 --
- tools/CMakeLists.txt | 1 +
- tools/icalconverter/CMakeLists.txt | 10 +++
- tools/icalconverter/icalconverter.pro | 10 ---
- tools/tools.pro | 2 -
- 23 files changed, 207 insertions(+), 211 deletions(-)
- create mode 100644 CMakeLists.txt
- delete mode 100644 calendar.pro
- create mode 100644 lightweight/CMakeLists.txt
- create mode 100644 lightweight/calendardataservice/CMakeLists.txt
- delete mode 100644 lightweight/calendardataservice/calendardataservice.pro
- create mode 100644 lightweight/calendareventsmodel/CMakeLists.txt
- delete mode 100644 lightweight/calendareventsmodel/calendareventsmodel.pro
- delete mode 100644 lightweight/lightweight.pro
- create mode 100644 src/CMakeLists.txt
- delete mode 100644 src/src.pro
- create mode 100644 tests/CMakeLists.txt
- delete mode 100644 tests/common.pri
- delete mode 100644 tests/tests.pro
- create mode 100644 tests/tst_calendarevent/CMakeLists.txt
- delete mode 100644 tests/tst_calendarevent/tst_calendarevent.pro
- create mode 100644 tests/tst_calendarmanager/CMakeLists.txt
- delete mode 100644 tests/tst_calendarmanager/tst_calendarmanager.pro
- create mode 100644 tools/CMakeLists.txt
- create mode 100644 tools/icalconverter/CMakeLists.txt
- delete mode 100644 tools/icalconverter/icalconverter.pro
- delete mode 100644 tools/tools.pro
-
diff --git a/.gitignore b/.gitignore
-index c6d36a2..d2a8406 100644
+index 7fdc54b..2d578b4 100644
--- a/.gitignore
+++ b/.gitignore
-@@ -1,11 +1,8 @@
+@@ -1,13 +1,8 @@
# Build artefacts
*.o
*.so
--lightweight/calendardataservice/calendardataservice
--tests/tst_calendarevent/tst_calendarevent
--tests/tst_calendarmanager/tst_calendarmanager
--tools/icalconverter/icalconverter
- RPMS
+-/lightweight/calendardataservice/calendardataservice
+-/tests/tst_calendarevent/tst_calendarevent
+-/tests/tst_calendarmanager/tst_calendarmanager
+-/tests/tst_calendaragendamodel/tst_calendaragendamodel
+-/tests/tst_calendarevent/Makefile.tst_calendareventbin
+-/tools/icalconverter/icalconverter
+ /RPMS
+build
# Generated sources
@@ -182,7 +126,7 @@ index 0000000..36425cf
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services)
diff --git a/lightweight/calendardataservice/calendardataservice.pro b/lightweight/calendardataservice/calendardataservice.pro
deleted file mode 100644
-index cfe937d..0000000
+index a311951..0000000
--- a/lightweight/calendardataservice/calendardataservice.pro
+++ /dev/null
@@ -1,45 +0,0 @@
@@ -201,11 +145,11 @@ index cfe937d..0000000
- calendardataserviceadaptor.h \
- ../common/eventdata.h \
- ../../src/calendaragendamodel.h \
+- ../../src/calendareventlistmodel.h \
- ../../src/calendarmanager.h \
- ../../src/calendarworker.h \
- ../../src/calendareventoccurrence.h \
- ../../src/calendarevent.h \
-- ../../src/calendarchangeinformation.h \
- ../../src/calendareventquery.h \
- ../../src/calendarinvitationquery.h \
- ../../src/calendarutils.h
@@ -215,11 +159,11 @@ index cfe937d..0000000
- calendardataserviceadaptor.cpp \
- ../common/eventdata.cpp \
- ../../src/calendaragendamodel.cpp \
+- ../../src/calendareventlistmodel.cpp \
- ../../src/calendarmanager.cpp \
- ../../src/calendarworker.cpp \
- ../../src/calendareventoccurrence.cpp \
- ../../src/calendarevent.cpp \
-- ../../src/calendarchangeinformation.cpp \
- ../../src/calendareventquery.cpp \
- ../../src/calendarinvitationquery.cpp \
- ../../src/calendarutils.cpp \
@@ -310,7 +254,7 @@ index 6fe91a6..0000000
-SUBDIRS = calendardataservice calendareventsmodel
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
-index 0000000..66fef87
+index 0000000..901c1dd
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,62 @@
@@ -329,13 +273,13 @@ index 0000000..66fef87
+ calendarmanager.cpp
+ calendarworker.cpp
+ calendarnotebookquery.cpp
-+ calendareventmodification.cpp
-+ calendarchangeinformation.cpp
++ calendareventmodification.cpp
+ calendarutils.cpp
+ calendarimportmodel.cpp
+ calendarimportevent.cpp
+ calendarcontactmodel.cpp
-+ calendarattendeemodel.cpp)
++ calendarattendeemodel.cpp
++ calendareventlistmodel.cpp)
+set(HEADERS
+ calendarevent.h
+ calendareventoccurrence.h
@@ -348,13 +292,13 @@ index 0000000..66fef87
+ calendarworker.h
+ calendardata.h
+ calendarnotebookquery.h
-+ calendareventmodification.h
-+ calendarchangeinformation.h
++ calendareventmodification.h
+ calendarutils.h
+ calendarimportmodel.h
+ calendarimportevent.h
+ calendarcontactmodel.h
-+ calendarattendeemodel.h)
++ calendarattendeemodel.h
++ calendareventlistmodel.h)
+
+add_library(nemocalendar SHARED ${SRC} ${HEADERS})
+
@@ -378,7 +322,7 @@ index 0000000..66fef87
+ DESTINATION ${PLUGIN_IMPORT_PATH})
diff --git a/src/src.pro b/src/src.pro
deleted file mode 100644
-index f728109..0000000
+index a6de4e5..0000000
--- a/src/src.pro
+++ /dev/null
@@ -1,70 +0,0 @@
@@ -401,7 +345,7 @@ index f728109..0000000
-qmldir.path += $$target.path
-INSTALLS += qmldir
-
--qmltypes.commands = qmlplugindump -nonrelocatable org.nemomobile.calendar 1.0 > $$PWD/plugins.qmltypes
+-qmltypes.commands = qmlplugindump -noinstantiate -nonrelocatable org.nemomobile.calendar 1.0 > $$PWD/plugins.qmltypes
-QMAKE_EXTRA_TARGETS += qmltypes
-
-CONFIG += link_pkgconfig
@@ -413,6 +357,7 @@ index f728109..0000000
- $$SRCDIR/calendarevent.cpp \
- $$SRCDIR/calendareventoccurrence.cpp \
- $$SRCDIR/calendaragendamodel.cpp \
+- $$SRCDIR/calendareventlistmodel.cpp \
- $$SRCDIR/calendarapi.cpp \
- $$SRCDIR/calendareventquery.cpp \
- $$SRCDIR/calendarinvitationquery.cpp \
@@ -421,7 +366,6 @@ index f728109..0000000
- $$SRCDIR/calendarworker.cpp \
- $$SRCDIR/calendarnotebookquery.cpp \
- $$SRCDIR/calendareventmodification.cpp \
-- $$SRCDIR/calendarchangeinformation.cpp \
- $$SRCDIR/calendarutils.cpp \
- $$SRCDIR/calendarimportmodel.cpp \
- $$SRCDIR/calendarimportevent.cpp \
@@ -432,6 +376,7 @@ index f728109..0000000
- $$SRCDIR/calendarevent.h \
- $$SRCDIR/calendareventoccurrence.h \
- $$SRCDIR/calendaragendamodel.h \
+- $$SRCDIR/calendareventlistmodel.h \
- $$SRCDIR/calendarapi.h \
- $$SRCDIR/calendareventquery.h \
- $$SRCDIR/calendarinvitationquery.h \
@@ -441,7 +386,6 @@ index f728109..0000000
- $$SRCDIR/calendardata.h \
- $$SRCDIR/calendarnotebookquery.h \
- $$SRCDIR/calendareventmodification.h \
-- $$SRCDIR/calendarchangeinformation.h \
- $$SRCDIR/calendarutils.h \
- $$SRCDIR/calendarimportmodel.h \
- $$SRCDIR/calendarimportevent.h \
@@ -454,14 +398,15 @@ index f728109..0000000
-OBJECTS_DIR = $$PWD/.obj
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
-index 0000000..238e21f
+index 0000000..b0f453b
--- /dev/null
+++ b/tests/CMakeLists.txt
-@@ -0,0 +1,4 @@
+@@ -0,0 +1,5 @@
+enable_testing()
+
+add_subdirectory(tst_calendarevent)
+add_subdirectory(tst_calendarmanager)
++add_subdirectory(tst_calendaragendamodel)
diff --git a/tests/common.pri b/tests/common.pri
deleted file mode 100644
index bab74e7..0000000
@@ -479,26 +424,80 @@ index bab74e7..0000000
-target.path = /opt/tests/nemo-qml-plugins-qt5/calendar
diff --git a/tests/tests.pro b/tests/tests.pro
deleted file mode 100644
-index 248d80a..0000000
+index 8405ea0..0000000
--- a/tests/tests.pro
+++ /dev/null
-@@ -1,10 +0,0 @@
+@@ -1,11 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = \
- tst_calendarmanager \
-- tst_calendarevent
+- tst_calendarevent \
+- tst_calendaragendamodel
-
-tests_xml.path = /opt/tests/nemo-qml-plugins-qt5/calendar
-tests_xml.files = tests.xml
-INSTALLS += tests_xml
-
-OTHER_FILES += tests.xml
+diff --git a/tests/tests.xml b/tests/tests.xml
+deleted file mode 100644
+index 2b91b34..0000000
+--- a/tests/tests.xml
++++ /dev/null
+@@ -1,16 +0,0 @@
+-<?xml version="1.0" encoding="UTF-8"?>
+-<testdefinition version="1.0">
+- <suite name="nemo-qml-plugins-calendar-qt5-tests" domain="mw">
+- <set name="unit-tests" feature="calendar mw">
+- <case manual="false" name="calendarmanager">
+- <step>rm -f /tmp/testdb; SQLITESTORAGEDB=/tmp/testdb /usr/sbin/run-blts-root /bin/su $USER -g privileged -c /opt/tests/nemo-qml-plugins-qt5/calendar/tst_calendarmanager</step>
+- </case>
+- <case manual="false" name="calendarevent">
+- <step>rm -f /tmp/testdb; SQLITESTORAGEDB=/tmp/testdb MKCAL_PLUGIN_DIR=/opt/tests/nemo-qml-plugins-qt5/calendar/plugins /usr/sbin/run-blts-root /bin/su $USER -g privileged -c /opt/tests/nemo-qml-plugins-qt5/calendar/tst_calendarevent</step>
+- </case>
+- <case manual="false" name="calendaragendamodel">
+- <step>rm -f /tmp/testdb; SQLITESTORAGEDB=/tmp/testdb /usr/sbin/run-blts-root /bin/su $USER -g privileged -c /opt/tests/nemo-qml-plugins-qt5/calendar/tst_calendaragendamodel</step>
+- </case>
+- </set>
+- </suite>
+-</testdefinition>
+diff --git a/tests/tst_calendaragendamodel/CMakeLists.txt b/tests/tst_calendaragendamodel/CMakeLists.txt
+new file mode 100644
+index 0000000..09cfa06
+--- /dev/null
++++ b/tests/tst_calendaragendamodel/CMakeLists.txt
+@@ -0,0 +1,15 @@
++set(SRC tst_calendaragendamodel.cpp)
++
++add_executable(tst_calendaragendamodel ${SRC})
++
++target_include_directories(tst_calendaragendamodel PRIVATE
++ ${PROJECT_SOURCE_DIR}/src
++ ${TARGET_MOC_DIR})
++
++target_link_libraries(tst_calendaragendamodel
++ Qt5::Qml
++ Qt5::Test
++ KF5::CalendarCore
++ nemocalendar)
++
++add_test(tst_calendaragendamodel tst_calendaragendamodel)
+diff --git a/tests/tst_calendaragendamodel/tst_calendaragendamodel.pro b/tests/tst_calendaragendamodel/tst_calendaragendamodel.pro
+deleted file mode 100644
+index d9b67f3..0000000
+--- a/tests/tst_calendaragendamodel/tst_calendaragendamodel.pro
++++ /dev/null
+@@ -1,4 +0,0 @@
+-include(../common.pri)
+-
+-TARGET = tst_calendaragendamodel
+-SOURCES += tst_calendaragendamodel.cpp
diff --git a/tests/tst_calendarevent/CMakeLists.txt b/tests/tst_calendarevent/CMakeLists.txt
new file mode 100644
-index 0000000..70c0ef6
+index 0000000..50f49f5
--- /dev/null
+++ b/tests/tst_calendarevent/CMakeLists.txt
-@@ -0,0 +1,15 @@
+@@ -0,0 +1,17 @@
+set(SRC tst_calendarevent.cpp)
+
+add_executable(tst_calendarevent ${SRC})
@@ -514,16 +513,70 @@ index 0000000..70c0ef6
+ nemocalendar)
+
+add_test(tst_calendarevent tst_calendarevent)
++
++add_subdirectory(test_plugin)
+diff --git a/tests/tst_calendarevent/test_plugin/CMakeLists.txt b/tests/tst_calendarevent/test_plugin/CMakeLists.txt
+new file mode 100644
+index 0000000..9188446
+--- /dev/null
++++ b/tests/tst_calendarevent/test_plugin/CMakeLists.txt
+@@ -0,0 +1,13 @@
++set(SRC test_plugin.cpp)
++
++add_library(tst_calendarevent_plugin ${SRC})
++
++target_include_directories(tst_calendarevent_plugin PRIVATE
++ ${PROJECT_SOURCE_DIR}/src
++ ${TARGET_MOC_DIR})
++
++target_link_libraries(tst_calendarevent_plugin
++ Qt5::Qml
++ Qt5::Test
++ KF5::CalendarCore
++ PkgConfig::MKCAL)
+diff --git a/tests/tst_calendarevent/test_plugin/test_plugin.pro b/tests/tst_calendarevent/test_plugin/test_plugin.pro
+deleted file mode 100644
+index 0ec993f..0000000
+--- a/tests/tst_calendarevent/test_plugin/test_plugin.pro
++++ /dev/null
+@@ -1,16 +0,0 @@
+-TARGET = testplugin
+-
+-TEMPLATE = lib
+-CONFIG += qt plugin hide_symbols
+-
+-QT -= gui
+-
+-target.path = /opt/tests/nemo-qml-plugins-qt5/calendar/plugins
+-PKGCONFIG += KF5CalendarCore libmkcal-qt5
+-
+-INSTALLS += target
+-
+-CONFIG += link_pkgconfig
+-
+-SOURCES += test_plugin.cpp
+-HEADERS += test_plugin.h
diff --git a/tests/tst_calendarevent/tst_calendarevent.pro b/tests/tst_calendarevent/tst_calendarevent.pro
deleted file mode 100644
-index c9b0931..0000000
+index a2d5722..0000000
--- a/tests/tst_calendarevent/tst_calendarevent.pro
+++ /dev/null
@@ -1,4 +0,0 @@
+-TEMPLATE = subdirs
+-SUBDIRS = \
+- test_plugin \
+- tst_calendareventbin.pro
+diff --git a/tests/tst_calendarevent/tst_calendareventbin.pro b/tests/tst_calendarevent/tst_calendareventbin.pro
+deleted file mode 100644
+index b52729e..0000000
+--- a/tests/tst_calendarevent/tst_calendareventbin.pro
++++ /dev/null
+@@ -1,5 +0,0 @@
-include(../common.pri)
-
-TARGET = tst_calendarevent
-SOURCES += tst_calendarevent.cpp
+-HEADERS += test_plugin_interface.h
diff --git a/tests/tst_calendarmanager/CMakeLists.txt b/tests/tst_calendarmanager/CMakeLists.txt
new file mode 100644
index 0000000..66c959f
@@ -602,6 +655,3 @@ index 1827543..0000000
@@ -1,2 +0,0 @@
-TEMPLATE=subdirs
-SUBDIRS+=icalconverter
---
-2.31.1
-