[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2024-05-25 Thread Arthur Zamarin
commit: 2c435680ca5545dfcf3215d7a9d2d646c9209e48
Author: Philipp Rösner  protonmail  com>
AuthorDate: Sat May  4 18:47:19 2024 +
Commit: Arthur Zamarin  gentoo  org>
CommitDate: Sat May 25 07:04:08 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c435680

app-text/mupdf: drop 1.22.0-r1, 1.23.3-r1

Signed-off-by: Philipp Rösner  protonmail.com>
Signed-off-by: Arthur Zamarin  gentoo.org>

 app-text/mupdf/Manifest|   2 -
 app-text/mupdf/files/mupdf-1.15-openssl-x11.patch  |  18 ---
 .../mupdf/files/mupdf-1.19.0-cross-fixes.patch | 130 
 app-text/mupdf/files/mupdf-1.19.0-darwin.patch |  39 -
 app-text/mupdf/files/mupdf-1.21.1-no-drm.patch |  18 ---
 app-text/mupdf/mupdf-1.22.0-r1.ebuild  | 164 -
 app-text/mupdf/mupdf-1.23.3-r1.ebuild  | 164 -
 7 files changed, 535 deletions(-)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index e50372953f7c..2d8887e05469 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1,4 +1,2 @@
-DIST mupdf-1.22.0-source.tar.gz 55043552 BLAKE2B 
745a2fd1d0406acf4fa696585bcd21a4ff36e7539c1d45f886dfe5c9bbf966169e5183e89940d81e88db3014f1ebb0446ae1732b6c2fa25a135251853b71f1f7
 SHA512 
ba073b977306420343c969e6fec37cca4559031ad06cfdee2356edfdfa013ebe7654175aff931684fa48a935bf87f68537754b5e83f767517bc428ac07709a59
-DIST mupdf-1.23.3-source.tar.gz 55144800 BLAKE2B 
816e2bf46c2431df9726976efeaa0d7ebd8809cbdd9331a747cca32088aaf21b70e9522614d1dc20c856cc597003be6285f866eae8bbde3098e702acfdea8465
 SHA512 
37fbebd07680d79a38d289264a4028396ee58fad52c541efa37463e63a45ed8bab71188d6c05eb15e602964d89ee6633575dceb972f7bd8b0b5efdde5af9b737
 DIST mupdf-1.23.7-source.tar.gz 55312697 BLAKE2B 
7ceb7c1871d33b77d4a3d52ed2d1af514c09349df019a189fa7df8ad09648fae313d63de4c1ce6b0666d17f9a897d5ac788d0be2d8896d9b7e4e6ecf679bad7c
 SHA512 
581a4a5a16041bb405fbd7c1b9fba47da5745f00cbdf30e0e0468bfe67ac542884193b5957b293a4cdfc52f043b4f19612086f294b93dbd242d34735a1088777
 DIST mupdf-1.24.1-source.tar.gz 55310618 BLAKE2B 
33396b0cca6e2beb1b2bc70c606917c8d9b30b6a277645849ef7ba1e7efbf909c21196acdd5d94d964dd20d3ba746c45cab3c899dfbee1b2138de12e32375a4e
 SHA512 
9d6fbd3388173f06c5db4a27753e69afd21ed32d93f263d4448c3be60a3be747b61102edd5430459f0dbe7ae4df2019689a2f3a582acec77ff322b6d41066fba

diff --git a/app-text/mupdf/files/mupdf-1.15-openssl-x11.patch 
b/app-text/mupdf/files/mupdf-1.15-openssl-x11.patch
deleted file mode 100644
index 3f3aac4c933a..
--- a/app-text/mupdf/files/mupdf-1.15-openssl-x11.patch
+++ /dev/null
@@ -1,18 +0,0 @@
 a/Makerules
-+++ b/Makerules
-@@ -119,13 +119,13 @@ else ifeq ($(OS),Linux)
-   SYS_GLUT_LIBS := -lglut -lGL
-   endif
- 
--  HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes)
-+  HAVE_X11 := not-unless-portage-tells-me
-   ifeq ($(HAVE_X11),yes)
-   X11_CFLAGS := $(shell pkg-config --cflags x11 xext)
-   X11_LIBS := $(shell pkg-config --libs x11 xext)
-   endif
- 
--  HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo 
yes)
-+  HAVE_LIBCRYPTO := not-unless-portage-tells-me
-   ifeq ($(HAVE_LIBCRYPTO),yes)
-   LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) 
-DHAVE_LIBCRYPTO
-   LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)

diff --git a/app-text/mupdf/files/mupdf-1.19.0-cross-fixes.patch 
b/app-text/mupdf/files/mupdf-1.19.0-cross-fixes.patch
deleted file mode 100644
index 643b6d2c8b1e..
--- a/app-text/mupdf/files/mupdf-1.19.0-cross-fixes.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-Refreshed patches based on:
-https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0004-MuPDF-crossbuild-use-target-arch-pkg-config.patch/
-https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0005-MuPDF-crossbuild-use-host-cc-for-utils.patch/
 a/Makefile
