initial import
This commit is contained in:
76
zathura-pdf-mupdf/0001-Remove-mupdf-linking-detection.patch
Normal file
76
zathura-pdf-mupdf/0001-Remove-mupdf-linking-detection.patch
Normal file
@@ -0,0 +1,76 @@
|
||||
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 c8c19dc..8174431 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -19,8 +19,6 @@ zathura = dependency('zathura', version: '>=0.3.9')
|
||||
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_pkgconfig_variable('plugindir')
|
||||
--
|
||||
2.35.1
|
||||
|
||||
12
zathura-pdf-mupdf/0002-Fix-build.patch
Normal file
12
zathura-pdf-mupdf/0002-Fix-build.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- a/zathura-pdf-mupdf/search.c 2022-08-22 23:00:38.000000000 +0200
|
||||
+++ b/zathura-pdf-mupdf/search.c 2024-11-20 03:18:05.987378393 +0100
|
||||
@@ -40,8 +40,7 @@
|
||||
}
|
||||
|
||||
fz_quad* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, fz_quad);
|
||||
- int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
|
||||
- text, NULL, hit_bbox, N_SEARCH_RESULTS);
|
||||
+ int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text, text, hit_bbox, N_SEARCH_RESULTS);
|
||||
|
||||
fz_rect r;
|
||||
for (int i = 0; i < num_results; i++) {
|
||||
36
zathura-pdf-mupdf/PKGBUILD
Normal file
36
zathura-pdf-mupdf/PKGBUILD
Normal file
@@ -0,0 +1,36 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=zathura-pdf-mupdf
|
||||
pkgver=0.3.9
|
||||
pkgrel=2
|
||||
pkgdesc="Adds pdf support to zathura by using the mupdf engine"
|
||||
url='https://pwmt.org/projects/zathura-pdf-mupdf/'
|
||||
arch=('i686' 'x86_64')
|
||||
license=('zlib')
|
||||
conflicts=('zathura-pdf-poppler')
|
||||
depends=('cairo' 'gumbo-parser' 'jbig2dec' 'libjpeg-turbo' 'openjpeg2' 'libressl' 'zathura')
|
||||
makedepends=('libmupdf' 'meson' 'ninja' 'git-legacy')
|
||||
groups=('zathura-extra')
|
||||
source=("https://pwmt.org/projects/${pkgname}/download/${pkgname}-${pkgver}.tar.xz"
|
||||
"0001-Remove-mupdf-linking-detection.patch"
|
||||
"0002-Fix-build.patch")
|
||||
sha512sums=('6a81e562965a0d6a2a25e301b0cc20ee70ada43ed7261f5d4ef6c132de1136f0222ebee0088d80cc2e0d1d60595e335cb1a1a914cb761aad36b487d7c16ac034'
|
||||
'd84f5431296b84f3197002ced8e66d178582b2303c1b7b736159ed4e8147eb409c48198b20595ce296e49f76c8df5794779c4e9888df6051c6129cb512db317c'
|
||||
'49b2c2eee0c83c11ae20e1539a093e8775cfef64f6ff98e8ce5535e12033e2114f19883d9446597f781368af507f0e23b293c7e7176b96857cb06527f37807b0')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
patch -p1 <"$srcdir"/0001-Remove-mupdf-linking-detection.patch
|
||||
patch -p1 <"$srcdir"/0002-Fix-build.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
hyperbola-meson build
|
||||
ninja -C build
|
||||
}
|
||||
|
||||
package(){
|
||||
DESTDIR="$pkgdir" ninja -C $pkgname-$pkgver/build install
|
||||
install -Dm644 zathura-pdf-mupdf-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
|
||||
}
|
||||
Reference in New Issue
Block a user