Skip to content

Commit

Permalink
libthai (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored Dec 30, 2023
1 parent ea56bb1 commit e48583e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "libime"]
path = libime
url = https://github.com/fcitx/libime
[submodule "libthai"]
path = libthai
url = https://github.com/tlwg/libthai
1 change: 1 addition & 0 deletions all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -e
all_packages=(
marisa
libime
libthai
)

for package in "${all_packages[@]}"; do
Expand Down
1 change: 1 addition & 0 deletions libthai
Submodule libthai added at 185a81
19 changes: 19 additions & 0 deletions patches/libthai.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.22.1)
project(libthai)

set(LIBTHAI_HEADER
"include/thai/thailib.h"
"include/thai/thcell.h"
"include/thai/thinp.h"
)
set(LIBTHAI_SOURCE
src/thcell/thcell.c
src/thctype/thctype.c
src/thctype/wtt.c
src/thinp/thinp.c
)

add_library(thai STATIC ${LIBTHAI_SOURCE})
target_include_directories(thai PRIVATE include)
install(TARGETS thai)
install(FILES ${LIBTHAI_HEADER} DESTINATION include/thai)
9 changes: 9 additions & 0 deletions scripts/libthai.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set -e
. ./common.sh $1
cd libthai

cp ../patches/libthai.cmake CMakeLists.txt
f5m_configure
f5m_build
f5m_install libthai
f5m_make_tarball libthai

0 comments on commit e48583e

Please sign in to comment.