summaryrefslogtreecommitdiff
path: root/source/x/scim
diff options
context:
space:
mode:
Diffstat (limited to 'source/x/scim')
-rw-r--r--source/x/scim/scim-setup.desktop28
-rwxr-xr-xsource/x/scim/scim.SlackBuild276
-rw-r--r--source/x/scim/scim.desktop20
-rw-r--r--source/x/scim/slack-desc19
4 files changed, 343 insertions, 0 deletions
diff --git a/source/x/scim/scim-setup.desktop b/source/x/scim/scim-setup.desktop
new file mode 100644
index 00000000..a236ef29
--- /dev/null
+++ b/source/x/scim/scim-setup.desktop
@@ -0,0 +1,28 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=SCIM Input Method Setup
+Name[cs]=Nastavení vstupní metody SCIM
+Name[de]=Einstellungen der SCIM-Eingabemethoden
+Name[fr]=Configuration de la Méthode de Saisie SCIM
+Name[it]=Configurazione del metodo di inserimento SCIM
+Name[ja]=SCIM入力メソッドの設定
+Name[ko]=SCIM 입력기 설정
+Name[pa]=SCIM ਇੰਪੁੱਟ ਢੰਗ ਸੈਟਅੱਪ
+Name[zh_CN]=SCIM 输入法设置
+Name[zh_TW]=SCIM 輸入法設定
+Comment=Setup utility for Smart Common Input Method platform
+Comment[cs]=Nástroj pro nastavení Smart Common Input Method platformy
+Comment[de]=Einrichtungswerkzeug für die Smart Common Input Method-Plattform
+Comment[fr]=Utilitaire de configuration de la plateforme "Smart Common Input Method"
+Comment[it]=Programma di configurazione per il metodo inserimento comune intelligente
+Comment[ja]=Smart Common Input Method platform セットアップユーティリティ
+Comment[ko]=똑똑한 공통 입력 방법 (SCIM)을 위한 설정 프로그램
+Comment[pa]=ਸਮਾਰਟ ਕਾਮਨ ਇੰਪੁੱਟ ਮੈਂਥਸਡ ਪਲੇਟਫਾਰਮ ਲਈ ਸੈਟਅੱਪ ਸਹੂਲਤ
+Comment[zh_CN]=智能通用输入法平台的设置工具
+Comment[zh_TW]=泛用智慧型輸入法平台的設定工具
+Exec=scim-setup
+Icon=/usr/share/pixmaps/scim-setup.png
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Applications;Settings;
diff --git a/source/x/scim/scim.SlackBuild b/source/x/scim/scim.SlackBuild
new file mode 100755
index 00000000..168ae991
--- /dev/null
+++ b/source/x/scim/scim.SlackBuild
@@ -0,0 +1,276 @@
+#!/bin/sh
+
+# Copyright 2006,2007,2008 Eric Hameleers, Eindhoven, NL
+# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+#
+# Slackware SlackBuild script
+# ===========================
+# By: Eric Hameleers <alien@slackware.com>
+# For: scim
+# Descr: Smart Common Input Method platform
+# URL: http://www.scim-im.org/
+#
+# -----------------------------------------------------------------------------
+
+
+PRGNAM=scim
+VERSION=${VERSION:-1.4.9}
+ARCH=${ARCH:-x86_64}
+NUMJOBS=${NUMJOBS:-" -j7 "}
+BUILD=${BUILD:-4}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PRGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf ${PRGNAM}-${VERSION}
+tar -xvf $CWD/${PRGNAM}-${VERSION}.tar.gz
+cd ${PRGNAM}-${VERSION} || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+echo Building ...
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --disable-static \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make DESTDIR=$PKG install || exit 1
+
+# Add a profile script that sets up the environment:
+mkdir -p $PKG/etc/profile.d
+
+cat <<EOT > $PKG/etc/profile.d/scim.sh.new
+#!/bin/sh
+
+# SCIM (Smart Common Input Method platform). This is used to support the
+# entering of text in non-US-English languages.
+
+# For SCIM to work, you need to use a UTF-8 locale. Make sure it ends on
+# ".UTF-8", not "utf-8"! As an example, you would need to use en_US.UTF-8
+# for a US locale (export LANG=en_US.UTF-8), not en_US.
+#
+# The locale (LANG variable) is set in /etc/profile.d/lang.sh.
+
+if [ -x /usr/bin/scim ]; then
+ # Enable legacy X applications to use scim:
+ export XMODIFIERS="@im=SCIM"
+ ## Enable Qt/KDE applications to use scim (not working with kde4):
+ #export QT_IM_MODULE="scim"
+ # Make scim start automatically if the "magic key" Ctrl-Space is pressed:
+ export XIM_PROGRAM="/usr/bin/scim -d"
+fi
+
+if [ -x /usr/bin/scim-bridge ]; then
+ # Let GTK applications like Firefox/Thunderbird use scim-bridge as
+ # default immodule:
+ export GTK_IM_MODULE="scim-bridge"
+ # Enable Qt4/KDE4 applications to use scim:
+ export QT_IM_MODULE="scim-bridge"
+fi
+
+# This ensures scim starts when you logon.
+# This will only work if you login through runlevel 4 (graphical login)!!!
+# Better is to have it start through Ctrl-Space like configured higher up ^^.
+#if [ ! \`ls /tmp/scim-socket*\` ]; then
+# /usr/bin/scim -d
+#fi
+
+# GTK+ environments such as XFce should support SCIM automatically, BUT
+# if the first app you run is a Qt one, you'll run into problems. This
+# can be avoided by going into Menu -> Settings -> Autostarted Applications
+# and adding SCIM: /usr/bin/scim -d
+
+# KDE will not start SCIM automatically, so you will need a script such as
+# this one in your $HOME/.kde/Autostart:
+
+#!/bin/bash
+#if [ -x /usr/bin/scim ]; then
+# /usr/bin/scim -d &
+#fi
+
+# Obviously, uncomment all but the first line. :-)
+
+EOT
+
+cat <<EOT > $PKG/etc/profile.d/scim.csh.new
+#!/bin/csh
+
+# SCIM (Smart Common Input Method platform). This is used to support the
+# entering of text in non-US-English languages.
+
+# For SCIM to work, you need to use a UTF-8 locale. Make sure it ends on
+# ".UTF-8", not "utf-8"! As an example, you would need to use en_US.UTF-8
+# for a US locale (setenv LANG en_US.UTF-8), not en_US.
+#
+# The locale (LANG variable) is set in /etc/profile.d/lang.csh.
+
+[ -x /usr/bin/scim ]
+if (\$status == 0) then
+ # Enable legacy X applications to use scim:
+ setenv XMODIFIERS "@im=SCIM"
+ ## Enable Qt/KDE applications to use scim (does not work for kde4):
+ #setenv QT_IM_MODULE "scim"
+ # Make scim start automatically if the "magic key" Ctrl-Space is pressed:
+ setenv XIM_PROGRAM "/usr/bin/scim -d"
+endif
+
+[ -x /usr/bin/scim-bridge ]
+if (\$status == 0) then
+ # Let GTK applications like Firefox/Thunderbird use scim-bridge as
+ # default immodule:
+ setenv GTK_IM_MODULE "scim-bridge"
+ # Enable Qt4/KDE4 applications to use scim:
+ setenv QT_IM_MODULE "scim-bridge"
+endif
+
+# This ensures scim starts when you logon.
+# This will only work if you login through runlevel 4 (graphical login)!!!
+# Better is to have it start through Ctrl-Space like configured higher up ^^.
+#[ ! \`ls /tmp/scim-socket*\` ]
+#if (\$status == 0) then
+# /usr/bin/scim -d
+#endif
+
+# GTK+ environments such as XFce should support SCIM automatically, BUT
+# if the first app you run is a Qt one, you'll run into problems. This
+# can be avoided by going into Menu -> Settings -> Autostarted Applications
+# and adding SCIM: /usr/bin/scim -d
+
+# KDE will not start SCIM automatically, so you will need a script such as
+# this one in your $HOME/.kde/Autostart:
+
+#!/bin/csh
+#[ -x /usr/bin/scim ]
+#if (\$status == 0) then
+# /usr/bin/scim -d &
+#endif
+
+# Obviously, uncomment all but the first line. :-)
+
+EOT
+
+chmod 755 $PKG/etc/profile.d/scim.sh.new
+chmod 755 $PKG/etc/profile.d/scim.csh.new
+
+mkdir -p $PKG/usr/share/applications
+cat $CWD/scim.desktop > $PKG/usr/share/applications/scim.desktop
+cat $CWD/scim-setup.desktop > $PKG/usr/share/applications/scim-setup.desktop
+
+# Protect config files from being overwritten:
+mv $PKG/etc/scim/config{,.new}
+mv $PKG/etc/scim/global{,.new}
+
+# Add this to the doinst.sh
+mkdir -p $PKG/install
+cat <<EOINS >> $PKG/install/doinst.sh
+
+# Handle the incoming configuration files:
+config() {
+ for infile in \$1; do
+ NEW="\$infile"
+ OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then
+ # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+ done
+}
+
+# Prepare the new configuration files
+for file in etc/scim/config.new etc/scim/global.new etc/profile.d/scim.sh.new etc/profile.d/scim.csh.new ; do
+ if [ -e \$(dirname \$file)/\$(basename \$file .new) -a -x \$(dirname \$file)/\$(basename \$file .new) ]; then
+ chmod 755 \$file
+ else
+ chmod 644 \$file
+ fi
+ config \$file
+done
+
+# Run gtk-query-immodules so that "scim" will appear under Imput Method
+# when you right- click your mouse in a text box.
+if [ -x /usr/bin/update-gtk-immodules ]; then
+ /usr/bin/update-gtk-immodules
+fi
+
+EOINS
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/manual/zh_CN/figures
+cp -a \
+ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+# Install documentation and user manual
+cp -a docs/manual/zh_CN/user-manual.html \
+ $PKG/usr/doc/$PRGNAM-$VERSION/manual/zh_CN/
+cp -a docs/manual/zh_CN/figures/*.png \
+ $PKG/usr/doc/$PRGNAM-$VERSION/manual/zh_CN/figures/
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg --prepend --linkadd y --chown n $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/source/x/scim/scim.desktop b/source/x/scim/scim.desktop
new file mode 100644
index 00000000..7aacbcc0
--- /dev/null
+++ b/source/x/scim/scim.desktop
@@ -0,0 +1,20 @@
+[Desktop Entry]
+Comment=Start the Smart Common Input Method platform
+Comment[zh_CN]=
+Encoding=UTF-8
+Exec=scim -d
+GenericName=
+GenericName[zh_CN]=
+Icon=/usr/share/pixmaps/scim-setup.png
+MimeType=
+Name=SCIM (Smart Common Input Method) startup
+Name[zh_CN]=
+Path=
+StartupNotify=true
+Terminal=false
+TerminalOptions=
+Type=Application
+X-DCOP-ServiceType=
+X-KDE-SubstituteUID=false
+X-KDE-Username=
+Categories=Applications;Utility;
diff --git a/source/x/scim/slack-desc b/source/x/scim/slack-desc
new file mode 100644
index 00000000..066d9f41
--- /dev/null
+++ b/source/x/scim/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+scim: scim (Smart Common Input Method platform)
+scim:
+scim: SCIM is an input platform for CJK and other languages.
+scim: It aims to significantly reduce the difficulty of input method
+scim: development.
+scim:
+scim: See the scim scripts in /etc/profile.d/ for setup info.
+scim:
+scim: scim home: http://www.scim-im.org/
+scim:
+scim: