Update to 1.8.8

- Add PINYIN_MODE = TRUE to cangjie-big.txt, quick-classic.txt, and erbi.txt
- Make “Traditional Chinese only” the default for quick5
- Improve the quick5.txt table in a similar way the cangjie5.txt
  table was recently improved
  (Resolves: https://github.com/mike-fabian/ibus-table-chinese/issues/4)
- Build outside of the source tree
  (Resolves: https://github.com/mike-fabian/ibus-table-chinese/issues/2)
This commit is contained in:
Mike FABIAN 2022-02-07 21:42:33 +01:00
parent 36aa7bd140
commit e20d99071e
4 changed files with 211 additions and 8 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@
/ibus-table-chinese-1.8.5.tar.gz
/ibus-table-chinese-1.8.6.tar.gz
/ibus-table-chinese-1.8.7.tar.gz
/ibus-table-chinese-1.8.8.tar.gz

View File

@ -0,0 +1,193 @@
From 1dee2a155641f265fc7302cfdf25b56c0de82a1a Mon Sep 17 00:00:00 2001
From: Mike FABIAN <mfabian@redhat.com>
Date: Mon, 7 Feb 2022 20:53:30 +0100
Subject: [PATCH] Make build outside of the source tree possible
Resolves: https://github.com/mike-fabian/ibus-table-chinese/issues/3
---
CMakeLists.txt | 2 +-
tables/CMakeLists.txt | 4 ++--
tables/array/CMakeLists.txt | 6 +++---
tables/cangjie/CMakeLists.txt | 6 +++++-
tables/cantonese/CMakeLists.txt | 6 +++++-
tables/easy/CMakeLists.txt | 2 +-
tables/erbi/CMakeLists.txt | 4 +++-
tables/quick/CMakeLists.txt | 5 ++++-
tables/scj/CMakeLists.txt | 2 +-
tables/stroke5/CMakeLists.txt | 2 +-
tables/wu/CMakeLists.txt | 2 +-
tables/wubi-haifeng/CMakeLists.txt | 7 +++++--
tables/wubi-jidian/CMakeLists.txt | 3 +--
tables/yong/CMakeLists.txt | 2 +-
14 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9113fba..d881c05 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.6.2)
+cmake_minimum_required(VERSION 3.0.0)
# Default CMAKE_INSTALL_PREFIX should be set before PROJECT()
SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install dir prefix")
diff --git a/tables/CMakeLists.txt b/tables/CMakeLists.txt
index 6a5c8c1..a9f6ddc 100644
--- a/tables/CMakeLists.txt
+++ b/tables/CMakeLists.txt
@@ -76,7 +76,7 @@ ENDMACRO(MAKE_TABLE_SOURCE_TXT outputFile)
ADD_CUSTOM_TARGET(convert_all ALL)
MACRO(CONVERT_DB targetName)
- SET(_tableList "")
+ # SET(_tableList "")
SET(_dependDb "")
SET(_dependIcon "")
FOREACH(_tabFile ${ARGN})
@@ -87,7 +87,7 @@ MACRO(CONVERT_DB targetName)
DEPENDS ${_tabFile}
COMMENT "Building ${_tabName} table"
)
- LIST(APPEND _dependDb "${_dbF}")
+ LIST(APPEND _dependDb "${CMAKE_CURRENT_BINARY_DIR}/${_dbF}")
IF(EXISTS "${CMAKE_SOURCE_DIR}/icons/${_tabName}.png")
LIST(APPEND _dependIcon "${CMAKE_SOURCE_DIR}/icons/${_tabName}.png")
ELSEIF(EXISTS "${CMAKE_SOURCE_DIR}/icons/${_tabName}.svg")
diff --git a/tables/array/CMakeLists.txt b/tables/array/CMakeLists.txt
index 7f9015d..88b06ac 100644
--- a/tables/array/CMakeLists.txt
+++ b/tables/array/CMakeLists.txt
@@ -16,7 +16,7 @@ SET(ARRAY30_BASE_HEAD "${ARRAY30_BASE}.head")
CONFIGURE_FILE(${ARRAY30_HEAD_IN} ${ARRAY30_BASE_HEAD} @ONLY)
-CONVERT_ENCODING(${ARRAY30_BASE_UTF8} UTF16 array30_27489.txt)
+CONVERT_ENCODING(${CMAKE_CURRENT_BINARY_DIR}/array30.utf8 UTF16 ${CMAKE_SOURCE_DIR}/tables/array/array30_27489.txt)
GENERATE_FREQ(${ARRAY30_BASE_FREQ}
${ARRAY30_BASE_UTF8}
)
@@ -41,10 +41,10 @@ SET(ARRAY30_BIG_HEAD "${ARRAY30_BIG}.head")
CONFIGURE_FILE(${ARRAY30_HEAD_IN} ${ARRAY30_BIG_HEAD} @ONLY)
SET(ARRAY30_EXT_B_UTF8 ${CMAKE_CURRENT_BINARY_DIR}/array30_ExtB.utf8)
-CONVERT_ENCODING(${CMAKE_CURRENT_BINARY_DIR}/array30_ExtB.utf8 UTF16 array30_ExtB.txt)
+CONVERT_ENCODING(${CMAKE_CURRENT_BINARY_DIR}/array30_ExtB.utf8 UTF16 ${CMAKE_SOURCE_DIR}/tables/array/array30_ExtB.txt)
SET(ARRAY30_EXT_CD_UTF8 ${CMAKE_CURRENT_BINARY_DIR}/array30_ExtCD.utf8)
-CONVERT_ENCODING(${CMAKE_CURRENT_BINARY_DIR}/array30_ExtCD.utf8 UTF16 array30_ExtCD_V2012A.txt)
+CONVERT_ENCODING(${CMAKE_CURRENT_BINARY_DIR}/array30_ExtCD.utf8 UTF16 ${CMAKE_SOURCE_DIR}/tables/array/array30_ExtCD_V2012A.txt)
ADD_CUSTOM_COMMAND(OUTPUT ${ARRAY30_BIG_UTF8}
COMMAND cat ${ARRAY30_BASE_UTF8}
diff --git a/tables/cangjie/CMakeLists.txt b/tables/cangjie/CMakeLists.txt
index 92c54d0..29fcd29 100644
--- a/tables/cangjie/CMakeLists.txt
+++ b/tables/cangjie/CMakeLists.txt
@@ -1,2 +1,6 @@
-CONVERT_DB(cangjie "cangjie3.txt" "cangjie5.txt" "cangjie-big.txt")
+CONVERT_DB(cangjie
+ "${CMAKE_SOURCE_DIR}/tables/cangjie/cangjie3.txt"
+ "${CMAKE_SOURCE_DIR}/tables/cangjie/cangjie5.txt"
+ "${CMAKE_SOURCE_DIR}/tables/cangjie/cangjie-big.txt")
+
diff --git a/tables/cantonese/CMakeLists.txt b/tables/cantonese/CMakeLists.txt
index 7e7d04e..1e9a033 100644
--- a/tables/cantonese/CMakeLists.txt
+++ b/tables/cantonese/CMakeLists.txt
@@ -1,2 +1,6 @@
-CONVERT_DB(cantonese "cantonese.txt" "cantonhk.txt" "cantonyale.txt" "jyutping.txt")
+CONVERT_DB(cantonese
+ "${CMAKE_SOURCE_DIR}/tables/cantonese/cantonese.txt"
+ "${CMAKE_SOURCE_DIR}/tables/cantonese/cantonhk.txt"
+ "${CMAKE_SOURCE_DIR}/tables/cantonese/cantonyale.txt"
+ "${CMAKE_SOURCE_DIR}/tables/cantonese/jyutping.txt")
diff --git a/tables/easy/CMakeLists.txt b/tables/easy/CMakeLists.txt
index fb5baa5..1fbd4b0 100644
--- a/tables/easy/CMakeLists.txt
+++ b/tables/easy/CMakeLists.txt
@@ -1,2 +1,2 @@
-CONVERT_DB(easy "easy-big.txt")
+CONVERT_DB(easy "${CMAKE_SOURCE_DIR}/tables/easy/easy-big.txt")
diff --git a/tables/erbi/CMakeLists.txt b/tables/erbi/CMakeLists.txt
index d265b89..5e0ec60 100644
--- a/tables/erbi/CMakeLists.txt
+++ b/tables/erbi/CMakeLists.txt
@@ -1,2 +1,4 @@
-CONVERT_DB(erbi "erbi.txt" "erbi-qs.txt")
+CONVERT_DB(erbi
+ "${CMAKE_SOURCE_DIR}/tables/erbi/erbi.txt"
+ "${CMAKE_SOURCE_DIR}/tables/erbi/erbi-qs.txt")
diff --git a/tables/quick/CMakeLists.txt b/tables/quick/CMakeLists.txt
index 7cee315..b7f03f1 100644
--- a/tables/quick/CMakeLists.txt
+++ b/tables/quick/CMakeLists.txt
@@ -1,2 +1,5 @@
-CONVERT_DB(quick "quick3.txt" "quick5.txt" "quick-classic.txt")
+CONVERT_DB(quick
+ "${CMAKE_SOURCE_DIR}/tables/quick/quick3.txt"
+ "${CMAKE_SOURCE_DIR}/tables/quick/quick5.txt"
+ "${CMAKE_SOURCE_DIR}/tables/quick/quick-classic.txt")
diff --git a/tables/scj/CMakeLists.txt b/tables/scj/CMakeLists.txt
index 4decc9e..12186af 100644
--- a/tables/scj/CMakeLists.txt
+++ b/tables/scj/CMakeLists.txt
@@ -1,2 +1,2 @@
-CONVERT_DB(scj "scj6.txt")
+CONVERT_DB(scj "${CMAKE_SOURCE_DIR}/tables/scj/scj6.txt")
diff --git a/tables/stroke5/CMakeLists.txt b/tables/stroke5/CMakeLists.txt
index 72d01e2..6aaffa4 100644
--- a/tables/stroke5/CMakeLists.txt
+++ b/tables/stroke5/CMakeLists.txt
@@ -1,2 +1,2 @@
-CONVERT_DB(stroke5 "stroke5.txt")
+CONVERT_DB(stroke5 "${CMAKE_SOURCE_DIR}/tables/stroke5/stroke5.txt")
diff --git a/tables/wu/CMakeLists.txt b/tables/wu/CMakeLists.txt
index dea90c0..2e33292 100644
--- a/tables/wu/CMakeLists.txt
+++ b/tables/wu/CMakeLists.txt
@@ -1,2 +1,2 @@
-CONVERT_DB(wu "wu.txt")
+CONVERT_DB(wu "${CMAKE_SOURCE_DIR}/tables/wu/wu.txt")
diff --git a/tables/wubi-haifeng/CMakeLists.txt b/tables/wubi-haifeng/CMakeLists.txt
index 25c8206..4cdca8c 100644
--- a/tables/wubi-haifeng/CMakeLists.txt
+++ b/tables/wubi-haifeng/CMakeLists.txt
@@ -5,6 +5,9 @@
# COMMENT "Building wubi-haifeng86.UTF-8"
# )
-MAKE_TABLE_SOURCE_TXT(wubi-haifeng86.txt wubi-haifeng86.head wubi-haifeng86.UTF-8 wubi-haifeng86.tail)
-CONVERT_DB(wubi-haifeng "wubi-haifeng86.txt")
+MAKE_TABLE_SOURCE_TXT(${CMAKE_CURRENT_BINARY_DIR}/wubi-haifeng86.txt
+ ${CMAKE_SOURCE_DIR}/tables/wubi-haifeng/wubi-haifeng86.head
+ ${CMAKE_SOURCE_DIR}/tables/wubi-haifeng/wubi-haifeng86.UTF-8
+ ${CMAKE_SOURCE_DIR}/tables/wubi-haifeng/wubi-haifeng86.tail)
+CONVERT_DB(wubi-haifeng "${CMAKE_CURRENT_BINARY_DIR}/wubi-haifeng86.txt")
diff --git a/tables/wubi-jidian/CMakeLists.txt b/tables/wubi-jidian/CMakeLists.txt
index 93ac9c0..ea0aa1b 100644
--- a/tables/wubi-jidian/CMakeLists.txt
+++ b/tables/wubi-jidian/CMakeLists.txt
@@ -1,2 +1 @@
-CONVERT_DB(wubi-jidian "wubi-jidian86.txt")
-
+CONVERT_DB(wubi-jidian "${CMAKE_SOURCE_DIR}/tables/wubi-jidian/wubi-jidian86.txt")
diff --git a/tables/yong/CMakeLists.txt b/tables/yong/CMakeLists.txt
index e3ddb03..f6749a1 100644
--- a/tables/yong/CMakeLists.txt
+++ b/tables/yong/CMakeLists.txt
@@ -1,2 +1,2 @@
-CONVERT_DB(yong "yong.txt")
+CONVERT_DB(yong "${CMAKE_SOURCE_DIR}/tables/yong/yong.txt")
--
2.34.1

View File

@ -2,8 +2,8 @@
%global ibus_tables_dir %{_datadir}/ibus-table/tables
%global ibus_icons_dir %{_datadir}/ibus-table/icons
Name: ibus-table-chinese
Version: 1.8.7
Release: 2%{?dist}
Version: 1.8.8
Release: 1%{?dist}
Summary: Chinese input tables for IBus
Summary(zh_CN): 中文码表输入法
Summary(zh_TW): 中文碼表輸入法
@ -11,7 +11,7 @@ License: GPLv3+
URL: https://github.com/mike-fabian/ibus-table-chinese
Source0: https://github.com/mike-fabian/ibus-table-chinese/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: cmake >= 2.6.2
BuildRequires: cmake >= 3.0.0
BuildRequires: ibus-table-devel >= 1.10.0
BuildRequires: make
Requires: ibus-table >= 1.10.0
@ -301,13 +301,12 @@ Cantonese input method based on yale romanization
%setup -q -n %{name}-%{version}
%build
# $RPM_OPT_FLAGS should be loaded from cmake macro.
%cmake -B .
%__make VERBOSE=1 %{?_smp_mflags}
cmake -B build-noarch -S .
make -C build-noarch
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
make -C build-noarch install DESTDIR=%{buildroot}
# Register as AppStream components to be visible in the software center
#
@ -801,6 +800,16 @@ rm -fr %{buildroot}%{_docdir}/*
%{ibus_tables_dir}/cantonyale.db
%changelog
* Wed Feb 09 2022 Mike FABIAN <mfabian@redhat.com> - 1.8.8-1
- Update to 1.8.8
- Add PINYIN_MODE = TRUE to cangjie-big.txt, quick-classic.txt, and erbi.txt
- Make “Traditional Chinese only” the default for quick5
- Improve the quick5.txt table in a similar way the cangjie5.txt
table was recently improved
(Resolves: https://github.com/mike-fabian/ibus-table-chinese/issues/4)
- Build outside of the source tree
(Resolves: https://github.com/mike-fabian/ibus-table-chinese/issues/2)
* Sat Jan 29 2022 Mike FABIAN <mfabian@redhat.com> - 1.8.7-2
- Dont index the databases in the post install

View File

@ -1 +1 @@
SHA512 (ibus-table-chinese-1.8.7.tar.gz) = 3754750d47e520e53b583c69acc9c55fca7a175189684ee3fec0d8aafdddf48b3d053fc47fece300c0163c7c9a3430506461c79e751a4951e47e11c631f7e9c6
SHA512 (ibus-table-chinese-1.8.8.tar.gz) = 1c7cf18a51f6c6ebd3223c8bc624148a2b730f0a1f511470d0ef8098c618d3d602b830c06bbc6ca95ed53a4dbcde54302e87fd5ed1896178db82f6de0170ee17