# Maintainer: Netanel Shine <Netanelshine@gmail.com>
# Contributor: tobias <tobias@archlinux.org>
# Contributor: Gatekeeper <cool_work@yahoo.com>
pkgname=mlterm
pkgver=3.0.2
pkgrel=1
pkgdesc="Multi Lingual TERMinal emulator on X"
url="http://mlterm.sourceforge.net/"
arch=('i686' 'x86_64')
license=('BSD')
depends=('fribidi' 'gtk2' 'libsm')
makedepends=('intltool' 'librsvg' 'ncurses' 'scim')
options=('!libtool')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
${pkgname}.desktop)
md5sums=('91833f0cc4204fa77d9d70baa3049aef'
'cea39a3e312d0a40a1e839d79bec03ed')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
# fix build problem
patch -p1 < ${startdir}/fix-obj-ext.diff || return 1
# build
./configure --prefix=/usr \
--libexecdir=/usr/lib/mlterm --sysconfdir=/etc --mandir=/usr/share/man \
--enable-fribidi --enable-optimize-redrawing --enable-utmp \
--enable-scim --enable-m17nlib --disable-static \
--with-tools=mlconfig,mlterm-zoom,mlterm-menu,mlclient \
--with-imagelib=gdk-pixbuf --with-type-engines=xcore,xft
make || return 1
make DESTDIR=${pkgdir} install
echo 'conf_menu_path_2 = mlterm-zoom' >> ${pkgdir}/etc/mlterm/main
# install some freedesktop.org compatibility
install -D -m644 ${srcdir}/${pkgname}.desktop \
${pkgdir}/usr/share/applications/${pkgname}.desktop
sed -e 's:mlterm:mlclient:' \
< ${pkgdir}/usr/share/applications/${pkgname}.desktop \
> ${pkgdir}/usr/share/applications/mlclient.desktop
install -D -m644 contrib/icon/${pkgname}-icon.svg \
${pkgdir}/usr/share/pixmaps/${pkgname}.svg
install -D -m644 contrib/icon/${pkgname}-icon-trans.svg \
${pkgdir}/usr/share/pixmaps/mlclient.svg
# finally we render a png as fallback for not svg aware menu applications
# Attention: always make sure you check the dimensions of the source-svg,
# you can read the dimensions via inkscapes export funktion
cd ${pkgdir}/usr/share/pixmaps
rsvg -w 48 -h 38 -f png mlterm.svg mlterm.png
rsvg -w 48 -h 38 -f png mlclient.svg mlclient.png
}