IceCat + zpspell

I got a message from Samed Beyribey, sharing the changes he made to get GNU IceCat working with zpspell for Turkish spell-checking, on Arch GNU/Linux. We are sharing this in hope it can be useful to someone.

Why zpspell? Because “aspell doesn’t support Turkish language”. For using zpspell, you need to install zemberek-server and zpspell. They’re both available in AUR.

The patch used here is made by Pardus developers and they release their patch under the GPL, so this is Free Software :)


PKGBUILD:
# Contributor: Samed Beyribey
# Thanks for Pardus GNU/Linux developers for Spellchecking patch
pkgname=icecat-zemberek
_pkgname=icecat
pkgver=3.0.1g1
_pkgver=3.0.1-g1
pkgrel=1
pkgdesc=”GNU version of the Firefox browser.”
arch=(‘i686′ ‘x86_64′)
url=”http://www.gnu.org/software/gnuzilla/”
license=(‘GPL2′ ‘MPL’ ‘LGPL’)
depends=(‘gtk2′ ‘libxt’ ‘libidl2′ ‘nss’ ‘zpspell’ ‘zemberek-server’)
makedepends=(‘zip’ ‘tar’)
provide=(‘icecat’ ‘iceweasel-bin’ ‘iceweasel’ ‘firefox’ ‘mozilla-firefox’ \
‘mozilla-firebird’ ‘phoenix’ ‘swiftweasel’ ‘swiftfox’ \
‘icecat-bin’ ‘icecat-cvs’)
conflicts=(‘icecat’ ‘icecat-cvs’ ‘icecat-bin’ ‘iceweasel-bin’)
replaces=()
install=(icecat.install)
source=(ftp://ftp.gnu.org/gnu/gnuzilla/${_pkgver}/${_pkgname}-${_pkgver}.tar.bz2 \
${_pkgname}.desktop \
${_pkgname}-safe.desktop \
${_pkgname}.sh \
${_pkgname}-launcher.sh \
${_pkgname}16.png \
${_pkgname}32.png \
${_pkgname}48.png \
${_pkgname}48.xpm \
icecat_new_files.tar.bz2 \
icecat_icons.tar.gz \
zemberek-firefox3.patch)
md5sums=(‘c52f5ff97179fa8c5c12f1577e232f9c’ \
’2965d6561c4c4473e1e392a20f5e61cb’ \
’5c498b31bd52c1f1d92c8d7da27c5d6f’ \
’70d93e9755af53ad4d310966a7d55a55′ \
‘c6ab71d3ed1ee3c767391cd981099a03′ \
‘ddd0c466cced06ee9f7068a0fc5dda3a’ \
’2de250a85719545d3853ebc92240f42a’ \
‘a04aec7bc8f760f95a3573c641c687e6′ \
‘df60f7e4f3c6fe3d8b3540f338d4f7fd’ \
’1d3e97b290cd4b38a251bffcd10cc9bc’ \
’5b3b7e11439e4d3dee52c2f798284e75′ \
’43f0783e6284afafbf08d9c1899dfa0a’)

#options=(‘!makeflags’)
ICECATDIR=”/usr/lib/icecat-${_pkgver}” && export ICECATDIR

