summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD26
2 files changed, 23 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 42d2f9d334da..b177e09466b7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 82724f8108b5..5adda74e5e16 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}