summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 967a76304a165eea677069dfb9534cb99ed1516f (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
# Maintainer: Adam Reichold <adam.reichold@t-online.de>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=qpdfview-bzr
pkgver=2070
pkgrel=1
pkgdesc='A tabbed PDF viewer using the poppler library. (development version)'
arch=('i686' 'x86_64' 'armv7h')
url='https://launchpad.net/qpdfview'
license=('GPL2')
depends=('libcups' 'qt5-svg' 'desktop-file-utils' 'hicolor-icon-theme')
optdepends=('texlive-bin: for shared SyncTeX parser library (required at build time)'
            'poppler-qt5: for PDF support (required at build time)'
            'libspectre: for PostScript support (required at build time)'
            'djvulibre: for DjVu support (required at build time)')
makedepends=('bzr' 'qt5-tools')
conflicts=('qpdfview')
source=('qpdfview::bzr+http://bazaar.launchpad.net/~adamreichold/qpdfview/trunk/')
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/qpdfview"
  
  bzr revno
}

build() {
  cd "$srcdir/qpdfview"

  local config="with_lto"

  if ! pkg-config --exists poppler-qt5; then
    local config="$config without_pdf"
  fi
  
  if ! pkg-config --exists libspectre; then
    local config="$config without_ps"
  fi
  
  if ! pkg-config --exists ddjvuapi; then
    local config="$config without_djvu"
  fi

  lrelease-qt5 qpdfview.pro qpdfview.pro
  qmake-qt5 "CONFIG+=$config" qpdfview.pro
  make
}

package() {
  cd "$srcdir/qpdfview"

  make "INSTALL_ROOT=$pkgdir" install

  if pkg-config --exists synctex; then
    depends=("${depends[@]}" 'texlive-bin')
  fi
}