build() {
ICECATDIR=”/usr/lib/icecat-${_pkgver}” && export ICECATDIR
cd ${startdir}/src/${_pkgname}-${_pkgver}/
############################################
patch -Np1 -i ${srcdir}/zemberek-firefox3.patch

## Temp. solutions: —————————————————–
tar -zxvf ${startdir}/src/icecat_icons.tar.gz

tar -jxvf ${startdir}/src/icecat_new_files.tar.bz2 || return 1
#unset CFLAGS
#unset CXXFLAGS
#export LDFLAGS=”-Wl,-rpath,${ICECATDIR}”
############################################

## Changes in .mozconfig: ———————————————–
## We can just replace whatever .mozconfig given and use our own:
#rm -f ${startdir}/src/${_pkgname}-${_pkgver}/.mozconfig &&
#cp ${startdir}/src/mozconfig \
# ${startdir}/src/${_pkgname}-${_pkgver}/.mozconfig
if [ -f "${startdir}/src/${_pkgname}-${_pkgver}/.mozconfig" ]
then
sed -i ‘s|–prefix=/usr/local|–prefix=/usr|’ \
${startdir}/src/${_pkgname}-${_pkgver}/.mozconfig
else
cp ${startdir}/src/mozconfig \
${startdir}/src/${_pkgname}-${_pkgver}/.mozconfig
echo “ac_add_options –disable-official-branding” \
>>${startdir}/src/${_pkgname}-${_pkgver}/.mozconfig
fi
echo “ac_add_options –with-default-mozilla-five-home=\”${ICECATDIR}\”" \
>>${startdir}/src/${_pkgname}-${_pkgver}/.mozconfig || return 1
##change this to suite your optimization:
if [ "$CARCH" == "i686" ]; then
echo “ac_add_options –enable-optimize=\”${CFLAGS}\”" \
>>${startdir}/src/${_pkgname}-${_pkgver}/.mozconfig || return 1
else
echo “ac_add_options –enable-optimize” \
>>${startdir}/src/${_pkgname}-${_pkgver}/.mozconfig || return 1
fi
export MAKEFLAGS=”-j1″
############################################

## configure && make && make install————————————-
./configure –prefix=/usr || return 1
make || return 1
install –directory ${startdir}/pkg
make DESTDIR=${startdir}/pkg install || return 1
############################################

## Final arrangements: ————————————————–
install –directory ${startdir}/pkg/usr/share/applications
install -m644 ${startdir}/src/${_pkgname}.desktop \
${startdir}/pkg/usr/share/applications
install -m644 ${startdir}/src/${_pkgname}-safe.desktop \
${startdir}/pkg/usr/share/applications
install –directory ${startdir}/pkg/usr/share/pixmaps
install -m644 ${startdir}/src/${_pkgname}48.xpm \
${startdir}/pkg/usr/share/pixmaps/${_pkgname}.xpm
install –directory ${startdir}/pkg${ICECATDIR}/chrome/icons/default
rm -f ${startdir}/pkg${ICECATDIR}/chrome/icons/default/default*
install -m644 ${startdir}/src/${_pkgname}16.png \
${startdir}/pkg${ICECATDIR}/chrome/icons/default/default16.png
install -m644 ${startdir}/src/${_pkgname}32.png \
${startdir}/pkg${ICECATDIR}/chrome/icons/default/default32.png
install -m644 ${startdir}/src/${_pkgname}48.png \
${startdir}/pkg${ICECATDIR}/chrome/icons/default/default48.png
install -m644 ${startdir}/src/${_pkgname}48.xpm \
${startdir}/pkg${ICECATDIR}/chrome/icons/default/default.xpm
install –directory ${startdir}/pkg${ICECATDIR}/icons
install -m644 ${startdir}/src/${_pkgname}48.xpm \
${startdir}/pkg${ICECATDIR}/icons/default.xpm
install –directory ${startdir}/pkg/etc/profile.d/
install -m755 ${startdir}/src/${_pkgname}.sh \
${startdir}/pkg/etc/profile.d/
install –directory ${startdir}/pkg/usr/bin/
install -m755 ${startdir}/src/${_pkgname}-launcher.sh \
${startdir}/pkg/usr/bin/${_pkgname}-launcher
cd ${startdir}/pkg${ICECATDIR}
ln -s ${_pkgname} firefox
ln -s ${_pkgname}-bin firefox-bin
# We need to touch tr-TR dictionary files for enabling Turkish dictionary.
touch ${startdir}/pkg${ICECATDIR}/dictionaries/{tr-TR.aff,tr-TR.dic}
}


Here is the zemberek-firefox3.patch.

The rest of the files can be found at: http://aur.archlinux.org/packages/icecat/icecat/

And the PKGBUILD is available on AUR as: icecat-zemberek

Credit: Abdussamed Beyribey (aka ras0ir) + thanks to Pardus GNU/Linux developers for Spellchecking patch.

Leave a Reply

You must be logged in to post a comment.