Skip to content

Commit

Permalink
Upgrade muPDF to version 1.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nick863 authored and max-kammerer committed Sep 28, 2023
1 parent 11d3988 commit 8a4a011
Show file tree
Hide file tree
Showing 6 changed files with 885 additions and 9,541 deletions.
227 changes: 146 additions & 81 deletions nativeLibs/mupdfModule/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ ${MUPDF_PATH}/thirdparty/lcms2/include
${MUPDF_PATH}/thirdparty/mujs
${MUPDF_PATH}/thirdparty/openjpeg/src/lib/openjp2
${MUPDF_PATH}/thirdparty/zlib
${MUPDF_PATH}/thirdparty/extract/include
${MUPDF_PATH}/thirdparty/gumbo-parser/src
)

#LOCAL_CFLAGS := \
Expand Down Expand Up @@ -68,94 +70,116 @@ ${MUPDF_PATH}/thirdparty/freetype/src/raster/raster.c
${MUPDF_PATH}/thirdparty/freetype/src/sfnt/sfnt.c
${MUPDF_PATH}/thirdparty/freetype/src/smooth/smooth.c
${MUPDF_PATH}/thirdparty/freetype/src/truetype/truetype.c
${MUPDF_PATH}/thirdparty/freetype/src/type1/type1.c
${MUPDF_PATH}/thirdparty/freetype/src/type1/type1.c
${MUPDF_PATH}/thirdparty/freetype/src/base/ftfstype.c

