testing/lomiri-settings-components: new aport

This commit is contained in:
Luca Weiss 2023-11-08 18:24:52 +02:00 committed by Bart Ribbers
parent 557ba3fb80
commit 209e73e3bd
2 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,42 @@
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=lomiri-settings-components
pkgver=1.1.0
pkgrel=0
pkgdesc="Lomiri settings Components"
arch="all"
url="https://gitlab.com/ubports/development/core/lomiri-settings-components"
license="GPL-3.0-only AND LGPL-3.0-only"
makedepends="
cmake
cmake-extras
qt5-qtdeclarative-dev
samurai
"
source="https://gitlab.com/ubports/development/core/lomiri-settings-components/-/archive/$pkgver/lomiri-settings-components-$pkgver.tar
qmltestrunner.patch
"
subpackages="$pkgname-lang"
build() {
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=None
cmake --build build
}
check() {
ctest --test-dir build --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
09d17e3c3c6435b5e5bb3f283af63f577661eb1b51bd381ebbaa16331b3d6f2320d8539b95855ccd06938cfbf825bd411acb9bc9e67dff3e8ad7a2ba3167d4b7 lomiri-settings-components-1.1.0.tar
0cbe24ba24468ccfae80b6d6b49c68b55e44561ac7914645746af15ee252c12341f2b401390cffbed520963d1cb7da6980f99520ee820528de964b8a714b87b4 qmltestrunner.patch
"

View File

@ -0,0 +1,29 @@
diff --git a/cmake/modules/QmlTest.cmake b/cmake/modules/QmlTest.cmake
index 42d5c49..3ccd6ac 100644
--- a/cmake/modules/QmlTest.cmake
+++ b/cmake/modules/QmlTest.cmake
@@ -65,9 +65,9 @@ endfunction()
# This function wraps add_executable_test, see below for available arguments.
function(add_qml_unittest PATH COMPONENT_NAME)
- import_executables(qmltestrunner)
+ import_executables(qmltestrunner-qt5)
- add_executable_test(${COMPONENT_NAME} qmltestrunner
+ add_executable_test(${COMPONENT_NAME} qmltestrunner-qt5
${ARGN}
ARGS -input ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS}
)
@@ -84,10 +84,10 @@ endfunction()
# This function wraps add_manual_test, see below for available arguments.
function(add_manual_qml_test PATH COMPONENT_NAME)
- import_executables(qmlscene)
+ import_executables(qmlscene-qt5)
cmake_parse_arguments(QMLTEST "${QMLTEST_OPTIONS}" "${QMLTEST_SINGLE}" "${QMLTEST_MULTI}" ${ARGN})
- add_manual_test(${COMPONENT_NAME} qmlscene
+ add_manual_test(${COMPONENT_NAME} qmlscene-qt5
${ARGN}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${PATH}/tst_${COMPONENT_NAME}.qml ${QMLTEST_ARGS}
)