diff options
author | xiota | 2024-01-26 06:10:51 -0800 |
---|---|---|
committer | xiota | 2024-01-26 06:50:19 -0800 |
commit | 4f5cd565cf6e8a135e3b5a68f6123ef8ee727608 (patch) | |
tree | 4dfe33a8b238d2d7d4d0bb910eb72888fb335203 | |
parent | 9b59b9ded973f257c88da376357a01ed34944207 (diff) | |
download | aur-4f5cd565cf6e8a135e3b5a68f6123ef8ee727608.tar.gz |
switch to qt6
add dep on libolm
build with clang/lld
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 46 |
2 files changed, 40 insertions, 24 deletions
@@ -1,7 +1,7 @@ pkgbase = quaternion pkgdesc = Qt-based IM client for the Matrix protocol pkgver = 0.0.96 - pkgrel = 1 + pkgrel = 2 url = https://github.com/quotient-im/Quaternion arch = aarch64 arch = i686 @@ -10,15 +10,19 @@ pkgbase = quaternion license = LGPL-2.1-or-later makedepends = cmake makedepends = git - depends = hicolor-icon-theme - depends = qt5-multimedia - depends = qt5-quickcontrols2 - depends = qt5-tools - depends = qtkeychain-qt5 - optdepends = qt5-graphicaleffects: Display the conversation history at startup + makedepends = qt6-tools + depends = libolm.so + depends = qt6-multimedia + depends = qt6-declarative + depends = qtkeychain-qt6 source = quaternion::git+https://github.com/quotient-im/Quaternion#tag=0.0.96 source = libquotient::git+https://github.com/quotient-im/libQuotient sha256sums = SKIP sha256sums = SKIP pkgname = quaternion + depends = libolm.so + depends = qt6-multimedia + depends = qt6-declarative + depends = qtkeychain-qt6 + depends = hicolor-icon-theme @@ -9,6 +9,8 @@ # https://github.com/quotient-im/Quaternion ## options +: ${_build_clang:=true} + : ${_build_git:=false} [[ "${_build_git::1}" == "t" ]] && _pkgtype+="-git" @@ -17,7 +19,7 @@ _pkgname="quaternion" pkgname="$_pkgname${_pkgtype:-}" pkgver=0.0.96 -pkgrel=1 +pkgrel=2 pkgdesc='Qt-based IM client for the Matrix protocol' url="https://github.com/quotient-im/Quaternion" license=('GPL-3.0-or-later' 'LGPL-2.1-or-later') @@ -26,21 +28,25 @@ arch=('aarch64' 'i686' 'x86_64') ## main package _main_package() { depends=( - hicolor-icon-theme - qt5-multimedia - qt5-quickcontrols2 - qt5-tools - qtkeychain-qt5 + libolm.so + qt6-multimedia + qt6-declarative + qtkeychain-qt6 ) makedepends=( cmake git - ) - optdepends=( - 'qt5-graphicaleffects: Display the conversation history at startup' + qt6-tools ) - if [ "${_build_git::1}" != "t" ] ; then + if [[ "${_build_clang::1}" != "t" ]] ; then + makedepends+=( + clang + lld + ) + fi + + if [[ "${_build_git::1}" != "t" ]] ; then _main_stable else _main_git @@ -58,7 +64,6 @@ _main_stable() { ) sha256sums=( 'SKIP' - 'SKIP' ) @@ -73,7 +78,7 @@ _main_stable() { ## git package _main_git() { - provides=("$_pkgname") + provides=("$_pkgname=${pkgver%.r**}") conflicts=("$_pkgname") _pkgsrc="$_pkgname" @@ -89,16 +94,14 @@ _main_git() { ) sha256sums=( 'SKIP' - 'SKIP' - 'SKIP' 'SKIP' ) pkgver() { cd "$_pkgsrc" - git describe --long --tags --exclude '[a-z]*' --exclude '*[a-z][a-z]*' \ + git describe --long --tags --abbrev=8 --exclude '[a-z]*' --exclude '*[a-z][a-z]*' \ | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } @@ -141,13 +144,18 @@ prepare() { } build() { + if [[ "${_build_clang::1}" != "t" ]] ; then + export CXX=clang++ + export LDFLAGS+=" -fuse-ld=lld" + fi + local _cmake_options=( -B build -S "$_pkgsrc" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_BUILD_TYPE=Release -DUSE_INTREE_LIBQMC=ON - -DBUILD_WITH_QT6=OFF + -DBUILD_WITH_QT6=ON ) cmake "${_cmake_options[@]}" @@ -155,7 +163,11 @@ build() { } package() { - DESTDIR="${pkgdir:?}" cmake --install build + depends+=( + hicolor-icon-theme + ) + + DESTDIR="$pkgdir" cmake --install build } ## execute |