summarylogtreecommitdiffstats
path: root/0001-Remove-mupdf-linking-detection.patch
blob: aed2f35db8ed9fce73f0fd1f936717f403257230 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
From e91e5ad64d20eb4a7df377effc12ec21ba6f5f7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes@kyriasis.com>
Date: Fri, 18 Mar 2022 00:02:43 +0100
Subject: [PATCH] Remove mupdf linking detection
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
---
 meson.build | 40 ++++++++++++++--------------------------
 1 file changed, 14 insertions(+), 26 deletions(-)

diff --git a/meson.build b/meson.build
index 2d1c6a2..9e34214 100644
--- a/meson.build
+++ b/meson.build
@@ -22,8 +22,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, version: '>=@0@.@1@'.format(mupdf_required_version_major, mupdf_required_version_minor))
-mupdfthird = cc.find_library('mupdf-third')
 
 build_dependencies = [
   zathura,
@@ -32,43 +30,20 @@ build_dependencies = [
   cairo,
 ]
 
-if not mupdf.found()
-  # normal build of mupdf
-  mupdf = cc.find_library('mupdf', has_headers: ['mupdf/fitz/version.h', 'mupdf/fitz.h', 'mupdf/pdf.h'], required: true)
-  version_check = '''
-#include <mupdf/fitz/version.h>
+mupdf = cc.find_library('mupdf')
 
-#if FZ_VERSION_MAJOR < @0@ || (FZ_VERSION_MAJOR == @0@ && FZ_VERSION_MINOR < @1@)
-#error "mupdf @0@.@1@ or newer is requried"
-#endif
-'''.format(mupdf_required_version_major, mupdf_required_version_minor)
-  if not cc.compiles(version_check, dependencies: [mupdf])
-    error('mupdf @0@.@1@ or newer is required'.format(mupdf_required_version_major, mupdf_required_version_minor))
-  endif
+libjpeg = dependency('libjpeg')
+libjbig2dec = cc.find_library('jbig2dec')
+libopenjp2 = dependency('libopenjp2')
+gumbo = dependency('gumbo')
 
-  build_dependencies += [mupdf, mupdfthird]
-else
-  # build from Debian's libmupdf-dev
-  build_dependencies += [mupdf, mupdfthird]
-
-  libjpeg = dependency('libjpeg')
-  libjbig2dec = cc.find_library('jbig2dec')
-  libopenjp2 = dependency('libopenjp2')
-  gumbo = dependency('gumbo')
-  tesseract = dependency('tesseract')
-  leptonica = dependency('lept')
-  mujs = dependency('mujs')
-
-  build_dependencies += [
-    libjpeg,
-    libjbig2dec,
-    libopenjp2,
-    gumbo,
-    tesseract,
-    leptonica,
-    mujs
-  ]
-endif
+build_dependencies += [
+  mupdf,
+  libjpeg,
+  libjbig2dec,
+  libopenjp2,
+  gumbo,
+]
 
 if get_option('plugindir') == ''
   plugindir = zathura.get_variable(pkgconfig: 'plugindir')