79 lines
2.5 KiB
Bash
79 lines
2.5 KiB
Bash
# Template file for 'fcitx5-chinese-addons'
|
|
pkgname=fcitx5-chinese-addons
|
|
version=5.1.5
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="-DENABLE_OPENCC=ON -DENABLE_GUI=ON -DENABLE_BROWSER=ON
|
|
-DENABLE_CLOUDPINYIN=ON -DENABLE_DATA=ON"
|
|
hostmakedepends="pkg-config gettext doxygen extra-cmake-modules libime-utils"
|
|
makedepends="libfcitx5-devel fmt-devel opencc-devel fcitx5-lua-devel
|
|
libcurl-devel boost-devel libime-devel"
|
|
short_desc="Fcitx5 - Chinese related addon"
|
|
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
|
license="GPL-2.0-or-later, LGPL-2.1-or-later"
|
|
homepage="https://fcitx-im.org/wiki/Fcitx"
|
|
_pytable_version=20121124
|
|
_pystroke_version=20121124
|
|
distfiles="https://download.fcitx-im.org/fcitx5/fcitx5-chinese-addons/fcitx5-chinese-addons-${version}.tar.zst
|
|
http://download.fcitx-im.org/data/py_table-${_pytable_version}.tar.gz
|
|
http://download.fcitx-im.org/data/py_stroke-${_pystroke_version}.tar.gz"
|
|
checksum="4987c529080d9920d1d29469f3721a57394e101d8ea05c4e3225bb689696da24
|
|
42146ac97de6c13d55f9e99ed873915f4c66739e9c11532a34556badf9792c04
|
|
8eb128a9bfa43952e67cf2fcee1fd134c6f4cfd317bc2f6c38a615f5eb64e248"
|
|
skip_extraction="
|
|
py_table-${_pytable_version}.tar.gz
|
|
py_stroke-${_pystroke_version}.tar.gz"
|
|
lib32disabled=yes
|
|
replaces="fcitx5-chinese-addons-icons>=0"
|
|
|
|
_have_webengine=no
|
|
if [ "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ]; then
|
|
_have_webengine=yes
|
|
fi
|
|
if [ "$XBPS_WORDSIZE" = 32 ]; then
|
|
_have_webengine=no
|
|
fi
|
|
|
|
if [ "$_have_webengine" = yes ]; then
|
|
configure_args+=" -DUSE_QT6=ON -DUSE_WEBKIT=OFF"
|
|
hostmakedepends+=" qt6-base"
|
|
makedepends+=" qt6-webengine-devel fcitx5-qt6-devel"
|
|
else
|
|
configure_args+=" -DUSE_QT6=OFF -DUSE_WEBKIT=ON"
|
|
hostmakedepends+=" qt5-host-tools qt5-qmake"
|
|
makedepends+=" qt5-webkit-devel fcitx5-qt5-devel"
|
|
fi
|
|
|
|
post_extract() {
|
|
local _srcdistdir=${XBPS_SRCDISTDIR}/${pkgname}-${version}
|
|
local _file
|
|
for _file in ${skip_extraction}; do
|
|
cp ${_srcdistdir}/$_file modules/pinyinhelper
|
|
done
|
|
}
|
|
|
|
fcitx5-cloudpinyin_package() {
|
|
short_desc="Fcitx5 - Cloud based PinYin"
|
|
pkg_install() {
|
|
vmove usr/share/fcitx5/addon/cloudpinyin.conf
|
|
vmove usr/lib/fcitx5/libcloudpinyin.so
|
|
}
|
|
}
|
|
|
|
fcitx5-chinese-addons-pinyin-dict-manager_package() {
|
|
short_desc+=" - Pinyin Dictionaries Manager"
|
|
depends="fcitx5-chinese-addons>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove "usr/lib/fcitx5/qt*"
|
|
}
|
|
}
|
|
|
|
fcitx5-chinese-addons-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="fcitx5-chinese-addons>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/cmake
|
|
}
|
|
}
|