-+++ b/Makefile
-@@ -147,6 +147,9 @@ PKCS7_OBJ := $(PKCS7_SRC:%.c=$(OUT)/%.o)
-
- HEXDUMP_EXE := $(OUT)/scripts/hexdump.exe
-
-+$(HEXDUMP_EXE): scripts/hexdump.c
-+  $(QUIET_CC) $(MKTGTDIR) ; $(CC_FOR_BUILD) $(CFLAGS) -o $@ $<
-+
- FONT_BIN := $(sort $(wildcard resources/fonts/urw/*.cff))
- FONT_BIN += $(sort $(wildcard resources/fonts/han/*.ttc))
- FONT_BIN += $(sort $(wildcard resources/fonts/droid/*.ttf))
 a/Makerules
-+++ b/Makerules
-@@ -6,6 +6,9 @@ OS := $(OS:MSYS%=MINGW)
- OS := $(OS:Windows_NT=MINGW)
- OS := $(OS:Darwin=MACOS)
- 
-+PKG_CONFIG ?= pkg-config
-+CC_FOR_BUILD ?= $(CC)
-+
- WARNING_CFLAGS := -Wall -Wsign-compare
- 
- # Feature configuration options
-@@ -156,51 +159,51 @@ else ifeq ($(OS),MACOS)
-   endif
- endif
- 
--  ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
--  SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
--  SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2)
-+  ifeq ($(shell $(PKG_CONFIG) --exists freetype2 && echo yes),yes)
-+  SYS_FREETYPE_CFLAGS := $(shell $(PKG_CONFIG) --cflags 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2024-05-25 Thread Arthur Zamarin
commit: dc4b87e7add0dcdc791e922d28de8b3e36ac80e0
Author: Philipp Rösner  protonmail  com>
AuthorDate: Sat May  4 18:42:51 2024 +
Commit: Arthur Zamarin  gentoo  org>
CommitDate: Sat May 25 07:04:08 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc4b87e7

app-text/mupdf: add 1.24.1

Add local use flag 'archive' for enabling support
for various archive format using libarchive.

Signed-off-by: Philipp Rösner  protonmail.com>
Signed-off-by: Arthur Zamarin  gentoo.org>

 app-text/mupdf/Manifest|   1 +
 .../mupdf/files/mupdf-1.24.1-cross-fixes.patch | 154 +++
 app-text/mupdf/files/mupdf-1.24.1-darwin.patch |  20 +++
 .../mupdf/files/mupdf-1.24.1-openssl-x11.patch |  19 +++
 app-text/mupdf/metadata.xml|   1 +
 app-text/mupdf/mupdf-1.24.1.ebuild | 166 +
 6 files changed, 361 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index a835f7c90abd..e50372953f7c 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1,3 +1,4 @@
 DIST mupdf-1.22.0-source.tar.gz 55043552 BLAKE2B 
745a2fd1d0406acf4fa696585bcd21a4ff36e7539c1d45f886dfe5c9bbf966169e5183e89940d81e88db3014f1ebb0446ae1732b6c2fa25a135251853b71f1f7
 SHA512 
ba073b977306420343c969e6fec37cca4559031ad06cfdee2356edfdfa013ebe7654175aff931684fa48a935bf87f68537754b5e83f767517bc428ac07709a59
 DIST mupdf-1.23.3-source.tar.gz 55144800 BLAKE2B 
816e2bf46c2431df9726976efeaa0d7ebd8809cbdd9331a747cca32088aaf21b70e9522614d1dc20c856cc597003be6285f866eae8bbde3098e702acfdea8465
 SHA512 
37fbebd07680d79a38d289264a4028396ee58fad52c541efa37463e63a45ed8bab71188d6c05eb15e602964d89ee6633575dceb972f7bd8b0b5efdde5af9b737
 DIST mupdf-1.23.7-source.tar.gz 55312697 BLAKE2B 
7ceb7c1871d33b77d4a3d52ed2d1af514c09349df019a189fa7df8ad09648fae313d63de4c1ce6b0666d17f9a897d5ac788d0be2d8896d9b7e4e6ecf679bad7c
 SHA512 
581a4a5a16041bb405fbd7c1b9fba47da5745f00cbdf30e0e0468bfe67ac542884193b5957b293a4cdfc52f043b4f19612086f294b93dbd242d34735a1088777
+DIST mupdf-1.24.1-source.tar.gz 55310618 BLAKE2B 
33396b0cca6e2beb1b2bc70c606917c8d9b30b6a277645849ef7ba1e7efbf909c21196acdd5d94d964dd20d3ba746c45cab3c899dfbee1b2138de12e32375a4e
 SHA512 
9d6fbd3388173f06c5db4a27753e69afd21ed32d93f263d4448c3be60a3be747b61102edd5430459f0dbe7ae4df2019689a2f3a582acec77ff322b6d41066fba

diff --git a/app-text/mupdf/files/mupdf-1.24.1-cross-fixes.patch 
b/app-text/mupdf/files/mupdf-1.24.1-cross-fixes.patch
new file mode 100644
index ..6d87798c2e66
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.24.1-cross-fixes.patch
@@ -0,0 +1,154 @@
+# Fix cross compilation issue with pkg-config
+--- a/Makerules
 b/Makerules
+@@ -9,6 +9,8 @@ ifeq ($(OS),)
+   OS := $(OS:Darwin=MACOS)
+ endif
+ 
++PKG_CONFIG ?= pkg-config
++CC_FOR_BUILD ?= $(CC)
+ WARNING_CFLAGS := -Wall -Wsign-compare
+ 
+ # Feature configuration options
+@@ -194,13 +196,13 @@ else ifeq ($(OS),MACOS)
+   ifneq ($(ARCHFLAGS),)
+ $(warning "MacOS with ARCHFLAGS set. Assuming we are building for arm64, 
and setting HAVE_LIBCRYPTO to no.")
+ HAVE_LIBCRYPTO := no
+-  else ifeq (, $(shell command -v pkg-config))
++  else ifeq (, $(shell command -v $(PKG_CONFIG)))
+ $(warning "No pkg-config found, install it for proper integration of 
libcrypto")
+   else
+-HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && 
echo yes)
++HAVE_LIBCRYPTO := $(shell $(PKG_CONFIG) --exists 'libcrypto >= 1.1.0' && 
echo yes)
+ ifeq ($(HAVE_LIBCRYPTO),yes)
+-LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) 
-DHAVE_LIBCRYPTO
+-LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
++LIBCRYPTO_CFLAGS := $(shell $(PKG_CONFIG) --cflags libcrypto) 
-DHAVE_LIBCRYPTO
++LIBCRYPTO_LIBS := $(shell $(PKG_CONFIG) --libs libcrypto)
+ endif
+   endif
+ 
+@@ -210,82 +212,82 @@ else ifeq ($(LINUX_OR_OPENBSD),yes)
+ HAVE_OBJCOPY := yes
+   endif
+ 
+-  ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
+-  SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
+-  SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2)
++  ifeq ($(shell $(PKG_CONFIG) --exists freetype2 && echo yes),yes)
++  SYS_FREETYPE_CFLAGS := $(shell $(PKG_CONFIG) --cflags freetype2)
++  SYS_FREETYPE_LIBS := $(shell $(PKG_CONFIG) --libs freetype2)
+   endif
+-  ifeq ($(shell pkg-config --exists gumbo && echo yes),yes)
+-  SYS_GUMBO_CFLAGS := $(shell pkg-config --cflags gumbo)
+-  SYS_GUMBO_LIBS := $(shell pkg-config --libs gumbo)
++  ifeq ($(shell $(PKG_CONFIG) --exists gumbo && echo yes),yes)
++  SYS_GUMBO_CFLAGS := $(shell $(PKG_CONFIG) --cflags gumbo)
++  SYS_GUMBO_LIBS := $(shell $(PKG_CONFIG) --libs gumbo)
+   endif
+-  ifeq ($(shell pkg-config --exists harfbuzz && echo yes),yes)
+-  SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz)
+-  SYS_HARFBUZZ_LIBS := $(shell 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2023-02-25 Thread Joonas Niilola
commit: 2d0b50425eb4184f10e275934e8c6939c9bffea8
Author: Philipp Rösner  protonmail  com>
AuthorDate: Mon Feb 13 21:42:05 2023 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Sun Feb 26 06:59:58 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d0b5042

app-text/mupdf: fix url processing in 1.21.1

In <=app-text/mupdf-1.21.1 built with USE=opengl trying to open
an URL in a PDF file results in "warning: cannot spawn browser
'xdg-open': No such file or directory".
Apply fix from upstream to resolve the issue until the next
release of MuPDF.

Closes: https://bugs.gentoo.org/893604
Signed-off-by: Philipp Rösner  protonmail.com>
Signed-off-by: Joonas Niilola  gentoo.org>

 .../files/mupdf-1.21.1-fix-url-processing.patch|  25 
 app-text/mupdf/mupdf-1.21.1-r1.ebuild  | 166 +
 2 files changed, 191 insertions(+)

diff --git a/app-text/mupdf/files/mupdf-1.21.1-fix-url-processing.patch 
b/app-text/mupdf/files/mupdf-1.21.1-fix-url-processing.patch
new file mode 100644
index ..bebdf3909e81
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.21.1-fix-url-processing.patch
@@ -0,0 +1,25 @@
+From 37757db262425d793b17b63821d9014d3655e50a Mon Sep 17 00:00:00 2001
+From: Sebastian Rasmussen 
+Date: Thu, 1 Dec 2022 00:04:40 +0100
+Subject: [PATCH] gl: Use posix_spawnp() in order to search PATH for binaries.
+
+---
+ platform/gl/gl-main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c
+index d5ae69c95..271ac43a6 100644
+--- a/platform/gl/gl-main.c
 b/platform/gl/gl-main.c
+@@ -122,7 +122,7 @@ static void open_browser(const char *uri)
+   argv[0] = (char*) browser;
+   argv[1] = (char*) uri;
+   argv[2] = NULL;
+-  err = posix_spawn(, browser, NULL, NULL, argv, environ);
++  err = posix_spawnp(, browser, NULL, NULL, argv, environ);
+   if (err)
+   fz_warn(ctx, "cannot spawn browser '%s': %s", browser, 
strerror(err));
+ 
+-- 
+2.39.1
+

diff --git a/app-text/mupdf/mupdf-1.21.1-r1.ebuild 
b/app-text/mupdf/mupdf-1.21.1-r1.ebuild
new file mode 100644
index ..e8c3ad893fa4
--- /dev/null
+++ b/app-text/mupdf/mupdf-1.21.1-r1.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Please check upstream git regularly for relevant security-related commits
+# to backport.
+
+inherit desktop flag-o-matic toolchain-funcs xdg
+
+DESCRIPTION="A lightweight PDF viewer and toolkit written in portable C"
+HOMEPAGE="https://mupdf.com/ https://git.ghostscript.com/?p=mupdf.git;
+SRC_URI="https://mupdf.com/downloads/archive/${P}-source.tar.gz;
+S="${WORKDIR}"/${P}-source
+
+LICENSE="AGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv 
~s390 ~x86"
+IUSE="+drm +javascript opengl ssl X"
+REQUIRED_USE="opengl? ( javascript )"
+
+# Although we use the bundled, patched version of freeglut in mupdf (because of
+# bug #653298), the best way to ensure that its dependencies are present is to
+# install system's freeglut.
+RDEPEND="
+   dev-libs/gumbo
+   media-libs/freetype:2
+   media-libs/harfbuzz:=[truetype]
+   media-libs/jbig2dec:=
+   media-libs/libpng:0=
+   >=media-libs/openjpeg-2.1:2=
+   >=media-libs/libjpeg-turbo-1.5.3-r2:0=
+   javascript? ( >=dev-lang/mujs-1.2.0:= )
+   opengl? ( >=media-libs/freeglut-3.0.0 )
+   ssl? ( >=dev-libs/openssl-1.1:0= )
+   sys-libs/zlib
+   X? (
+   x11-libs/libX11
+   x11-libs/libXext
+   )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="X? ( x11-base/xorg-proto )
+   virtual/pkgconfig"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.15-CFLAGS.patch
+   "${FILESDIR}"/${PN}-1.19.0-Makefile.patch
+   "${FILESDIR}"/${PN}-1.21.0-add-desktop-pc-files.patch
+   "${FILESDIR}"/${PN}-1.19.0-darwin.patch
+   # See bugs #662352
+   "${FILESDIR}"/${PN}-1.15-openssl-x11.patch
+   # General cross fixes from Debian (refreshed)
+   "${FILESDIR}"/${PN}-1.19.0-cross-fixes.patch
+   "${FILESDIR}"/${P}-no-drm.patch
+   "${FILESDIR}"/${P}-fix-aliasing-violation.patch
+   # See bug 893604
+   # Fixed in upcoming release
+   "${FILESDIR}"/${P}-fix-url-processing.patch
+)
+
+src_prepare() {
+   default
+
+   use hppa && append-cflags -ffunction-sections
+
+   use drm && append-cflags -DGENTOO_MUPDF_DRM
+
+   append-cflags "-DFZ_ENABLE_JS=$(usex javascript 1 0)"
+
+   sed -e "1iOS = Linux" \
+   -e "1iCC = $(tc-getCC)" \
+   -e "1iCXX = $(tc-getCXX)" \
+   -e "1iLD = $(tc-getLD)" \
+   -e "1iAR = $(tc-getAR)" \
+   -e "1iverbose = yes" \
+   -e "1ibuild = debug" \
+   -i Makerules || die "Failed adding build variables to Makerules 
in src_prepare()"
+
+   # Adjust MuPDF version in 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2023-01-03 Thread Sam James
commit: 6208b6698adad4d24c7cad780efb95349fb5e2da
Author: Philipp Rösner  protonmail  com>
AuthorDate: Fri Dec 30 22:22:33 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jan  4 05:48:12 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6208b669

app-text/mupdf-1.21.1: patch aliasing violation

Add patch fixing an aliasing violation build error
in the thirdparty freeglut module.

See: https://bugs.gentoo.org/859847
See: 
https://github.com/FreeGLUTProject/freeglut/pull/112/commits/8c6f6bf3ad2fd33d15de6ee96175cd29bf804d9f

Closes: https://bugs.gentoo.org/888998
Suggested-by: Matt Turner  gentoo.org>
Signed-off-by: Philipp Rösner  protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/28903
Signed-off-by: Sam James  gentoo.org>

 .../mupdf-1.21.1-fix-aliasing-violation.patch  | 63 ++
 app-text/mupdf/mupdf-1.21.1.ebuild |  1 +
 2 files changed, 64 insertions(+)

diff --git a/app-text/mupdf/files/mupdf-1.21.1-fix-aliasing-violation.patch 
b/app-text/mupdf/files/mupdf-1.21.1-fix-aliasing-violation.patch
new file mode 100644
index ..4f51f72deb1e
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.21.1-fix-aliasing-violation.patch
@@ -0,0 +1,63 @@
+https://bugs.gentoo.org/859847
+
+From 8c6f6bf3ad2fd33d15de6ee96175cd29bf804d9f Mon Sep 17 00:00:00 2001
+From: Matt Turner 
+Date: Tue, 26 Jul 2022 15:47:02 -0400
+Subject: [PATCH] Fix aliasing violation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Noticed when compiling with link-time optimizations.
+
+include/GL/freeglut_std.h:240:18: error: type of `glutBitmapHelvetica18` does 
not match original declaration [-Werror=lto-type-mismatch]
+  240 | extern void* glutBitmapHelvetica18;
+  |  ^
+src/x11/fg_glutfont_definitions_x11.c:103:27: note: `glutBitmapHelvetica18` 
was previously declared here
+  103 | struct freeglutBitmapFont glutBitmapHelvetica18 ;
+  |   ^
+src/x11/fg_glutfont_definitions_x11.c:103:27: note: code may be misoptimized 
unless `-fno-strict-aliasing` is used
+---
+ src/x11/fg_glutfont_definitions_x11.c | 29 ++-
+ 1 file changed, 20 insertions(+), 9 deletions(-)
+
+--- a/thirdparty/freeglut/src/x11/fg_glutfont_definitions_x11.c
 b/thirdparty/freeglut/src/x11/fg_glutfont_definitions_x11.c
+@@ -91,14 +91,25 @@ struct freeglutBitmapFont
+ };
+ 
+ 
+-struct freeglutStrokeFont glutStrokeRoman ;
+-struct freeglutStrokeFont glutStrokeMonoRoman ;
++static struct freeglutStrokeFont glutStrokeRoman_ ;
++static struct freeglutStrokeFont glutStrokeMonoRoman_ ;
+ 
+-struct freeglutBitmapFont glutBitmap9By15 ;
+-struct freeglutBitmapFont glutBitmap8By13 ;
+-struct freeglutBitmapFont glutBitmapTimesRoman10 ;
+-struct freeglutBitmapFont glutBitmapTimesRoman24 ;
+-struct freeglutBitmapFont glutBitmapHelvetica10 ;
+-struct freeglutBitmapFont glutBitmapHelvetica12 ;
+-struct freeglutBitmapFont glutBitmapHelvetica18 ;
++static struct freeglutBitmapFont glutBitmap9By15_ ;
++static struct freeglutBitmapFont glutBitmap8By13_ ;
++static struct freeglutBitmapFont glutBitmapTimesRoman10_ ;
++static struct freeglutBitmapFont glutBitmapTimesRoman24_ ;
++static struct freeglutBitmapFont glutBitmapHelvetica10_ ;
++static struct freeglutBitmapFont glutBitmapHelvetica12_ ;
++static struct freeglutBitmapFont glutBitmapHelvetica18_ ;
+ 
++
++void *glutStrokeRoman = _ ;
++void *glutStrokeMonoRoman = _ ;
++
++void *glutBitmap9By15 = _ ;
++void *glutBitmap8By13 = _ ;
++void *glutBitmapTimesRoman10 = _ ;
++void *glutBitmapTimesRoman24 = _ ;
++void *glutBitmapHelvetica10 = _ ;
++void *glutBitmapHelvetica12 = _ ;
++void *glutBitmapHelvetica18 = _ ;
+-- 
+2.35.1
+

diff --git a/app-text/mupdf/mupdf-1.21.1.ebuild 
b/app-text/mupdf/mupdf-1.21.1.ebuild
index ac2702bc5da4..718ebd6ed15a 100644
--- a/app-text/mupdf/mupdf-1.21.1.ebuild
+++ b/app-text/mupdf/mupdf-1.21.1.ebuild
@@ -53,6 +53,7 @@ PATCHES=(
# General cross fixes from Debian (refreshed)
"${FILESDIR}"/${PN}-1.19.0-cross-fixes.patch
"${FILESDIR}"/$P-no-drm.patch
+   "${FILESDIR}"/$P-fix-aliasing-violation.patch
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2022-12-29 Thread Florian Schmaus
commit: 9581bec40fed2aaf7cce58fa0f4d64ce9db887aa
Author: Philipp Rösner  protonmail  com>
AuthorDate: Fri Dec 23 15:51:49 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Thu Dec 29 20:48:42 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9581bec4

app-text/mupdf-1.21.1: allow disabling DRM checking

MuPDF by default blocks DRM content, see:
https://github.com/ArtifexSoftware/mupdf/commit/2b3bd1b7dbbf13f82b70587676809f189354c77a

Add patch and local use flag `drm` for allowing/disallowing DRM content
in PDF files.

Suggested-by: William Rabbermann  gmail.com>
Signed-off-by: Philipp Rösner  protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/28772
Signed-off-by: Florian Schmaus  gentoo.org>

 app-text/mupdf/files/mupdf-1.21.1-no-drm.patch | 18 ++
 app-text/mupdf/metadata.xml|  3 +++
 app-text/mupdf/mupdf-1.21.1.ebuild |  5 -
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/app-text/mupdf/files/mupdf-1.21.1-no-drm.patch 
b/app-text/mupdf/files/mupdf-1.21.1-no-drm.patch
new file mode 100644
index ..356ee4b852dd
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.21.1-no-drm.patch
@@ -0,0 +1,18 @@
+diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c
+index f764242..83888dc 100644
+--- a/source/html/epub-doc.c
 b/source/html/epub-doc.c
+@@ -692,10 +692,12 @@ epub_parse_header(fz_context *ctx, epub_document *doc)
+   epub_chapter **tailp;
+   int i;
+ 
++  #ifdef drm
+   if (fz_has_archive_entry(ctx, zip, "META-INF/rights.xml"))
+   fz_throw(ctx, FZ_ERROR_GENERIC, "EPUB is locked by DRM");
+   if (fz_has_archive_entry(ctx, zip, "META-INF/encryption.xml"))
+   fz_throw(ctx, FZ_ERROR_GENERIC, "EPUB is locked by DRM");
++  #endif
+ 
+   fz_var(buf);
+   fz_var(container_xml);
+

diff --git a/app-text/mupdf/metadata.xml b/app-text/mupdf/metadata.xml
index 5d2f87cc3174..c0d61774dbcf 100644
--- a/app-text/mupdf/metadata.xml
+++ b/app-text/mupdf/metadata.xml
@@ -9,4 +9,7 @@
proxy-ma...@gentoo.org
Proxy Maintainers

+   
+   Enable support for Digital rights management 
(DRM)
+   
 

diff --git a/app-text/mupdf/mupdf-1.21.1.ebuild 
b/app-text/mupdf/mupdf-1.21.1.ebuild
index 87efa898ece6..5b4674fadf25 100644
--- a/app-text/mupdf/mupdf-1.21.1.ebuild
+++ b/app-text/mupdf/mupdf-1.21.1.ebuild
@@ -16,7 +16,7 @@ S="${WORKDIR}"/${P}-source
 LICENSE="AGPL-3"
 SLOT="0/${PV}"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv 
~s390 ~x86"
-IUSE="+javascript opengl ssl X"
+IUSE="+drm +javascript opengl ssl X"
 REQUIRED_USE="opengl? ( javascript )"
 
 # Although we use the bundled, patched version of freeglut in mupdf (because of
@@ -52,6 +52,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.15-openssl-x11.patch
# General cross fixes from Debian (refreshed)
"${FILESDIR}"/${PN}-1.19.0-cross-fixes.patch
+   "${FILESDIR}"/$P-no-drm.patch
 )
 
 src_prepare() {
@@ -59,6 +60,8 @@ src_prepare() {
 
use hppa && append-cflags -ffunction-sections
 
+   use drm && append-cflags -Ddrm
+
append-cflags "-DFZ_ENABLE_JS=$(usex javascript 1 0)"
 
sed -e "1iOS = Linux" \



[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2022-12-29 Thread Florian Schmaus
commit: 4a46119e0149990be553c6ee7723cdeb16410c7f
Author: Florian Schmaus  gentoo  org>
AuthorDate: Thu Dec 29 20:48:22 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Thu Dec 29 20:48:42 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a46119e

app-text/mupdf: rename drm macro to GENTOO_MUPDF_DRM

Signed-off-by: Florian Schmaus  gentoo.org>

 app-text/mupdf/files/mupdf-1.21.1-no-drm.patch | 2 +-
 app-text/mupdf/mupdf-1.21.1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-text/mupdf/files/mupdf-1.21.1-no-drm.patch 
b/app-text/mupdf/files/mupdf-1.21.1-no-drm.patch
index 356ee4b852dd..9f2b9d692f4e 100644
--- a/app-text/mupdf/files/mupdf-1.21.1-no-drm.patch
+++ b/app-text/mupdf/files/mupdf-1.21.1-no-drm.patch
@@ -6,7 +6,7 @@ index f764242..83888dc 100644
epub_chapter **tailp;
int i;
  
-+  #ifdef drm
++  #ifdef GENTOO_MUPDF_DRM
if (fz_has_archive_entry(ctx, zip, "META-INF/rights.xml"))
fz_throw(ctx, FZ_ERROR_GENERIC, "EPUB is locked by DRM");
if (fz_has_archive_entry(ctx, zip, "META-INF/encryption.xml"))

diff --git a/app-text/mupdf/mupdf-1.21.1.ebuild 
b/app-text/mupdf/mupdf-1.21.1.ebuild
index 5b4674fadf25..ac2702bc5da4 100644
--- a/app-text/mupdf/mupdf-1.21.1.ebuild
+++ b/app-text/mupdf/mupdf-1.21.1.ebuild
@@ -60,7 +60,7 @@ src_prepare() {
 
use hppa && append-cflags -ffunction-sections
 
-   use drm && append-cflags -Ddrm
+   use drm && append-cflags -DGENTOO_MUPDF_DRM
 
append-cflags "-DFZ_ENABLE_JS=$(usex javascript 1 0)"
 



[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2022-07-19 Thread Florian Schmaus
commit: a8ca257f22f4ca2eddaec6b04906d2a805c86134
Author: Philipp Rösner  protonmail  com>
AuthorDate: Wed Jun 29 19:36:48 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Tue Jul 19 07:35:54 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8ca257f

app-text/mupdf: fix strict-aliasing violations

Fix two issues in thirdparty/lcms2/src/cmsplugin.c regarding
strinct-aliasing rule violations.

Issue: https://github.com/mm2/Little-CMS/issues/303
PR: https://github.com/mm2/Little-CMS/pull/323

Closes: https://bugs.gentoo.org/855020
Signed-off-by: Philipp Rösner  protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26152
Signed-off-by: Florian Schmaus  gentoo.org>

 app-text/mupdf/files/mupdf-1.20.0-lcms2.patch | 69 +++
 app-text/mupdf/mupdf-1.20.0.ebuild|  1 +
 2 files changed, 70 insertions(+)

diff --git a/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch 
b/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch
new file mode 100644
index ..a5cb30e3b74c
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch
@@ -0,0 +1,69 @@
+From d98de0bb0b627772625c1acf050ba0dd4b5ac9df Mon Sep 17 00:00:00 2001
+From: David Seifert 
+Date: Tue, 5 Jul 2022 11:35:28 +0200
+Subject: [PATCH] Perform type punning via union without undefined behavior
+
+* The previous code from c3d7f491e2daebda2413fb3d2935c51df1c50ac7
+  still contains undefined behavior, since it just creates
+  temporary pointer variables.
+---
+ src/cmsplugin.c | 31 +++
+ 1 file changed, 15 insertions(+), 16 deletions(-)
+
+This patch slightly differs from the upstream commit, because
+the lcms2 version used in mupdf is slightly behind the upstream
+version.
+
+See: 
https://github.com/mm2/Little-CMS/commit/d98de0bb0b627772625c1acf050ba0dd4b5ac9df.patch
+
+diff --git a/src/cmsplugin.c b/src/cmsplugin.c
+index 556fbc28..b34e3aab 100644
+--- a/thirdparty/lcms2/src/cmsplugin.c
 b/thirdparty/lcms2/src/cmsplugin.c
+@@ -167,17 +167,20 @@ cmsBool CMSEXPORT  _cmsReadUInt32Number(cmsContext 
ContextID, cmsIOHANDLER* io,
+ 
+ cmsBool CMSEXPORT  _cmsReadFloat32Number(cmsContext ContextID, cmsIOHANDLER* 
io, cmsFloat32Number* n)
+ {
+-cmsUInt32Number tmp;
++union typeConverter {
++cmsUInt32Number integer;
++cmsFloat32Number floating_point;
++} tmp;
+ 
+ _cmsAssert(io != NULL);
+ 
+-if (io->Read(ContextID, io, , sizeof(cmsUInt32Number), 1) != 1)
++if (io->Read(ContextID, io, , sizeof(cmsUInt32Number), 1) != 
1)
+ return FALSE;
+ 
+ if (n != NULL) {
+ 
+-tmp = _cmsAdjustEndianess32(tmp);
+-*n = *(cmsFloat32Number*)(void*)
++tmp.integer = _cmsAdjustEndianess32(tmp.integer);
++*n = tmp.floating_point;
+ 
+ // Safeguard which covers against absurd values
+ if (*n > 1E+20 || *n < -1E+20) return FALSE;
+@@ -304,13 +307,14 @@ cmsBool CMSEXPORT  _cmsWriteUInt32Number(cmsContext 
ContextID, cmsIOHANDLER* io,
+ 
+ cmsBool CMSEXPORT  _cmsWriteFloat32Number(cmsContext ContextID, cmsIOHANDLER* 
io, cmsFloat32Number n)
+ {
+-cmsUInt32Number tmp;
+-
+-_cmsAssert(io != NULL);
+-
+-tmp = *(cmsUInt32Number*) (void*) 
+-tmp = _cmsAdjustEndianess32(tmp);
+-if (io -> Write(ContextID, io, sizeof(cmsUInt32Number), ) != 1)
++union typeConverter {
++cmsUInt32Number integer;
++cmsFloat32Number floating_point;
++} tmp;
++
++tmp.floating_point = n;
++tmp.integer = _cmsAdjustEndianess32(tmp.integer);
++if (io -> Write(ContextID, io, sizeof(cmsUInt32Number), ) != 
1)
+ return FALSE;
+ 
+ return TRUE;

diff --git a/app-text/mupdf/mupdf-1.20.0.ebuild 
b/app-text/mupdf/mupdf-1.20.0.ebuild
index 3d7f8f3e2946..216bbfaa79e7 100644
--- a/app-text/mupdf/mupdf-1.20.0.ebuild
+++ b/app-text/mupdf/mupdf-1.20.0.ebuild
@@ -51,6 +51,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.15-openssl-x11.patch
# General cross fixes from Debian (refreshed)
"${FILESDIR}"/${PN}-1.19.0-cross-fixes.patch
+   "${FILESDIR}"/${P}-lcms2.patch
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2022-06-30 Thread Florian Schmaus
commit: 3b49a6d09605a565ec329c53ee4e5adcc8c9c2b0
Author: Florian Schmaus  gentoo  org>
AuthorDate: Thu Jun 30 13:30:19 2022 +
Commit: Florian Schmaus  gentoo  org>
CommitDate: Thu Jun 30 13:33:09 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b49a6d0

app-text/mupdf: Revert "fix strict-aliasing violations"

Sam pointed out that the patch my be wrong (although correct from a
strict aliasing view).

This reverts commit e69ffe486e072430217eb921a1886f93d8d74534.

Signed-off-by: Florian Schmaus  gentoo.org>
Suggested-by: Sam James  gentoo.org>

 app-text/mupdf/files/mupdf-1.20.0-lcms2.patch | 20 
 app-text/mupdf/mupdf-1.20.0.ebuild|  1 -
 2 files changed, 21 deletions(-)

diff --git a/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch 
b/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch
deleted file mode 100644
index a975d42d15e9..
--- a/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
 a/thirdparty/lcms2/src/cmsplugin.c
-+++ b/thirdparty/lcms2/src/cmsplugin.c
-@@ -177,7 +177,7 @@ cmsBool CMSEXPORT  _cmsReadFloat32Number(cmsContext 
ContextID, cmsIOHANDLER* io,
- if (n != NULL) {
- 
- tmp = _cmsAdjustEndianess32(tmp);
--*n = *(cmsFloat32Number*)(void*)
-+*n = (cmsFloat32Number)tmp;
- 
- // Safeguard which covers against absurd values
- if (*n > 1E+20 || *n < -1E+20) return FALSE;
-@@ -308,7 +308,7 @@ cmsBool CMSEXPORT  _cmsWriteFloat32Number(cmsContext 
ContextID, cmsIOHANDLER* io
- 
- _cmsAssert(io != NULL);
- 
--tmp = *(cmsUInt32Number*) (void*) 
-+tmp = (cmsUInt32Number)n;
- tmp = _cmsAdjustEndianess32(tmp);
- if (io -> Write(ContextID, io, sizeof(cmsUInt32Number), ) != 1)
- return FALSE;

diff --git a/app-text/mupdf/mupdf-1.20.0.ebuild 
b/app-text/mupdf/mupdf-1.20.0.ebuild
index 216bbfaa79e7..3d7f8f3e2946 100644
--- a/app-text/mupdf/mupdf-1.20.0.ebuild
+++ b/app-text/mupdf/mupdf-1.20.0.ebuild
@@ -51,7 +51,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.15-openssl-x11.patch
# General cross fixes from Debian (refreshed)
"${FILESDIR}"/${PN}-1.19.0-cross-fixes.patch
-   "${FILESDIR}"/${P}-lcms2.patch
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2021-12-04 Thread Joonas Niilola
commit: 59271a38de883bea2a0ebdc0f42dd1ca458b11f0
Author: Philipp Roesner  protonmail  com>
AuthorDate: Fri Dec  3 23:59:47 2021 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Sat Dec  4 08:18:21 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59271a38

app-text/mupdf: bump to 1.19.0

We version bumped the package to mupdf-1.19.0.
Several patches were removed because they were fixed upstream.

Closes: https://bugs.gentoo.org/827957
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Philipp Roesner  protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/23174
Signed-off-by: Joonas Niilola  gentoo.org>

 app-text/mupdf/Manifest|   1 +
 app-text/mupdf/files/mupdf-1.19.0-Makefile.patch   |  37 +
 .../mupdf/files/mupdf-1.19.0-cross-fixes.patch | 130 ++
 app-text/mupdf/files/mupdf-1.19.0-darwin.patch |  39 ++
 app-text/mupdf/mupdf-1.19.0.ebuild | 152 +
 5 files changed, 359 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index acda2b0eb4e3..c901a64470da 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1 +1,2 @@
 DIST mupdf-1.18.0-source.tar.xz 53621544 BLAKE2B 
d0057f4240bd4f6b4b6d9381ae1c3871c56b97604d5c6ea6438a8bde72d4696c10a9f0e8e2ed8f43d63a04bb1d973bade8a708327c00b0d0c6802b28af697a55
 SHA512 
7551f18b9bac6e2dc1cf073741cbc975ce3a16dc7e37c9d5a58254c67bf2c07bb36185d6585e435d4126f3ae351f67d7432d19a986c9b47b15105ca43db0edb8
+DIST mupdf-1.19.0-source.tar.xz 64077324 BLAKE2B 
4c30cfc004b4f354ae349e5460327775a4dbdd689e561888c156e9e69e22b45ea1f260dfed8d2d8c017fe65a1e83cabc8ff29dad8de47a2c541f9e335bf11285
 SHA512 
421e8e49f83cf00bfb2c86b5425939056fe866a048cf18e4c8f5764cdee9829974eea655c944d0f3f5a9407347cceaef34030f4079aa399e798da3ff849230e7

diff --git a/app-text/mupdf/files/mupdf-1.19.0-Makefile.patch 
b/app-text/mupdf/files/mupdf-1.19.0-Makefile.patch
new file mode 100644
index ..b266655aaeca
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.19.0-Makefile.patch
@@ -0,0 +1,37 @@
+diff --git a/Makefile b/Makefile
+index 7fa74b3..e842374 100644
+--- a/Makefile
 b/Makefile
+@@ -3,7 +3,7 @@
+ -include user.make
+ 
+ ifndef build
+-  build := release
++  build := debug
+ endif
+ 
+ default: all
+@@ -252,17 +252,19 @@ $(THIRD_GLUT_LIB) : $(THIRD_GLUT_OBJ)
+ $(THREAD_LIB) : $(THREAD_OBJ)
+ $(PKCS7_LIB) : $(PKCS7_OBJ)
+ else
+-MUPDF_LIB = $(OUT)/libmupdf.a
++MUPDF_LIB = libmupdf.so.$(GENTOO_PV) 
+ LIBS_TO_INSTALL_IN_LIB = $(MUPDF_LIB) $(THIRD_LIB)
+-THIRD_LIB = $(OUT)/libmupdf-third.a
++THIRD_LIB = 
++MUPDF_STATIC = $(OUT)/libmupdf.a
+ ifneq ($(USE_SYSTEM_GLUT),yes)
+ THIRD_GLUT_LIB = $(OUT)/libmupdf-glut.a
+ endif
+ THREAD_LIB = $(OUT)/libmupdf-threads.a
+ PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
+ 
+-$(MUPDF_LIB) : $(MUPDF_OBJ)
+-$(THIRD_LIB) : $(THIRD_OBJ)
++$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ)
++  $(QUIET_LINK) $(CC) $(LDFLAGS) --shared -Wl,-soname -Wl,$(MUPDF_LIB) -o 
$@ $^ $(THIRD_LIBS) $(LIBS)
++$(MUPDF_STATIC): $(MUPDF_OBJ) $(THIRD_OBJ)
+ $(THIRD_GLUT_LIB) : $(THIRD_GLUT_OBJ)
+ $(THREAD_LIB) : $(THREAD_OBJ)
+ $(PKCS7_LIB) : $(PKCS7_OBJ)

diff --git a/app-text/mupdf/files/mupdf-1.19.0-cross-fixes.patch 
b/app-text/mupdf/files/mupdf-1.19.0-cross-fixes.patch
new file mode 100644
index ..643b6d2c8b1e
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.19.0-cross-fixes.patch
@@ -0,0 +1,130 @@
+Refreshed patches based on:
+https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0004-MuPDF-crossbuild-use-target-arch-pkg-config.patch/
+https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0005-MuPDF-crossbuild-use-host-cc-for-utils.patch/
+--- a/Makefile
 b/Makefile
+@@ -147,6 +147,9 @@ PKCS7_OBJ := $(PKCS7_SRC:%.c=$(OUT)/%.o)
+
+ HEXDUMP_EXE := $(OUT)/scripts/hexdump.exe
+
++$(HEXDUMP_EXE): scripts/hexdump.c
++  $(QUIET_CC) $(MKTGTDIR) ; $(CC_FOR_BUILD) $(CFLAGS) -o $@ $<
++
+ FONT_BIN := $(sort $(wildcard resources/fonts/urw/*.cff))
+ FONT_BIN += $(sort $(wildcard resources/fonts/han/*.ttc))
+ FONT_BIN += $(sort $(wildcard resources/fonts/droid/*.ttf))
+--- a/Makerules
 b/Makerules
+@@ -6,6 +6,9 @@ OS := $(OS:MSYS%=MINGW)
+ OS := $(OS:Windows_NT=MINGW)
+ OS := $(OS:Darwin=MACOS)
+ 
++PKG_CONFIG ?= pkg-config
++CC_FOR_BUILD ?= $(CC)
++
+ WARNING_CFLAGS := -Wall -Wsign-compare
+ 
+ # Feature configuration options
+@@ -156,51 +159,51 @@ else ifeq ($(OS),MACOS)
+   endif
+ endif
+ 
+-  ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
+-  SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
+-  SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2)
++  ifeq ($(shell $(PKG_CONFIG) --exists freetype2 && echo yes),yes)
++  SYS_FREETYPE_CFLAGS := $(shell $(PKG_CONFIG) --cflags freetype2)
++  SYS_FREETYPE_LIBS := $(shell $(PKG_CONFIG) --libs freetype2)
+   endif
+-  ifeq ($(shell pkg-config --exists gumbo && echo yes),yes)
+-  

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2021-04-14 Thread Sam James
commit: 179ae2aff7affd4cc9e273ae1c7ec4ef3b443578
Author: Sam James  gentoo  org>
AuthorDate: Wed Apr 14 21:37:36 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Apr 14 22:00:16 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=179ae2af

app-text/mupdf: improve build on Darwin, ${ED} usage, libressl--

Not quite there on Darwin, need to fix -soname usage, but
a lot further than before.

We also fix incorrect ${ED} usage, export ${PKG_CONFIG}, and
drop USE=libressl.

Signed-off-by: Sam James  gentoo.org>

 app-text/mupdf/files/mupdf-1.18.0-darwin.patch | 41 +++
 app-text/mupdf/mupdf-1.18.0-r3.ebuild  | 45 +++---
 2 files changed, 67 insertions(+), 19 deletions(-)

diff --git a/app-text/mupdf/files/mupdf-1.18.0-darwin.patch 
b/app-text/mupdf/files/mupdf-1.18.0-darwin.patch
new file mode 100644
index 000..cdd8ccf0f40
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.18.0-darwin.patch
@@ -0,0 +1,41 @@
+--- a/Makerules
 b/Makerules
+@@ -117,11 +117,11 @@ ifeq ($(OS),MINGW)
+ else ifeq ($(OS),MACOS)
+   HAVE_GLUT := yes
+   SYS_GLUT_CFLAGS := -Wno-deprecated-declarations
+-  SYS_GLUT_LIBS := -framework GLUT -framework OpenGL
+-  CC = xcrun cc
+-  AR = xcrun ar
+-  LD = xcrun ld
+-  RANLIB = xcrun ranlib
++  SYS_GLUT_LIBS ?= -framework GLUT -framework OpenGL
++  CC ?= xcrun cc
++  AR ?= xcrun ar
++  LD ?= xcrun ld
++  RANLIB ?= xcrun ranlib
+ 
+ else ifeq ($(OS),Linux)
+   HAVE_OBJCOPY := yes
+--- a/Makerules
 b/Makerules
+@@ -122,9 +122,7 @@ else ifeq ($(OS),MACOS)
+   AR ?= xcrun ar
+   LD ?= xcrun ld
+   RANLIB ?= xcrun ranlib
+-
+-else ifeq ($(OS),Linux)
+-  HAVE_OBJCOPY := yes
++endif
+ 
+   ifeq ($(shell $(PKG_CONFIG) --exists freetype2 && echo yes),yes)
+   SYS_FREETYPE_CFLAGS := $(shell $(PKG_CONFIG) --cflags freetype2)
+@@ -197,8 +195,6 @@ else ifeq ($(OS),Linux)
+   PTHREAD_LIBS := -lpthread
+   endif
+ 
+-endif
+-
+ # The following section has various cross compilation configurations.
+ #
+ # Invoke these as:

diff --git a/app-text/mupdf/mupdf-1.18.0-r3.ebuild 
b/app-text/mupdf/mupdf-1.18.0-r3.ebuild
index 8c96cdb6255..60145d9c3d3 100644
--- a/app-text/mupdf/mupdf-1.18.0-r3.ebuild
+++ b/app-text/mupdf/mupdf-1.18.0-r3.ebuild
@@ -8,18 +8,17 @@ inherit desktop flag-o-matic toolchain-funcs xdg
 DESCRIPTION="A lightweight PDF viewer and toolkit written in portable C"
 HOMEPAGE="https://mupdf.com/ https://git.ghostscript.com/?p=mupdf.git;
 SRC_URI="https://mupdf.com/downloads/archive/${P}-source.tar.xz;
-S="${WORKDIR}/${P}-source"
+S="${WORKDIR}"/${P}-source
 
 LICENSE="AGPL-3"
 SLOT="0/${PV}"
 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~s390 x86"
-IUSE="+javascript libressl opengl ssl X"
+IUSE="+javascript opengl ssl X"
 REQUIRED_USE="opengl? ( javascript )"
 
 # Although we use the bundled, patched version of freeglut in mupdf (because of
 # bug #653298), the best way to ensure that its dependencies are present is to
 # install system's freeglut.
-BDEPEND="virtual/pkgconfig"
 RDEPEND="
dev-libs/gumbo
media-libs/freetype:2=
@@ -30,21 +29,20 @@ RDEPEND="
virtual/jpeg
javascript? ( >=dev-lang/mujs-1.0.7:= )
opengl? ( >=media-libs/freeglut-3.0.0 )
-   ssl? (
-   libressl? ( >=dev-libs/libressl-3.1.4:0= )
-   !libressl? ( >=dev-libs/openssl-1.1:0= )
-   )
+   ssl? ( >=dev-libs/openssl-1.1:0= )
X? (
x11-libs/libX11
x11-libs/libXext
)
 "
 DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
 
 PATCHES=(
"${FILESDIR}"/${PN}-1.15-CFLAGS.patch
"${FILESDIR}"/${PN}-1.18-Makefile.patch
"${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
+   "${FILESDIR}"/${PN}-1.18.0-darwin.patch
# See bugs #662352
"${FILESDIR}"/${PN}-1.15-openssl-x11.patch
# General cross fixes from Debian (refreshed)
@@ -69,14 +67,12 @@ src_prepare() {
-e "1iAR = $(tc-getAR)" \
-e "1iverbose = yes" \
-e "1ibuild = debug" \
-   -e "1iprefix = ${ED}/usr" \
-   -e "1ilibdir = ${ED}/usr/$(get_libdir)" \
-   -e "1idocdir = ${ED}/usr/share/doc/${PF}" \
-i Makerules || die
 }
 
 _emake() {
# When HAVE_OBJCOPY is yes, we end up with a lot of QA warnings.
+   #
# Bundled libs
# * General
# Note that USE_SYSTEM_LIBS=yes is a metaoption which will set to 
upstream's
@@ -100,19 +96,24 @@ _emake() {
#
# [0] 
https://git.ghostscript.com/?p=mupdf.git;a=blob;f=Makethird;h=c4c540fa4a075df0db85e6fdaab809099881f35a;hb=HEAD#l9
# [1] https://www.ghostscript.com/doc/lcms2mt/doc/WhyThisFork.txt
-   emake \
-   GENTOO_PV=${PF} \
-   HAVE_GLUT=$(usex opengl) \
-   HAVE_LIBCRYPTO=$(usex ssl) \
-   HAVE_X11=$(usex X) \
-   USE_SYSTEM_LIBS=yes \
- 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2020-10-13 Thread Sam James
commit: a986634efb6c5c0842444e989d86e10472412699
Author: Volkmar W. Pogatzki  pogatzki  net>
AuthorDate: Mon Oct 12 10:51:19 2020 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Oct 13 23:21:38 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a986634e

app-text/mupdf: bump to 1.18.0 (CVE-2020-26519)

Bug: https://bugs.gentoo.org/747151
Removing some keywords (RDEPEND dev-libs/gumbo)

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Volkmar W. Pogatzki  pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/17898
Signed-off-by: Sam James  gentoo.org>

 app-text/mupdf/Manifest|   1 +
 app-text/mupdf/files/mupdf-1.18-Makefile.patch |  42 ++
 .../mupdf/files/mupdf-1.18.0-cross-fixes.patch | 128 ++
 app-text/mupdf/mupdf-1.18.0.ebuild | 150 +
 4 files changed, 321 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index 7d709695072..7c07b736ec9 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1,2 +1,3 @@
 DIST mupdf-1.16.1-source.tar.xz 45800404 BLAKE2B 
bc4158a457056c55db52a518efc13c289cca537c29a6b563046297dc225f3ce0add781adb8520c4d0829d653ed0539042597e341cb21c4fb4c462ed422bf735b
 SHA512 
fa657e6b9251aff91c25e91b335ea829b797dd91a759505bfd7259f8236613f590a044bc741e9b0587da55817a1ab8c1499c067d65d683d099259d06d91a8f50
 DIST mupdf-1.17.0-source.tar.xz 48559964 BLAKE2B 
f46b09a6d288054da79bea356df4d7d98fe2759cf82bea1f0df2e961b94acebbab58826f7a731c4c68e8b086fd9367fddcabea6c7d2838f25ed84ddc1a0c2bd9
 SHA512 
39188e6ce3eaefb525b2c32767c4bf52ed881b41889edef086aa64bfe1c38e6f3cb853450c8284d175ef8854f32e9bc67415a692048ead26cf31c35645f9e0e5
+DIST mupdf-1.18.0-source.tar.xz 53621544 BLAKE2B 
d0057f4240bd4f6b4b6d9381ae1c3871c56b97604d5c6ea6438a8bde72d4696c10a9f0e8e2ed8f43d63a04bb1d973bade8a708327c00b0d0c6802b28af697a55
 SHA512 
7551f18b9bac6e2dc1cf073741cbc975ce3a16dc7e37c9d5a58254c67bf2c07bb36185d6585e435d4126f3ae351f67d7432d19a986c9b47b15105ca43db0edb8

diff --git a/app-text/mupdf/files/mupdf-1.18-Makefile.patch 
b/app-text/mupdf/files/mupdf-1.18-Makefile.patch
new file mode 100644
index 000..32ee7e57c49
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.18-Makefile.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index b0fb617..528e117 100644
+--- a/Makefile
 b/Makefile
+@@ -3,7 +3,7 @@
+ -include user.make
+ 
+ ifndef build
+-  build := release
++  build := debug
+ endif
+ 
+ ifndef OUT
+@@ -214,13 +214,15 @@ MUPDF_LIB = $(OUT)/libmupdf.$(SO)
+ 
+ $(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ) $(THREAD_OBJ) $(PKCS7_OBJ)
+ else
+-MUPDF_LIB = $(OUT)/libmupdf.a
+-THIRD_LIB = $(OUT)/libmupdf-third.a
++MUPDF_LIB = libmupdf.so.$(GENTOO_PV)
++MUPDF_STATIC = $(OUT)/libmupdf.a
++THIRD_LIB = 
+ THREAD_LIB = $(OUT)/libmupdf-threads.a
+ PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
+ 
+-$(MUPDF_LIB) : $(MUPDF_OBJ)
+-$(THIRD_LIB) : $(THIRD_OBJ)
++$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ)
++  $(QUIET_LINK) $(CC) $(LDFLAGS) --shared -Wl,-soname -Wl,$(MUPDF_LIB) -o 
$@ $^ $(THIRD_LIBS) $(LIBS)
++$(MUPDF_STATIC): $(MUPDF_OBJ) $(THIRD_OBJ)
+ $(THREAD_LIB) : $(THREAD_OBJ)
+ $(PKCS7_LIB) : $(PKCS7_OBJ)
+ endif
+@@ -374,7 +376,7 @@ install: libs apps
+ 
+   install -d $(DESTDIR)$(docdir)
+   install -d $(DESTDIR)$(docdir)/examples
+-  install -m 644 README COPYING CHANGES $(DESTDIR)$(docdir)
++  install -m 644 README CHANGES $(DESTDIR)$(docdir)
+   install -m 644 docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir)
+   install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples
+ 

diff --git a/app-text/mupdf/files/mupdf-1.18.0-cross-fixes.patch 
b/app-text/mupdf/files/mupdf-1.18.0-cross-fixes.patch
new file mode 100644
index 000..0576033a03a
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.18.0-cross-fixes.patch
@@ -0,0 +1,128 @@
+Refreshed patches based on:
+https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0004-MuPDF-crossbuild-use-target-arch-pkg-config.patch/
+https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0005-MuPDF-crossbuild-use-host-cc-for-utils.patch/
+--- a/Makefile
 b/Makefile
+@@ -147,6 +147,9 @@ PKCS7_OBJ := $(PKCS7_SRC:%.c=$(OUT)/%.o)
+ 
+ HEXDUMP_EXE := $(OUT)/scripts/hexdump.exe
+ 
++$(HEXDUMP_EXE): scripts/hexdump.c
++  $(QUIET_CC) $(MKTGTDIR) ; $(CC_FOR_BUILD) $(CFLAGS) -o $@ $<
++
+ FONT_BIN := $(sort $(wildcard resources/fonts/urw/*.cff))
+ FONT_BIN += $(sort $(wildcard resources/fonts/han/*.ttc))
+ FONT_BIN += $(sort $(wildcard resources/fonts/droid/*.ttf))
+--- a/Makerules
 b/Makerules
+@@ -6,6 +6,9 @@ OS := $(OS:MSYS%=MINGW)
+ OS := $(OS:Windows_NT=MINGW)
+ OS := $(OS:Darwin=MACOS)
+ 
++PKG_CONFIG ?= pkg-config
++CC_FOR_BUILD ?= $(CC)
++
+ ifeq ($(findstring -fembed-bitcode,$(XCFLAGS)),)
+   # clang does not support these in combination with -fembed-bitcode
+   CFLAGS += -ffunction-sections -fdata-sections
+@@ -128,51 +128,51 @@ else ifeq ($(OS),MACOS)
+ else 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2020-08-13 Thread Sam James
commit: 0985c4811a165c289d7cde5a81ea960077d7a235
Author: Sam James  gentoo  org>
AuthorDate: Fri Aug 14 04:09:42 2020 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Aug 14 04:21:22 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0985c481

app-text/mupdf: security bump to 1.17.0

* Debundle dev-lang/mujs again for the
  security bug (bundled copy is probably OK
  in terms of release mujs, but not a new bug
  (CVE-2020-24343).

* Document bundled libs with references
  to check when bumping. Useful for both
  security@ and the maintainer.

* Include extra Debian patches for improved
  cross-compilation support (mostly pkg-config).

* Fix existing patch to respect libdir in pkgconfig
  file.

* Fix missing || dies.

Bug: https://bugs.gentoo.org/737034
Bug: https://bugs.gentoo.org/737020
Closes: https://bugs.gentoo.org/725672
Closes: https://bugs.gentoo.org/734898
Package-Manager: Portage-3.0.2, Repoman-2.3.23
Signed-off-by: Sam James  gentoo.org>

 app-text/mupdf/Manifest|   1 +
 .../mupdf/files/mupdf-1.17.0-cross-fixes.patch | 103 ++
 app-text/mupdf/mupdf-1.17.0.ebuild | 153 +
 3 files changed, 257 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index 964f9c13501..7d709695072 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1 +1,2 @@
 DIST mupdf-1.16.1-source.tar.xz 45800404 BLAKE2B 
bc4158a457056c55db52a518efc13c289cca537c29a6b563046297dc225f3ce0add781adb8520c4d0829d653ed0539042597e341cb21c4fb4c462ed422bf735b
 SHA512 
fa657e6b9251aff91c25e91b335ea829b797dd91a759505bfd7259f8236613f590a044bc741e9b0587da55817a1ab8c1499c067d65d683d099259d06d91a8f50
+DIST mupdf-1.17.0-source.tar.xz 48559964 BLAKE2B 
f46b09a6d288054da79bea356df4d7d98fe2759cf82bea1f0df2e961b94acebbab58826f7a731c4c68e8b086fd9367fddcabea6c7d2838f25ed84ddc1a0c2bd9
 SHA512 
39188e6ce3eaefb525b2c32767c4bf52ed881b41889edef086aa64bfe1c38e6f3cb853450c8284d175ef8854f32e9bc67415a692048ead26cf31c35645f9e0e5

diff --git a/app-text/mupdf/files/mupdf-1.17.0-cross-fixes.patch 
b/app-text/mupdf/files/mupdf-1.17.0-cross-fixes.patch
new file mode 100644
index 000..ae14f9bb5e4
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.17.0-cross-fixes.patch
@@ -0,0 +1,103 @@
+Refreshed patches based on:
+https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0004-MuPDF-crossbuild-use-target-arch-pkg-config.patch/
+https://sources.debian.org/patches/mupdf/1.17.0+ds1-1/0005-MuPDF-crossbuild-use-host-cc-for-utils.patch/
+--- a/Makefile
 b/Makefile
+@@ -134,6 +134,9 @@ PKCS7_OBJ := $(PKCS7_SRC:%.c=$(OUT)/%.o)
+ 
+ HEXDUMP_EXE := $(OUT)/scripts/hexdump.exe
+ 
++$(HEXDUMP_EXE): scripts/hexdump.c
++  $(QUIET_CC) $(MKTGTDIR) ; $(CC_FOR_BUILD) $(CFLAGS) -o $@ $<
++
+ FONT_BIN := $(sort $(wildcard resources/fonts/urw/*.cff))
+ FONT_BIN += $(sort $(wildcard resources/fonts/han/*.ttc))
+ FONT_BIN += $(sort $(wildcard resources/fonts/droid/*.ttf))
+--- a/Makerules
 b/Makerules
+@@ -15,6 +15,9 @@ OS := $(OS:MSYS%=MINGW)
+ OS := $(OS:Windows_NT=MINGW)
+ OS := $(OS:Darwin=MACOS)
+ 
++PKG_CONFIG ?= pkg-config
++CC_FOR_BUILD ?= $(CC)
++
+ ifeq ($(findstring -fembed-bitcode,$(XCFLAGS)),)
+   # clang does not support these in combination with -fembed-bitcode
+   CFLAGS += -ffunction-sections -fdata-sections
+@@ -101,35 +104,35 @@ else ifeq ($(OS),MACOS)
+ else ifeq ($(OS),Linux)
+   HAVE_OBJCOPY := yes
+ 
+-  ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
+-  SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
+-  SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2)
++  ifeq ($(shell $(PKG_CONFIG) --exists freetype2 && echo yes),yes)
++  SYS_FREETYPE_CFLAGS := $(shell $(PKG_CONFIG) --cflags freetype2)
++  SYS_FREETYPE_LIBS := $(shell $(PKG_CONFIG) --libs freetype2)
+   endif
+-  ifeq ($(shell pkg-config --exists harfbuzz && echo yes),yes)
+-  SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz)
+-  SYS_HARFBUZZ_LIBS := $(shell pkg-config --libs harfbuzz)
++  ifeq ($(shell $(PKG_CONFIG) --exists harfbuzz && echo yes),yes)
++  SYS_HARFBUZZ_CFLAGS := $(shell $(PKG_CONFIG) --cflags harfbuzz)
++  SYS_HARFBUZZ_LIBS := $(shell $(PKG_CONFIG) --libs harfbuzz)
+   endif
+-  ifeq ($(shell pkg-config --exists lcms2 && echo yes),yes)
+-  SYS_LCMS2_CFLAGS := $(shell pkg-config --cflags lcms2)
+-  SYS_LCMS2_LIBS := $(shell pkg-config --libs lcms2)
++  ifeq ($(shell $(PKG_CONFIG) --exists lcms2 && echo yes),yes)
++  SYS_LCMS2_CFLAGS := $(shell $(PKG_CONFIG) --cflags lcms2)
++  SYS_LCMS2_LIBS := $(shell $(PKG_CONFIG) --libs lcms2)
+   endif
+-  ifeq ($(shell pkg-config --exists libjpeg && echo yes),yes)
+-  SYS_LIBJPEG_CFLAGS := $(shell pkg-config --cflags libjpeg)
+-  SYS_LIBJPEG_LIBS := $(shell pkg-config --libs libjpeg)
++  ifeq ($(shell $(PKG_CONFIG) --exists libjpeg && echo yes),yes)
++  SYS_LIBJPEG_CFLAGS := 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2020-01-21 Thread Sergei Trofimovich
commit: b65f37dd215869eae0bc6fd367a515281e301f6a
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Tue Jan 21 23:04:19 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Tue Jan 21 23:04:29 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b65f37dd

app-text/mupdf: tweak for gcc-10

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../mupdf-1.16.1-freeglut-fg_gl2-gcc-10.patch  | 80 ++
 app-text/mupdf/mupdf-1.16.1.ebuild |  3 +-
 2 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/app-text/mupdf/files/mupdf-1.16.1-freeglut-fg_gl2-gcc-10.patch 
b/app-text/mupdf/files/mupdf-1.16.1-freeglut-fg_gl2-gcc-10.patch
new file mode 100644
index 000..c9c37e2efac
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.16.1-freeglut-fg_gl2-gcc-10.patch
@@ -0,0 +1,80 @@
+From 5791564dd934d193df771a0a7c52013e9f456aa1 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich 
+Date: Tue, 21 Jan 2020 22:33:49 +
+Subject: [PATCH] fg_gl2: fix build failure against gcc-10
+
+On gcc-10 (and gcc-9 -fno-common) build fails as:
+
+```
+[ 31%] Linking C executable bin/Lorenz_static
+/usr/bin/cmake -E cmake_link_script CMakeFiles/Lorenz_static.dir/link.txt 
--verbose=1
+/usr/lib/ccache/bin/cc  -Wall -pedantic  -rdynamic 
CMakeFiles/Lorenz_static.dir/progs/demos/Lorenz/lorenz.c.o \
+   -o bin/Lorenz_static  -lGLU -lGL -lm -lX11 -lXrandr -lXxf86vm -lXi -lm 
lib/libglut.a -lGL -lm -lX11 -lXrandr -lXxf86vm -lXi
+ld: lib/libglut.a(fg_gl2.c.o):(.bss+0x0):
+  multiple definition of `fghGenBuffers'; 
lib/libglut.a(fg_window.c.o):(.bss+0x0): first defined here
+ld: lib/libglut.a(fg_gl2.c.o):(.bss+0x8):
+  multiple definition of `fghDeleteBuffers'; 
lib/libglut.a(fg_window.c.o):(.bss+0x8): first defined here
+```
+
+Note: duplicate definition comes here from 'fg_gl2.h'.
+The fix is to move declaration to a 'fg_gl2.c' file.
+
+gcc-10 will change the default from -fcommon to fno-common:
+https://gcc.gnu.org/PR85678.
+
+The error also happens if CFLAGS=-fno-common passed explicitly.
+
+Bug: https://bugs.gentoo.org/705840
+Signed-off-by: Sergei Trofimovich 
+---
+ freeglut/freeglut/src/fg_gl2.c | 12 
+ freeglut/freeglut/src/fg_gl2.h | 14 +++---
+ 2 files changed, 19 insertions(+), 7 deletions(-)
+
+--- a/thirdparty/freeglut/src/fg_gl2.c
 b/thirdparty/freeglut/src/fg_gl2.c
+@@ -27,6 +27,18 @@
+ #include "fg_internal.h"
+ #include "fg_gl2.h"
+ 
++#ifdef GL_ES_VERSION_2_0
++/* Use existing functions on GLES 2.0 */
++#else
++FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
++FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
++FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
++FGH_PFNGLBUFFERDATAPROC fghBufferData;
++FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
++FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
++FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
++#endif
++
+ void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib) {
+   if (fgStructure.CurrentWindow != NULL)
+ fgStructure.CurrentWindow->Window.attribute_v_coord = attrib;
+--- a/thirdparty/freeglut/src/fg_gl2.h
 b/thirdparty/freeglut/src/fg_gl2.h
+@@ -67,13 +67,13 @@ typedef void (APIENTRY 
*FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+ typedef void (APIENTRY *FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint);
+ typedef void (APIENTRY *FGH_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, 
GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid 
*pointer);
+ 
+-FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
+-FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
+-FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
+-FGH_PFNGLBUFFERDATAPROC fghBufferData;
+-FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
+-FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
+-FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
++extern FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
++extern FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
++extern FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
++extern FGH_PFNGLBUFFERDATAPROC fghBufferData;
++extern FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
++extern FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
++extern FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
+ 
+ #endif
+ 
+-- 
+2.25.0
+

diff --git a/app-text/mupdf/mupdf-1.16.1.ebuild 
b/app-text/mupdf/mupdf-1.16.1.ebuild
index 117de7bc199..a7b99956515 100644
--- a/app-text/mupdf/mupdf-1.16.1.ebuild
+++ b/app-text/mupdf/mupdf-1.16.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -46,6 +46,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
# See bugs #662352
"${FILESDIR}"/${PN}-1.15-openssl-x11.patch
+   "${FILESDIR}"/${PN}-1.16.1-freeglut-fg_gl2-gcc-10.patch
 )
 
 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2019-11-26 Thread Jory Pratt
commit: b451e991a41390d90b59e558ba77ce0efc0e1950
Author: Jory Pratt  gentoo  org>
AuthorDate: Tue Nov 26 14:24:28 2019 +
Commit: Jory Pratt  gentoo  org>
CommitDate: Tue Nov 26 14:24:41 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b451e991

Revert "app-text/mupdf: cleanup"

This reverts commit a89743c14b67fa2507926ad8d0aea43b5b8712b0.

Signed-off-by: Jory Pratt  gentoo.org>

 app-text/mupdf/Manifest|   2 +
 app-text/mupdf/files/mupdf-1.14-CFLAGS.patch   |  13 +++
 app-text/mupdf/files/mupdf-1.14-Makefile.patch |  46 
 .../mupdf/files/mupdf-1.14-fix-big-endian.patch| 125 
 app-text/mupdf/files/mupdf-1.14-libressl.patch |  45 +++
 .../files/mupdf-1.14-r3-openssl-curl-x11.patch |  35 ++
 app-text/mupdf/files/mupdf-1.3-zoom-2.patch|  10 ++
 app-text/mupdf/mupdf-1.14.0-r3.ebuild  | 129 
 app-text/mupdf/mupdf-1.15.0.ebuild | 130 +
 9 files changed, 535 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index 964f9c13501..9142b4ccaf0 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1 +1,3 @@
+DIST mupdf-1.14.0-source.tar.xz 41602372 BLAKE2B 
bb680038344af16c7231a18a009c0d04c5f50b3fcbaf061c9f5907f35d79eea93eeced7c2a43a06a963b93b39c74d0246c5fdad35655953d1aa5efb79737265a
 SHA512 
bd41125dac1a81b7dbbfbb5f5e06e70bb601854731e0945983688da5d8d7c0bca9771fff2e4b6d9c36dbead6146f0a866ed7427d58e13d02ed6dfd94dcfe54bf
+DIST mupdf-1.15.0-source.tar.xz 39828864 BLAKE2B 
15d0e4244062a91c7055b98fa61f2b02e0e3effbcf5374fe589f5a0d2ba2a2d4a59318ae3c0f28d866c6b07554e4b1e65ee9264c26a5f4524ef34e998d6c3320
 SHA512 
ef19362e8b6c2843e214fd2fcdcc9ba91017884383f7e1cfe08ef1f528a233820475ddfdd8aef481e6e37ae69e8b64324eb4b30699baa8055e99e47c2fab31dd
 DIST mupdf-1.16.1-source.tar.xz 45800404 BLAKE2B 
bc4158a457056c55db52a518efc13c289cca537c29a6b563046297dc225f3ce0add781adb8520c4d0829d653ed0539042597e341cb21c4fb4c462ed422bf735b
 SHA512 
fa657e6b9251aff91c25e91b335ea829b797dd91a759505bfd7259f8236613f590a044bc741e9b0587da55817a1ab8c1499c067d65d683d099259d06d91a8f50

diff --git a/app-text/mupdf/files/mupdf-1.14-CFLAGS.patch 
b/app-text/mupdf/files/mupdf-1.14-CFLAGS.patch
new file mode 100644
index 000..90972e8c53e
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.14-CFLAGS.patch
@@ -0,0 +1,13 @@
+diff --git a/Makerules b/Makerules
+index fc9bf998..82f10b28 100644
+--- a/Makerules
 b/Makerules
+@@ -21,8 +21,6 @@ SANITIZE_FLAGS += -fsanitize=address
+ SANITIZE_FLAGS += -fsanitize=leak
+ 
+ ifeq ($(build),debug)
+-  CFLAGS += -pipe -g
+-  LDFLAGS += -g $(LDREMOVEUNREACH)
+ else ifeq ($(build),release)
+   CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
+   LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s

diff --git a/app-text/mupdf/files/mupdf-1.14-Makefile.patch 
b/app-text/mupdf/files/mupdf-1.14-Makefile.patch
new file mode 100644
index 000..a8c4ef770dc
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.14-Makefile.patch
@@ -0,0 +1,46 @@
+1. debug build (not sure why...)
+2. build shared library
+3. add optional static lib target
+4. Don't install COPYING
+diff --git a/Makefile b/Makefile
+index 37fc48e6..4303e9fa 100644
+--- a/Makefile
 b/Makefile
+@@ -3,7 +3,7 @@
+ -include user.make
+ 
+ ifndef build
+-  build := release
++  build := debug
+ endif
+ 
+ ifndef OUT
+@@ -190,13 +190,15 @@ generate: source/pdf/js/util.js.h
+ 
+ # --- Library ---
+ 
+-MUPDF_LIB = $(OUT)/libmupdf.a
+-THIRD_LIB = $(OUT)/libmupdf-third.a
++MUPDF_LIB = libmupdf.so.$(GENTOO_PV)
++MUPDF_STATIC = $(OUT)/libmupdf.a
++THIRD_LIB =
+ THREAD_LIB = $(OUT)/libmupdf-threads.a
+ PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
+ 
+-$(MUPDF_LIB) : $(MUPDF_OBJ)
+-$(THIRD_LIB) : $(THIRD_OBJ)
++$(MUPDF_LIB): $(MUPDF_OBJ) $(THIRD_OBJ)
++  $(QUIET_LINK) $(CC) $(LDFLAGS) --shared -Wl,-soname -Wl,$(MUPDF_LIB) 
-Wl,--no-undefined -o $@ $^ $(THIRD_LIBS) $(LIBS)
++$(MUPDF_STATIC): $(MUPDF_OBJ) $(THIRD_OBJ)
+ $(THREAD_LIB) : $(THREAD_OBJ)
+ $(PKCS7_LIB) : $(PKCS7_OBJ)
+ 
+@@ -355,7 +357,7 @@ install: libs apps
+ 
+   install -d $(DESTDIR)$(docdir)
+   install -d $(DESTDIR)$(docdir)/examples
+-  install README COPYING CHANGES $(DESTDIR)$(docdir)
++  install README CHANGES $(DESTDIR)$(docdir)
+   install docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir)
+   install docs/examples/* $(DESTDIR)$(docdir)/examples
+ 

diff --git a/app-text/mupdf/files/mupdf-1.14-fix-big-endian.patch 
b/app-text/mupdf/files/mupdf-1.14-fix-big-endian.patch
new file mode 100644
index 000..dc472153ca6
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.14-fix-big-endian.patch
@@ -0,0 +1,125 @@
+vdupras note: exact same patch as in
+https://bugs.ghostscript.com/show_bug.cgi?id=699395 except for tweaked
+diff paths.
+From 5fb79e6ccb805b3d94c8bb8eb0990d9944ae7602 Mon Sep 17 00:00:00 2001
+Message-Id: 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2019-05-06 Thread Virgil Dupras
commit: 6e0b3e7722417649362c3909fbf1fc0b5c80eb93
Author: Virgil Dupras  gentoo  org>
AuthorDate: Tue May  7 02:37:54 2019 +
Commit: Virgil Dupras  gentoo  org>
CommitDate: Tue May  7 02:38:46 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e0b3e77

app-text/mupdf: bump to 1.15.0

We remove the "curl" USE flag because upstream stopped depending on it
with its removal of "progressive loading code".

Closes: https://bugs.gentoo.org/653298
Closes: https://bugs.gentoo.org/683490
Closes: https://bugs.gentoo.org/595190
Signed-off-by: Virgil Dupras  gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11

 app-text/mupdf/Manifest   |   1 +
 app-text/mupdf/files/mupdf-1.15-CFLAGS.patch  |  13 +++
 app-text/mupdf/files/mupdf-1.15-Makefile.patch|  42 
 app-text/mupdf/files/mupdf-1.15-openssl-x11.patch |  20 
 app-text/mupdf/mupdf-1.15.0.ebuild| 122 ++
 5 files changed, 198 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index 3c5ff516a7a..c8ad1a8bd31 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1 +1,2 @@
 DIST mupdf-1.14.0-source.tar.xz 41602372 BLAKE2B 
bb680038344af16c7231a18a009c0d04c5f50b3fcbaf061c9f5907f35d79eea93eeced7c2a43a06a963b93b39c74d0246c5fdad35655953d1aa5efb79737265a
 SHA512 
bd41125dac1a81b7dbbfbb5f5e06e70bb601854731e0945983688da5d8d7c0bca9771fff2e4b6d9c36dbead6146f0a866ed7427d58e13d02ed6dfd94dcfe54bf
+DIST mupdf-1.15.0-source.tar.xz 39828864 BLAKE2B 
15d0e4244062a91c7055b98fa61f2b02e0e3effbcf5374fe589f5a0d2ba2a2d4a59318ae3c0f28d866c6b07554e4b1e65ee9264c26a5f4524ef34e998d6c3320
 SHA512 
ef19362e8b6c2843e214fd2fcdcc9ba91017884383f7e1cfe08ef1f528a233820475ddfdd8aef481e6e37ae69e8b64324eb4b30699baa8055e99e47c2fab31dd

diff --git a/app-text/mupdf/files/mupdf-1.15-CFLAGS.patch 
b/app-text/mupdf/files/mupdf-1.15-CFLAGS.patch
new file mode 100644
index 000..a7de530909b
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.15-CFLAGS.patch
@@ -0,0 +1,13 @@
+diff --git a/Makerules b/Makerules
+index 298b5737..71c307e6 100644
+--- a/Makerules
 b/Makerules
+@@ -21,8 +21,6 @@ SANITIZE_FLAGS += -fsanitize=address
+ SANITIZE_FLAGS += -fsanitize=leak
+ 
+ ifeq ($(build),debug)
+-  CFLAGS += -pipe -g
+-  LDFLAGS += -g
+ else ifeq ($(build),release)
+   CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
+   LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s

diff --git a/app-text/mupdf/files/mupdf-1.15-Makefile.patch 
b/app-text/mupdf/files/mupdf-1.15-Makefile.patch
new file mode 100644
index 000..cff348d95e4
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.15-Makefile.patch
@@ -0,0 +1,42 @@
+diff --git a/Makefile b/Makefile
+index a9539342..e76b2c61 100644
+--- a/Makefile
 b/Makefile
+@@ -3,7 +3,7 @@
+ -include user.make
+ 
+ ifndef build
+-  build := release
++  build := debug
+ endif
+ 
+ ifndef OUT
+@@ -187,13 +187,15 @@ generate: source/pdf/js/util.js.h
+ 
+ # --- Library ---
+ 
+-MUPDF_LIB = $(OUT)/libmupdf.a
+-THIRD_LIB = $(OUT)/libmupdf-third.a
++MUPDF_LIB = libmupdf.so.$(GENTOO_PV)
++MUPDF_STATIC = $(OUT)/libmupdf.a
++THIRD_LIB = 
+ THREAD_LIB = $(OUT)/libmupdf-threads.a
+ PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
+ 
+-$(MUPDF_LIB) : $(MUPDF_OBJ)
+-$(THIRD_LIB) : $(THIRD_OBJ)
++$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ)
++  $(QUIET_LINK) $(CC) $(LDFLAGS) --shared -Wl,-soname -Wl,$(MUPDF_LIB) -o 
$@ $^ $(THIRD_LIBS) $(LIBS)
++$(MUPDF_STATIC): $(MUPDF_OBJ) $(THIRD_OBJ)
+ $(THREAD_LIB) : $(THREAD_OBJ)
+ $(PKCS7_LIB) : $(PKCS7_OBJ)
+ 
+@@ -322,7 +324,7 @@ install: libs apps
+ 
+   install -d $(DESTDIR)$(docdir)
+   install -d $(DESTDIR)$(docdir)/examples
+-  install -m 644 README COPYING CHANGES $(DESTDIR)$(docdir)
++  install -m 644 README CHANGES $(DESTDIR)$(docdir)
+   install -m 644 docs/*.html docs/*.css docs/*.png $(DESTDIR)$(docdir)
+   install -m 644 docs/examples/* $(DESTDIR)$(docdir)/examples
+ 

diff --git a/app-text/mupdf/files/mupdf-1.15-openssl-x11.patch 
b/app-text/mupdf/files/mupdf-1.15-openssl-x11.patch
new file mode 100644
index 000..22829279e14
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.15-openssl-x11.patch
@@ -0,0 +1,20 @@
+diff --git a/Makerules b/Makerules
+index 298b5737..b2079435 100644
+--- a/Makerules
 b/Makerules
+@@ -119,13 +119,13 @@ else ifeq ($(OS),Linux)
+   SYS_GLUT_LIBS := -lglut -lGL
+   endif
+ 
+-  HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes)
++  HAVE_X11 := not-unless-portage-tells-me
+   ifeq ($(HAVE_X11),yes)
+   X11_CFLAGS := $(shell pkg-config --cflags x11 xext)
+   X11_LIBS := $(shell pkg-config --libs x11 xext)
+   endif
+ 
+-  HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo 
yes)
++  HAVE_LIBCRYPTO := not-unless-portage-tells-me
+   ifeq ($(HAVE_LIBCRYPTO),yes)
+   LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) 
-DHAVE_LIBCRYPTO
+   LIBCRYPTO_LIBS := $(shell pkg-config 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2019-02-19 Thread Virgil Dupras
commit: a5247eb5569e7573eba63db4cf5e6012607e1a6d
Author: Virgil Dupras  gentoo  org>
AuthorDate: Tue Feb 19 20:22:34 2019 +
Commit: Virgil Dupras  gentoo  org>
CommitDate: Tue Feb 19 21:01:02 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5247eb5

app-text/mupdf: fix libressl and openssl

openssl's requirements is actually 1.1+. prior to this change, mupdf
compiled with openssl support unless openssl 1.1+ was installed.

libressl support requires a patch to work properly.

Also, other minor fixes. See closed bugs.

Closes: https://bugs.gentoo.org/671062
Closes: https://bugs.gentoo.org/623732
Closes: https://bugs.gentoo.org/669698
Closes: https://bugs.gentoo.org/670832
Signed-off-by: Virgil Dupras  gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 app-text/mupdf/files/mupdf-1.14-libressl.patch |  45 +++
 .../files/mupdf-1.14-r3-openssl-curl-x11.patch |  35 ++
 app-text/mupdf/mupdf-1.14.0-r3.ebuild  | 132 +
 3 files changed, 212 insertions(+)

diff --git a/app-text/mupdf/files/mupdf-1.14-libressl.patch 
b/app-text/mupdf/files/mupdf-1.14-libressl.patch
new file mode 100644
index 000..fcc0a7205c1
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.14-libressl.patch
@@ -0,0 +1,45 @@
+From 8561b744ac95ab6145a1163fa1d7c490a3329465 Mon Sep 17 00:00:00 2001
+From: William 
+Date: Mon, 12 Nov 2018 16:50:07 +0100
+Subject: [PATCH] hardcode missing ssl functions
+
+---
+ source/helpers/pkcs7/pkcs7-openssl.c | 22 ++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/source/helpers/pkcs7/pkcs7-openssl.c 
b/source/helpers/pkcs7/pkcs7-openssl.c
+index 58dbf65..2b1f9e9 100644
+--- a/source/helpers/pkcs7/pkcs7-openssl.c
 b/source/helpers/pkcs7/pkcs7-openssl.c
+@@ -511,6 +511,28 @@ static void signer_drop_designated_name(pdf_pkcs7_signer 
*signer, pdf_pkcs7_desi
+   fz_free(osigner->ctx, dn);
+ }
+ 
++int
++PKCS12_SAFEBAG_get_nid(const PKCS12_SAFEBAG *bag)
++{
++return OBJ_obj2nid(bag->type);
++}
++
++const STACK_OF(PKCS12_SAFEBAG) *
++PKCS12_SAFEBAG_get0_safes(const PKCS12_SAFEBAG *bag)
++{
++if (OBJ_obj2nid(bag->type) != NID_safeContentsBag)
++return NULL;
++return bag->value.safes;
++}
++
++const PKCS8_PRIV_KEY_INFO *
++PKCS12_SAFEBAG_get0_p8inf(const PKCS12_SAFEBAG *bag)
++{
++if (PKCS12_SAFEBAG_get_nid(bag) != NID_keyBag)
++return NULL;
++return bag->value.keybag;
++}
++
+ static void add_from_bags(X509 **pX509, EVP_PKEY **pPkey, const 
STACK_OF(PKCS12_SAFEBAG) *bags, const char *pw);
+ 
+ static void add_from_bag(X509 **pX509, EVP_PKEY **pPkey, PKCS12_SAFEBAG *bag, 
const char *pw)
+-- 
+2.19.1
+

diff --git a/app-text/mupdf/files/mupdf-1.14-r3-openssl-curl-x11.patch 
b/app-text/mupdf/files/mupdf-1.14-r3-openssl-curl-x11.patch
new file mode 100644
index 000..79efe32c0e4
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.14-r3-openssl-curl-x11.patch
@@ -0,0 +1,35 @@
+diff --git a/Makerules b/Makerules
+index fc9bf998..f1fd93cb 100644
+--- a/Makerules
 b/Makerules
+@@ -113,10 +113,11 @@ else ifeq ($(OS),Linux)
+   SYS_ZLIB_LIBS := $(shell pkg-config --libs zlib)
+   endif
+ 
+-  HAVE_CURL := $(shell pkg-config --exists libcurl && echo yes)
++  HAVE_CURL ?= not-unless-portage-tells-me
+   ifeq ($(HAVE_CURL),yes)
+   SYS_CURL_CFLAGS := $(shell pkg-config --cflags libcurl)
+-  SYS_CURL_LIBS := $(shell pkg-config --libs libcurl)
++# We have to forcibly add -lpthread to avoid linking errors.
++  SYS_CURL_LIBS := $(shell pkg-config --libs libcurl) -lpthread
+   endif
+ 
+   HAVE_GLUT := yes
+@@ -125,13 +126,14 @@ else ifeq ($(OS),Linux)
+   SYS_GLUT_LIBS := -lglut -lGL
+   endif
+ 
+-  HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes)
++  HAVE_X11 ?= not-unless-portage-tells-me
+   ifeq ($(HAVE_X11),yes)
+   X11_CFLAGS := $(shell pkg-config --cflags x11 xext)
+   X11_LIBS := $(shell pkg-config --libs x11 xext)
+   endif
+ 
+-  HAVE_LIBCRYPTO := $(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo 
yes)
++  
++  HAVE_LIBCRYPTO ?= not-unless-portage-tells-me
+   ifeq ($(HAVE_LIBCRYPTO),yes)
+   LIBCRYPTO_CFLAGS := $(shell pkg-config --cflags libcrypto) 
-DHAVE_LIBCRYPTO
+   LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)

diff --git a/app-text/mupdf/mupdf-1.14.0-r3.ebuild 
b/app-text/mupdf/mupdf-1.14.0-r3.ebuild
new file mode 100644
index 000..1b153620923
--- /dev/null
+++ b/app-text/mupdf/mupdf-1.14.0-r3.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs xdg
+
+DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C"
+HOMEPAGE="https://mupdf.com/;
+SRC_URI="https://mupdf.com/downloads/archive/${P}-source.tar.xz;
+
+LICENSE="AGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 
~amd64-linux 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2018-12-16 Thread Virgil Dupras
commit: fad8415f7c9b2f9d626ac6b2b23d1a238def1763
Author: Virgil Dupras  gentoo  org>
AuthorDate: Sun Dec 16 20:24:24 2018 +
Commit: Virgil Dupras  gentoo  org>
CommitDate: Sun Dec 16 20:24:24 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fad8415f

app-text/mupdf: remove old

Signed-off-by: Virgil Dupras  gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 app-text/mupdf/Manifest|   1 -
 .../files/mupdf-1.11-drop-libmupdfthird.patch  |  22 ---
 app-text/mupdf/files/mupdf-1.12-CFLAGS.patch   |  11 --
 app-text/mupdf/files/mupdf-1.13-libressl.patch |  23 ---
 .../mupdf/files/mupdf-1.13-openssl-curl-x11.patch  |  39 -
 app-text/mupdf/files/mupdf-1.9a-debug-build.patch  |  10 --
 app-text/mupdf/mupdf-1.13.0-r1.ebuild  | 168 -
 app-text/mupdf/mupdf-1.13.0.ebuild | 166 
 8 files changed, 440 deletions(-)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index f5f8f290123..3c5ff516a7a 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1,2 +1 @@
-DIST mupdf-1.13.0-source.tar.gz 51425034 BLAKE2B 
7f4a1c84b5840991cc7879f3617165579f4db1f7a010a8313b0eaf94ad59af60bb3d0e4a0f2acc14d2c7511dd0f8b96c89c51e360ab379ba32590b887dd3be6a
 SHA512 
d7fca7292e612959893a728d35964cf7b4e607385bdd72e81b8ca1de6ab642f999b734afbbf32d75400cd29b7e178ec360e65c91d7b1e1a53c2a04ff0adbd707
 DIST mupdf-1.14.0-source.tar.xz 41602372 BLAKE2B 
bb680038344af16c7231a18a009c0d04c5f50b3fcbaf061c9f5907f35d79eea93eeced7c2a43a06a963b93b39c74d0246c5fdad35655953d1aa5efb79737265a
 SHA512 
bd41125dac1a81b7dbbfbb5f5e06e70bb601854731e0945983688da5d8d7c0bca9771fff2e4b6d9c36dbead6146f0a866ed7427d58e13d02ed6dfd94dcfe54bf

diff --git a/app-text/mupdf/files/mupdf-1.11-drop-libmupdfthird.patch 
b/app-text/mupdf/files/mupdf-1.11-drop-libmupdfthird.patch
deleted file mode 100644
index e5600c00cd8..000
--- a/app-text/mupdf/files/mupdf-1.11-drop-libmupdfthird.patch
+++ /dev/null
@@ -1,22 +0,0 @@
 mupdf-1.11-source/Makefile
-+++ mupdf-1.11-source/Makefile
-@@ -301,7 +301,7 @@
- # --- Library ---
- 
- MUPDF_LIB = $(OUT)/libmupdf.a
--THIRD_LIB = $(OUT)/libmupdfthird.a
-+THIRD_LIB =
- THREAD_LIB = $(OUT)/libmuthreads.a
- 
- MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(SVG_OBJ) 
$(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
 mupdf-1.12.0-source/Makefile
-+++ mupdf-1.12.0-source/Makefile
-@@ -343,7 +343,7 @@
- 
- THREAD_OBJ := $(THREAD_OBJ)
- 
--$(MUPDF_LIB) : $(MUPDF_OBJ)
-+$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ)
- $(THIRD_LIB) : $(THIRD_OBJ)
- $(THREAD_LIB) : $(THREAD_OBJ)
- 

diff --git a/app-text/mupdf/files/mupdf-1.12-CFLAGS.patch 
b/app-text/mupdf/files/mupdf-1.12-CFLAGS.patch
deleted file mode 100644
index 796d127263a..000
--- a/app-text/mupdf/files/mupdf-1.12-CFLAGS.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 mupdf-1.12.0-source/Makerules
-+++ mupdf-1.12.0-source/Makerules
-@@ -22,8 +22,6 @@
- endif
- 
- ifeq "$(build)" "debug"
--CFLAGS += -pipe -g
--LDFLAGS += -g
- else ifeq "$(build)" "release"
- CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
- LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s

diff --git a/app-text/mupdf/files/mupdf-1.13-libressl.patch 
b/app-text/mupdf/files/mupdf-1.13-libressl.patch
deleted file mode 100644
index 396a0e5b5db..000
--- a/app-text/mupdf/files/mupdf-1.13-libressl.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/Makerules b/Makerules
-index f9b25d6..6c91c6c 100644
 a/Makerules
-+++ b/Makerules
-@@ -106,11 +106,17 @@ SYS_GLUT_LIBS := -lglut -lGL
- 
- WANT_OPENSSL ?= yes
- ifeq "$(WANT_OPENSSL)" "yes"
--ifeq "$(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)" "yes"
-+ifeq "$(shell pkg-config --exists 'libcrypto >= 2.0.0' && echo libre)" "libre"
-+ifeq "$(shell pkg-config --exists 'libcrypto >= 2.7.0' && echo yes)" "yes"
- HAVE_LIBCRYPTO := yes
- SYS_LIBCRYPTO_CFLAGS := -DHAVE_LIBCRYPTO $(shell pkg-config --cflags 
libcrypto)
- SYS_LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
- endif
-+else ifeq "$(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)" 
"yes"
-+HAVE_LIBCRYPTO := yes
-+SYS_LIBCRYPTO_CFLAGS := -DHAVE_LIBCRYPTO $(shell pkg-config --cflags 
libcrypto)
-+SYS_LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
-+endif
- endif
- 
- WANT_CURL ?= yes

diff --git a/app-text/mupdf/files/mupdf-1.13-openssl-curl-x11.patch 
b/app-text/mupdf/files/mupdf-1.13-openssl-curl-x11.patch
deleted file mode 100644
index 6db51a083ed..000
--- a/app-text/mupdf/files/mupdf-1.13-openssl-curl-x11.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff --git a/Makerules b/Makerules
-index ef2b6b0..f9b25d6 100644
 a/Makerules
-+++ b/Makerules
-@@ -104,12 +104,17 @@ HAVE_GLUT := yes
- SYS_GLUT_CFLAGS :=
- SYS_GLUT_LIBS := -lglut -lGL
- 
-+WANT_OPENSSL ?= yes
-+ifeq "$(WANT_OPENSSL)" "yes"
- ifeq "$(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)" "yes"
- HAVE_LIBCRYPTO := yes
- 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2018-08-27 Thread Virgil Dupras
commit: faf6b578bd55a8010c3957e03901cc1dab35a328
Author: Virgil Dupras  gentoo  org>
AuthorDate: Mon Aug 27 19:50:49 2018 +
Commit: Virgil Dupras  gentoo  org>
CommitDate: Mon Aug 27 19:53:30 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faf6b578

app-text/mupdf: fix compilation with libressl

Patch from Jouni Kosonen

Closes: https://bugs.gentoo.org/662352
Package-Manager: Portage-2.3.48, Repoman-2.3.10

 app-text/mupdf/files/mupdf-1.13-libressl.patch |  23 
 app-text/mupdf/mupdf-1.13.0-r1.ebuild  | 168 +
 2 files changed, 191 insertions(+)

diff --git a/app-text/mupdf/files/mupdf-1.13-libressl.patch 
b/app-text/mupdf/files/mupdf-1.13-libressl.patch
new file mode 100644
index 000..396a0e5b5db
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.13-libressl.patch
@@ -0,0 +1,23 @@
+diff --git a/Makerules b/Makerules
+index f9b25d6..6c91c6c 100644
+--- a/Makerules
 b/Makerules
+@@ -106,11 +106,17 @@ SYS_GLUT_LIBS := -lglut -lGL
+ 
+ WANT_OPENSSL ?= yes
+ ifeq "$(WANT_OPENSSL)" "yes"
+-ifeq "$(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)" "yes"
++ifeq "$(shell pkg-config --exists 'libcrypto >= 2.0.0' && echo libre)" "libre"
++ifeq "$(shell pkg-config --exists 'libcrypto >= 2.7.0' && echo yes)" "yes"
+ HAVE_LIBCRYPTO := yes
+ SYS_LIBCRYPTO_CFLAGS := -DHAVE_LIBCRYPTO $(shell pkg-config --cflags 
libcrypto)
+ SYS_LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
+ endif
++else ifeq "$(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)" 
"yes"
++HAVE_LIBCRYPTO := yes
++SYS_LIBCRYPTO_CFLAGS := -DHAVE_LIBCRYPTO $(shell pkg-config --cflags 
libcrypto)
++SYS_LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
++endif
+ endif
+ 
+ WANT_CURL ?= yes

diff --git a/app-text/mupdf/mupdf-1.13.0-r1.ebuild 
b/app-text/mupdf/mupdf-1.13.0-r1.ebuild
new file mode 100644
index 000..3f522e8dc86
--- /dev/null
+++ b/app-text/mupdf/mupdf-1.13.0-r1.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs xdg
+
+DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C"
+HOMEPAGE="https://mupdf.com/;
+SRC_URI="https://mupdf.com/downloads/${P}-source.tar.gz;
+
+LICENSE="AGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 
~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="X +curl javascript lcms libressl opengl +openssl static static-libs 
vanilla"
+
+LIB_DEPEND="
+   !libressl? ( dev-libs/openssl:0=[static-libs?] )
+   libressl? ( dev-libs/libressl:0=[static-libs?] )
+   javascript? ( >=dev-lang/mujs-0_p20160504 )
+   media-libs/freetype:2=[static-libs?]
+   media-libs/harfbuzz:=[static-libs?]
+   media-libs/jbig2dec:=[static-libs?]
+   media-libs/libpng:0=[static-libs?]
+   >=media-libs/openjpeg-2.1:2=[static-libs?]
+   net-misc/curl[static-libs?]
+   virtual/jpeg[static-libs?]
+   X? ( x11-libs/libX11[static-libs?]
+   x11-libs/libXext[static-libs?] )
+   opengl? ( >=media-libs/freeglut-3.0.0:= )"
+RDEPEND="${LIB_DEPEND}"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+   static-libs? ( ${LIB_DEPEND} )
+   static? ( ${LIB_DEPEND//?}
+   app-arch/bzip2[static-libs]
+   x11-libs/libXau[static-libs]
+   x11-libs/libXdmcp[static-libs]
+   x11-libs/libxcb[static-libs] )"
+
+REQUIRED_USE="opengl? ( !static !static-libs )"
+
+S=${WORKDIR}/${P}-source
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.12-CFLAGS.patch
+   "${FILESDIR}"/${PN}-1.9a-debug-build.patch
+   "${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
+   "${FILESDIR}"/${PN}-1.13-openssl-curl-x11.patch
+   "${FILESDIR}"/${PN}-1.11-drop-libmupdfthird.patch
+   # See bug #662352
+   "${FILESDIR}"/${PN}-1.13-libressl.patch
+)
+
+src_prepare() {
+   xdg_src_prepare
+   use hppa && append-cflags -ffunction-sections
+
+   # specialized lcms2, keep it if wanted inside lubmupdfthird
+   if ! use lcms ; then
+   rm -rf thirdparty/lcms2
+   fi
+
+   rm -rf 
thirdparty/{README,curl,freeglut,freetype,harfbuzz,jbig2dec,libjpeg,mujs,openjpeg,zlib}
 || die
+   for my_third in thirdparty/* ; do
+   ewarn "Bundled thirdparty lib: ${my_third}"
+   done
+
+   if has_version ">=media-libs/openjpeg-2.1:2" ; then
+   # Remove a switch, which prevents using shared libraries for 
openjpeg2.
+   # See 
http://www.linuxfromscratch.org/blfs/view/cvs/pst/mupdf.html
+   sed '/OPJ_STATIC$/d' -i source/fitz/load-jpx.c
+   fi
+
+   use javascript || \
+   sed -e '/* #define FZ_ENABLE_JS/ a\#define FZ_ENABLE_JS 0' \
+   -i include/mupdf/fitz/config.h
+
+   sed -e 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2018-04-11 Thread Thomas Deutschmann
commit: 705f826fcfadb81b301ad61589ea585bc58c8849
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Thu Apr 12 01:03:40 2018 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Thu Apr 12 01:03:40 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=705f826f

app-text/mupdf: Fix typo in mupdf-1.11-openssl-curl-x11.patch

Reported-by: Arfrever Frehtes Taifersar Arahesis  Apache.Org>
Package-Manager: Portage-2.3.28, Repoman-2.3.9
RepoMan-Options: --force

 .../files/mupdf-1.11-openssl-curl-x11-r1.patch | 37 ++
 ...pdf-1.12.0-r1.ebuild => mupdf-1.12.0-r2.ebuild} |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/app-text/mupdf/files/mupdf-1.11-openssl-curl-x11-r1.patch 
b/app-text/mupdf/files/mupdf-1.11-openssl-curl-x11-r1.patch
new file mode 100644
index 000..92845a0eef2
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.11-openssl-curl-x11-r1.patch
@@ -0,0 +1,37 @@
+--- mupdf-1.11-source/Makerules
 mupdf-1.11-source/Makerules
+@@ -116,12 +116,17 @@
+ SYS_PTHREAD_CFLAGS :=
+ SYS_PTHREAD_LIBS := -lpthread
+ 
++WANT_OPENSSL ?= yes
++ifeq "$(WANT_OPENSSL)" "yes"
+ ifeq "$(shell pkg-config --exists 'libcrypto <= 1.0.1t' && echo yes)" "yes"
+ HAVE_LIBCRYPTO := yes
+ SYS_LIBCRYPTO_CFLAGS := -DHAVE_LIBCRYPTO $(shell pkg-config --cflags 
libcrypto)
+ SYS_LIBCRYPTO_LIBS := $(shell pkg-config --libs libcrypto)
+ endif
++endif
+ 
++WANT_CURL ?= yes
++ifeq "$(WANT_CURL)" "yes"
+ ifeq "$(shell pkg-config --exists libcurl && echo yes)" "yes"
+ HAVE_CURL := yes
+ SYS_CURL_CFLAGS := $(shell pkg-config --cflags libcurl)
+@@ -133,12 +138,16 @@
+ endif
+ endif
+ SYS_CURL_DEPS += -lpthread -lrt
++endif
+ 
++WANT_X11 ?= yes
++ifeq "$(WANT_X11)" "yes"
+ ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes"
+ HAVE_X11 := yes
+ SYS_X11_CFLAGS := $(shell pkg-config --cflags x11 xext)
+ SYS_X11_LIBS := $(shell pkg-config --libs x11 xext)
+ endif
++endif
+ 
+ ifeq "$(shell pkg-config --exists harfbuzz && echo yes)" "yes"
+ SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz)

diff --git a/app-text/mupdf/mupdf-1.12.0-r1.ebuild 
b/app-text/mupdf/mupdf-1.12.0-r2.ebuild
similarity index 98%
rename from app-text/mupdf/mupdf-1.12.0-r1.ebuild
rename to app-text/mupdf/mupdf-1.12.0-r2.ebuild
index 0511828741f..24fbe8ee0af 100644
--- a/app-text/mupdf/mupdf-1.12.0-r1.ebuild
+++ b/app-text/mupdf/mupdf-1.12.0-r2.ebuild
@@ -46,7 +46,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.12-CFLAGS.patch
"${FILESDIR}"/${PN}-1.9a-debug-build.patch
"${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
-   "${FILESDIR}"/${PN}-1.11-openssl-curl-x11.patch
+   "${FILESDIR}"/${PN}-1.11-openssl-curl-x11-r1.patch
"${FILESDIR}"/${PN}-1.11-drop-libmupdfthird.patch
 )
 



[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2018-01-28 Thread Michael Weber
commit: a4a4dfe71cde92b2eaa38c774d19eeb002d00236
Author: Michael Weber  gentoo  org>
AuthorDate: Sun Jan 28 09:52:34 2018 +
Commit: Michael Weber  gentoo  org>
CommitDate: Sun Jan 28 09:52:49 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4a4dfe7

app-text/mupdf: Version bump (thanks Hadrien Lacour), add USE=lcms for 
bundled/modified lcms2.

Closes: https://bugs.gentoo.org/641862
Package-Manager: Portage-2.3.20, Repoman-2.3.6

 app-text/mupdf/Manifest|   1 +
 .../files/mupdf-1.11-drop-libmupdfthird.patch  |  11 ++
 app-text/mupdf/files/mupdf-1.12-CFLAGS.patch   |  11 ++
 app-text/mupdf/mupdf-1.12.0.ebuild | 160 +
 4 files changed, 183 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index a0a8c315fa4..1367f972efc 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1 +1,2 @@
 DIST mupdf-1.11-source.tar.gz 40156070 BLAKE2B 
2a9991a11355a449b91955bd897b5da175d3a89943277345779ea52c74f57c58226ee4087b23e3f434c0a45ae7a39df95c81c26c55d959f362bd1a0d0216716d
 SHA512 
501670f540e298a8126806ebbd9db8b29866f663b7bbf26c9ade1933e42f0c00ad410b9d93f3ddbfb3e45c38722869095de28d832fe3fb3703c55cc9a01dbf63
+DIST mupdf-1.12.0-source.tar.gz 51508917 BLAKE2B 
c34df17f0df7a200897d678514ff4012e02b1cef71189fe48740948c88cb544c6ce80f52a5dc335d70002806a7b413e5f79a1edee88865e42daf76e49416d9bf
 SHA512 
11ae620e55e9ebd5844abd7decacc0dafc90dd1f4907ba6ed12f5c725d3920187fc730a7fc33979bf3ff9451da7dbb51f34480a878083e2064f345f47d96

diff --git a/app-text/mupdf/files/mupdf-1.11-drop-libmupdfthird.patch 
b/app-text/mupdf/files/mupdf-1.11-drop-libmupdfthird.patch
index eaf11678868..e5600c00cd8 100644
--- a/app-text/mupdf/files/mupdf-1.11-drop-libmupdfthird.patch
+++ b/app-text/mupdf/files/mupdf-1.11-drop-libmupdfthird.patch
@@ -9,3 +9,14 @@
  THREAD_LIB = $(OUT)/libmuthreads.a
  
  MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(SVG_OBJ) 
$(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
+--- mupdf-1.12.0-source/Makefile
 mupdf-1.12.0-source/Makefile
+@@ -343,7 +343,7 @@
+ 
+ THREAD_OBJ := $(THREAD_OBJ)
+ 
+-$(MUPDF_LIB) : $(MUPDF_OBJ)
++$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ)
+ $(THIRD_LIB) : $(THIRD_OBJ)
+ $(THREAD_LIB) : $(THREAD_OBJ)
+ 

diff --git a/app-text/mupdf/files/mupdf-1.12-CFLAGS.patch 
b/app-text/mupdf/files/mupdf-1.12-CFLAGS.patch
new file mode 100644
index 000..796d127263a
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.12-CFLAGS.patch
@@ -0,0 +1,11 @@
+--- mupdf-1.12.0-source/Makerules
 mupdf-1.12.0-source/Makerules
+@@ -22,8 +22,6 @@
+ endif
+ 
+ ifeq "$(build)" "debug"
+-CFLAGS += -pipe -g
+-LDFLAGS += -g
+ else ifeq "$(build)" "release"
+ CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
+ LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s

diff --git a/app-text/mupdf/mupdf-1.12.0.ebuild 
b/app-text/mupdf/mupdf-1.12.0.ebuild
new file mode 100644
index 000..bb542060cd7
--- /dev/null
+++ b/app-text/mupdf/mupdf-1.12.0.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs xdg
+
+DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C"
+HOMEPAGE="http://mupdf.com/;
+SRC_URI="http://mupdf.com/downloads/${P}-source.tar.gz;
+
+LICENSE="AGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 
~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="X +curl javascript lcms libressl opengl +openssl static static-libs 
vanilla"
+
+LIB_DEPEND="
+   !libressl? ( dev-libs/openssl:0[static-libs?] )
+   libressl? ( dev-libs/libressl[static-libs?] )
+   javascript? ( >=dev-lang/mujs-0_p20160504 )
+   media-libs/freetype:2[static-libs?]
+   media-libs/harfbuzz[static-libs?]
+   media-libs/jbig2dec[static-libs?]
+   media-libs/libpng:0[static-libs?]
+   >=media-libs/openjpeg-2.1:2[static-libs?]
+   net-misc/curl[static-libs?]
+   virtual/jpeg[static-libs?]
+   X? ( x11-libs/libX11[static-libs?]
+   x11-libs/libXext[static-libs?] )
+   opengl? ( >=media-libs/glfw-3.2 )"
+RDEPEND="${LIB_DEPEND}"
+DEPEND="${RDEPEND}
+   virtual/pkgconfig
+   static-libs? ( ${LIB_DEPEND} )
+   static? ( ${LIB_DEPEND//?}
+   app-arch/bzip2[static-libs]
+   x11-libs/libXau[static-libs]
+   x11-libs/libXdmcp[static-libs]
+   x11-libs/libxcb[static-libs] )"
+
+REQUIRED_USE="opengl? ( !static !static-libs )"
+
+S=${WORKDIR}/${P}-source
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.12-CFLAGS.patch
+   "${FILESDIR}"/${PN}-1.9a-debug-build.patch
+   "${FILESDIR}"/${PN}-1.10a-add-desktop-pc-xpm-files.patch
+   "${FILESDIR}"/${PN}-1.11-openssl-curl-x11.patch
+   "${FILESDIR}"/${PN}-1.11-system-glfw.patch
+   

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2017-03-06 Thread Michael Weber
commit: 8231bc27f9ef5caa6f21b3601047797c432adb7c
Author: Michael Weber  gentoo  org>
AuthorDate: Mon Mar  6 22:12:21 2017 +
Commit: Michael Weber  gentoo  org>
CommitDate: Mon Mar  6 22:12:48 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8231bc27

app-text/mupdf: Revbump with patch for CVE-2017-5991.

Package-Manager: Portage-2.3.4, Repoman-2.3.2

 .../mupdf/files/mupdf-1.10a-null-pointer-2.patch   |  88 
 app-text/mupdf/mupdf-1.10a-r2.ebuild   | 148 +
 2 files changed, 236 insertions(+)

diff --git a/app-text/mupdf/files/mupdf-1.10a-null-pointer-2.patch 
b/app-text/mupdf/files/mupdf-1.10a-null-pointer-2.patch
new file mode 100644
index 000..a4fefb79ca6
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.10a-null-pointer-2.patch
@@ -0,0 +1,88 @@
+From: Robin Watts 
+Date: Thu, 9 Feb 2017 15:49:15 + (+)
+Subject: Bug 697500: Fix NULL ptr access.
+X-Git-Url: 
http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;h=1912de5f08e90af1d9d0a9791f58ba3afdb9d465;hp=2c4e5867ee699b1081527bc6c6ea0e99a35a5c27
+
+Bug 697500: Fix NULL ptr access.
+
+Cope better with errors during rendering - avoid letting the
+gstate stack get out of sync.
+
+This avoids us ever getting into the situation of popping
+a clip when we should be popping a mask or a group. This was
+causing an unexpected case in the painting.
+---
+
+diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c
+index a3ea895..f1eac8d 100644
+--- a/source/pdf/pdf-op-run.c
 b/source/pdf/pdf-op-run.c
+@@ -1213,6 +1213,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor 
*proc, pdf_xobject *xobj, pdf
+   pdf_run_processor *pr = (pdf_run_processor *)proc;
+   pdf_gstate *gstate = NULL;
+   int oldtop = 0;
++  int oldbot = -1;
+   fz_matrix local_transform = *transform;
+   softmask_save softmask = { NULL };
+   int gparent_save;
+@@ -1232,16 +1233,17 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor 
*proc, pdf_xobject *xobj, pdf
+   fz_var(cleanup_state);
+   fz_var(gstate);
+   fz_var(oldtop);
++  fz_var(oldbot);
+ 
+   gparent_save = pr->gparent;
+   pr->gparent = pr->gtop;
++  oldtop = pr->gtop;
+ 
+   fz_try(ctx)
+   {
+   pdf_gsave(ctx, pr);
+ 
+   gstate = pr->gstate + pr->gtop;
+-  oldtop = pr->gtop;
+ 
+   pdf_xobject_bbox(ctx, xobj, _bbox);
+   pdf_xobject_matrix(ctx, xobj, _matrix);
+@@ -1302,12 +1304,25 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor 
*proc, pdf_xobject *xobj, pdf
+ 
+   doc = pdf_get_bound_document(ctx, xobj->obj);
+ 
++  oldbot = pr->gbot;
++  pr->gbot = pr->gtop;
++
+   pdf_process_contents(ctx, (pdf_processor*)pr, doc, resources, 
xobj->obj, NULL);
+   }
+   fz_always(ctx)
+   {
++  /* Undo any gstate mismatches due to the pdf_process_contents 
call */
++  if (oldbot != -1)
++  {
++  while (pr->gtop > pr->gbot)
++  {
++  pdf_grestore(ctx, pr);
++  }
++  pr->gbot = oldbot;
++  }
++
+   if (cleanup_state >= 3)
+-  pdf_grestore(ctx, pr); /* Remove the clippath */
++  pdf_grestore(ctx, pr); /* Remove the state we pushed 
for the clippath */
+ 
+   /* wrap up transparency stacks */
+   if (transparency)
+@@ -1341,13 +1356,8 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor 
*proc, pdf_xobject *xobj, pdf
+   pr->gstate[pr->gparent].ctm = gparent_save_ctm;
+   pr->gparent = gparent_save;
+ 
+-  if (gstate)
+-  {
+-  while (oldtop < pr->gtop)
+-  pdf_grestore(ctx, pr);
+-
++  while (oldtop < pr->gtop)
+   pdf_grestore(ctx, pr);
+-  }
+ 
+   pdf_unmark_obj(ctx, xobj->obj);
+   }

