Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Package]: 编译了libime和fcitx5-chinese-addons如何传至仓里 #22121

Open
6 of 8 tasks
liuo2023 opened this issue Nov 5, 2024 · 14 comments
Open
6 of 8 tasks

[Package]: 编译了libime和fcitx5-chinese-addons如何传至仓里 #22121

liuo2023 opened this issue Nov 5, 2024 · 14 comments
Labels
package request A new package was requested

Comments

@liuo2023
Copy link

liuo2023 commented Nov 5, 2024

Why is it worth to add this package?

需要中文输入法,目前已经编译并安装libime和fcitx5-Chinese-addons,需要递交到x11-repo代码仓

Home page URL

https://fcitx-im.org

Source code URL

https://github.com/fcitx/fcitx5-chinese-adsons

Packaging policy acknowledgement

  • The project is actively developed.

  • The project has existing packages and is "well known".

  • Licensed under an open source license.

  • Not available through a language package manager: pip, npm, cpan, cargo, etc.

  • Not taking up too much disk space (< 100MiB per architecture, exceptions can be made)

  • Not duplicating the functionality of existing packages.

  • Not serving hacking, malware, phishing, spamming, spying, ddos functionality.

  • I certify that I have read Termux Packaging Policy and understand that my request will be denied if it is found lacking.

Additional information

No response

@liuo2023 liuo2023 added the package request A new package was requested label Nov 5, 2024
@Biswa96
Copy link
Member

Biswa96 commented Nov 7, 2024

I have tried to compile fcitx5-chinese-addons package but I can not compile its dependency libime. The later one requires some tools which need to be built for host x86_64. The libime tools requires fcitx5 and dependencies.

@liuo2023
Copy link
Author

liuo2023 commented Nov 8, 2024

I have tried to compile fcitx5-chinese-addons package but I can not compile its dependency libime. The later one requires some tools which need to be built for host x86_64. The libime tools requires fcitx5 and dependencies.

非常简单,下载分别下载libime源码和 kenlm源码. git clone https://mirror.ghproxy.com/https://github.com/kpu/kenlm.git,然后将kenlm源码里面kenlm目录下的文件复制到libime-1.1.9/src/libime/core/kenlm,然后编译安装。很简单的。

@liuo2023
Copy link
Author

liuo2023 commented Nov 8, 2024

I have tried to compile fcitx5-chinese-addons package but I can not compile its dependency libime. The later one requires some tools which need to be built for host x86_64. The libime tools requires fcitx5 and dependencies.

没有那么复杂,先编译安装libime包,然后编译fcitx5-chinese-addons,但编译fcitx5-chinese-addons的时候要注意在主要的Cmakelist.txt中屏蔽一下qt6-qtwebengine

@liuo2023
Copy link
Author

liuo2023 commented Nov 8, 2024

编译fcitx5-chinese-addons 主CMakeList.txt中添加
原来的是这样的:
cmake_minimum_required(VERSION 3.6.0)
project(fcitx5-chinese-addons VERSION 5.1.7)

find_package(ECM REQUIRED 1.0.0)

修改后是这样的:
cmake_minimum_required(VERSION 3.6.0)
project(fcitx5-chinese-addons VERSION 5.1.7)
set(QT_HOST_PATH_CMAKE_DIR /data/data/com.termux/files/usr/lib/cmake)
set(QT_HOST_PATH /data/data/com.termux/files/usr/lib/cmake/Qt6/)
find_package(ECM REQUIRED 1.0.0)

删除掉的内容:
else()
find_package(Qt${QT_MAJOR_VERSION}WebEngineWidgets REQUIRED)

@liuo2023
Copy link
Author

liuo2023 commented Nov 8, 2024 via email

@liuo2023
Copy link
Author

liuo2023 commented Nov 8, 2024

fcitx5-chinese-addons 里面涉及的
else()
find_package(Qt${QT_MAJOR_VERSION}WebEngineWidgets REQUIRED)
都要删除

@liuo2023
Copy link
Author

liuo2023 commented Nov 8, 2024

因为qt6-qtwebengine 没有相关的包

@Biswa96
Copy link
Member

Biswa96 commented Nov 8, 2024

The issue is not about that. The termux packages are cross compile for 4 CPU architectures (aarch64, arm, x86, x86_64) but the host platform is x86_64 Ubuntu. So, the build failed with /bin/sh: 1: LibIME::slm_build_binary: not found error. We need libime for x86_64 Ubuntu host which requires every fcitx dependencies.

@liuo2023
Copy link
Author

liuo2023 commented Nov 8, 2024

The issue is not about that. The termux packages are cross compile for 4 CPU architectures (aarch64, arm, x86, x86_64) but the host platform is x86_64 Ubuntu. So, the build failed with /bin/sh: 1: LibIME::slm_build_binary: not found error. We need libime for x86_64 Ubuntu host which requires every fcitx dependencies.

你缺少src/libime/core/kenlm/lm/build_binary_main.cc.o 这个文件,这个源于kenlm源码,去下载kenlm源码,替换到libime相应目录里面

@liuo2023
Copy link
Author

liuo2023 commented Nov 8, 2024

libime源码中,kenlm里面没有源码,这个需要到kenlm仓中下载,将kenlm源码放进去,然后直接编译libime即可,不需要编译kenlm

@liuo2023
Copy link
Author

close

@Biswa96
Copy link
Member

Biswa96 commented Nov 11, 2024

The issue is not solved yet. I've built the packages without dictionary files. I'll try to add the packages.

@Biswa96 Biswa96 reopened this Nov 11, 2024
@liuo2023
Copy link
Author

The issue is not solved yet. I've built the packages without dictionary files. I'll try to add the packages.

dictionary files will be downloaded automatically when build libime

@Biswa96
Copy link
Member

Biswa96 commented Nov 14, 2024

I have added the required packages in the aforementioned pull request. Those do not have dictionary files yet. I have copied them from ArchLinux packages. Here is the result in mousepad text editor in xfce4.

image

I can not figure out how to add dictionary files with the cross compilation. Please feel free to add necessary changes in a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package request A new package was requested
Projects
None yet
Development

No branches or pull requests

2 participants