ashie / meta-inputmethod

Mirror of https://gitlab.com/clear-code/meta-inputmethod
https://gitlab.com/clear-code/meta-inputmethod
Other
1 stars 2 forks source link

update the layer to kirkstone #2

Closed hyyoxhk closed 1 year ago

hyyoxhk commented 1 year ago

Hi, Can you update the layer to branch kirkstone, I want to use the Chinese input method, but it cannot used on branch kirkstone, I ported fcitx5 and fcitx5-chinese-addons by referring your layer, and build success, but it seems something is wrong

can you help me to debug it ?

here is some log

$> weston --version
weston 10.0.0
$>
$>fcitx5 --version
5.0.23
$> fcitx5-remote -s pinyin
$> fcitx5-remote    
0
$> fcitx5-remote -o
$> fcitx5-remote # It's always 0, why?
0
$>
$> ps aux | grep weston
weston       529  0.0  0.1  10704  7060 ?        Ss   18:21   0:00 /lib/systemd/systemd --user
weston       530  0.0  0.0  13044  2140 ?        S    18:21   0:00 (sd-pam)
weston       566  0.0  0.0   5328  2928 ?        Ss   18:21   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
weston       662  0.0  0.0   3976  3108 pts/0    Ss   18:21   0:00 -sh
weston     16905  0.2  2.0 316628 82892 tty7     Ssl+ 18:36   0:07 /usr/bin/weston --log=/tmp/weston.log --modules=systemd-notify.so
weston     16908  0.0  0.0 160940  2460 tty7     S+   18:36   0:00 (sd-pam)
weston     16924  0.0  0.6  37652 24124 tty7     S+   18:36   0:00 /usr/libexec/weston-desktop-shell
weston     24455  0.0  0.4 111292 19776 tty7     S+   18:49   0:00 /usr/bin/fcitx5
weston     48042  0.0  0.0   5028  2096 pts/0    R+   19:30   0:00 ps aux
weston     48043  0.0  0.0   2948  1300 pts/0    S+   19:30   0:00 grep weston
$>
hyyoxhk commented 1 year ago

recipes fcitx5_5.0.23.bb

LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68"

SRC_URI = "https://download.fcitx-im.org/fcitx5/fcitx5/fcitx5-${PV}_dict.tar.xz"
SRC_URI[sha256sum] = "17f008e58f3d4821cfb39005151433d5f329c822e0d579a943fb478c14d846f0"

SRC_URI:append = "\
    file://0001-Add-CMAKE_SYSROOT-for-xkb_base.patch \
    file://0002-Add-options-to-disable-XIM-IBus-frontend.patch \
    file://0003-Add-an-option-to-disable-AppStream-metainfo.patch \
    file://0004-Avoid-to-add-CMAKE_SYSROOT-to-ISOCODES_ISO-_JSON.patch \
    file://0005-Tweak-include-directories-to-care-CMAKE_SYSROOT.patch \
    file://0006-Make-sure-to-get-global-registry.patch \
    file://0007-Disable-input-method-v2.patch \
"

DEPENDS = " \
    ninja-native extra-cmake-modules virtual/egl expat dbus fmt \
    libxcb xcb-util xcb-util-keysyms xcb-util-wm xcb-imdkit libxkbcommon libxkbfile\
    wayland wayland-native wayland-protocols iso-codes cairo \
    gdk-pixbuf pango enchant2 json-c fcitx5-tools-native xkeyboard-config \
    ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "libevent", d)} \
"

inherit cmake pkgconfig gettext

EXTRA_OECMAKE = "\
    -DCMAKE_SYSROOT=${RECIPE_SYSROOT} \
    -DENABLE_TEST=OFF \
    -DENABLE_IBUS=OFF \
    -DENABLE_METAINFO=OFF \
    -DENABLE_X11=${@bb.utils.contains("DISTRO_FEATURES", "x11", "ON", "OFF", d)} \
    -DENABLE_XIM=${@bb.utils.contains("DISTRO_FEATURES", "x11", "ON", "OFF", d)} \
    -DENABLE_WAYLAND=${@bb.utils.contains("DISTRO_FEATURES", "wayland", "ON", "OFF", d)} \
"

