summaryrefslogtreecommitdiffstats
path: root/arch/master/trinity-poppler-qt3/PKGBUILD
blob: 30863e2997155010dde3d6e6625eee7d9830c46e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: Peter Lewis <plewis@aur.archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# 2010-03-11  Modified by catweazle for poppler 0.12.4
# 2010-06-23  Modified by catweazle for poppler 0.14.0
# 2010-10-16  Modified by rankin for poppler 0.14.4
# 2010-10-16  Modified by rankin for poppler 0.14.5

pkgbase=trinity
pkgname=trinity-poppler-qt3
pkgver=0.16.4
pkgrel=3
pkgdesc="Trinity - Poppler Qt3 bindings"
arch=(i686 x86_64)
license=('GPL')
depends=('trinity-qt3' "poppler>=${pkgver}")
makedepends=('pkgconfig')
provides=('trinity-poppler-qt3' 'poppler-qt3')
conflicts=('poppler-qt3')
replaces=('poppler-qt3')
options=('libtool' '!strip')
url="http://poppler.freedesktop.org/"
source=(http://poppler.freedesktop.org/poppler-${pkgver/trinity-/}.tar.gz
	poppler-bindings.patch)
sha256sums=('0e48e54d6e6d7269f049cf9d060e3ed078cad69808bda8a6da285a7b41c3a2a6'
            '0f9fa33dca271c6c0e31d66cce1847099b63c1443a002aa9bde99a8cb20ad770')

build() {

  # set default Qt dir
  _qtdir=/opt/qt

  # source qt3 profile.d/qt3.sh
  if [[ -r /etc/profile.d/qt3.sh ]]; then
    . /etc/profile.d/qt3.sh
    [[ -n $QTDIR ]] && _qtdir=$QTDIR
  else
    [[ ${PATH%%:*} =~ ${_qtdir}/bin ]] || export PATH=${_qtdir}/bin:$PATH
  fi

  cd "${srcdir}/poppler-${pkgver}"

  patch -Np2 -i ../poppler-bindings.patch

  libtoolize --force --copy
  AT_M4DIR="m4" autoreconf -i
  ./configure --prefix=${_qtdir} --sysconfdir=/etc \
              --localstatedir=/var --disable-static \
              --enable-zlib \
              --enable-libjpeg \
              --enable-cairo-output \
              --enable-poppler-qt \
              --disable-poppler-glib \
              --disable-gtk-test \
              --disable-poppler-qt4
  sed -i -e 's|^LDFLAGS =|LDFLAGS = -L${_qtdir}/lib -lqt-mt|' qt/Makefile
  pushd poppler
  make libpoppler-cairo.la
  popd
  make
}

package() {
  cd "${srcdir}/poppler-${pkgver}"
 make DESTDIR="${pkgdir}" install
}