aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Weiss <luca@z3ntu.xyz>2023-11-13 10:34:46 +0100
committerBart Ribbers <bribbers@disroot.org>2023-11-13 23:10:25 +0000
commitfc63d7d2745bb04486778695dc1efad126b3796a (patch)
tree36dea904b96ff92a0a18f4eb23029776aa72c959
parenta1bbb119429ed1a3b146112d83f645b85004e602 (diff)
testing/lomiri-history-service: new aport
-rw-r--r--testing/lomiri-history-service/0001-CMakeLists.txt-Add-ENABLE_WERROR-CMake-option-defaul.patch38
-rw-r--r--testing/lomiri-history-service/0002-upgrade-to-C-17.patch25
-rw-r--r--testing/lomiri-history-service/0003-remove-systemd-dependency.patch24
-rw-r--r--testing/lomiri-history-service/0004-remove-daemon-directory.patch26
-rw-r--r--testing/lomiri-history-service/APKBUILD65
5 files changed, 178 insertions, 0 deletions
diff --git a/testing/lomiri-history-service/0001-CMakeLists.txt-Add-ENABLE_WERROR-CMake-option-defaul.patch b/testing/lomiri-history-service/0001-CMakeLists.txt-Add-ENABLE_WERROR-CMake-option-defaul.patch
new file mode 100644
index 00000000000..6ca2fe29b43
--- /dev/null
+++ b/testing/lomiri-history-service/0001-CMakeLists.txt-Add-ENABLE_WERROR-CMake-option-defaul.patch
@@ -0,0 +1,38 @@
+From af704299654bc2c1816454da23e7da5fb5f74318 Mon Sep 17 00:00:00 2001
+From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+Date: Fri, 13 Jan 2023 10:55:22 +0100
+Subject: [PATCH 1/4] CMakeLists.txt: Add ENABLE_WERROR CMake option,
+ defaulting to ON.
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ CMakeLists.txt | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e61fea5..7e9e9ca 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -79,12 +79,17 @@ enable_testing()
+
+ add_definitions(-std=c++11)
+
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Werror")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall")
+ # TODO remove the need for -Wno-unused-variable
+ # unused-variable currently fails because of public headers includes static char's
+ # there is also a gcc bug that makes it not possable to rely on diagnostic pragmas
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69967
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wno-unused-variable")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-variable")
++
++option(ENABLE_WERROR "Treat all build warnings as errors" ON)
++if(ENABLE_WERROR)
++ add_compile_options(-Werror)
++endif()
+
+ # Define the version to be used in the library
+ set(HISTORY_VERSION_MAJOR 0)
+--
+2.42.1
+
diff --git a/testing/lomiri-history-service/0002-upgrade-to-C-17.patch b/testing/lomiri-history-service/0002-upgrade-to-C-17.patch
new file mode 100644
index 00000000000..ba836c6e077
--- /dev/null
+++ b/testing/lomiri-history-service/0002-upgrade-to-C-17.patch
@@ -0,0 +1,25 @@
+From 47323491d7054c28f24e34e7baa644b2f1a19833 Mon Sep 17 00:00:00 2001
+From: Brandon Boese <brandonboese@protonmail.com>
+Date: Sun, 15 Oct 2023 20:57:38 -0400
+Subject: [PATCH 2/4] upgrade to C++17
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7e9e9ca..b4d1a8a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -77,7 +77,7 @@ endfunction()
+
+ enable_testing()
+
+-add_definitions(-std=c++11)
++add_definitions(-std=c++17)
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall")
+ # TODO remove the need for -Wno-unused-variable
+--
+2.42.1
+
diff --git a/testing/lomiri-history-service/0003-remove-systemd-dependency.patch b/testing/lomiri-history-service/0003-remove-systemd-dependency.patch
new file mode 100644
index 00000000000..42a1438c4dd
--- /dev/null
+++ b/testing/lomiri-history-service/0003-remove-systemd-dependency.patch
@@ -0,0 +1,24 @@
+From 5af65080d792d88131bf76bb642518e99279b9da Mon Sep 17 00:00:00 2001
+From: Brandon Boese <brandonboese@protonmail.com>
+Date: Sun, 15 Oct 2023 16:52:02 -0400
+Subject: [PATCH 3/4] remove systemd dependency
+
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b4d1a8a..3c28459 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -47,7 +47,6 @@ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(TP_QT5 REQUIRED TelepathyQt5)
+ pkg_check_modules(SQLITE3 REQUIRED sqlite3)
+ pkg_check_modules(QTGLIB QtGLib-2.0)
+-pkg_check_modules(SYSTEMD REQUIRED systemd)
+
+ find_program(DBUS_RUNNER dbus-test-runner)
+
+--
+2.42.1
+
diff --git a/testing/lomiri-history-service/0004-remove-daemon-directory.patch b/testing/lomiri-history-service/0004-remove-daemon-directory.patch
new file mode 100644
index 00000000000..bf019dd458c
--- /dev/null
+++ b/testing/lomiri-history-service/0004-remove-daemon-directory.patch
@@ -0,0 +1,26 @@
+From 55637288bad139d24c4401eb71c994835defee48 Mon Sep 17 00:00:00 2001
+From: Brandon Boese <brandonboese@protonmail.com>
+Date: Sun, 15 Oct 2023 17:49:13 -0400
+Subject: [PATCH 4/4] remove daemon directory
+
+Temporary patch to allow compiling. Will be fixed when work on ofono begins.
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3c28459..45a0635 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -97,7 +97,7 @@ set(HISTORY_VERSION_PATCH 0)
+ set(PACKAGE_VERSION ${HISTORY_VERSION_MAJOR}.${HISTORY_VERSION_MINOR}.${HISTORY_VERSION_PATCH})
+
+ add_subdirectory(src)
+-add_subdirectory(daemon)
++# add_subdirectory(daemon)
+ add_subdirectory(plugins)
+ add_subdirectory(tools)
+ add_subdirectory(Lomiri)
+--
+2.42.1
+
diff --git a/testing/lomiri-history-service/APKBUILD b/testing/lomiri-history-service/APKBUILD
new file mode 100644
index 00000000000..bc4d7102f25
--- /dev/null
+++ b/testing/lomiri-history-service/APKBUILD
@@ -0,0 +1,65 @@
+# Maintainer: Luca Weiss <luca@z3ntu.xyz>
+# Contributor: Brandon Boese <brandonboese@protonmail.com>
+pkgname=lomiri-history-service
+pkgver=0.4
+pkgrel=0
+pkgdesc="Service that provides call log and conversation history"
+url="https://gitlab.com/ubports/development/core/history-service"
+arch="all"
+license="GPL-3.0-only"
+depends="
+ libphonenumber-dev
+ qt5-qtbase-dev
+ qt5-qtbase-sqlite
+ qt5-qtdeclarative-dev
+ qt5-qtpim-dev
+ sqlite-dev
+ telepathy-mission-control
+ telepathy-qt-dev
+ "
+makedepends="
+ cmake
+ cmake-extras
+ dconf
+ libqtdbustest
+ samurai
+ "
+checkdepends="
+ dbus-test-runner
+ xvfb-run
+ "
+subpackages="$pkgname-dev"
+source="https://gitlab.com/ubports/development/core/history-service/-/archive/$pkgver/history-service-$pkgver.tar.gz
+ 0001-CMakeLists.txt-Add-ENABLE_WERROR-CMake-option-defaul.patch
+ 0002-upgrade-to-C-17.patch
+ 0003-remove-systemd-dependency.patch
+ 0004-remove-daemon-directory.patch
+ "
+builddir="$srcdir/history-service-$pkgver"
+options="!check" # several tests timing out
+
+build() {
+ cmake -B build -G Ninja \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var \
+ -DENABLE_WERROR=OFF
+ cmake --build build
+}
+
+check() {
+ ctest --test-dir build
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+}
+
+sha512sums="
+73188367eb492375b1613ad10f45efd37b23cc0017955a12a89c375716268bb8bf1ba5ef024fae9798646312d3125d551549ffe44ad6c6e34fde60ba6d20fb42 history-service-0.4.tar.gz
+00d0ff183864c08307cd8161f99b2b7a51df745e29cc6c920536f5c9fe712526805943c799e8e52e373af933698a70a79e1a0e9abb5fda95c3bd3f8ea765d7c3 0001-CMakeLists.txt-Add-ENABLE_WERROR-CMake-option-defaul.patch
+ca24316555e14ac9a3f8f7420040b2803470efd312053020007009ae0273acbcf823c2c5cf0d6b88f2bbcd8430c248537e53e13a9c5855ccba17eac197cd9c4e 0002-upgrade-to-C-17.patch
+328f346cbdea5d36a432e20076dbb0a765fbe5a45b96425756e7871e66fe204d415a3e38c48a71473c7c55b7947062637ff9098df77e36873b8057b6d76dcb2a 0003-remove-systemd-dependency.patch
+5537768ff3ceda6fd4715adba63e8d34f97d2850e8137ca6efbb0614995c7c5b0ea83faef7b3b34e4b9e1c61910df47f113a1558088d510f0448f08cf28c7d7d 0004-remove-daemon-directory.patch
+"