# Maintainer: Maximilian Braeutigam < max - braeu at gmx.de >
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: furester <xfurester@hotmail.com> 
# Contributor: Firmicus <firmicus gmx net> 
# Contributor: Paulo Matias <matiasΘarchlinux-br·org>
# Contributor: Fabio Lima <fheday@gmail.com>>

pkgname=texmaker
pkgver=3.5.2
pkgrel=4
pkgdesc='Free cross-platform latex editor'
arch=('i686' 'x86_64' 'armv6h')
url="http://www.xm1math.net/texmaker/index.html"
license=('GPL')
install='texmaker.install'
depends=('poppler-qt' 'ghostscript' 'qtwebkit')
optdepends=('ibus-qt: accented characters support')
source=("http://www.xm1math.net/texmaker/texmaker-${pkgver}.tar.bz2" "patch.diff")
md5sums=('45eebb530e9516215665faf6d9dffe09'
         'd27bdafcbd9b772056b22ce111a7ade8')
sha1sums=('0297653750bca7eff99f4a2ee4bc1514eba72a3a'
          '4a173377c2eacb2011bc2905bb2df3c73ec1d3a7')
build() {

  patch texmaker-${pkgver}/documentview.cpp < ../patch.diff 
  
  cd texmaker-${pkgver}

  export INSTALL_ROOT=${pkgdir}

  qmake -unix PREFIX=//usr texmaker.pro

  make
}

package() {
  cd texmaker-${pkgver}

  export INSTALL_PATH=${pkgdir}

  make install
}
