summaryrefslogtreecommitdiff
path: root/zathura-pdf-mupdf/PKGBUILD
blob: 19ae84f1a62cedb323ef6029da18cbb52b3d0056 (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
# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Moritz Lipp <mlq@pwmt.org>

pkgname=zathura-pdf-mupdf
pkgver=0.4.1
pkgrel=101

pkgdesc="PDF support for Zathura (MuPDF backend) (Supports PDF, ePub, and OpenXPS)"
url="https://pwmt.org/projects/zathura-pdf-mupdf/"
arch=(aarch64 'x86_64')
license=('zlib')

conflicts=('zathura-pdf-poppler')

depends=('cairo' 'gumbo-parser' 'jbig2dec' 'libjpeg' 'openjpeg2' 'openssl' 'zathura')
makedepends=('libmupdf' 'meson' 'samurai' 'git')

source=(zathura-pdf-mupdf-$pkgver.tar.gz::https://pwmt.org/projects/zathura-pdf-mupdf/download/zathura-pdf-mupdf-$pkgver.tar.xz
  0001-Remove-mupdf-linking-detection.patch)
        # resolve_link_destination.patch)

sha256sums=('f982a01d6523fa25669381184c06a625edbfd7961cbdb0711dccfdb9c402ac2f'
            '8274537ce8357014ad44afe470d33ee46fa2e4fcf03b999c1615acfb38e12e25')
            # '322fba688c30b18d80c4d834b53e3cb643d5b77143acf72a36252802e3d03e9d')

prepare() {
  cd zathura-pdf-mupdf-$pkgver
  patch -p1 <"$srcdir"/0001-Remove-mupdf-linking-detection.patch

  # Temporary fix for the "resolving link destination" issue with mupdf 1.21.X (while waiting for it to be included in a new release)
  # https://git.pwmt.org/pwmt/zathura-pdf-mupdf/-/issues/33
  # https://git.pwmt.org/pwmt/zathura-pdf-mupdf/-/merge_requests/9
  # patch -Np1 <"$srcdir"/resolve_link_destination.patch
}

build() {
  cd zathura-pdf-mupdf-$pkgver
  arch-meson build
  samu -j2 -C build
}

package(){
  DESTDIR="$pkgdir" ninja -C zathura-pdf-mupdf-$pkgver/build install
  install -Dm0644 zathura-pdf-mupdf-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}