Skip to content

Commit

Permalink
libmupdf: 1.24.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ioraff committed Mar 23, 2024
1 parent 049e1c8 commit 803a7b2
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 14 deletions.
6 changes: 5 additions & 1 deletion community/libmupdf/build
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ make \
HAVE_GLUT=no \
install

ln -s libmupdf.so "$1/usr/lib/libmupdf.so.0"
mkdir -p "$1/usr/lib/pkgconfig"
sed "s/@@VERSION@@/$2/" mupdf.pc.in > "$1/usr/lib/pkgconfig/mupdf.pc"

cd "$1/usr/lib"
find . -name '*.so*' -exec ln -sf {} libmupdf.so \;
9 changes: 5 additions & 4 deletions community/libmupdf/checksums
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
021f5fb9af373c91f174a0e690e5d97861fc368f1490be0bc5230347f322038303
bf207e5271e5ee50b23292df3e63298f2bb1002894b9b947403a05835d59b605c2
c1712162813bdbf9cfa0abe5943b78ac85670c90ff26b42b4af4d7020673c6ffba
3c9e0f41f050f51c62c215cecc5d4befcd2a2f39f8efaa64c9f04b5591b5994206
6f7ba80dc9452c9749fdbaec59a77311ce50efcd91723520fdbbb0932b54d65c53
ffcd807a603f86d7d61c87057095bb7a1eac797449e1c2885e5b1346ca94026511
3e7d1f9c1dceeb756324aa97b30d95093e559baefbd983a9e30bbe0d98e1be80ed
e4bfb981cc739669a53877449abdf6fa7fa2ae6769b0f1588f46ae3882edd4e067
43826dec496c9e32a50a9fab32c3be127317196517c0b489805e4d3f458f87c843
5 changes: 5 additions & 0 deletions community/libmupdf/files/mupdf.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Name: mupdf
Description: Library for rendering PDF documents
URL: https://github.com/ArtifexSoftware/mupdf
Version: @@VERSION@@
Libs: -lmupdf
8 changes: 4 additions & 4 deletions community/libmupdf/patches/no-gumbo.patch
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ index e37b3ed..dbcf577 100644

HARFBUZZ_CFLAGS += -Ithirdparty/harfbuzz/src
diff --git a/source/fitz/xml.c b/source/fitz/xml.c
index 60f67b9..5336594 100644
index ef9a233..0278228 100644
--- a/source/fitz/xml.c
+++ b/source/fitz/xml.c
@@ -26,7 +26,9 @@
Expand All @@ -51,17 +51,17 @@ index 60f67b9..5336594 100644
#include <gumbo.h>
+#endif

/* #define FZ_XML_SEQ */
#define FZ_XML_MAX_DEPTH 4096

@@ -1000,6 +1002,7 @@ fz_parse_xml(fz_context *ctx, fz_buffer *buf, int preserve_white)
@@ -1127,6 +1129,7 @@ fz_parse_xml(fz_context *ctx, fz_buffer *buf, int preserve_white)
return xml;
}

+#if FZ_ENABLE_HTML
/*
Parse the contents of buffer into a tree of XML nodes, using the HTML5 syntax.

@@ -1166,6 +1169,7 @@ fz_parse_xml_from_html5(fz_context *ctx, fz_buffer *buf)
@@ -1293,6 +1296,7 @@ fz_parse_xml_from_html5(fz_context *ctx, fz_buffer *buf)

return xml;
}
Expand Down
17 changes: 17 additions & 0 deletions community/libmupdf/patches/no-openjpeg.patch
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,20 @@ index ac54f6f..af430d6 100644
# --- FREEGLUT ---

GLUT_CFLAGS += -Ithirdparty/freeglut/include
diff --git a/source/fitz/encode-jpx.c b/source/fitz/encode-jpx.c
index 40cca5a..e38604f 100644
--- a/source/fitz/encode-jpx.c
+++ b/source/fitz/encode-jpx.c
@@ -22,10 +22,10 @@

#include "mupdf/fitz.h"

-#include <openjpeg.h>
-
#if FZ_ENABLE_JPX

+#include <openjpeg.h>
+
static opj_image_t *
image_from_pixmap(fz_context *ctx, fz_pixmap *pix)
{
6 changes: 3 additions & 3 deletions community/libmupdf/patches/objcopy.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
diff --git a/Makefile b/Makefile
index 0f28384..94419a2 100644
index 53cf06f..948a0be 100644
--- a/Makefile
+++ b/Makefile
@@ -63,7 +63,7 @@ endif
@@ -76,7 +76,7 @@ endif
LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p --exclude=platform/python --exclude=platform/c++
TAGS_CMD = $(QUIET_TAGS) ctags
WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
-OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
+OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; objcopy -I binary -O default $< $@
Expand Down
3 changes: 2 additions & 1 deletion community/libmupdf/sources
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
https://www.mupdf.com/downloads/archive/mupdf-1.23.11-source.tar.gz
https://www.mupdf.com/downloads/archive/mupdf-1.24.0-source.tar.gz
files/mupdf.pc.in
patches/no-gumbo.patch
patches/no-openjpeg.patch
patches/objcopy.patch
2 changes: 1 addition & 1 deletion community/libmupdf/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.11 1
1.24.0 1

0 comments on commit 803a7b2

Please sign in to comment.