diff --git a/graphics/zathura-pdf-mupdf/Makefile b/graphics/zathura-pdf-mupdf/Makefile index 63a4a241d273..ca48d5ee2792 100644 --- a/graphics/zathura-pdf-mupdf/Makefile +++ b/graphics/zathura-pdf-mupdf/Makefile @@ -1,39 +1,39 @@ PORTNAME= zathura-pdf-mupdf DISTVERSION= 0.4.4 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= graphics MASTER_SITES= https://pwmt.org/projects/zathura-pdf-mupdf/download/ MAINTAINER= uzsolt@FreeBSD.org COMMENT= MuPDF render PDF plugin for Zathura PDF viewer WWW= https://pwmt.org/projects/zathura-pdf-mupdf/ LICENSE= ZLIB LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= appstream-util:devel/appstream-glib \ zathura:graphics/zathura LIB_DEPENDS= libfreetype.so:print/freetype2 \ libgirara-gtk3.so:x11-toolkits/girara \ libmupdf.so:graphics/mupdf RUN_DEPENDS= zathura:graphics/zathura USES= compiler:c++17-lang desktop-file-utils gnome jpeg localbase \ meson pkgconfig tar:xz USE_GNOME= cairo glib20 CONFLICTS_INSTALL= zathura-pdf-poppler #MESON_ARGS= -Dlink-external=true PLIST_FILES= lib/zathura/libpdf-mupdf.so \ share/applications/org.pwmt.zathura-pdf-mupdf.desktop \ share/metainfo/org.pwmt.zathura-pdf-mupdf.metainfo.xml post-patch: ${REINPLACE_CMD} "s@\(cc.find_library(.*\))@\1,dirs:'${PREFIX}/lib')@" \ ${WRKSRC}/meson.build ${REINPLACE_CMD} "s@join_paths(datadir, \ 'metainfo')@join_paths(datadir, 'appdata')@" ${WRKSRC}/meson.build .include diff --git a/graphics/zathura-pdf-mupdf/files/patch-meson.build b/graphics/zathura-pdf-mupdf/files/patch-meson.build new file mode 100644 index 000000000000..52af85b6f040 --- /dev/null +++ b/graphics/zathura-pdf-mupdf/files/patch-meson.build @@ -0,0 +1,58 @@ +--- meson.build.orig 2024-08-04 08:34:58 UTC ++++ meson.build +@@ -22,8 +22,7 @@ cairo = dependency('cairo') + 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') ++mupdf = cc.find_library('mupdf') + + build_dependencies = [ + zathura, +@@ -32,43 +31,19 @@ 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 ++ build_dependencies += [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 +- +- 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 ++ gumbo + ] +-endif + + if get_option('plugindir') == '' + plugindir = zathura.get_variable(pkgconfig: 'plugindir')