[arch-commits] Commit in chewing-editor/trunk (PKGBUILD no-rebuild-manpage.diff)

Chih-Hsuan Yen yan12125 at archlinux.org
Sat Jul 11 08:57:21 UTC 2020


    Date: Saturday, July 11, 2020 @ 08:57:20
  Author: yan12125
Revision: 663240

upgpkg: chewing-editor 0.1.1-7; fix the man page and follow CMake package guidelines

Added:
  chewing-editor/trunk/no-rebuild-manpage.diff
Modified:
  chewing-editor/trunk/PKGBUILD

-------------------------+
 PKGBUILD                |   29 +++++++++++++++++------------
 no-rebuild-manpage.diff |   11 +++++++++++
 2 files changed, 28 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-11 08:45:54 UTC (rev 663239)
+++ PKGBUILD	2020-07-11 08:57:20 UTC (rev 663240)
@@ -3,7 +3,7 @@
 
 pkgname=chewing-editor
 pkgver=0.1.1
-pkgrel=6
+pkgrel=7
 pkgdesc="Cross platform chewing user phrase editor"
 arch=('x86_64')
 url="http://chewing.im"
@@ -13,10 +13,12 @@
 checkdepends=('valgrind')
 source=("https://github.com/chewing/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz"
         system-gtest.patch
-        chewing-editor-reproducibility.patch::https://github.com/chewing/chewing-editor/commit/7db328e7372f870dc741436ba2da8ceb5199f2f9.patch)
+        chewing-editor-reproducibility.patch::https://github.com/chewing/chewing-editor/commit/7db328e7372f870dc741436ba2da8ceb5199f2f9.patch
+        no-rebuild-manpage.diff)
 sha256sums=('ad59ba32bb258d7a1ee6c105a4be54357d2de18cc324277a1429f53fbb23709b'
             '17f115cc9352c85973f1a3f75c2f1f17c2e8cc3e52a6656914d3895478cc35fc'
-            '36a2aa702f58e90f306f3de07dee2cac74f013dff4762e277fd0048d9476c430')
+            '36a2aa702f58e90f306f3de07dee2cac74f013dff4762e277fd0048d9476c430'
+            '864a7f5a0b50a96edb21cbc76448010b375d65bb35e2f012640d41839fb13df3')
 
 prepare() {
     cd $pkgname-$pkgver
@@ -26,29 +28,32 @@
 
     patch -Np1 -i ../chewing-editor-reproducibility.patch
 
+    # Building the man page requires an environment for Qt (see below). This
+    # patch avoids preparing the environment twice.
+    patch -Np1 -i ../no-rebuild-manpage.diff
+
     rm -r gmock
-
-    mkdir build
 }
 
 build() {
-    cd $pkgname-$pkgver/build
-
-    cmake \
+    cmake -S $pkgname-$pkgver -B build \
       -DCMAKE_INSTALL_PREFIX="/usr" \
-      ..
+      -DCMAKE_BUILD_TYPE=None
 
-    make
+    # Building the man page needs running `chewing-editor --version`, so
+    # preparing an environment for Qt
+    export XDG_RUNTIME_DIR="$PWD""$(mktemp -d runtimer_dir_XXXXXX)"
+    QT_QPA_PLATFORM=offscreen make -C build
 }
 
 check() {
-    cd $pkgname-$pkgver/build
+    cd build
 
     make test
 }
 
 package() {
-    cd $pkgname-$pkgver/build
+    cd build
 
     make DESTDIR="$pkgdir" install
 }

Added: no-rebuild-manpage.diff
===================================================================
--- no-rebuild-manpage.diff	                        (rev 0)
+++ no-rebuild-manpage.diff	2020-07-11 08:57:20 UTC (rev 663240)
@@ -0,0 +1,11 @@
+--- chewing-editor-0.1.1/CMakeLists.txt.orig	2020-07-08 00:51:45.394618655 +0800
++++ chewing-editor-0.1.1/CMakeLists.txt	2020-07-08 00:51:53.657721919 +0800
+@@ -248,7 +248,7 @@
+             OUTPUT
+                 ${manpage}.gz
+             COMMAND ${GZIP}
+-                -n -f
++                -n -f -k
+                 ${manpage}
+             DEPENDS
+                 ${manpage}



More information about the arch-commits mailing list