${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-aat-layout.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-blob.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-buffer-serialize.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-buffer.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-common.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-face.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-fallback-shape.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-font.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ft.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-color.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-face.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-font.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-layout.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-map.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-math.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-arabic.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-default.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-hangul.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-hebrew.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic-table.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-indic.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-khmer.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-myanmar.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-thai.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-tibetan.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-use-table.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-complex-use.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-fallback.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-normalize.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-tag.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-var.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-set.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-shape-plan.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-shape.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-shaper.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-static.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ucdn.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-unicode.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-warning.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-aat-map.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-blob.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-buffer-serialize.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-buffer-verify.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-buffer.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ft.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-common.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-face.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-fallback-shape.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-font.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-number.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-cff1-table.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-cff2-table.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-color.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-face.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-font.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-layout.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-map.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-math.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-metrics.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-fallback.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape-normalize.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shape.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-arabic.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-default.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-hangul.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-hebrew.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-indic-table.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-indic.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-khmer.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-myanmar.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-syllabic.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-thai.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-use.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-shaper-vowel-constraints.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-tag.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ot-var.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-set.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-shape-plan.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-shape.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-shaper.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-static.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-ucd.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-unicode.cc
${MUPDF_PATH}/thirdparty/harfbuzz/src/hb-uniscribe.cc

${MUPDF_PATH}/thirdparty/jbig2dec/jbig2.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_arith.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_arith_iaid.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_arith_int.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_generic.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_halftone.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_huffman.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_huffman.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_hufftab.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_image.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_mmr.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_page.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_refinement.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_segment.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_symbol_dict.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_text.c
${MUPDF_PATH}/thirdparty/jbig2dec/jbig2_text.c

${MUPDF_PATH}/thirdparty/libjpeg/jaricom.c
${MUPDF_PATH}/thirdparty/libjpeg/jcomapi.c
${MUPDF_PATH}/thirdparty/libjpeg/jdapimin.c
${MUPDF_PATH}/thirdparty/libjpeg/jdapistd.c
${MUPDF_PATH}/thirdparty/libjpeg/jdarith.c
${MUPDF_PATH}/thirdparty/libjpeg/jdatadst.c
${MUPDF_PATH}/thirdparty/libjpeg/jdatasrc.c
${MUPDF_PATH}/thirdparty/libjpeg/jdcoefct.c
${MUPDF_PATH}/thirdparty/libjpeg/jdcolor.c
${MUPDF_PATH}/thirdparty/libjpeg/jddctmgr.c
${MUPDF_PATH}/thirdparty/libjpeg/jdhuff.c
${MUPDF_PATH}/thirdparty/libjpeg/jdinput.c
${MUPDF_PATH}/thirdparty/libjpeg/jdmainct.c
${MUPDF_PATH}/thirdparty/libjpeg/jdmarker.c
${MUPDF_PATH}/thirdparty/libjpeg/jdmaster.c
${MUPDF_PATH}/thirdparty/libjpeg/jdmerge.c
${MUPDF_PATH}/thirdparty/libjpeg/jdpostct.c
${MUPDF_PATH}/thirdparty/libjpeg/jdsample.c
${MUPDF_PATH}/thirdparty/libjpeg/jdtrans.c
${MUPDF_PATH}/thirdparty/libjpeg/jerror.c
${MUPDF_PATH}/thirdparty/libjpeg/jfdctflt.c
${MUPDF_PATH}/thirdparty/libjpeg/jfdctfst.c
${MUPDF_PATH}/thirdparty/libjpeg/jfdctint.c
${MUPDF_PATH}/thirdparty/libjpeg/jidctflt.c
${MUPDF_PATH}/thirdparty/libjpeg/jidctfst.c
${MUPDF_PATH}/thirdparty/libjpeg/jidctint.c
${MUPDF_PATH}/thirdparty/libjpeg/jmemmgr.c
${MUPDF_PATH}/thirdparty/libjpeg/jquant1.c
${MUPDF_PATH}/thirdparty/libjpeg/jquant2.c
${MUPDF_PATH}/thirdparty/libjpeg/jutils.c
${MUPDF_PATH}/thirdparty/libjpeg/jcomapi.c
${MUPDF_PATH}/thirdparty/libjpeg/jdapimin.c
${MUPDF_PATH}/thirdparty/libjpeg/jdapistd.c
${MUPDF_PATH}/thirdparty/libjpeg/jdarith.c
${MUPDF_PATH}/thirdparty/libjpeg/jdatadst.c
${MUPDF_PATH}/thirdparty/libjpeg/jdatasrc.c
${MUPDF_PATH}/thirdparty/libjpeg/jdcoefct.c
${MUPDF_PATH}/thirdparty/libjpeg/jdcolor.c
${MUPDF_PATH}/thirdparty/libjpeg/jddctmgr.c
${MUPDF_PATH}/thirdparty/libjpeg/jdhuff.c
${MUPDF_PATH}/thirdparty/libjpeg/jdinput.c
${MUPDF_PATH}/thirdparty/libjpeg/jdmainct.c
${MUPDF_PATH}/thirdparty/libjpeg/jdmarker.c
${MUPDF_PATH}/thirdparty/libjpeg/jdmaster.c
${MUPDF_PATH}/thirdparty/libjpeg/jdmerge.c
${MUPDF_PATH}/thirdparty/libjpeg/jdpostct.c
${MUPDF_PATH}/thirdparty/libjpeg/jdsample.c
${MUPDF_PATH}/thirdparty/libjpeg/jdtrans.c
${MUPDF_PATH}/thirdparty/libjpeg/jerror.c
${MUPDF_PATH}/thirdparty/libjpeg/jfdctflt.c
${MUPDF_PATH}/thirdparty/libjpeg/jfdctfst.c
${MUPDF_PATH}/thirdparty/libjpeg/jfdctint.c
${MUPDF_PATH}/thirdparty/libjpeg/jidctflt.c
${MUPDF_PATH}/thirdparty/libjpeg/jidctfst.c
${MUPDF_PATH}/thirdparty/libjpeg/jidctint.c
${MUPDF_PATH}/thirdparty/libjpeg/jmemmgr.c
${MUPDF_PATH}/thirdparty/libjpeg/jquant1.c
${MUPDF_PATH}/thirdparty/libjpeg/jquant2.c
${MUPDF_PATH}/thirdparty/libjpeg/jutils.c
${MUPDF_PATH}/thirdparty/libjpeg/jcapimin.c
${MUPDF_PATH}/thirdparty/libjpeg/jcmarker.c
${MUPDF_PATH}/thirdparty/libjpeg/jcparam.c
${MUPDF_PATH}/thirdparty/libjpeg/jcapistd.c
${MUPDF_PATH}/thirdparty/libjpeg/jcinit.c
${MUPDF_PATH}/thirdparty/libjpeg/jcmaster.c
${MUPDF_PATH}/thirdparty/libjpeg/jccolor.c
${MUPDF_PATH}/thirdparty/libjpeg/jcsample.c
${MUPDF_PATH}/thirdparty/libjpeg/jcprepct.c
${MUPDF_PATH}/thirdparty/libjpeg/jcdctmgr.c
${MUPDF_PATH}/thirdparty/libjpeg/jcarith.c
${MUPDF_PATH}/thirdparty/libjpeg/jchuff.c
${MUPDF_PATH}/thirdparty/libjpeg/jccoefct.c
${MUPDF_PATH}/thirdparty/libjpeg/jcmainct.c

${MUPDF_PATH}/thirdparty/lcms2/src/cmsalpha.c
${MUPDF_PATH}/thirdparty/lcms2/src/cmscam02.c
Expand Down Expand Up @@ -204,18 +228,57 @@ ${MUPDF_PATH}/thirdparty/openjpeg/src/lib/openjp2/t1.c
${MUPDF_PATH}/thirdparty/openjpeg/src/lib/openjp2/t2.c
${MUPDF_PATH}/thirdparty/openjpeg/src/lib/openjp2/tcd.c
${MUPDF_PATH}/thirdparty/openjpeg/src/lib/openjp2/tgt.c
${MUPDF_PATH}/thirdparty/openjpeg/src/lib/openjp2/thread.c
${MUPDF_PATH}/thirdparty/openjpeg/src/lib/openjp2/thread.c
${MUPDF_PATH}/thirdparty/openjpeg/src/lib/openjp2/ht_dec.c

${MUPDF_PATH}/thirdparty/zlib/adler32.c
${MUPDF_PATH}/thirdparty/zlib/compress.c
${MUPDF_PATH}/thirdparty/zlib/crc32.c
${MUPDF_PATH}/thirdparty/zlib/deflate.c
${MUPDF_PATH}/thirdparty/zlib/inffast.c
${MUPDF_PATH}/thirdparty/zlib/inflate.c
${MUPDF_PATH}/thirdparty/zlib/inftrees.c
${MUPDF_PATH}/thirdparty/zlib/trees.c
${MUPDF_PATH}/thirdparty/zlib/uncompr.c
${MUPDF_PATH}/thirdparty/zlib/compress.c
${MUPDF_PATH}/thirdparty/zlib/crc32.c
${MUPDF_PATH}/thirdparty/zlib/deflate.c
${MUPDF_PATH}/thirdparty/zlib/inffast.c
${MUPDF_PATH}/thirdparty/zlib/inflate.c
${MUPDF_PATH}/thirdparty/zlib/inftrees.c
${MUPDF_PATH}/thirdparty/zlib/trees.c
${MUPDF_PATH}/thirdparty/zlib/uncompr.c
${MUPDF_PATH}/thirdparty/zlib/zutil.c


${MUPDF_PATH}/thirdparty/extract/src/alloc.c
${MUPDF_PATH}/thirdparty/extract/src/astring.c
${MUPDF_PATH}/thirdparty/extract/src/boxer.c
${MUPDF_PATH}/thirdparty/extract/src/buffer-test.c
${MUPDF_PATH}/thirdparty/extract/src/buffer.c
${MUPDF_PATH}/thirdparty/extract/src/document.c
${MUPDF_PATH}/thirdparty/extract/src/docx.c
${MUPDF_PATH}/thirdparty/extract/src/docx_template.c
${MUPDF_PATH}/thirdparty/extract/src/extract.c
${MUPDF_PATH}/thirdparty/extract/src/html.c
${MUPDF_PATH}/thirdparty/extract/src/join.c
${MUPDF_PATH}/thirdparty/extract/src/json.c
${MUPDF_PATH}/thirdparty/extract/src/mem.c
${MUPDF_PATH}/thirdparty/extract/src/memento.c
${MUPDF_PATH}/thirdparty/extract/src/misc-test.c
${MUPDF_PATH}/thirdparty/extract/src/odt.c
${MUPDF_PATH}/thirdparty/extract/src/odt_template.c
${MUPDF_PATH}/thirdparty/extract/src/outf.c
${MUPDF_PATH}/thirdparty/extract/src/rect.c
${MUPDF_PATH}/thirdparty/extract/src/sys.c
${MUPDF_PATH}/thirdparty/extract/src/text.c
${MUPDF_PATH}/thirdparty/extract/src/xml.c
${MUPDF_PATH}/thirdparty/extract/src/zip-test.c
${MUPDF_PATH}/thirdparty/extract/src/zip.c

${MUPDF_PATH}/thirdparty/gumbo-parser/src/attribute.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/char_ref.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/error.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/parser.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/string_buffer.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/string_piece.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/tag.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/tokenizer.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/utf8.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/util.c
${MUPDF_PATH}/thirdparty/gumbo-parser/src/vector.c
)

