From e006da1cf4ce59cd6999871805709636429591bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 13 Mar 2022 20:09:35 +0700 Subject: [PATCH] libchewing: cross-compiling --- srcpkgs/libchewing-data | 1 - .../libchewing/patches/cross-compile.patch | 23 +++++++++++++++++++ srcpkgs/libchewing/template | 13 +++-------- 3 files changed, 26 insertions(+), 11 deletions(-) delete mode 120000 srcpkgs/libchewing-data create mode 100644 srcpkgs/libchewing/patches/cross-compile.patch diff --git a/srcpkgs/libchewing-data b/srcpkgs/libchewing-data deleted file mode 120000 index 5ea20a615bb..00000000000 --- a/srcpkgs/libchewing-data +++ /dev/null @@ -1 +0,0 @@ -libchewing \ No newline at end of file diff --git a/srcpkgs/libchewing/patches/cross-compile.patch b/srcpkgs/libchewing/patches/cross-compile.patch new file mode 100644 index 00000000000..d127a83589f --- /dev/null +++ b/srcpkgs/libchewing/patches/cross-compile.patch @@ -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 diff --git a/srcpkgs/libchewing/template b/srcpkgs/libchewing/template index 7e1acca89dc..9345a70fe6f 100644 --- a/srcpkgs/libchewing/template +++ b/srcpkgs/libchewing/template @@ -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 " 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 - } -}