diff --git a/app-text/mupdf/mupdf-1.10a-r2.ebuild 
b/app-text/mupdf/mupdf-1.10a-r2.ebuild
new file mode 100644
index 000..6fb8e5ac911
--- /dev/null
+++ b/app-text/mupdf/mupdf-1.10a-r2.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C"
+HOMEPAGE="http://mupdf.com/;
+SRC_URI="http://mupdf.com/downloads/${P}-source.tar.gz;
+
+LICENSE="AGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 
~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="X +curl javascript libressl opengl +openssl static static-libs vanilla"
+
+LIB_DEPEND="
+   !libressl? ( dev-libs/openssl:0[static-libs?] )
+   

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2017-02-09 Thread Michael Weber
commit: 54f3dbbee64dfa9de3193a16daa5ff254d4963b2
Author: Michael Weber  gentoo  org>
AuthorDate: Thu Feb  9 21:10:20 2017 +
Commit: Michael Weber  gentoo  org>
CommitDate: Thu Feb  9 21:10:20 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54f3dbbe

app-text/mupdf: Revbump to fix null pointer dereference (bug 608702) and heap 
overflow (bug 608712).

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../mupdf/files/mupdf-1.10a-heap-overflow.patch|  40 ++
 .../mupdf/files/mupdf-1.10a-null-pointer.patch |  21 +++
 app-text/mupdf/mupdf-1.10a-r1.ebuild   | 148 +
 3 files changed, 209 insertions(+)

