libchewing: cross-compiling

This commit is contained in:
Đoàn Trần Công Danh 2022-03-13 20:09:35 +07:00
parent c0377e57a6
commit e006da1cf4
3 changed files with 26 additions and 11 deletions

View file

@ -1 +0,0 @@
libchewing

View file

@ -0,0 +1,23 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 07112b0..597a764 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -229,15 +229,16 @@ set_target_properties(${ALL_TOOLS} PROPERTIES
)
# tools command
+file(MAKE_DIRECTORY ${DATA_BIN_DIR})
add_custom_command(
OUTPUT
${ALL_DATA}
- COMMAND ${CMAKE_COMMAND} -E make_directory ${DATA_BIN_DIR}
- COMMAND ${CMAKE_COMMAND} -E chdir ${DATA_BIN_DIR} ${TOOLS_BIN_DIR}/init_database ${DATA_SRC_DIR}/phone.cin ${DATA_SRC_DIR}/tsi.src
+ COMMAND init_database ${DATA_SRC_DIR}/phone.cin ${DATA_SRC_DIR}/tsi.src
DEPENDS
${ALL_TOOLS}
${DATA_SRC_DIR}/phone.cin
${DATA_SRC_DIR}/tsi.src
+ WORKING_DIRECTORY ${DATA_BIN_DIR}
)
# test

View file

@ -1,18 +1,18 @@
# Template file for 'libchewing'
pkgname=libchewing
version=0.5.1
revision=4
revision=5
build_style=cmake
build_helper="qemu"
hostmakedepends="texinfo"
makedepends="sqlite-devel"
depends="libchewing-data-${version}_${revision}"
short_desc="Intelligent phonetic (Zhuyin/Bopomofo) input method"
maintainer="Robert Stancil <robert.stancil@mavs.uta.edu>"
license="LGPL-2.1-only"
homepage="http://chewing.im/"
distfiles="https://github.com/chewing/libchewing/releases/download/v${version}/${pkgname}-${version}.tar.bz2"
checksum=9708c63415fa6034435c0f38100e7d30d0e1bac927f67bec6dfeb3fef016172b
nocross="/builddir/libchewing-0.5.1/build/src/tools/init_database: cannot execute binary file"
replaces="libchewing-data>=0"
libchewing-devel_package() {
depends="libchewing>=${version}_${revision}"
@ -25,10 +25,3 @@ libchewing-devel_package() {
vmove usr/share/info
}
}
libchewing-data_package() {
short_desc+=" - data files"
pkg_install() {
vmove usr/share/libchewing
}
}