Mail archive
alpine-aports

[alpine-aports] [PATCH] main/mupdf: upgrade to 1.12.0

From: Daniel Sabogal <dsabogalcc_at_gmail.com>
Date: Fri, 15 Dec 2017 17:38:54 -0500

---
 main/mupdf/APKBUILD            | 36 +++++++++++++++---------------------
 main/mupdf/CVE-2017-6060.patch | 41 -----------------------------------------
 main/mupdf/openjpeg-2.1.patch  |  8 ++++----
 main/mupdf/shared-lib.patch    | 19 ++++++++++---------
 4 files changed, 29 insertions(+), 75 deletions(-)
 delete mode 100644 main/mupdf/CVE-2017-6060.patch
diff --git a/main/mupdf/APKBUILD b/main/mupdf/APKBUILD
index d6c76afd88..cfab6145db 100644
--- a/main/mupdf/APKBUILD
+++ b/main/mupdf/APKBUILD
_at_@ -2,22 +2,21 @@
 # Contributor: Michael Zhou <zhoumichaely_at_gmail.com>
 # Maintainer: Daniel Sabogal <dsabogalcc_at_gmail.com>
 pkgname=mupdf
-pkgver=1.11
-pkgrel=1
+pkgver=1.12.0
+pkgrel=0
 pkgdesc="A lightweight PDF and XPS viewer"
 url="http://mupdf.com"
 arch="all"
 license="AGPL3+"
 depends=""
 makedepends="freetype-dev jpeg-dev jbig2dec-dev libx11-dev libxext-dev
-	openjpeg-dev harfbuzz-dev glfw-dev"
+	openjpeg-dev harfbuzz-dev freeglut-dev"
 subpackages="$pkgname-doc $pkgname-dev $pkgname-x11:_x11
 	$pkgname-gl:_gl $pkgname-tools:_tools"
 options="!check"
-source="http://mupdf.com/downloads/archive/$pkgname-$pkgver-source.tar.gz
+source="http://mupdf.com/downloads/archive/$pkgname-$pkgver-source.tar.xz
 	shared-lib.patch
 	openjpeg-2.1.patch
-	CVE-2017-6060.patch
 	"
 
 # secfixes:
_at_@ -30,26 +29,21 @@ source="http://mupdf.com/downloads/archive/$pkgname-$pkgver-source.tar.gz
 
 builddir="$srcdir/$pkgname-$pkgver-source"
 prepare() {
-	default_prepare || return 1
+	default_prepare
 
 	cd "$builddir"
 	for file in thirdparty/*; do
 		[ "${file##*/}" != "mujs" ] && rm -rf "$file"
 	done