diff --git a/app-text/mupdf/files/mupdf-1.10a-heap-overflow.patch 
b/app-text/mupdf/files/mupdf-1.10a-heap-overflow.patch
new file mode 100644
index 00..8b350ea859
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.10a-heap-overflow.patch
@@ -0,0 +1,40 @@
+X-Git-Url: 
http://git.ghostscript.com/?p=mupdf.git;a=blobdiff_plain;f=source%2Ffitz%2Fpixmap.c;h=f1291dc29d49ead44c10785fd014a0d995e45a91;hp=a8317127da7af6d39eb86fe3ca02cb4106a9b262;hb=2c4e5867ee699b1081527bc6c6ea0e99a35a5c27;hpb=90fa6203ad032fe161d85a3e580941ce3d1216f0
+
+diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
+index a831712..f1291dc 100644
+--- a/source/fitz/pixmap.c
 b/source/fitz/pixmap.c
+@@ -1104,6 +1104,7 @@ fz_subsample_pixmap_ARM(unsigned char *ptr, int w, int 
h, int f, int factor,
+   
"@STACK:r1,<9>,factor,n,fwd,back,back2,fwd2,divX,back4,fwd4,fwd3,divY,back5,divXY\n"
+   "ldrr4, [r13,#4*22] @ r4 = divXY\n"
+   "ldrr5, [r13,#4*11] @ for (nn = n; nn > 0; n--) {   \n"
++  "ldrr8, [r13,#4*17] @ r8 = back4\n"
+   "18:@   \n"
+   "movr14,#0  @ r14= v = 0\n"
+   "subr5, r5, r1, LSL #8  @ for (xx = x; xx > 0; x--) {   \n"
+@@ -1120,7 +1121,7 @@ fz_subsample_pixmap_ARM(unsigned char *ptr, int w, int 
h, int f, int factor,
+   "mulr14,r4, r14 @ r14= v *= divX\n"
+   "movr14,r14,LSR #16 @ r14= v >>= 16 \n"
+   "strb   r14,[r9], #1@ *d++ = r14\n"
+-  "subr0, r0, r8  @ s -= back2\n"
++  "subr0, r0, r8  @ s -= back4\n"
+   "subs   r5, r5, #1  @ n--   \n"
+   "bgt18b @ } \n"
+   "21:@   \n"
+@@ -1249,6 +1250,7 @@ fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile, 
int factor)
+   x += f;
+   if (x > 0)
+   {
++  int back4 = x * n - 1;
+   div = x * y;
+   for (nn = n; nn > 0; nn--)
+   {
+@@ -1263,7 +1265,7 @@ fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile, 
int factor)
+   s -= back5;
+   }
+   *d++ = v / div;
+-  s -= back2;
++  s -= back4;
+   }
+   }
+   }