file(GLOB cc_EXT $(MUPDF_PATH)/thirdparty/harfbuzz/src/)
Expand All @@ -234,6 +297,8 @@ ${MUPDF_PATH}/thirdparty/lcms2/include
${MUPDF_PATH}/thirdparty/mujs
${MUPDF_PATH}/thirdparty/openjpeg/src/lib/openjp2
${MUPDF_PATH}/thirdparty/zlib
${MUPDF_PATH}/thirdparty/extract/include
${MUPDF_PATH}/thirdparty/gumbo-parser/src
)

#LOCAL_CFLAGS := \
Expand All @@ -254,7 +319,7 @@ ${MUPDF_PATH}/thirdparty/zlib
#-Dhb_realloc_impl=fz_hb_realloc \
#-Dhb_free_impl=fz_hb_free \

target_compile_definitions(mupdf_thirdparty PRIVATE -DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON -DFT_CONFIG_MODULES_H="slimftmodules.h" -DFT_CONFIG_OPTIONS_H="slimftoptions.h" -DHAVE_STDINT_H -DOPJ_STATIC -DOPJ_HAVE_INTTYPES_H -DOPJ_HAVE_STDINT_H -DHAVE_FALLBACK=1 -DHAVE_OT -DHAVE_UCDN -DHB_NO_MT -Dhb_malloc_impl=fz_hb_malloc -Dhb_calloc_impl=fz_hb_calloc -Dhb_realloc_impl=fz_hb_realloc -Dhb_free_impl=fz_hb_free)
target_compile_definitions(mupdf_thirdparty PRIVATE -DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON -DFT_CONFIG_MODULES_H="slimftmodules.h" -DFT_CONFIG_OPTIONS_H="slimftoptions.h" -DHAVE_STDINT_H -DOPJ_STATIC -DOPJ_HAVE_INTTYPES_H -DOPJ_HAVE_STDINT_H -DHAVE_FALLBACK=1 -DHAVE_OT -DHAVE_UCDN -DHAVE_FREETYPE -DHB_NO_MT -Dhb_malloc_impl=fz_hb_malloc -Dhb_calloc_impl=fz_hb_calloc -Dhb_realloc_impl=fz_hb_realloc -Dhb_free_impl=fz_hb_free)
target_compile_options(mupdf_thirdparty PRIVATE -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvisibility-inlines-hidden)


Expand Down
Loading

0 comments on commit 8a4a011

Please sign in to comment.