-
-	sed '/^JBIG2DEC_CFLAGS :=/s|$| -I./include/mupdf|' \
-		-i Makethird || return 1
 }
 
 build() {
-	make HAVE_GLFW=yes SYS_GLFW_LIBS="$(pkgconf --libs glfw3 gl)" \
-		prefix=/usr -C "$builddir" || return 1
+	make prefix=/usr -C "$builddir"
 }
 
 package() {
-	make HAVE_GLFW=yes \
-		prefix=/usr DESTDIR="$pkgdir" \
-		-C "$builddir" install || return 1
+	make prefix=/usr DESTDIR="$pkgdir" \
+		-C "$builddir" install
 
 	ln -s libmupdf.so.0 "$pkgdir"/usr/lib/libmupdf.so
 	ln -s libmupdfthird.so.0 "$pkgdir"/usr/lib/libmupdfthird.so
_at_@ -61,7 +55,7 @@ _x11() {
 
 	mkdir -p "$subpkgdir"/usr/bin
 	mv "$pkgdir"/usr/bin/mupdf-x11 \
-		"$subpkgdir"/usr/bin/ || return 1
+		"$subpkgdir"/usr/bin/
 	ln -s /usr/bin/mupdf-x11 "$subpkgdir"/usr/bin/mupdf
 }
 
_at_@ -71,7 +65,7 @@ _gl() {
 
 	mkdir -p "$subpkgdir"/usr/bin
 	mv "$pkgdir"/usr/bin/mupdf-gl \
-		"$subpkgdir"/usr/bin/ || return 1
+		"$subpkgdir"/usr/bin/
 }
 
 _tools() {
_at_@ -80,12 +74,12 @@ _tools() {
 
 	mkdir -p "$subpkgdir"/usr/bin
 	mv "$pkgdir"/usr/bin/mutool \
+		"$pkgdir"/usr/bin/mjsgen \
 		"$pkgdir"/usr/bin/mujstest \
 		"$pkgdir"/usr/bin/muraster \
-		"$subpkgdir"/usr/bin/ || return 1
+		"$subpkgdir"/usr/bin/
 }
 
-sha512sums="501670f540e298a8126806ebbd9db8b29866f663b7bbf26c9ade1933e42f0c00ad410b9d93f3ddbfb3e45c38722869095de28d832fe3fb3703c55cc9a01dbf63  mupdf-1.11-source.tar.gz
-b3ddbc22da894a8b9a0fa0c93711e2052b5d2ca29497473b6e15ffbae52faaafff9238619680de474c455ebd073c2d29ead4ff5d962fddb99f7ced27057fa77f  shared-lib.patch
-f8283db9a510527e84afeeb6eea89948161899c149a559c4a699c533445b42f30e5bf520616ca69d7feb554529ad494a60c276a1eecc915723ec0f264bbc0ed0  openjpeg-2.1.patch
-3e3f34e448967acb7772365065234c313cb014ebe6e3c3b3bcdbed2242b32ee5589ecd749d06fb4cd5f406eb37ca431e369c96b9adb3b5367d2e5296f1ca983e  CVE-2017-6060.patch"
+sha512sums="4c9ce81e7b0e2d77e017776fd9f700bc2f695f34b7fd97be7ba113ec1b340e7046c9db7d396abf19a98b1d0c7d72f01ecc1b44fadd250d2d6c6ffdcd9799bc16  mupdf-1.12.0-source.tar.xz
+8d3f22908060351e8bb171c7c8248662dd6ac3fb5c765ad0ce33f33c418f6bcfb1982ea8e97b4fefee067c675cac03f76e8b715640dfd3689e8d7738384b6536  shared-lib.patch
+3034e7d3248d904cc23e033a6331fc7a48d8f14e85deaa7b7b7bc37d8a3bc6c788e2fd0a866873a69c5f416d8de5b3a5b9efde4747fa50c2ea3c4b8d170aa549  openjpeg-2.1.patch"
diff --git a/main/mupdf/CVE-2017-6060.patch b/main/mupdf/CVE-2017-6060.patch
deleted file mode 100644
index cc03f6106b..0000000000
--- a/main/mupdf/CVE-2017-6060.patch
+++ /dev/null
_at_@ -1,41 +0,0 @@
-squashed commits:
-06a012a42c9884e3cd653e7826cff1ddec04eb6e
-e089b2e2c1d38c5696c7dfd741e21f8f3ef22b14
-
-From 05cb7595b61aa00a29f1609b75d280b589091356 Mon Sep 17 00:00:00 2001
-From: Sebastian Rasmussen <sebras_at_gmail.com>
-Date: Tue, 11 Apr 2017 10:54:12 +0800
-Subject: [PATCH] Bug 697551: Make path and line buffers of equal size.
-
-Previously a too long line could be copied into the too short path buffer.
-
-jstest: Stop printing bogus script lines.
----
- platform/x11/jstest_main.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/platform/x11/jstest_main.c b/platform/x11/jstest_main.c
-index 13c3a0a3..36b32155 100644
---- a/platform/x11/jstest_main.c
-+++ b/platform/x11/jstest_main.c
-_at_@ -346,7 +346,7 @@ main(int argc, char *argv[])
- 				}
- 				else if (match(&line, "OPEN"))
- 				{
--					char path[1024];
-+					char path[LONGLINE];
- 					if (file_open)
- 						pdfapp_close(&gapp);
- 					if (prefix)
-_at_@ -402,7 +402,7 @@ main(int argc, char *argv[])
- 				}
- 				else
- 				{
--					fprintf(stderr, "Unmatched: %s\n", line);
-+					fprintf(stderr, "Ignoring line without script statement.\n");
- 				}
- 			}
- 			while (!feof(script));
--- 
-2.12.2
-
diff --git a/main/mupdf/openjpeg-2.1.patch b/main/mupdf/openjpeg-2.1.patch
index 3181c461f3..437e114cb9 100644
--- a/main/mupdf/openjpeg-2.1.patch
+++ b/main/mupdf/openjpeg-2.1.patch
_at_@ -1,12 +1,12 @@
---- mupdf-1.11-source/source/fitz/load-jpx.c.orig
-+++ mupdf-1.11-source/source/fitz/load-jpx.c
-_at_@ -444,11 +444,6 @@
+--- mupdf-1.12.0-source/source/fitz/load-jpx.c.orig
++++ mupdf-1.12.0-source/source/fitz/load-jpx.c
+_at_@ -445,11 +445,6 @@
  
  #else /* HAVE_LURATECH */
  
 -#define OPJ_STATIC
 -#define OPJ_HAVE_INTTYPES_H
