Skip to content

Instantly share code, notes, and snippets.

@mikoim
Created September 29, 2018 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikoim/b0148c7b1f8e602102376e13ba40782d to your computer and use it in GitHub Desktop.
Save mikoim/b0148c7b1f8e602102376e13ba40782d to your computer and use it in GitHub Desktop.
Install latest fcitx4 on Fedora 28 from source
#!/bin/bash
# This script does not install dependencies. You must install them before continuing.
# ref. https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/fcitx
cd $BUILD_DIR
wget https://download.fcitx-im.org/fcitx/fcitx-4.2.9.6.tar.xz
wget https://download.fcitx-im.org/fcitx/fcitx-4.2.9.6_dict.tar.xz
wget https://download.fcitx-im.org/fcitx-configtool/fcitx-configtool-0.4.10.tar.xz
# wget https://download.fcitx-im.org/fcitx-gtk/fcitx-gtk-4.2.7.tar.xz
# wget https://download.fcitx-im.org/fcitx-qt5/fcitx-qt5-1.2.3.tar.xz
tar xf *.tar.xz
# fcitx4
cd fcitx-4.2.9.6
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DSYSCONFDIR=/usr/local/etc \
-DFORCE_OPENCC=ON \
-DFORCE_PRESAGE=ON \
-DFORCE_ENCHANT=ON \
-DENABLE_TEST=ON \
-DENABLE_GTK2_IM_MODULE=ON \
-DENABLE_GTK3_IM_MODULE=ON \
-DENABLE_QT_IM_MODULE=ON
make -j36
sudo make install
sudo gtk-query-immodules-3.0-64 --update-cache /usr/local/lib/gtk-3.0/3.0.0/immodules/im-fcitx.so
sudo gtk-query-immodules-2.0-64 --update-cache /usr/local/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so
# fcitx-configtool (fcitx-config-gtk3)
cd $BUILD_DIR
cd fcitx-configtool-0.4.10
mkdir build
cd build
env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local
make -j36
sudo make install
sudo patchelf --set-rpath /usr/local/lib /usr/local/bin/fcitx-config-gtk3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment