diff options
author | Morgenstern | 2021-01-03 11:54:01 +1300 |
---|---|---|
committer | Morgenstern | 2021-01-03 11:54:01 +1300 |
commit | 630e9ebd3553bf6f8d3d729b244f818bc981bbf9 (patch) | |
tree | a8e1b796b32d97c37798d158eff57ac6f31bdd5a | |
parent | 6e92ec8460f776ffeecbab56904b2983cfabf9f5 (diff) | |
download | aur-630e9ebd3553bf6f8d3d729b244f818bc981bbf9.tar.gz |
Use external fmt package, add optional check() function
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 26 |
2 files changed, 23 insertions, 9 deletions
@@ -1,6 +1,6 @@ pkgbase = cherrytree-git pkgdesc = Hierarchical note-taking application, git version - pkgver = 0.99.27.r13.g36b10bdd + pkgver = 0.99.28.r0.g4d0eba74 pkgrel = 1 url = https://github.com/giuspen/cherrytree arch = x86_64 @@ -8,11 +8,13 @@ pkgbase = cherrytree-git makedepends = cmake makedepends = git makedepends = python + makedepends = spdlog + depends = fmt depends = gspell depends = gtksourceviewmm depends = libxml++2.6 - depends = spdlog depends = uchardet + optdepends = xorg-xhost: allow chroot access to X server for running tests provides = cherrytree conflicts = cherrytree source = git+https://github.com/giuspen/cherrytree.git @@ -2,20 +2,22 @@ pkgname=cherrytree-git _pkgname="${pkgname%%-git}" -pkgver=0.99.27.r13.g36b10bdd +pkgver=0.99.28.r0.g4d0eba74 pkgrel=1 pkgdesc="Hierarchical note-taking application, git version" arch=('x86_64') url="https://github.com/giuspen/${_pkgname}" license=('GPL3') -depends=('gspell' +depends=('fmt' + 'gspell' 'gtksourceviewmm' 'libxml++2.6' - 'spdlog' 'uchardet') +optdepends=('xorg-xhost: allow chroot access to X server for running tests') makedepends=('cmake' 'git' - 'python') + 'python' + 'spdlog') provides=("${_pkgname}") conflicts=("${_pkgname}") source=("git+https://github.com/giuspen/${_pkgname}.git" @@ -35,19 +37,29 @@ prepare() { git submodule update } -# Remove GMOCK and TESTING options to build and run tests -# If utilising tests, make sure cherrytree is NOT already running! build() { cmake \ -B "${_pkgname}/build" \ -S "${_pkgname}" \ -DBUILD_GMOCK:BOOL='OFF' \ -DBUILD_TESTING:BOOL='OFF' \ - -DINSTALL_GTEST:BOOL='OFF' \ -Wno-dev make -C "${_pkgname}/build" } +# NOTE: In order to run tests in a clean chroot, you must allow it access your X server: +# xhost +local: +# https://wiki.archlinux.org/index.php/chroot#Run_graphical_applications_from_chroot +check() { + export DISPLAY=:0 + cmake \ + -B "${_pkgname}/test-build" \ + -S "${_pkgname}" \ + -DINSTALL_GTEST:BOOL='OFF' \ + -Wno-dev + make -C "${_pkgname}/test-build/tests" +} + package() { make -C "${_pkgname}/build" DESTDIR="${pkgdir}" install } |