Skip to content

Commit 80574f0

Browse files
authored
reduce libpinyin patch; update mozc (#65)
1 parent cbaae50 commit 80574f0

File tree

5 files changed

+13
-37
lines changed

5 files changed

+13
-37
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
pull_request:
88

99
env:
10-
MOZC_SHA: ac096a5226dc1b1828fdc188d1209d729447572e
10+
MOZC_SHA: 3feec1b11cd72d0af182da3f80bc3988a7ec3f10
1111

1212
jobs:
1313
lint:

patches/libpinyin.patch

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index aac36dfe..0942e6b5 100644
2+
index c04f10cf..a5a45a41 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -79,14 +79,12 @@ endif (DB_FOUND)
6-
if (NOT HAVE_BERKELEY_DB)
7-
# DBM: Kyoto Cabinet
8-
find_package(KyotoCabinet)
9-
- if (KyotoCabinet_FOUND)
10-
include_directories ( ${KyotoCabinet_INCLUDE_PATH} )
11-
SET (LIBS ${LIBS} ${KyotoCabinet_LIBRARY})
12-
SET (HAVE_KYOTO_CABINET 1)
13-
SET (DATABASE_FORMAT "KyotoCabinet")
14-
SET (CMAKE_CXX_LINK_EXECUTABLE
15-
"${CMAKE_CXX_LINK_EXECUTABLE} ${LIBS}")
16-
- endif (KyotoCabinet_FOUND)
17-
endif (NOT HAVE_BERKELEY_DB)
18-
19-
20-
@@ -141,6 +139,12 @@ configure_file(
5+
@@ -145,6 +145,12 @@ configure_file(
216
@ONLY
227
)
238

@@ -30,21 +15,14 @@ index aac36dfe..0942e6b5 100644
3015
configure_file(
3116
config.h.cmake
3217
config.h
33-
@@ -150,6 +154,7 @@ configure_file(
18+
@@ -154,6 +160,7 @@ configure_file(
3419
install(
3520
FILES
3621
${CMAKE_BINARY_DIR}/libpinyin.pc
3722
+ ${CMAKE_BINARY_DIR}/libzhuyin.pc
3823
DESTINATION
3924
${DIR_LIBRARY}/pkgconfig
4025
)
41-
@@ -178,6 +183,3 @@ include_directories(
42-
######## Subdirectories
43-
44-
add_subdirectory(src)
45-
-add_subdirectory(tests)
46-
-add_subdirectory(utils)
47-
-add_subdirectory(data)
4826
diff --git a/libzhuyin.pc.in b/libzhuyin.pc.in
4927
index f248d1c0..0e6b944f 100644
5028
--- a/libzhuyin.pc.in
@@ -57,20 +35,18 @@ index f248d1c0..0e6b944f 100644
5735
+Libs: -L${libdir} -lpinyin
5836
Cflags: -I${libzhuyinincludedir}
5937
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
60-
index fe16a668..f8a496fe 100644
38+
index f48a9b3e..f8a496fe 100644
6139
--- a/src/CMakeLists.txt
6240
+++ b/src/CMakeLists.txt
63-
@@ -10,8 +10,8 @@ set(
64-
41+
@@ -11,6 +11,7 @@ set(
6542
add_library(
6643
pinyin
67-
- SHARED
6844
${LIBPINYIN_SOURCES}
6945
+ zhuyin.cpp
7046
)
7147

7248
target_link_libraries(
73-
@@ -41,6 +41,7 @@ install(
49+
@@ -40,6 +41,7 @@ install(
7450
install(
7551
FILES
7652
${LIBPINYIN_HEADERS}
@@ -92,10 +68,10 @@ index 767748c2..77da8b1c 100644
9268
)
9369

9470
diff --git a/src/storage/CMakeLists.txt b/src/storage/CMakeLists.txt
95-
index 26330e0f..da215d76 100644
71+
index cceccdf1..43fa3245 100644
9672
--- a/src/storage/CMakeLists.txt
9773
+++ b/src/storage/CMakeLists.txt
98-
@@ -45,7 +45,7 @@ endif (HAVE_KYOTO_CABINET)
74+
@@ -48,7 +48,7 @@ endif (HAVE_KYOTO_CABINET)
9975

10076
add_library(
10177
storage
@@ -104,7 +80,7 @@ index 26330e0f..da215d76 100644
10480
${LIBSTORAGE_SOURCES}
10581
)
10682

107-
@@ -58,6 +58,7 @@ target_link_libraries(
83+
@@ -61,6 +61,7 @@ target_link_libraries(
10884
install(
10985
FILES
11086
${LIBSTORAGE_HEADERS}

scripts/libpinyin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
project = 'libpinyin'
44
patch(project)
55

6-
CMakeBuilder(project).exec()
6+
CMakeBuilder(project, ['-DBUILD_UTILS=OFF']).exec()

0 commit comments

Comments
 (0)