1 # Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
2 # Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>
7 pkgdesc="Cross platform chewing user phrase editor"
9 url="http://chewing.im"
11 depends=('glibc' 'libchewing' 'qt5-base')
12 makedepends=('cmake' 'qt5-tools' 'help2man' 'gtest' 'gmock')
13 checkdepends=('valgrind')
14 source=("https://github.com/chewing/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz"
16 chewing-editor-reproducibility.patch::https://github.com/chewing/chewing-editor/commit/7db328e7372f870dc741436ba2da8ceb5199f2f9.patch
17 no-rebuild-manpage.diff)
18 sha256sums=('ad59ba32bb258d7a1ee6c105a4be54357d2de18cc324277a1429f53fbb23709b'
19 '17f115cc9352c85973f1a3f75c2f1f17c2e8cc3e52a6656914d3895478cc35fc'
20 '36a2aa702f58e90f306f3de07dee2cac74f013dff4762e277fd0048d9476c430'
21 '864a7f5a0b50a96edb21cbc76448010b375d65bb35e2f012640d41839fb13df3')
26 # based on commits from https://github.com/iblis17/chewing-editor/tree/cmake-gtest
27 patch -Np1 -i ../system-gtest.patch
29 patch -Np1 -i ../chewing-editor-reproducibility.patch
31 # Building the man page requires an environment for Qt (see below). This
32 # patch avoids preparing the environment twice.
33 patch -Np1 -i ../no-rebuild-manpage.diff
39 cmake -S $pkgname-$pkgver -B build \
40 -DCMAKE_INSTALL_PREFIX="/usr" \
41 -DCMAKE_BUILD_TYPE=None
43 # Building the man page needs running `chewing-editor --version`, so
44 # preparing an environment for Qt
45 export XDG_RUNTIME_DIR="$PWD""$(mktemp -d runtimer_dir_XXXXXX)"
46 QT_QPA_PLATFORM=offscreen make -C build
58 make DESTDIR="$pkgdir" install