do_configure:append() {
    # Someone put unexpected "-I/usr/include" for building xim module but we
    # don't yet find who does it.
    NINJA_FLAGS_FILE="${B}/build.ninja"
    MAKEFILE_FLAGS_FILE="${B}/src/frontend/xim/CMakeFiles/xim.dir/flags.make"
    if test -f "${NINJA_FLAGS_FILE}"; then
        sed -i -e "s# -I/usr/include # #g" "${NINJA_FLAGS_FILE}"
    elif test -f "${MAKEFILE_FLAGS_FILE}"; then
        sed -i -e "s# -I/usr/include # #g" "${MAKEFILE_FLAGS_FILE}"
    fi
}

FILES:${PN} += " \
   ${datadir}/icons/hicolor/128x128/apps/*.png \
   ${datadir}/icons/hicolor/16x16/apps/*.png \
   ${datadir}/icons/hicolor/22x22/apps/*.png \
   ${datadir}/icons/hicolor/24x24/apps/*.png \
   ${datadir}/icons/hicolor/32x32/apps/*.png \
   ${datadir}/icons/hicolor/48x48/apps/*.png \
   ${datadir}/icons/hicolor/scalable/apps/*.svg \
   ${datadir}/dbus-1/services/org.fcitx.Fcitx5.service \
   ${datadir}/metainfo/* \
"

FILES:${PN}-dev += "${libdir}/cmake"
hyyoxhk commented 1 year ago

recipes fcitx5-chinese-addons_5.0.17.bb

LICENSE = "LGPL-2.0-only"
LIC_FILES_CHKSUM = " \
    file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \
    file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \
"

DEPENDS = "fcitx5 fcitx5-tools-native fmt curl opencc libime libime-tools-native"
RDEPENDS_${PN} = "fcitx5 curl opencc libime"

SRC_URI = " \
    https://download.fcitx-im.org/fcitx5/${BPN}/${BPN}-${PV}.tar.xz;name=src \
    https://download.fcitx-im.org/data/py_stroke-20121124.tar.gz;name=py_stroke \
    https://download.fcitx-im.org/data/py_table-20121124.tar.gz;name=py_table \
"
SRC_URI[src.sha256sum] = "9822aeac6b772d38df8bca4f806798d0cef8e8493cc601ddbe060b50b6f75f46"
SRC_URI[py_stroke.sha256sum] = "8eb128a9bfa43952e67cf2fcee1fd134c6f4cfd317bc2f6c38a615f5eb64e248"
SRC_URI[py_table.sha256sum] = "42146ac97de6c13d55f9e99ed873915f4c66739e9c11532a34556badf9792c04"

SRC_URI:append = "\
    file://0001-Add-CMAKE_SYSROOT-to-find-additional-cmake-file.patch \
    file://0002-Add-cmake-option-ENABLE_METAINFO.patch \
    file://0003-Work-arround-to-execute-libime_pinyindict-for-cross-.patch \
"

inherit cmake pkgconfig

EXTRA_OECMAKE += " \
    -DCMAKE_SYSROOT=${RECIPE_SYSROOT} \
    -DENABLE_METAINFO=OFF \
    -DENABLE_GUI=OFF \
    -DENABLE_TEST=OFF \
"

do_unpack[py_stroke.noexec] = "1"
do_unpack[py_table.noexec] = "1"
do_unpack_extra() {
    cp ${DL_DIR}/py_stroke-20121124.tar.gz ${S}/modules/pinyinhelper/
    cp ${DL_DIR}/py_table-20121124.tar.gz ${S}/modules/pinyinhelper/
}
addtask unpack_extra after do_unpack before do_patch

FILES:${PN} += "\
    ${libdir}/fcitx5/*.so \
    ${datadir}/icons \
    ${datadir}/fcitx5 \
"

FILES:${PN}-dev += "${libdir}/cmake"
hyyoxhk commented 1 year ago

My custom board is based on rk3568-evb, yocto layer is meta-rockchip ( https://github.com/JeffyCN/meta-rockchip ) , branch kirkstone