--#if !defined(_WIN32) && !defined(_WIN64)
+-#if !defined(_MSC_VER) || _MSC_VER >= 1600
 -#define OPJ_HAVE_STDINT_H
 -#endif
  #define USE_JPIP
diff --git a/main/mupdf/shared-lib.patch b/main/mupdf/shared-lib.patch
index a73d885364..a3d039a575 100644
--- a/main/mupdf/shared-lib.patch
+++ b/main/mupdf/shared-lib.patch
_at_@ -1,14 +1,15 @@
---- mupdf-1.11-source/Makefile.orig
-+++ mupdf-1.11-source/Makefile
-_at_@ -15,6 +15,7 @@
+--- mupdf-1.12.0-source/Makefile.orig
++++ mupdf-1.12.0-source/Makefile
+_at_@ -14,7 +14,7 @@
+ # Do not specify CFLAGS or LIBS on the make invocation line - specify
  # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that
  # set a variable that was set on the command line.
- CFLAGS += $(XCFLAGS) -Iinclude -Igenerated
-+CFLAGS += -fPIC
+-CFLAGS += $(XCFLAGS) -Iinclude
++CFLAGS += $(XCFLAGS) -Iinclude -fPIC
  LIBS += $(XLIBS) -lm
  
  LIBS += $(FREETYPE_LIBS)
-_at_@ -73,6 +74,7 @@
+_at_@ -75,6 +75,7 @@
  CXX_CMD = $(QUIET_CXX) $(CXX) $(CFLAGS) -o $_at_ -c $<
  AR_CMD = $(QUIET_AR) $(AR) cr $_at_ $^
  LINK_CMD = $(QUIET_LINK) $(CC) $(LDFLAGS) -o $_at_ $^ $(LIBS)
_at_@ -16,7 +17,7 @@
  MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $_at_
  RM_CMD = $(QUIET_RM) rm -f $_at_
  TAGS_CMD = $(QUIET_TAGS) ctags $^
-_at_@ -88,6 +90,9 @@
+_at_@ -90,6 +91,9 @@
  	$(AR_CMD)
  	$(RANLIB_CMD)
  
_at_@ -26,7 +27,7 @@
  $(OUT)/%.exe: $(OUT)/%.o | $(ALL_DIR)
  	$(LINK_CMD)
  
-_at_@ -300,8 +305,8 @@
+_at_@ -312,8 +316,8 @@
  
  # --- Library ---
  
_at_@ -36,4 +37,4 @@
 +THIRD_LIB = $(OUT)/libmupdfthird.so.0
  THREAD_LIB = $(OUT)/libmuthreads.a
  
- MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(SVG_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
+ MUPDF_OBJ := \
-- 
2.15.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Dec 15 2017 - 17:38:54 GMT