diff --git a/app-text/mupdf/files/mupdf-1.10a-null-pointer.patch 
b/app-text/mupdf/files/mupdf-1.10a-null-pointer.patch
new file mode 100644
index 00..9a459b2801
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.10a-null-pointer.patch
@@ -0,0 +1,21 @@
+From: Sebastian Rasmussen 
+Date: Sat, 4 Feb 2017 05:21:20 + (+0100)
+Subject: Bug 697514: Write SVG output to stdout if no output specified.
+X-Git-Url: 
http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;h=40ac85bfb676bb4373bda4b18f9fd90268c9f1e9
+
+Bug 697514: Write SVG output to stdout if no output specified.
+---
+
+diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c
+index 95b3440..720e7ff 100644
+--- a/source/tools/mudraw.c
 b/source/tools/mudraw.c
+@@ -578,7 +578,7 @@ static void dodrawpage(fz_context *ctx, fz_page *page, 
fz_display_list *list, in
+   char buf[512];
+   fz_output *out;
+ 
+-  if (!strcmp(output, "-"))
++  if (!output || !strcmp(output, "-"))
+   out = fz_stdout(ctx);
+   else
+   {

diff --git a/app-text/mupdf/mupdf-1.10a-r1.ebuild 
b/app-text/mupdf/mupdf-1.10a-r1.ebuild
new file mode 100644
index 00..fb40d437d1
--- /dev/null
+++ b/app-text/mupdf/mupdf-1.10a-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="a lightweight PDF viewer and toolkit written in portable C"

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2017-01-22 Thread Michael Weber
commit: 290927105365ff1f2374f383d7135ecf17f41cb1
Author: Michael Weber  gentoo  org>
AuthorDate: Mon Jan 23 00:31:02 2017 +
Commit: Michael Weber  gentoo  org>
CommitDate: Mon Jan 23 00:31:18 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29092710

app-text/mupdf: Version bump (https://github.com/gentoo/gentoo/pull/3108, 
thanks charIes17).

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-text/mupdf/Manifest|   1 +
 .../files/mupdf-1.10a-Makerules-openssl-curl.patch |  32 ++
 .../mupdf-1.10a-add-desktop-pc-xpm-files.patch | 533 +
 app-text/mupdf/mupdf-1.10a.ebuild  | 146 ++
 4 files changed, 712 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index 88b3b21..43abae7 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1,3 +1,4 @@
+DIST mupdf-1.10a-source.tar.gz 42264707 SHA256 
aacc1f36b9180f562022ef1ab3439b009369d944364f3cff8a2a898834e3a836 SHA512 
8c735963364985e74ceb38242afae555a3d2ee7c69abe3fe5c485e8613a83d996a58f231cb689a156019d431fa67d565503247d010b0a404054850483aed9fec
 WHIRLPOOL 
f3dc7fbddd2ee140226f17b444f184138dbff5d626033a295a7b335119fae5eb49eae680fb392068935610cdbed21267016af8afaa080fffba4f320b82209fbb
 DIST mupdf-1.5.tar.gz 7485699 SHA256 
946393c7abf78e50fa9815f18a9e91f275a1a96a7ea14ae39b5237944070d1f5 SHA512 
bfb79838eba629295ab164cf37e49edc8846689598fbad9312409535022a2e747bd062718b899909564c6cf5826fb46a2b4b579ced8c7a3896d6098e7e5ccf40
 WHIRLPOOL 
ebcaf5f677984a78aecf9eeb72e7a79e6e2a6388db5024427d8bf55f31b3690844dd291ada3cd578a5bb9a370ea21cb2a044656c21a0ef47cdf7bfc42c842beb
 DIST mupdf-1.8.tar.gz 7706473 SHA256 
d4e06644caad381d1dc88401dae12ee614809a7b95f6dcbf6fd086d5b594dcc4 SHA512 
6adc30330c61d0bb8c9ee09488ef31701e9a7425cbac76e072eae9816c14a1190a1e2bd1e9155b6892d4198f7d8692661582cc1b82c7caab7b3ba4fddfcc7461
 WHIRLPOOL 
9fceca049cf5eaffd1520a0077c78bd8647d8e5b384eb2c1bc968a16349b46909b592cb8cbd5ee0546e798434afbece39a258e175ba02d0454b8edc35e179dd7
 DIST mupdf-1.9a.tar.gz 13282205 SHA256 
2a7d6d73cd1f6de8f70792dff9936b84c54c127feecd485675e0d0c17debc98d SHA512 
aa268484371597f2082bff61052b3f80e30b8d41018bf0477b8975e4520849090b75e6c4be6be15d6af9cea6d9315deb28f82c6afc8b6f3c5bfc3498eca91140
 WHIRLPOOL 
b552e68d0412e723e23c645516e87d695e00af0c88b14ab1ebc6b65e374f525fab6df2b5f81fe72fc8a61a8a9f616712ef0d215a07327745d33fb0238509eac9

diff --git a/app-text/mupdf/files/mupdf-1.10a-Makerules-openssl-curl.patch 
b/app-text/mupdf/files/mupdf-1.10a-Makerules-openssl-curl.patch
new file mode 100644
index ..3fdc204
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.10a-Makerules-openssl-curl.patch
@@ -0,0 +1,32 @@
+--- mupdf-1.10a/Makerules
 mupdf-1.10a/Makerules
+@@ -107,12 +107,17 @@
+ 
+ HAVE_PTHREADS ?= yes
+ 
++WANT_OPENSSL ?= yes
++ifeq "$(WANT_OPENSSL)" "yes"
+ ifeq "$(shell pkg-config --exists libcrypto && echo yes)" "yes"
+ HAVE_LIBCRYPTO = yes
+ SYS_LIBCRYPTO_CFLAGS = -DHAVE_LIBCRYPTO $(shell pkg-config --cflags libcrypto)
+ SYS_LIBCRYPTO_LIBS = $(shell pkg-config --libs libcrypto)
+ endif
++endif
+ 
++WANT_CURL ?= yes
++ifeq "$(WANT_CURL)" "yes"
+ ifeq "$(shell pkg-config --exists libcurl && echo yes)" "yes"
+ HAVE_CURL = yes
+ SYS_CURL_CFLAGS = $(shell pkg-config --cflags libcurl)
+@@ -122,8 +127,10 @@
+ SYS_CURL_CFLAGS += $(shell pkg-config --cflags openssl)
+ SYS_CURL_DEPS += $(shell pkg-config --libs openssl)
+ endif
+-endif
+ SYS_CURL_DEPS += -lpthread -lrt
++endif
++endif
++
+ 
+ ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes"
+ HAVE_X11 = yes

diff --git a/app-text/mupdf/files/mupdf-1.10a-add-desktop-pc-xpm-files.patch 
b/app-text/mupdf/files/mupdf-1.10a-add-desktop-pc-xpm-files.patch
new file mode 100644
index ..decab50
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.10a-add-desktop-pc-xpm-files.patch
@@ -0,0 +1,533 @@
+--- /dev/null
 ./platform/debian/mupdf.desktop
+@@ -0,0 +1,15 @@
++[Desktop Entry]
++Name=MuPDF
++GenericName=PDF file viewer
++Exec=mupdf %f
++TryExec=mupdf
++Icon=mupdf
++Terminal=false
++Type=Application
++MimeType=application/pdf;application/x-pdf;application/x-cbz;application/oxps;application/vnd.ms-xpsdocument;image/jpeg;image/pjpeg;image/png;image/tiff;image/x-tiff;
++Categories=Viewer;Graphics;
++Actions=View;
++
++[Desktop Action View]
++Name=View with mupdf
++Exec=mupdf %f
+--- /dev/null
 ./platform/debian/mupdf.pc
+@@ -0,0 +1,12 @@
++prefix=/usr
++exec_prefix=${prefix}
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include
++
++Name: mupdf
++Description: Library for rendering PDF documents
++Requires: freetype2 libopenjp2 libcrypto
++Version: 0.5.0
++Libs: -L${libdir} -lmupdf
++Libs.private: -lmupdf-js-none
++Cflags: -I${includedir}
+--- /dev/null
 ./platform/debian/mupdf.xpm
+@@ -0,0 +1,497 @@
++/* XPM */
++static char *mupdf[] = {
++/* width height ncolors chars_per_pixel */
++"48 48 442 2",
++/* colors */
++"   c #00",
++" . c #2E4558",
++" 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2016-06-04 Thread Michael Weber
commit: 9d40bc9df5cd1c5de3bcdd0d6e846ae832ede27b
Author: Michael Weber  gentoo  org>
AuthorDate: Sat Jun  4 19:45:29 2016 +
Commit: Michael Weber  gentoo  org>
CommitDate: Sat Jun  4 19:46:09 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d40bc9d

app-text/mupdf: Version bump (thanks johncarmack  cock.li for the hint, bug 
584266).

Package-Manager: portage-2.3.0_rc1

 app-text/mupdf/Manifest|   1 +
 app-text/mupdf/files/mupdf-1.9a-CFLAGS.patch   |  11 ++
 app-text/mupdf/files/mupdf-1.9a-debug-build.patch  |  10 ++
 app-text/mupdf/files/mupdf-1.9a-no-thirdlibs.patch | 113 
 app-text/mupdf/mupdf-1.9a.ebuild   | 144 +
 5 files changed, 279 insertions(+)

diff --git a/app-text/mupdf/Manifest b/app-text/mupdf/Manifest
index 6faa9d9..88b3b21 100644
--- a/app-text/mupdf/Manifest
+++ b/app-text/mupdf/Manifest
@@ -1,2 +1,3 @@
 DIST mupdf-1.5.tar.gz 7485699 SHA256 
946393c7abf78e50fa9815f18a9e91f275a1a96a7ea14ae39b5237944070d1f5 SHA512 
bfb79838eba629295ab164cf37e49edc8846689598fbad9312409535022a2e747bd062718b899909564c6cf5826fb46a2b4b579ced8c7a3896d6098e7e5ccf40
 WHIRLPOOL 
ebcaf5f677984a78aecf9eeb72e7a79e6e2a6388db5024427d8bf55f31b3690844dd291ada3cd578a5bb9a370ea21cb2a044656c21a0ef47cdf7bfc42c842beb
 DIST mupdf-1.8.tar.gz 7706473 SHA256 
d4e06644caad381d1dc88401dae12ee614809a7b95f6dcbf6fd086d5b594dcc4 SHA512 
6adc30330c61d0bb8c9ee09488ef31701e9a7425cbac76e072eae9816c14a1190a1e2bd1e9155b6892d4198f7d8692661582cc1b82c7caab7b3ba4fddfcc7461
 WHIRLPOOL 
9fceca049cf5eaffd1520a0077c78bd8647d8e5b384eb2c1bc968a16349b46909b592cb8cbd5ee0546e798434afbece39a258e175ba02d0454b8edc35e179dd7
+DIST mupdf-1.9a.tar.gz 13282205 SHA256 
2a7d6d73cd1f6de8f70792dff9936b84c54c127feecd485675e0d0c17debc98d SHA512 
aa268484371597f2082bff61052b3f80e30b8d41018bf0477b8975e4520849090b75e6c4be6be15d6af9cea6d9315deb28f82c6afc8b6f3c5bfc3498eca91140
 WHIRLPOOL 
b552e68d0412e723e23c645516e87d695e00af0c88b14ab1ebc6b65e374f525fab6df2b5f81fe72fc8a61a8a9f616712ef0d215a07327745d33fb0238509eac9

diff --git a/app-text/mupdf/files/mupdf-1.9a-CFLAGS.patch 
b/app-text/mupdf/files/mupdf-1.9a-CFLAGS.patch
new file mode 100644
index 000..a6caa30
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.9a-CFLAGS.patch
@@ -0,0 +1,11 @@
+--- mupdf-1.9a/Makerules
 mupdf-1.9a/Makerules
+@@ -10,7 +10,7 @@
+ CFLAGS += -Wall
+ 
+ ifeq "$(build)" "debug"
+-CFLAGS += -pipe -g -DDEBUG
++CFLAGS += -DDEBUG
+ LDFLAGS += -g
+ else ifeq "$(build)" "release"
+ CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer

diff --git a/app-text/mupdf/files/mupdf-1.9a-debug-build.patch 
b/app-text/mupdf/files/mupdf-1.9a-debug-build.patch
new file mode 100644
index 000..93c52f5
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.9a-debug-build.patch
@@ -0,0 +1,10 @@
+--- mupdf-1.9a/Makefile
 mupdf-1.9a/Makefile
+@@ -1,6 +1,6 @@
+ # GNU Makefile
+ 
+-build ?= release
++build ?= debug
+ 
+ OUT := build/$(build)
+ GEN := generated

diff --git a/app-text/mupdf/files/mupdf-1.9a-no-thirdlibs.patch 
b/app-text/mupdf/files/mupdf-1.9a-no-thirdlibs.patch
new file mode 100644
index 000..08d2eca
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.9a-no-thirdlibs.patch
@@ -0,0 +1,113 @@
+--- mupdf-1.9a/Makefile
 mupdf-1.9a/Makefile
+@@ -142,15 +141,12 @@
+ # --- Library ---
+ 
+ MUPDF_LIB = $(OUT)/libmupdf.a
+-THIRD_LIB = $(OUT)/libmupdfthird.a
+ 
+ MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) 
$(HTML_OBJ) $(GPRF_OBJ)
+-THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(JPEG_OBJ) 
$(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ)
+ 
+ $(MUPDF_LIB) : $(MUPDF_OBJ)
+-$(THIRD_LIB) : $(THIRD_OBJ)
+ 
+-INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
++INSTALL_LIBS := $(MUPDF_LIB)
+ 
+ # --- Rules ---
+ 
+@@ -251,19 +247,19 @@
+ MUTOOL := $(addprefix $(OUT)/, mutool)
+ MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o mudraw.o murun.o pdfclean.o 
pdfcreate.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o pdfpages.o pdfmerge.o)
+ $(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR)
+-$(MUTOOL) : $(MUPDF_LIB) $(THIRD_LIB)
++$(MUTOOL) : $(MUPDF_LIB)
+ $(MUTOOL) : $(MUTOOL_OBJ)
+   $(LINK_CMD)
+ 
+ MJSGEN := $(OUT)/mjsgen
+-$(MJSGEN) : $(MUPDF_LIB) $(THIRD_LIB)
++$(MJSGEN) : $(MUPDF_LIB)
+ $(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.o)
+   $(LINK_CMD)
+ 
+ MUJSTEST := $(OUT)/mujstest
+ MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
+ $(MUJSTEST_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+-$(MUJSTEST) : $(MUPDF_LIB) $(THIRD_LIB)
++$(MUJSTEST) : $(MUPDF_LIB)
+ $(MUJSTEST) : $(MUJSTEST_OBJ)
+   $(LINK_CMD)
+ 
+@@ -271,7 +267,7 @@
+ MUVIEW_X11 := $(OUT)/mupdf-x11
+ MUVIEW_X11_OBJ := $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o 
pdfapp.o)
+ $(MUVIEW_X11_OBJ) : $(FITZ_HDR) $(PDF_HDR)
+-$(MUVIEW_X11) : $(MUPDF_LIB) $(THIRD_LIB)
++$(MUVIEW_X11) : $(MUPDF_LIB)
+ $(MUVIEW_X11) : $(MUVIEW_X11_OBJ)
+   $(LINK_CMD) $(X11_LIBS)
+ 
+@@ -279,7 

[gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/, app-text/mupdf/files/

2015-08-10 Thread Michael Weber
commit: 1dc8dafb477cabeecc8d46bf6a65bec6e289e4b0
Author: Michael Weber xmw AT gentoo DOT org
AuthorDate: Mon Aug 10 22:52:28 2015 +
Commit: Michael Weber xmw AT gentoo DOT org
CommitDate: Mon Aug 10 22:52:45 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dc8dafb

app-text/mupdf: fix format-security (bug 556830).

Package-Manager: portage-2.2.20

 .../files/mupdf-1.5-format-security-error.patch| 22 ++
 app-text/mupdf/mupdf-1.5-r1.ebuild |  3 ++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/app-text/mupdf/files/mupdf-1.5-format-security-error.patch 
b/app-text/mupdf/files/mupdf-1.5-format-security-error.patch
new file mode 100644
index 000..d0dce97
--- /dev/null
+++ b/app-text/mupdf/files/mupdf-1.5-format-security-error.patch
@@ -0,0 +1,22 @@
+From: =?utf-8?q?=22Kan-Ru_Chen_=28=E9=99=B3=E4=BE=83=E5=A6=82=29=22?=
+ kos...@debian.org
+Date: Sat, 20 Sep 2014 13:12:16 +0800
+Subject: Fix -Werror=format-security error
+
+---
+ source/pdf/pdf-op-run.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c
+index 2bea94b..da881b2 100644
+--- a/source/pdf/pdf-op-run.c
 b/source/pdf/pdf-op-run.c
+@@ -1729,7 +1729,7 @@ run_xobject(pdf_csi *csi, void *state, pdf_obj 
*resources, pdf_xobject *xobj, co
+ 
+   /* Rethrow postponed errors */
+   if (errmess[0])
+-  fz_throw(ctx, FZ_ERROR_GENERIC, errmess);
++  fz_throw(ctx, FZ_ERROR_GENERIC, %s, errmess);
+ }
+ 
+ static void pdf_run_BDC(pdf_csi *csi, void *state)

diff --git a/app-text/mupdf/mupdf-1.5-r1.ebuild 
b/app-text/mupdf/mupdf-1.5-r1.ebuild
index 791a17d..b066b49 100644
--- a/app-text/mupdf/mupdf-1.5-r1.ebuild
+++ b/app-text/mupdf/mupdf-1.5-r1.ebuild
@@ -41,7 +41,8 @@ src_prepare() {
${FILESDIR}/${PN}-1.3-CFLAGS.patch \
${FILESDIR}/${PN}-1.5-old-debian-files.patch \
${FILESDIR}/${PN}-1.3-pkg-config.patch \
-   ${FILESDIR}/${PN}-1.5-Makerules-openssl-curl.patch
+   ${FILESDIR}/${PN}-1.5-Makerules-openssl-curl.patch \
+   ${FILESDIR}/${PN}-1.5-format-security-error.patch
 
if has_version =media-libs/openjpeg-2.1:2 ; then
epatch \