misc/fcitx: Updated for version 4.2.9.4.

Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
This commit is contained in:
Heinz Wiesinger 2017-08-30 21:05:50 +02:00 committed by Willy Sudiarto Raharjo
parent 79607a1a41
commit 5f7670e209
7 changed files with 73 additions and 53 deletions

View file

@ -3,8 +3,19 @@ supports linux and Unix systems, like freebsd. It has three builtin
Input Method Engine, Pinyin, QuWei and Table-based input methods.
By default, this slackbuild will build IM module support for GTK2, GTK3
and Qt.
and Qt4.
If you have installed OpenCC, you may run as below to make fcitx
support them:
# OPENCC=On ./fcitx.SlackBuild
To enable OpenCC support for chinese input, you can pass OPENCC=On to
the script:
OPENCC=On ./fcitx.SlackBuild
To enable fcitx put the following lines in your ~/.bashrc file
export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx
fcitx is pre-configured to autostart on xdg-compliant desktop environments
if these settings are present. On other desktop environments you can add
"fcitx-autostart" to the respective autostart settings.

View file

@ -2,12 +2,8 @@ if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -x /usr/bin/gtk-query-immodules-2.0 ]; then
/usr/bin/gtk-query-immodules-2.0 --update-cache
fi
if [ -x /usr/bin/gtk-query-immodules-3.0 ]; then
/usr/bin/gtk-query-immodules-3.0 --update-cache
if [ -x usr/bin/update-gtk-immodules ]; then
chroot . /usr/bin/update-gtk-immodules --verbose 1>/dev/null
fi
if [ -x /usr/bin/update-mime-database ]; then

View file

@ -0,0 +1,30 @@
--- fcitx-autostart.orig 2017-03-26 17:58:45.586105103 +0200
+++ fcitx-autostart 2017-03-26 17:59:09.693105345 +0200
@@ -1,4 +1,26 @@
-#!/bin/sh
+#!/bin/bash
+
+START="no"
+
+if [ "$XIM" = "fcitx" ]; then
+ START="yes"
+fi
+
+if [ "$XIM_PROGRAM" = "fcitx" ]; then
+ START="yes"
+fi
+
+if [ "$GTK_IM_MODULE" = "fcitx" ]; then
+ START="yes"
+fi
+
+if [ "$QT_IM_MOFULE" = "fcitx" ]; then
+ START="yes"
+fi
+
+if [ "$START" = "no" ]; then
+ exit 0
+fi
# sleep for a little while to avoid duplicate startup
sleep 2

View file

@ -3,6 +3,7 @@
# Slackware build script for fcitx.
# Copyright 2012 vvoody <vvoodywang@gmail.com>
# Copyright 2017 Heinz Wiesinger, Amsterdam, The Netherlands
#
# All rights reserved.
#
@ -24,7 +25,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=fcitx
VERSION=${VERSION:-4.2.8.6}
VERSION=${VERSION:-4.2.9.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -72,37 +73,33 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Patch fcitx-autostart to only start when fcitx is the configured input method
patch -p0 -d data/script/ -i $CWD/fcitx-autostart.patch
mkdir build
cd build
cmake -DCMAKE_C_FLAGS:STRING=${SLKCFLAGS} \
-DCMAKE_CXX_FLAGS:STRING=${SLKCFLAGS} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSYSCONFDIR=/etc \
-DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
-DENABLE_GTK2_IM_MODULE=On \
-DENABLE_GTK3_IM_MODULE=On \
-DENABLE_QT_IM_MODULE=On \
-DENABLE_OPENCC=${OPENCC} \
..
cmake \
-DCMAKE_C_FLAGS:STRING=${SLKCFLAGS} \
-DCMAKE_CXX_FLAGS:STRING=${SLKCFLAGS} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONFDIR=/etc \
-DENABLE_GTK2_IM_MODULE=On \
-DENABLE_GTK3_IM_MODULE=On \
-DENABLE_QT_IM_MODULE=On \
-DENABLE_OPENCC=${OPENCC} \
..
make
make install DESTDIR=$PKG
make install/strip DESTDIR=$PKG
cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mv $PKG/usr/share/man $PKG/usr
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/etc/profile.d
cat $CWD/profile.d/fcitx.sh > $PKG/etc/profile.d/fcitx.sh
cat $CWD/profile.d/fcitx.csh > $PKG/etc/profile.d/fcitx.csh
chmod 0755 $PKG/etc/profile.d/*
mv $PKG/usr/share/doc $PKG/usr
mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL README THANKS TODO $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL README THANKS TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install

View file

@ -1,10 +1,10 @@
PRGNAM="fcitx"
VERSION="4.2.8.6"
VERSION="4.2.9.4"
HOMEPAGE="https://fcitx-im.org"
DOWNLOAD="http://download.fcitx-im.org/fcitx/fcitx-4.2.8.6_dict.tar.xz"
MD5SUM="8dce1a0d65bf19f2a99b456458f8ac41"
DOWNLOAD="https://download.fcitx-im.org/fcitx/fcitx-4.2.9.4_dict.tar.xz"
MD5SUM="01a95b63fae67623cd594ab8517e80e9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Grissiom"
EMAIL="chaos.proton@gmail.com"
REQUIRES="libxkbcommon extra-cmake-modules"
MAINTAINER="Heinz Wiesinger"
EMAIL="pprkut@liwjatan.at"

View file

@ -1,7 +0,0 @@
#!/bin/csh
setenv XMODIFIERS "@im=fcitx"
setenv XIM fcitx
setenv XIM_PROGRAM fcitx
setenv GTK_IM_MODULE fcitx
setenv QT_IM_MODULE fcitx

View file

@ -1,7 +0,0 @@
#!/bin/sh
export XMODIFIERS="@im=fcitx"
export XIM=fcitx
export XIM_PROGRAM=fcitx
export GTK_IM_MODULE=fcitx #=xim
export QT_IM_MODULE=fcitx #=xim