diff options
Diffstat (limited to 'community/libquotient/APKBUILD')
-rw-r--r-- | community/libquotient/APKBUILD | 64 |
1 files changed, 48 insertions, 16 deletions
diff --git a/community/libquotient/APKBUILD b/community/libquotient/APKBUILD index 3a5df0eadc6..baeb08eb93d 100644 --- a/community/libquotient/APKBUILD +++ b/community/libquotient/APKBUILD @@ -1,45 +1,77 @@ # Contributor: Leo <thinkabit.ukim@gmail.com> # Maintainer: Bart Ribbers <bribbers@disroot.org> pkgname=libquotient -pkgver=0.6.7 +pkgver=0.8.1.2 pkgrel=0 -pkgdesc="Qt5 library for cross-platform clients for Matrix" +pkgdesc="Qt library for cross-platform clients for Matrix" url="https://github.com/quotient-im/libQuotient" -arch="all !armhf !mips64" # blocked by qt5-qtmultimedia, mips blocked by qtolm +arch="all !armhf" # blocked by qt5-qtmultimedia license="LGPL-2.1-or-later" depends_dev=" + olm-dev qt5-qtbase-dev qt5-qtmultimedia-dev + qt6-qtbase-dev + qtkeychain-dev " makedepends="$depends_dev cmake + samurai " -subpackages="$pkgname-dev" -source="https://github.com/quotient-im/libQuotient/archive/$pkgver/libQuotient-$pkgver.tar.gz" -options="!check" # Requires a running homeserver +subpackages="$pkgname-qt5 $pkgname-qt6 $pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/quotient-im/libQuotient/archive/refs/tags/$pkgver.tar.gz" builddir="$srcdir/libQuotient-$pkgver" build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ + CXXFLAGS="$CXXFLAGS -flto=auto" \ + + msg "Building for Qt5" + cmake -B build-qt5 -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=True \ + -DBUILD_TESTING=True \ + -DQuotient_ENABLE_E2EE=True \ + -DQuotient_INSTALL_TESTS=False + cmake --build build-qt5 + + msg "Building for Qt6" + cmake -B build-qt6 -G Ninja \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ - -DQuotient_ENABLE_E2EE=False # Broken - cmake --build build - cmake tests -B build-test - cmake --build build-test + -DBUILD_TESTING=True \ + -DBUILD_WITH_QT6=ON \ + -DQuotient_ENABLE_E2EE=True \ + -DQuotient_INSTALL_TESTS=False + cmake --build build-qt6 } check() { - cd build-test - ./quotest # <username> <password> quotest-travis '#quotest:matrix.org' "Alpine Linux CI" + # testolmaccount requires a running Matrix homeserver + ctest --test-dir build-qt5 --output-on-failure -E "testolmaccount" + ctest --test-dir build-qt6 --output-on-failure -E "testolmaccount" } package() { - DESTDIR="$pkgdir" cmake --install build + DESTDIR="$pkgdir" cmake --install build-qt5 + DESTDIR="$pkgdir" cmake --install build-qt6 + # android only + rm -r "$pkgdir"/usr/share/ndk-modules +} + +qt5() { + pkgdesc="$pkgdesc (qt5)" + amove usr/lib/libQuotient.so.* +} + +qt6() { + pkgdesc="$pkgdesc (qt6)" + amove usr/lib/libQuotientQt6.so.* } sha512sums=" -7f7c56ef5f775d38a0bd9f112f2fb7473d42d1e886d17e84d4be1afda146999658eea8691c38071fd87aec7ece52b97bc837cc98452cc698cf152003474193f2 libQuotient-0.6.7.tar.gz +ff11f1e9093004461425179fcab630237bf1d28f6e5abe6486d657b455b560884047715fccff5b31f26275ffd423df787014aaac35c556eddb1842e8e68841ce libquotient-0.8.1.2.tar.gz " |