diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -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 } |