mupdf: 1.17.0 -> 1.18.0

fixes CVE-2017-5991
fixes CVE-2020-26519

also drops the patch for shared libs (not needed anymore)

authored by

Markus S. Wamser and committed by
Jonathan Ringer
e13120bb bd253218

+8 -45
+8 -6
pkgs/applications/misc/mupdf/default.nix
··· 1 1 { stdenv, lib, fetchurl, fetchpatch, pkgconfig, freetype, harfbuzz, openjpeg 2 2 , jbig2dec, libjpeg , darwin 3 + , gumbo 3 4 , enableX11 ? true, libX11, libXext, libXi, libXrandr 4 5 , enableCurl ? true, curl, openssl 5 6 , enableGL ? true, freeglut, libGLU ··· 13 14 14 15 15 16 in stdenv.mkDerivation rec { 16 - version = "1.17.0"; 17 + version = "1.18.0"; 17 18 pname = "mupdf"; 18 19 19 20 src = fetchurl { 20 21 url = "https://mupdf.com/downloads/archive/${pname}-${version}-source.tar.gz"; 21 - sha256 = "13nl9nrcx2awz9l83mlv2psi1lmn3hdnfwxvwgwiwbxlkjl3zqq0"; 22 + sha256 = "0rljl44y8p8hgaqializlyrgpij1wbnrzyp0ll5kcg7w05nylq48"; 22 23 }; 23 24 24 25 patches = 25 - # Use shared libraries to decrease size 26 - stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.14-shared_libs.patch 27 - ++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch 26 + stdenv.lib.optional stdenv.isDarwin ./darwin.patch 28 27 ; 29 28 30 29 postPatch = '' 31 30 sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c 32 31 ''; 33 32 33 + # Use shared libraries to decrease size 34 + buildFlags = [ "shared" ]; 35 + 34 36 makeFlags = [ "prefix=$(out) USE_SYSTEM_LIBS=yes" ]; 35 37 nativeBuildInputs = [ pkgconfig ]; 36 - buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg freeglut libGLU ] 38 + buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg freeglut libGLU gumbo ] 37 39 ++ lib.optionals enableX11 [ libX11 libXext libXi libXrandr ] 38 40 ++ lib.optionals enableCurl [ curl openssl ] 39 41 ++ lib.optionals enableGL (
-39
pkgs/applications/misc/mupdf/mupdf-1.14-shared_libs.patch
··· 1 - --- mupdf-1.14.0-source.orig/Makefile 2018-11-02 06:57:12.114012496 +0100 2 - +++ mupdf-1.14.0-source/Makefile 2018-11-02 09:57:10.067945307 +0100 3 - @@ -20,7 +20,7 @@ 4 - # Do not specify CFLAGS or LIBS on the make invocation line - specify 5 - # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that 6 - # set a variable that was set on the command line. 7 - -CFLAGS += $(XCFLAGS) -Iinclude 8 - +CFLAGS += $(XCFLAGS) -Iinclude -fPIC 9 - LIBS += $(XLIBS) -lm 10 - 11 - ifneq ($(threading),no) 12 - @@ -190,17 +190,21 @@ 13 - 14 - # --- Library --- 15 - 16 - -MUPDF_LIB = $(OUT)/libmupdf.a 17 - -THIRD_LIB = $(OUT)/libmupdf-third.a 18 - -THREAD_LIB = $(OUT)/libmupdf-threads.a 19 - -PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a 20 - +MUPDF_LIB = $(OUT)/libmupdf.so 21 - +THIRD_LIB = $(OUT)/libmupdf-third.so 22 - +THREAD_LIB = $(OUT)/libmupdf-threads.so 23 - +PKCS7_LIB = $(OUT)/libmupdf-pkcs7.so 24 - 25 - -$(MUPDF_LIB) : $(MUPDF_OBJ) 26 - +$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB) 27 - + $(LINK_CMD) $(THIRD_LIBS) -shared -Wl,-soname -Wl,libmupdf.so -Wl,--no-undefined 28 - $(THIRD_LIB) : $(THIRD_OBJ) 29 - + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-third.so -Wl,--no-undefined 30 - $(THREAD_LIB) : $(THREAD_OBJ) 31 - + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-threads.so -Wl,--no-undefined -lpthread 32 - $(PKCS7_LIB) : $(PKCS7_OBJ) 33 - + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-pkcs7.so 34 - 35 - -INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) 36 - +INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB) 37 - 38 - # --- Main tools and viewers --- 39 -