summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--0001-mupdf-openjpeg.patch33
-rw-r--r--PKGBUILD28
3 files changed, 25 insertions, 50 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 57fbd73b65d0..63d4f01067ed 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mupdf-nojs
pkgdesc = Lightweight PDF and XPS viewer
- pkgver = 1.9_a
- pkgrel = 2
+ pkgver = 1.10a
+ pkgrel = 1
url = http://mupdf.com
arch = i686
arch = x86_64
@@ -21,16 +21,12 @@ pkgbase = mupdf-nojs
conflicts = mupdf-gl
conflicts = mupdf-tools
options = staticlibs
- source = http://mupdf.com/downloads/mupdf-1.9a-source.tar.gz
+ source = http://mupdf.com/downloads/mupdf-1.10a-source.tar.gz
source = 0001-mupdf-openjpeg.patch
- source = mupdf-0001-bug-696941-fix-use-after-free.patch::http://git.ghostscript.com/?p=mupdf.git;a=patch;h=fa1936405b6a84e5c9bb440912c23d532772f958
- source = mupdf-0002-make-sure-that-number-of-colors-in-mesh-params-is-valid.patch::http://git.ghostscript.com/?p=mupdf.git;a=patch;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e
source = mupdf.desktop
source = mupdf.xpm
- sha256sums = 8015c55f4e6dd892d3c50db4f395c1e46660a10b460e2ecd180a497f55bbc4cc
- sha256sums = 3bad2ab6dfd11d7f715c9ea5618856ac386a0841d0ee14a33f0eec55b60bda67
- sha256sums = a8b72e0368f19349fe434d2fe7febc1e6623abf61d043dfa794a002aed8fef4c
- sha256sums = e0b53f0999a2c91f7906a9c6d61f7494716507e535e9f2c4dccc8ea490fb1402
+ sha256sums = aacc1f36b9180f562022ef1ab3439b009369d944364f3cff8a2a898834e3a836
+ sha256sums = e55c3b876149d46983b155b0a237fa7d8d47a49e4ecab848bfca3fd549c644c4
sha256sums = 70f632e22902ad4224b1d88696702b3ba4eb3c28eb7acf735f06d16e6884a078
sha256sums = a435f44425f5432c074dee745d8fbaeb879038ec1f1ec64f037c74662f09aca8
diff --git a/0001-mupdf-openjpeg.patch b/0001-mupdf-openjpeg.patch
index 562b7488052d..b41e3477907e 100644
--- a/0001-mupdf-openjpeg.patch
+++ b/0001-mupdf-openjpeg.patch
@@ -1,6 +1,6 @@
---- a/source/fitz/load-jpx.c
+--- a/source/fitz/load-jpx.c
+++ b/source/fitz/load-jpx.c
-@@ -3,12 +3,17 @@
+@@ -484,13 +484,18 @@
/* Without the definition of OPJ_STATIC, compilation fails on windows
* due to the use of __stdcall. We believe it is required on some
* linux toolchains too. */
@@ -15,24 +15,17 @@
+#endif
-#include <openjpeg.h>
+-
+#include <openjpeg-2.1/openjpeg.h>
-
- static void fz_opj_error_callback(const char *msg, void *client_data)
- {
-@@ -117,7 +122,7 @@ fz_load_jpx(fz_context *ctx, unsigned ch
- opj_stream_set_read_function(stream, fz_opj_stream_read);
- opj_stream_set_skip_function(stream, fz_opj_stream_skip);
- opj_stream_set_seek_function(stream, fz_opj_stream_seek);
-- opj_stream_set_user_data(stream, &sb);
-+ opj_stream_set_user_data(stream, &sb, NULL);
- /* Set the length to avoid an assert */
- opj_stream_set_user_data_length(stream, size);
-
-@@ -247,3 +252,6 @@ fz_load_jpx(fz_context *ctx, unsigned ch
-
- return img;
++
+ /* OpenJPEG does not provide a safe mechanism to intercept
+ * allocations. In the latest version all allocations go
+ * though opj_malloc etc, but no context is passed around.
+@@ -972,3 +977,7 @@
}
-+#ifdef __cplusplus
-+}
+
+ #endif /* HAVE_LURATECH */
++
++#ifdef __cplusplus
++}
+#endif
-
diff --git a/PKGBUILD b/PKGBUILD
index 8bdae680f0bc..ed349a8436c5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,8 +9,8 @@
_pkgbase=mupdf
pkgbase=${_pkgbase}-nojs
pkgname=(libmupdf-nojs mupdf-nojs mupdf-gl-nojs mupdf-tools-nojs)
-pkgver=1.9_a
-pkgrel=2
+pkgver=1.10a
+pkgrel=1
pkgdesc='Lightweight PDF and XPS viewer'
arch=('i686' 'x86_64')
url='http://mupdf.com'
@@ -22,14 +22,10 @@ makedepends=('curl' 'desktop-file-utils' 'freetype2' 'glfw' 'harfbuzz'
options=('staticlibs')
source=("http://mupdf.com/downloads/mupdf-${pkgver/_/}-source.tar.gz"
'0001-mupdf-openjpeg.patch'
- 'mupdf-0001-bug-696941-fix-use-after-free.patch::http://git.ghostscript.com/?p=mupdf.git;a=patch;h=fa1936405b6a84e5c9bb440912c23d532772f958'
- 'mupdf-0002-make-sure-that-number-of-colors-in-mesh-params-is-valid.patch::http://git.ghostscript.com/?p=mupdf.git;a=patch;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e'
'mupdf.desktop'
'mupdf.xpm')
-sha256sums=('8015c55f4e6dd892d3c50db4f395c1e46660a10b460e2ecd180a497f55bbc4cc'
-'3bad2ab6dfd11d7f715c9ea5618856ac386a0841d0ee14a33f0eec55b60bda67'
-'a8b72e0368f19349fe434d2fe7febc1e6623abf61d043dfa794a002aed8fef4c'
-'e0b53f0999a2c91f7906a9c6d61f7494716507e535e9f2c4dccc8ea490fb1402'
+sha256sums=('aacc1f36b9180f562022ef1ab3439b009369d944364f3cff8a2a898834e3a836'
+'e55c3b876149d46983b155b0a237fa7d8d47a49e4ecab848bfca3fd549c644c4'
'70f632e22902ad4224b1d88696702b3ba4eb3c28eb7acf735f06d16e6884a078'
'a435f44425f5432c074dee745d8fbaeb879038ec1f1ec64f037c74662f09aca8'
)
@@ -40,16 +36,6 @@ prepare() {
# remove bundled packages, we want our system libraries
rm -rf thirdparty/{curl,freetype,glfw,harfbuzz,jbig2dec,jpeg,openjpeg,zlib}
- # Bug 696941: Fix use after free.
- # CVE-2016-6265
- # https://security-tracker.debian.org/tracker/CVE-2016-6265
- patch -Np1 < "${srcdir}/mupdf-0001-bug-696941-fix-use-after-free.patch"
-
- # Make sure that number of colors in mesh params is valid.
- # CVE-2016-6525
- # https://security-tracker.debian.org/tracker/CVE-2016-6525
- patch -Np1 < "${srcdir}/mupdf-0002-make-sure-that-number-of-colors-in-mesh-params-is-valid.patch"
-
# fix function for openjpeg 2.1.x
patch -Np1 < "${srcdir}/0001-mupdf-openjpeg.patch"
@@ -58,9 +44,9 @@ prepare() {
}
build() {
- CFLAGS+=' -fPIC -fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2'
- CXXFLAGS+=' -fPIC -fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2'
- LDFLAGS+=' -pie'
+ CFLAGS+=' -fPIC -fPIE -fno-plt -fstack-check -fstack-protector-all -D_FORTIFY_SOURCE=2'
+ CXXFLAGS+=' -fPIC -fPIE -fno-plt -fstack-check -fstack-protector-all -D_FORTIFY_SOURCE=2'
+ LDFLAGS+=' -pie -z,now'
export CFLAGS CXXFLAGS LDFLAGS
HAVE_GLFW='yes'