mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
zathuraPkgs.zathura_pdf_mupdf: 0.3.7 -> 0.3.8
Also fix build with mupdf >= 1.20. Fixes #187305.
This commit is contained in:
parent
3ed15c29ce
commit
4625114ad4
@ -9,17 +9,22 @@
|
||||
, openjpeg
|
||||
, pkg-config
|
||||
, zathura_core
|
||||
, tesseract
|
||||
, leptonica
|
||||
, mujs
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.3.7";
|
||||
version = "0.3.8";
|
||||
pname = "zathura-pdf-mupdf";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz";
|
||||
sha256 = "07d2ds9yqfrl20z3yfgc55vwg10mwmcg2yvpr4j66jjd5mlal01g";
|
||||
sha256 = "sha256-wgW0z1ANjP6ezqreVOX6jUzRKYzYXxem9QxkclkRYhc=";
|
||||
};
|
||||
|
||||
patches = [ ./fix-mupdf-1.20.patch ];
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
@ -31,15 +36,11 @@ stdenv.mkDerivation rec {
|
||||
mupdf
|
||||
openjpeg
|
||||
zathura_core
|
||||
tesseract
|
||||
leptonica
|
||||
mujs
|
||||
] ++ lib.optional stdenv.isDarwin gtk-mac-integration;
|
||||
|
||||
mesonFlags = [
|
||||
"-Dlink-external=true"
|
||||
];
|
||||
|
||||
# avoid: undefined symbol: gumbo_destroy_output
|
||||
NIX_LDFLAGS = [ "-lgumbo" ];
|
||||
|
||||
PKG_CONFIG_ZATHURA_PLUGINDIR= "lib/zathura";
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -0,0 +1,24 @@
|
||||
From 5a5bb2634812f4c0530f5688a06269aaa4cd11dd Mon Sep 17 00:00:00 2001
|
||||
From: Osama Rebach <osamarebach@gmail.com>
|
||||
Date: Fri, 19 Aug 2022 13:39:49 +0100
|
||||
Subject: [PATCH] fix fz_search_stext_page
|
||||
|
||||
---
|
||||
zathura-pdf-mupdf/search.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/zathura-pdf-mupdf/search.c b/zathura-pdf-mupdf/search.c
|
||||
index f84dea0..419e5f4 100644
|
||||
--- a/zathura-pdf-mupdf/search.c
|
||||
+++ b/zathura-pdf-mupdf/search.c
|
||||
@@ -41,7 +41,7 @@ pdf_page_search_text(zathura_page_t* page, void* data, const char* text, zathura
|
||||
|
||||
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, hit_bbox, N_SEARCH_RESULTS);
|
||||
+ text, NULL, hit_bbox, N_SEARCH_RESULTS);
|
||||
|
||||
fz_rect r;
|
||||
for (int i = 0; i < num_results; i++) {
|
||||
--
|
||||
2.37.1
|
Loading…
Reference in New Issue
Block a user