mupdf: 1.11 -> 1.12.0

authored by Miguel Madrid Mencía and committed by Domen Kožar e714179c 2130bace

+53 -49
+12 -49
pkgs/applications/misc/mupdf/default.nix
··· 1 1 { stdenv, lib, fetchurl, fetchpatch, pkgconfig 2 2 , freetype, harfbuzz, openjpeg, jbig2dec, libjpeg 3 - , enableX11 ? true, libX11, libXext 3 + , enableX11 ? true, libX11, libXext, libXi, libXrandr 4 4 , enableCurl ? true, curl, openssl 5 + , enableGL ? true, freeglut, mesa_glu 5 6 }: 6 7 7 8 let ··· 13 14 14 15 15 16 in stdenv.mkDerivation rec { 16 - version = "1.11"; 17 + version = "1.12.0"; 17 18 name = "mupdf-${version}"; 18 19 19 20 src = fetchurl { 20 21 url = "http://mupdf.com/downloads/archive/${name}-source.tar.gz"; 21 - sha256 = "02phamcchgsmvjnb3ir7r5sssvx9fcrscn297z73b82n1jl79510"; 22 + sha256 = "0mc7a92zri27lk17wdr2iffarbfi4lvrmxhc53sz84hm5yl56qsw"; 22 23 }; 23 24 24 25 patches = [ 25 26 # Compatibility with new openjpeg 26 27 (fetchpatch { 27 - name = "mupdf-1.11-openjpeg-version.patch"; 28 - url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/0001-mupdf-openjpeg.patch?h=packages/mupdf&id=c19349f42838e4dca02e564b97e0a5ab3e1b943f"; 29 - sha256 = "0sx7jq84sr8bj6sg2ahg9cdgqz8dh4w6r0ah2yil8vrsznn4la8r"; 28 + name = "mupdf-1.12-openjpeg-version.patch"; 29 + url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/0001-mupdf-openjpeg.patch?h=packages/mupdf&id=a910cd33a2b311712f83710dc042fbe80c104306"; 30 + sha256 = "05i9v2ia586jyjqdb7g68ss4vkfwgp6cwhagc8zzggsba83azyqk"; 30 31 }) 31 32 32 - (fetchurl { 33 - name = "mupdf-1.11-CVE-2017-6060.patch"; 34 - url = "http://git.ghostscript.com/?p=mupdf.git;a=blobdiff_plain;f=platform/x11/jstest_main.c;h=f158d9628ed0c0a84e37fe128277679e8334422a;hp=13c3a0a3ba3ff4aae29f6882d23740833c1d842f;hb=06a012a42c9884e3cd653e7826cff1ddec04eb6e;hpb=34e18d127a02146e3415b33c4b67389ce1ddb614"; 35 - sha256 = "163bllvjrbm0gvjb25lv7b6sih4zr4g4lap3h0cbq8dvpjxx0jfc"; 36 - }) 37 - 38 - (fetchpatch { 39 - name = "mupdf-1.11-shared_libs-1.patch"; 40 - url = "https://ftp.osuosl.org/pub/blfs/conglomeration/mupdf/mupdf-1.11-shared_libs-1.patch"; 41 - sha256 = "127x8jhyj3i9cn3mxw9mm5barw2yk43rvmghg54bhn4rjalx857j"; 42 - }) 43 - 44 - (fetchurl { 45 - name = "mupdf-1.11-CVE-2017-14685.patch"; 46 - url = "http://git.ghostscript.com/?p=mupdf.git;a=patch;h=ab1a420613dec93c686acbee2c165274e922f82a"; 47 - sha256 = "120xapwj0af333n3a32ypxk0jmjv2ia476jg8pzsfqk9a5qqkx46"; 48 - }) 33 + ./mupdf-1.12-shared_libs-1.patch 49 34 50 - (fetchurl { 51 - name = "mupdf-1.11-CVE-2017-14686.patch"; 52 - url = "http://git.ghostscript.com/?p=mupdf.git;a=patch;h=0f0fbc07d9be31f5e83ec5328d7311fdfd8328b1"; 53 - sha256 = "0pkn7mfqhmnsyia4rh4mw4q435bzvlc22crqa1bxpaa0gcyky51c"; 54 - }) 55 - 56 - (fetchurl { 57 - name = "mupdf-1.11-CVE-2017-14687.patch"; 58 - url = "http://git.ghostscript.com/?p=mupdf.git;a=patch;h=2b16dbd8f73269cb15ca61ece75cf8d2d196ed28"; 59 - sha256 = "01v41cwrdnz3k32fcadk2gk4knqrm3mavzp6pxhn19nwgmqkshjd"; 60 - }) 61 - 62 - (fetchurl { 63 - name = "mupdf-1.11-CVE-2017-15587.patch"; 64 - url = "http://git.ghostscript.com/?p=mupdf.git;a=patch;h=82df2631d7d0446b206ea6b434ea609b6c28b0e8"; 65 - sha256 = "04kfww7y0wazg6372g44fa2k5kiiigq4616ihkvmp18rz86903n9"; 66 - }) 67 - 68 - (fetchurl { 69 - name = "mupdf-1.11-CVE-2017-15369.patch"; 70 - url = "http://git.ghostscript.com/?p=mupdf.git;a=patch;h=c2663e51238ec8256da7fc61ad580db891d9fe9a"; 71 - sha256 = "0xx2mrbjcymi3gh0l3cq81m6bygp9dv79v1kyrbcvpl5z6wgl71y"; 72 - }) 73 35 ]; 74 36 75 37 postPatch = '' ··· 78 40 79 41 makeFlags = [ "prefix=$(out)" ]; 80 42 nativeBuildInputs = [ pkgconfig ]; 81 - buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg ] 82 - ++ lib.optionals enableX11 [ libX11 libXext ] 83 - ++ lib.optionals enableCurl [ curl openssl ]; 43 + buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg freeglut mesa_glu ] 44 + ++ lib.optionals enableX11 [ libX11 libXext libXi libXrandr ] 45 + ++ lib.optionals enableCurl [ curl openssl ] 46 + ++ lib.optionals enableGL [ freeglut mesa_glu ]; 84 47 outputs = [ "bin" "dev" "out" "man" "doc" ]; 85 48 86 49 preConfigure = ''
+41
pkgs/applications/misc/mupdf/mupdf-1.12-shared_libs-1.patch
··· 1 + --- mupdf-1.12.0-source.orig/Makefile 2017-12-13 15:00:30.000000000 +0100 2 + +++ mupdf-1.12.0-source/Makefile 2017-12-31 00:05:23.003277481 +0100 3 + @@ -14,7 +14,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 + LIBS += $(FREETYPE_LIBS) 12 + @@ -312,9 +312,9 @@ 13 + 14 + # --- Library --- 15 + 16 + -MUPDF_LIB = $(OUT)/libmupdf.a 17 + -THIRD_LIB = $(OUT)/libmupdfthird.a 18 + -THREAD_LIB = $(OUT)/libmuthreads.a 19 + +MUPDF_LIB = $(OUT)/libmupdf.so 20 + +THIRD_LIB = $(OUT)/libmupdfthird.so 21 + +THREAD_LIB = $(OUT)/libmuthreads.so 22 + 23 + MUPDF_OBJ := \ 24 + $(FITZ_OBJ) \ 25 + @@ -343,11 +343,14 @@ 26 + 27 + THREAD_OBJ := $(THREAD_OBJ) 28 + 29 + -$(MUPDF_LIB) : $(MUPDF_OBJ) 30 + +$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB) 31 + + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so -Wl,--no-undefined 32 + $(THIRD_LIB) : $(THIRD_OBJ) 33 + + $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdfthird.so -Wl,--no-undefined 34 + $(THREAD_LIB) : $(THREAD_OBJ) 35 + + $(LINK_CMD) -shared -Wl,-soname -Wl,libmuthreads.so -Wl,--no-undefined -lpthread 36 + 37 + -INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) 38 + +INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) 39 + 40 + # --- Tools and Apps --- 41 +