Hello ! First time posting here.
Sorry, if it's a bit of lengthy
I'm trying to compile SCIM input method for tiny core
https://github.com/scim-im/scimI've tried on both 32-bit and 64-bit (mainly on 64-bit)
Although IBUS is already presented on the repo (64-bit)
I need ibus-chewing and libchewing to get it working
Considering the fact that there are too many libraries missing or outdated
I choosed to try SCIM instead
I use chewing input method
https://github.com/chewing/libchewingAnyway~~, here are how I build all extensions mentioned above
To build libchewing :
#!/bin/sh
mkdir -p /tmp/logs/libchewing64
# compile flags
export CFLAGS="-mtune=generic -Os -pipe"
export CXXFLAGS="-mtune=generic -Os -pipe"
export LDFLAGS="-Wl,-O1"
# load packages
echo Fetching build essentials
for dep in autoconf automake cmake compiletc git libtool-dev ncurses-dev sqlite3-dev squashfs-tools
do tce-load -w $dep 1>> /tmp/logs/libchewing64/tce-load-w.log 2>> /tmp/logs/libchewing64/tce-load-w-debug.log
done
echo Loading build essentials
for dep in autoconf automake cmake compiletc git libtool-dev ncurses-dev sqlite3-dev squashfs-tools
do tce-load -i $dep 1>> /tmp/logs/libchewing64/tce-load-i.log 2>> /tmp/logs/libchewing64/tce-load-i-debug.log
done
# get source and compile
cd /tmp && pwd && echo Git cloning source code
git clone https://github.com/chewing/libchewing.git
cd libchewing && pwd && echo Building from source
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local . 1> /tmp/logs/libchewing64/cmake.log 2> /tmp/logs/libchewing64/cmake-debug.log
make VERBOSE=1 -j 1> /tmp/logs/libchewing64/make.log 2> /tmp/logs/libchewing64/make-debug.log
make DESTDIR=/tmp/libchewing-root install 1> /tmp/logs/libchewing64/install.log 2> /tmp/logs/libchewing64/install-debug.log
# striping
cd /tmp/libchewing-root
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null \
|| find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" \
| cut -f 1 -d : | xargs strip -g 2> /dev/null
# seperating
RUNTIME=`find /tmp/libchewing-root/usr/local/lib64 -executable -not -type d -not -type l | rev | cut -d '/' -f 1 | rev`
LINKS=`find /tmp/libchewing-root/usr/local/lib64 -type l | rev | cut -d '/' -f 1 | rev`
## dev
mkdir -p /tmp/libchewing-dev/usr/local/lib/pkgconfig /tmp/libchewing-dev/usr/local/lib64
mv -f /tmp/libchewing-root/usr/local/include/ /tmp/libchewing-dev/usr/local/
mv -f /tmp/libchewing-root/usr/local/lib64/pkgconfig/ /tmp/libchewing-dev/usr/local/lib64/
mv -f /tmp/libchewing-root/usr/local/lib64/libchewing.a /tmp/libchewing-dev/usr/local/lib64/
cd /tmp/libchewing-dev/usr/local/lib
ln -s ../lib64/libchewing.a .
cd pkgconfig/
ln -s ../../lib64/pkgconfig/chewing.pc .
## root
mkdir -p /tmp/libchewing-root/usr/local/lib && cd /tmp/libchewing-root/usr/local/lib
for F in $LINKS
do ln -s ../lib64/$RUNTIME $F
done
ln -s ../lib64/$RUNTIME .
## doc
mkdir -p /tmp/libchewing-doc/usr/local/share/doc/libchewing/
cp /tmp/libchewing/AUTHORS /tmp/libchewing/COPYING /tmp/libchewing-doc/usr/local/share/doc/libchewing/
# chown
sudo chown -R root:root /tmp/libchewing-doc/ /tmp/libchewing-root/ /tmp/libchewing-dev/
# chmod
for F in `find /tmp/libchewing-root/ /tmp/libchewing-dev/ /tmp/libchewing-doc/ -executable -not -type l`
do sudo chmod 755 $F
done
for F in `find /tmp/libchewing-root/ /tmp/libchewing-dev/ /tmp/libchewing-doc/ -not -executable`
do sudo chmod 644 $F
done
# packing
cd /tmp && pwd && echo Building tcz packages
mksquashfs /tmp/libchewing-root libchewing.tcz > /dev/null
mksquashfs /tmp/libchewing-dev libchewing-dev.tcz > /dev/null
mksquashfs /tmp/libchewing-doc libchewing-doc.tcz > /dev/null
md5sum libchewing.tcz > libchewing.tcz.md5.txt
md5sum libchewing-dev.tcz > libchewing-dev.tcz.md5.txt
md5sum libchewing-doc.tcz > libchewing-doc.tcz.md5.txt
# dep file
for dep in libtool ncurses sqlite3
do echo $dep".tcz" >> libchewing.tcz.dep
done
echo libchewing.tcz > libchewing-dev.tcz.dep
# move to tcedir/optional and load
mv -f libchewing.tcz libchewing.tcz.dep libchewing.tcz.md5.txt libchewing-dev.tcz \
libchewing-dev.tcz.dep libchewing-dev.tcz.md5.txt libchewing-doc.tcz libchewing-doc.tcz.md5.txt \
/etc/sysconfig/tcedir/optional/
# remove temp file
sudo rm -fr /tmp/libchewing /tmp/libchewing-root /tmp/libchewing-dev /tmp/libchewing-doc
# load and test
tce-load -i libchewing libchewing-dev libchewing-doc
To build SCIM:
(From my understanding, SCIM needs locale to build, see scim_src_code_dir/po/)
(getlocale and rename mylocale.tcz to full-local-x64.tcz)
#!/bin/sh
mkdir -p /tmp/logs/scim64
#################
# compile flags #
#################
export CFLAGS="-mtune=generic -Os -pipe"
export CXXFLAGS="-mtune=generic -Os -pipe"
export LDFLAGS="-Wl,-O1"
#################
# load packages #
#################
echo Fetching build essentials ...
tce-load -w autoconf automake compiletc gettext-dev git gtk2-dev \
gtk3-dev intltool libX11-dev qt-4.x-dev squashfs-tools glibc_gconv\
1>> /tmp/logs/scim64/tce-load-w.log 2>> /tmp/logs/scim64/tce-load-w-debug.log
echo Loading build essentials ...
tce-load -i autoconf automake compiletc gettext-dev git gtk2-dev \
gtk3-dev intltool libX11-dev qt-4.x-dev squashfs-tools glibc_gconv\
1>> /tmp/logs/scim64/tce-load-i.log 2>> /tmp/logs/scim64/tce-load-i-debug.log
tce-load -i full-local-x64 || {
echo Error. Please load \"full-local-x64.tcz\" before continue
exit 1
}
##########################
# get source and compile #
##########################
cd /tmp && pwd && git clone https://github.com/scim-im/scim.git
cd scim && echo Configuring ...
##################################
# shut-up about `subdir-objects` #
##################################
sed -i 's/AM_INIT_AUTOMAKE(\[\])/AM_INIT_AUTOMAKE(\[subdir-objects\])/g' configure.ac
# add AC_CONFIG_MACRO_DIRS([m4]) -- I didn't add it
# sed -i 's/AC_CONFIG_FILES/AC_CONFIG_MACRO_DIRS(\[m4\])\nAC_CONFIG_FILES/g' configure.ac
./bootstrap 1> /tmp/logs/scim64/bootstrap.log 2> /tmp/logs/scim64/bootstrap-debug.log
####################
# configure & make #
####################
./configure --prefix=/usr/local/ --enable-documents --enable-hash-map --enable-orig-gtk2-immodule --enable-orig-gtk3-immodule \
1> /tmp/logs/scim64/configure1.log 2> /tmp/logs/scim64/configure2.log
echo Building ...
make -j 1> /tmp/logs/scim64/make1.log 2> /tmp/logs/scim64/make2.log
make check 1> /tmp/logs/scim64/check1.log 2> /tmp/logs/scim64/check2.log
make DESTDIR=/tmp/scim-root install 1> /tmp/logs/scim64/install1.log 2> /tmp/logs/scim64/install2.log
############
# striping #
############
cd /tmp/scim-root && echo Striping ...
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null \
|| find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" \
| cut -f 1 -d : | xargs strip -g 2> /dev/null
################################
## dev *.a *.la *.h *.m4 *.pc ##
################################
[ ! "`find . -name *.a -o -name *.la -o -name *.h -o -name *.m4 -o -name *.pc`" == '' ] && {
echo scim"-dev"
for file in `find . -name *.a -o -name *.la -o -name *.h -o -name *.m4 -o -name *.pc`; do
dir=`echo $file | rev | cut -d '/' -f 2- | rev | cut -d '/' -f 2-`
mkdir -p /tmp/scim"-dev"/$dir
mv $file /tmp/scim"-dev"/$dir
done 2> /dev/null
}
#########
## doc ##
#########
mkdir -p /tmp/scim-doc/usr/local/share/doc/scim/
cp /tmp/scim/AUTHORS /tmp/scim/COPYING /tmp/scim-doc/usr/local/share/doc/scim/
#################
## locale *.mo ##
#################
[ ! "`find . -name *.mo`" == '' ] && {
echo scim"-locale"
for file in `find . -name *.mo`; do
dir=`echo $file | rev | cut -d '/' -f 2- | rev | cut -d '/' -f 2-`
mkdir -p /tmp/scim"-locale"/$dir
mv $file /tmp/scim"-locale"/$dir
done 2> /dev/null
}
############################
# remove empty directories #
############################
echo remove empty directories
find . -depth -type d -exec rmdir {} + 2> /dev/null
############################
### adjust .desktop file ###
############################
cd /tmp
for desktop in `find scim-root/ -name scim-setup.desktop`; do
echo X-FullPathIcon=/usr/local/share/pixmaps/scim-setup.png >> $desktop
sed -i '/^\s*$/d' $desktop
done
#########
# chown #
#########
cd /tmp
sudo chown -R root:root scim-root/ scim-dev/ scim-doc/ scim-locale/
###########
# packing #
###########
pwd && echo Building tcz packages
mksquashfs scim-root scim.tcz > /dev/null
mksquashfs scim-dev scim-dev.tcz > /dev/null
mksquashfs scim-doc scim-doc.tcz > /dev/null
mksquashfs scim-locale scim-locale.tcz > /dev/null
md5sum scim.tcz > scim.tcz.md5.txt
md5sum scim-dev.tcz > scim-dev.tcz.md5.txt
md5sum scim-doc.tcz > scim-doc.tcz.md5.txt
md5sum scim-locale.tcz > scim-locale.tcz.md5.txt
############
# dep file #
############
for dep in gtk2 gtk3 intltool libX11 qt-4.x-dbus; do
echo $dep".tcz" >> scim.tcz.dep
done
echo scim.tcz > scim-dev.tcz.dep
echo scim-locale.tcz >> scim-dev.tcz.dep
echo scim.tcz > scim-locale.tcz.dep
mkdir -p /tmp/output
mv -f scim.tcz* scim-dev.tcz* scim-doc.tcz* scim-locale.tcz* /tmp/output
clear && echo Finished. See /tmp/output
ls /tmp/output
To build scim-chewing:
#!/bin/sh
mkdir -p /tmp/logs/scim-chewing
# compile flags
export CFLAGS="-mtune=generic -Os -pipe"
export CXXFLAGS="-mtune=generic -Os -pipe"
export LDFLAGS="-Wl,-O1"
# load packages
echo Fetching build essentials ...
tce-load -w autoconf automake cmake compiletc gettext-dev git gtk3-dev intltool libchewing64-dev libtool-dev libX11-dev ncurses-dev qt-4.x-dev scim-dev sqlite3-dev squashfs-tools \
1> /tmp/logs/scim-chewing/tce-load-w.log 2> /tmp/logs/scim-chewing/tce-load-w-debug.log
echo Loading build essentials ...
tce-load -i autoconf automake cmake compiletc gettext-dev git gtk3-dev intltool libchewing64-dev libtool-dev libX11-dev ncurses-dev qt-4.x-dev scim-dev sqlite3-dev squashfs-tools \
1> /tmp/logs/scim-chewing/tce-load-i.log 2> /tmp/logs/scim-chewing/tce-load-i-debug.log
# get source and compile
cd /tmp && pwd && git clone https://github.com/chewing/scim-chewing.git
cd scim-chewing && echo Configuring ...
# configure and make
./autogen.sh 1> /tmp/logs/scim-chewing/autogen1 2> /tmp/logs/scim-chewing/autogen2
./configure --prefix=/usr/local 1> /tmp/logs/scim-chewing/configure1 2> /tmp/logs/scim-chewing/configure2
echo src/scim_color_button.cpp >> po/POTFILES.in
make 1> /tmp/logs/scim-chewing/make1 2> /tmp/logs/scim-chewing/make2
make DESTDIR=/tmp/scim-chewing-root install
############
# striping #
############
cd /tmp && cp -a /tmp/scim-chewing-root /tmp/scim-chewing-base
cd /tmp/scim-chewing-base && echo Striping ...
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null \
|| find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" \
| cut -f 1 -d : | xargs strip -g 2> /dev/null
################################
## dev *.a *.la *.h *.m4 *.pc ##
################################
[ ! "`find . -name *.a -o -name *.la -o -name *.h -o -name *.m4 -o -name *.pc`" == '' ] && {
echo scim-chewing"-dev"
for file in `find . -name *.a -o -name *.la -o -name *.h -o -name *.m4 -o -name *.pc`; do
dir=`echo $file | rev | cut -d '/' -f 2- | rev | cut -d '/' -f 2-`
mkdir -p /tmp/scim-chewing"-dev"/$dir
mv $file /tmp/scim-chewing"-dev"/$dir
done 2> /dev/null
}
#################
## locale *.mo ##
#################
[ ! "`find . -name *.mo`" == '' ] && {
echo scim-chewing"-locale"
for file in `find . -name *.mo`; do
dir=`echo $file | rev | cut -d '/' -f 2- | rev | cut -d '/' -f 2-`
mkdir -p /tmp/scim-chewing"-locale"/$dir
mv $file /tmp/scim-chewing"-locale"/$dir
done 2> /dev/null
}
############################
# remove empty directories #
############################
echo remove empty directories
find . -depth -type d -exec rmdir {} + 2>/dev/null
#########
# chown #
#########
cd /tmp
sudo chown -R root:root scim-chewing-base scim-chewing-dev scim-chewing-locale
mksquashfs scim-chewing-base scim-chewing.tcz > /dev/null
mksquashfs scim-chewing-dev scim-chewing-dev.tcz > /dev/null
mksquashfs scim-chewing-locale scim-chewing-locale.tcz > /dev/null
md5sum scim-chewing.tcz > scim-chewing.tcz.md5.txt
md5sum scim-chewing-dev.tcz > scim-chewing-dev.tcz.md5.txt
md5sum scim-chewing-locale.tcz > scim-chewing-locale.tcz.md5.txt
#######
# dep #
#######
echo scim-chewing.tcz > scim-chewing-dev.tcz.dep
echo scim-chewing.tcz > scim-chewing-locale.tcz.dep
echo libchewing.tcz > scim-chewing.tcz.dep
echo scim.tcz >> scim-chewing.tcz.dep
mkdir -p /tmp/output
mv -f scim-chewing*.tcz* /tmp/output
To test the extensions
I load the gnome-session (in case other window manager won't work)
export the enviroment variables before startx:
export LC_CTYPE="zh_TW.utf8"
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
startx
Under the gnome enviroment
I run the scim-setup (UI)
Disable all input method except the chewing one
In terminal run "scim -d" to start the daemon
Somehow the SCIM only work with the fltk Xprogs, but the Xprogs couldn't display properlly
As far as I know, FLTK requires much more settings like modifications of a program's source code to support true type font
(Please correct me if I was wrong)
Tested on firefox, leafpad, libreoffice, gedit, gnome search bar .etc
None of these work
Here's my testing vedio clip:
https://drive.google.com/file/d/0B5JjCa8lGL9Nb3lPR0J2ZUJQTVk/view?usp=sharingAny advice is welcome