unity8: initial packaging (!27)

* Mir starts up and is able to display system settings
* x86_64 only for now, because at least ubuntu-app-test did not build
  on aarch64

Based on PureTryOut's work. Getting it to this stage was a huge effort
(as it shows in the package count: 111(!)). See the merge request for
details.

[skip ci]: this won't finish in CI; ollieparanoid made sure that
           everything builds for x86_64.
This commit is contained in:
Luca Weiss 2018-09-03 01:29:38 +02:00 committed by Oliver Smith
parent 7df8828dfb
commit 8c2a95dbe2
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
111 changed files with 8125 additions and 0 deletions

42
unity8/unity-api/APKBUILD Normal file
View file

@ -0,0 +1,42 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=unity-api
pkgver=0_git20190129
_commit="417d59b748bf2fc914561e671603399bf3818f6e"
pkgrel=0
pkgdesc="API for Unity shell integration"
url="https://github.com/ubports/unity-api"
arch="x86_64"
license="LGPL-3.0"
depends=""
depends_dev=""
makedepends="$depends_dev cmake cmake-extras qt5-qtdeclarative-dev libqtdbustest gtest-dev gmock"
source="$pkgname-$_commit.tar.gz::https://github.com/ubports/$pkgname/archive/$_commit.tar.gz
qmltestrunner.patch
gtest.patch"
subpackages="$pkgname-dev"
builddir="$srcdir/$pkgname-$_commit"
options="!check" # 88% tests passed, 3 tests failed out of 26
build() {
mkdir "$builddir"/build
cd "$builddir"/build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib ..
make
}
check() {
cd "$builddir"/build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
sha512sums="8bced72af9a3cecac9786ca079c7e28a6867de44e68f80e846e4ddba913ab39b60c3bcab0d38a1a7fb62f3195b33057493e26d72cda075f65e73ee035f9a8fea unity-api-417d59b748bf2fc914561e671603399bf3818f6e.tar.gz
8695998cb0451943ff08f00be52766d27c439184b1e8531a563cffe4bf4251dea52d5bc3493d797f4f6007f13130930c6b0cfb2c04b9dc54e6891e17c2978fb9 qmltestrunner.patch
d1fdccdf8d2b31d3be68478ba671514bc83afd26c756062f3f4a3cb1ee05331efb1ca5092b612449cc00552f8dd7071ba22903b5d336cc34b5bc94077a00d51e gtest.patch"

View file

@ -0,0 +1,49 @@
diff --git a/test/gtest/CMakeLists.txt b/test/gtest/CMakeLists.txt
index b2e105c..b1fa79e 100644
--- a/test/gtest/CMakeLists.txt
+++ b/test/gtest/CMakeLists.txt
@@ -1,7 +1,6 @@
find_package(Threads REQUIRED)
-set(TESTLIBDIR ${CMAKE_BINARY_DIR}/test/gtest/libgtest/build)
-set(LIBGTEST gtest)
-set(TESTLIBS ${TESTLIBS} ${LIBGTEST} ${CMAKE_THREAD_LIBS_INIT})
+find_package(GMock REQUIRED)
+set(TESTLIBS ${TESTLIBS} ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
# gtest does weird things with its own implementation of tr1::tuple. For clang, we need to
# set this macro, otherwise anything that includes gtest.h won't compile.
@@ -9,7 +8,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_USE_OWN_TR1_TUPLE=1")
endif()
-add_subdirectory(libgtest)
add_subdirectory(unity)
set(TEST_SRC
diff --git a/test/gtest/libgtest/CMakeLists.txt b/test/gtest/libgtest/CMakeLists.txt
deleted file mode 100644
index e4b4074..0000000
--- a/test/gtest/libgtest/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-if (NOT DEFINED GTEST_ROOT)
- set(GTEST_ROOT /usr/src/gtest)
-endif()
-
-# Do not use -Wsuggest-override here, we can't fix gtest
-string (REPLACE "-Wsuggest-override" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-
-set(GTEST_SRC_DIR "${GTEST_ROOT}/src")
-set(GTEST_INCLUDE_DIR ${GTEST_ROOT})
-
-add_library(gtest STATIC
-${GTEST_SRC_DIR}/gtest-all.cc
-${GTEST_SRC_DIR}/gtest_main.cc
-)
-
-set_target_properties(gtest PROPERTIES INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIR})
-
-# Clang complains about unused private field 'pretty_' in gtest-internal-inl.h.
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-Wno-unused-private-field")
-endif()

View file

@ -0,0 +1,13 @@
diff --git a/cmake/modules/QmlTest.cmake b/cmake/modules/QmlTest.cmake
index 8241703..d209b55 100644
--- a/cmake/modules/QmlTest.cmake
+++ b/cmake/modules/QmlTest.cmake
@@ -15,7 +15,7 @@
# qmltest_DEFAULT_IMPORT_PATHS
# qmltest_DEFAULT_PROPERTIES
-find_program(qmltestrunner_exe qmltestrunner)
+find_program(qmltestrunner_exe qmltestrunner-qt5)
if(NOT qmltestrunner_exe)
message(FATAL_ERROR "Could not locate qmltestrunner.")