summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authora8212023-01-14 18:36:04 +0100
committera8212023-01-14 18:36:04 +0100
commit7962a3363850745246ca743c8158658e27166537 (patch)
tree3de0dd93eec316994af1e531f8a0060abaf27e5d
parent723d69ca20ca86ca3fc8bf50849ce308f197b9e9 (diff)
downloadaur-7962a3363850745246ca743c8158658e27166537.tar.gz
Adopt and update. Follow official PKGBUILD
-rw-r--r--.SRCINFO23
-rw-r--r--0001-Remove-mupdf-linking-detection.patch76
-rw-r--r--PKGBUILD53
3 files changed, 114 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1afbde1636bf..dfea3d077438 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,25 @@
pkgbase = zathura-pdf-mupdf-git
- pkgdesc = PDF support for zathura by using the mupdf library
- pkgver = 0.3.5.1.g878e31c
+ pkgdesc = PDF support for zathura (mupdf backend)
+ pkgver = 0.4.0.r1.g2c5c24b
pkgrel = 1
- url = http://pwmt.org/projects/zathura-pdf-mupdf
+ url = https://pwmt.org/projects/zathura-pdf-mupdf
arch = i686
arch = x86_64
license = custom
- checkdepends = check
makedepends = git
- makedepends = python-sphinx
- makedepends = intltool
makedepends = meson
+ makedepends = ninja
+ makedepends = libmupdf
depends = zathura-git
- depends = libmupdf>=1.9
+ depends = gumbo-parser
+ depends = jbig2dec
+ depends = openjpeg2
provides = zathura-pdf-mupdf
conflicts = zathura-pdf-mupdf
- source = zathura-pdf-mupdf::git+https://git.pwmt.org/pwmt/zathura-pdf-mupdf.git#branch=develop
- md5sums = SKIP
+ conflicts = zathura-pdf-poppler
+ source = zathura-pdf-mupdf-git::git+https://git.pwmt.org/pwmt/zathura-pdf-mupdf.git#branch=develop
+ source = 0001-Remove-mupdf-linking-detection.patch
+ sha256sums = SKIP
+ sha256sums = f09e9ea91193fc225b82e4779ad8b0a5440f5938b69d19286d9c467aefa7ace3
pkgname = zathura-pdf-mupdf-git
-
diff --git a/0001-Remove-mupdf-linking-detection.patch b/0001-Remove-mupdf-linking-detection.patch
new file mode 100644
index 000000000000..34349d785197
--- /dev/null
+++ b/0001-Remove-mupdf-linking-detection.patch
@@ -0,0 +1,76 @@
+From 97259584339d5bdff677c7f6a076b996bc64cbb1 Mon Sep 17 00:00:00 2001
+From: a821 <a821@nospam.mail.de>
+Date: Sat, 14 Jan 2023 17:52:03 +0100
+Subject: [PATCH] Remove mupdf linking detection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Patch adapted from official PKGBUILD by Johannes Löthberg.
+---
+ meson.build | 40 ++++++++++++++--------------------------
+ 1 file changed, 14 insertions(+), 26 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index c7b5a8b..9fecc62 100644
+--- a/meson.build
++++ b/meson.build
+@@ -19,8 +19,6 @@ zathura = dependency('zathura', version: '>=0.5.2')
+ girara = dependency('girara-gtk3')
+ glib = dependency('glib-2.0')
+ cairo = dependency('cairo')
+-mupdf = dependency('mupdf', required: false)
+-mupdfthird = cc.find_library('mupdf-third')
+
+ build_dependencies = [
+ zathura,
+@@ -29,32 +27,22 @@ build_dependencies = [
+ cairo,
+ ]
+
+-if not mupdf.found()
+- # normal build of mupdf
+- mupdf = cc.find_library('mupdf')
+- build_dependencies += [mupdf, mupdfthird]
+-else
+- # build from Debian's libmupdf-dev
+- build_dependencies += [mupdf, mupdfthird]
++mupdf = cc.find_library('mupdf')
++mupdfthird = cc.find_library('mupdf-third')
+
+- libjpeg = dependency('libjpeg')
+- libjbig2dec = cc.find_library('jbig2dec')
+- libopenjp2 = dependency('libopenjp2')
+- gumbo = dependency('gumbo')
+- tesseract = dependency('tesseract')
+- leptonica = dependency('lept')
+- mujs = dependency('mujs')
++libjpeg = dependency('libjpeg')
++libjbig2dec = cc.find_library('jbig2dec')
++libopenjp2 = dependency('libopenjp2')
++gumbo = dependency('gumbo')
+
+- build_dependencies += [
+- libjpeg,
+- libjbig2dec,
+- libopenjp2,
+- gumbo,
+- tesseract,
+- leptonica,
+- mujs
+- ]
+-endif
++build_dependencies += [
++ mupdf,
++ mupdfthird,
++ libjpeg,
++ libjbig2dec,
++ libopenjp2,
++ gumbo,
++]
+
+ if get_option('plugindir') == ''
+ plugindir = zathura.get_variable(pkgconfig: 'plugindir')
+--
+2.39.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 4f3d1fc27181..134102a8b214 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,42 @@
-# Maintainer: Moritz Lipp <mlq@pwmt.org>
+# Maintainer: a821
+# Contributor: Moritz Lipp <mlq@pwmt.org>
pkgname=zathura-pdf-mupdf-git
pkgrel=1
-pkgver=0.3.5.1.g878e31c
-pkgdesc="PDF support for zathura by using the mupdf library"
+pkgver=0.4.0.r1.g2c5c24b
+pkgdesc="PDF support for zathura (mupdf backend)"
arch=('i686' 'x86_64')
-url="http://pwmt.org/projects/zathura-pdf-mupdf"
+url="https://pwmt.org/projects/zathura-pdf-mupdf"
license=('custom')
-depends=('zathura-git' 'libmupdf>=1.9')
-makedepends=('git' 'python-sphinx' 'intltool' 'meson')
-checkdepends=('check')
-conflicts=('zathura-pdf-mupdf')
+depends=('zathura-git' 'gumbo-parser' 'jbig2dec' 'openjpeg2')
+makedepends=('git' 'meson' 'ninja' 'libmupdf')
+conflicts=('zathura-pdf-mupdf' 'zathura-pdf-poppler')
provides=('zathura-pdf-mupdf')
-source=('zathura-pdf-mupdf::git+https://git.pwmt.org/pwmt/zathura-pdf-mupdf.git#branch=develop')
-md5sums=('SKIP')
-_gitname=zathura-pdf-mupdf
+source=("$pkgname::git+https://git.pwmt.org/pwmt/zathura-pdf-mupdf.git#branch=develop"
+ "0001-Remove-mupdf-linking-detection.patch")
+sha256sums=('SKIP'
+ 'f09e9ea91193fc225b82e4779ad8b0a5440f5938b69d19286d9c467aefa7ace3')
-prepare() {
- mkdir -p build
+pkgver() {
+ cd "$pkgname"
+ git describe --tags --long | sed 's/-/.r/;s/-/./g'
}
-build() {
- cd build
- meson --prefix=/usr --buildtype=release $srcdir/$_gitname
- ninja
+prepare() {
+ cd "$pkgname"
+ patch -p1 < ../0001-Remove-mupdf-linking-detection.patch
}
-check() {
- cd build
- ninja test
+build() {
+ cd "$pkgname"
+ arch-meson build
+ ninja -C build
}
package() {
- cd build
- DESTDIR="$pkgdir/" ninja install
-}
-
-pkgver() {
- cd "$_gitname"
- local ver="$(git describe --long)"
- printf "%s" "${ver//-/.}"
+ cd "$pkgname"
+ DESTDIR="$pkgdir/" ninja -C build install
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
# vim:set ts=2 sw=2 et: