public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/
@ 2016-10-30  8:17 Pacho Ramos
  0 siblings, 0 replies; 5+ messages in thread
From: Pacho Ramos @ 2016-10-30  8:17 UTC (permalink / raw
  To: gentoo-commits

commit:     7b987bb0143edbbf0f7e34512c1e90d78db8e692
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 30 08:12:13 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Oct 30 08:16:52 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b987bb0

app-text/mupdf: Fix openjpeg-2.1 patch (#595406 by Oleg)

Package-Manager: portage-2.3.2

 app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch | 50 ++++++++++++++++++++---
 1 file changed, 45 insertions(+), 5 deletions(-)

diff --git a/app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch b/app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch
index 7048140..f3b09eb 100644
--- a/app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch
+++ b/app-text/mupdf/files/mupdf-1.5-openjpeg-2.1.patch
@@ -1,11 +1,51 @@
---- mupdf-1.5/source/fitz/load-jpx.c
-+++ mupdf-1.5/source/fitz/load-jpx.c
-@@ -116,7 +116,7 @@
+From: =?utf-8?q?=22Kan-Ru_Chen_=28=E9=99=B3=E4=BE=83=E5=A6=82=29=22?=
+ <koster@debian.org>
+Date: Sat, 20 Sep 2014 12:33:08 +0800
+Subject: Fix build with libopenjp2
+
+---
+ Makerules              |  4 ++--
+ source/fitz/load-jpx.c | 10 +---------
+ 2 files changed, 3 insertions(+), 11 deletions(-)
+
+diff --git a/Makerules b/Makerules
+index 766ad53..a93b9cf 100644
+--- a/Makerules
++++ b/Makerules
+@@ -105,8 +105,8 @@ SYS_HARFBUZZ_CFLAGS = $(shell pkg-config --cflags harfbuzz)
+ SYS_HARFBUZZ_LIBS = $(shell pkg-config --libs harfbuzz)
+ SYS_FREETYPE_CFLAGS = $(shell pkg-config --cflags freetype2)
+ SYS_FREETYPE_LIBS = $(shell pkg-config --libs freetype2)
+-SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjp2)
+-SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenjp2)
++SYS_OPENJPEG_CFLAGS = -I/usr/include/openjpeg-2.1
++SYS_OPENJPEG_LIBS = -lopenjp2
+ SYS_JBIG2DEC_LIBS = -ljbig2dec
+ SYS_JPEG_LIBS = -ljpeg
+ SYS_ZLIB_LIBS = -lz
+diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
+index 6b92e5c..72dea50 100644
+--- a/source/fitz/load-jpx.c
++++ b/source/fitz/load-jpx.c
+@@ -1,13 +1,5 @@
+ #include "mupdf/fitz.h"
+ 
+-/* Without the definition of OPJ_STATIC, compilation fails on windows
+- * due to the use of __stdcall. We believe it is required on some
+- * linux toolchains too. */
+-#define OPJ_STATIC
+-#ifndef _MSC_VER
+-#define OPJ_HAVE_STDINT_H
+-#endif
+-
+ #include <openjpeg.h>
+ 
+ static void fz_opj_error_callback(const char *msg, void *client_data)
+@@ -117,7 +109,7 @@ fz_load_jpx(fz_context *ctx, unsigned char *data, int size, fz_colorspace *defcs
  	opj_stream_set_read_function(stream, fz_opj_stream_read);
  	opj_stream_set_skip_function(stream, fz_opj_stream_skip);
  	opj_stream_set_seek_function(stream, fz_opj_stream_seek);
 -	opj_stream_set_user_data(stream, &sb);
 +	opj_stream_set_user_data(stream, &sb, NULL);
  	/* Set the length to avoid an assert */
- 	opj_stream_set_user_data_length(stream, size);
- 
+ 	opj_stream_set_user_data_length(stream, size);
\ No newline at end of file


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/
@ 2020-11-03  4:11 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2020-11-03  4:11 UTC (permalink / raw
  To: gentoo-commits

commit:     bc16f11da6f3fbbb98a8460b05df6a3021c13ca4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  3 04:11:13 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  3 04:11:13 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc16f11d

app-text/mupdf: drop old patch

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-text/mupdf/files/mupdf-1.14-libressl.patch | 45 --------------------------
 1 file changed, 45 deletions(-)

diff --git a/app-text/mupdf/files/mupdf-1.14-libressl.patch b/app-text/mupdf/files/mupdf-1.14-libressl.patch
deleted file mode 100644
index fcc0a7205c1..00000000000
--- a/app-text/mupdf/files/mupdf-1.14-libressl.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 8561b744ac95ab6145a1163fa1d7c490a3329465 Mon Sep 17 00:00:00 2001
-From: William <wonko@undefined.re>
-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
-


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/
@ 2021-01-19 15:16 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2021-01-19 15:16 UTC (permalink / raw
  To: gentoo-commits

commit:     f0d703c8eb743b367378af0edba5ff72325d78d6
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Tue Jan 19 08:19:09 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 19 15:15:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0d703c8

app-text/mupdf: remove unused patches

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/19126
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-text/mupdf/files/mupdf-1.15-Makefile.patch     |  42 ---------
 .../mupdf-1.16.1-freeglut-fg_gl2-gcc-10.patch      |  80 ----------------
 .../mupdf/files/mupdf-1.17.0-cross-fixes.patch     | 103 ---------------------
 3 files changed, 225 deletions(-)

diff --git a/app-text/mupdf/files/mupdf-1.15-Makefile.patch b/app-text/mupdf/files/mupdf-1.15-Makefile.patch
deleted file mode 100644
index cff348d95e4..00000000000
--- a/app-text/mupdf/files/mupdf-1.15-Makefile.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-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.16.1-freeglut-fg_gl2-gcc-10.patch b/app-text/mupdf/files/mupdf-1.16.1-freeglut-fg_gl2-gcc-10.patch
deleted file mode 100644
index c9c37e2efac..00000000000
--- a/app-text/mupdf/files/mupdf-1.16.1-freeglut-fg_gl2-gcc-10.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 5791564dd934d193df771a0a7c52013e9f456aa1 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Tue, 21 Jan 2020 22:33:49 +0000
-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 <slyfox@gentoo.org>
----
- 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/files/mupdf-1.17.0-cross-fixes.patch b/app-text/mupdf/files/mupdf-1.17.0-cross-fixes.patch
deleted file mode 100644
index ae14f9bb5e4..00000000000
--- a/app-text/mupdf/files/mupdf-1.17.0-cross-fixes.patch
+++ /dev/null
@@ -1,103 +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
-@@ -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 := $(shell $(PKG_CONFIG) --cflags libjpeg)
-+	SYS_LIBJPEG_LIBS := $(shell $(PKG_CONFIG) --libs libjpeg)
-   endif
--  ifeq ($(shell pkg-config --exists libopenjp2 && echo yes),yes)
--	SYS_OPENJPEG_CFLAGS := $(shell pkg-config --cflags libopenjp2)
--	SYS_OPENJPEG_LIBS := $(shell pkg-config --libs libopenjp2)
-+  ifeq ($(shell $(PKG_CONFIG) --exists libopenjp2 && echo yes),yes)
-+	SYS_OPENJPEG_CFLAGS := $(shell $(PKG_CONFIG) --cflags libopenjp2)
-+	SYS_OPENJPEG_LIBS := $(shell $(PKG_CONFIG) --libs libopenjp2)
-   endif
--  ifeq ($(shell pkg-config --exists zlib && echo yes),yes)
--	SYS_ZLIB_CFLAGS := $(shell pkg-config --cflags zlib)
--	SYS_ZLIB_LIBS := $(shell pkg-config --libs zlib)
-+  ifeq ($(shell $(PKG_CONFIG) --exists zlib && echo yes),yes)
-+	SYS_ZLIB_CFLAGS := $(shell $(PKG_CONFIG) --cflags zlib)
-+	SYS_ZLIB_LIBS := $(shell $(PKG_CONFIG) --libs zlib)
-   endif
- 
--  HAVE_SYS_CURL := $(shell pkg-config --exists libcurl && echo yes)
-+  HAVE_SYS_CURL := $(shell $(PKG_CONFIG) --exists libcurl && echo yes)
-   ifeq ($(HAVE_SYS_CURL),yes)
--	SYS_CURL_CFLAGS := $(shell pkg-config --cflags libcurl)
--	SYS_CURL_LIBS := $(shell pkg-config --libs libcurl)
-+	SYS_CURL_CFLAGS := $(shell $(PKG_CONFIG) --cflags libcurl)
-+	SYS_CURL_LIBS := $(shell $(PKG_CONFIG) --libs libcurl)
-   endif
- 
-   HAVE_GLUT := yes
-@@ -140,14 +143,14 @@ else ifeq ($(OS),Linux)
- 
-   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)
-+	X11_CFLAGS := $(shell $(PKG_CONFIG) --cflags x11 xext)
-+	X11_LIBS := $(shell $(PKG_CONFIG) --libs x11 xext)
-   endif
- 
-   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)
-+	LIBCRYPTO_CFLAGS := $(shell $(PKG_CONFIG) --cflags libcrypto) -DHAVE_LIBCRYPTO
-+	LIBCRYPTO_LIBS := $(shell $(PKG_CONFIG) --libs libcrypto)
-   endif
- 
-   HAVE_PTHREAD := yes


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/
@ 2022-10-07 21:07 Florian Schmaus
  0 siblings, 0 replies; 5+ messages in thread
From: Florian Schmaus @ 2022-10-07 21:07 UTC (permalink / raw
  To: gentoo-commits

commit:     0baadd00adc34d9744d9e25ecb5b9be05254cb9c
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Fri Oct  7 20:19:22 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Oct  7 21:02:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0baadd00

app-text/mupdf: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/27687
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-text/mupdf/files/mupdf-1.18-Makefile.patch     |  42 -------
 .../mupdf/files/mupdf-1.18.0-CVE-2021-3407.patch   |  51 --------
 .../mupdf/files/mupdf-1.18.0-cross-fixes.patch     | 128 ---------------------
 app-text/mupdf/files/mupdf-1.18.0-darwin.patch     |  41 -------
 .../files/mupdf-1.18.0-fix-oob-in-pdf-layer.c      | 102 ----------------
 .../mupdf/files/mupdf-1.18.0-fix-oob-in-pixmap.c   |  41 -------
 6 files changed, 405 deletions(-)

diff --git a/app-text/mupdf/files/mupdf-1.18-Makefile.patch b/app-text/mupdf/files/mupdf-1.18-Makefile.patch
deleted file mode 100644
index 32ee7e57c493..000000000000
--- a/app-text/mupdf/files/mupdf-1.18-Makefile.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-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-CVE-2021-3407.patch b/app-text/mupdf/files/mupdf-1.18.0-CVE-2021-3407.patch
deleted file mode 100644
index 566ee562389c..000000000000
--- a/app-text/mupdf/files/mupdf-1.18.0-CVE-2021-3407.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-https://bugs.gentoo.org/772311
-
-From cee7cefc610d42fd383b3c80c12cbc675443176a Mon Sep 17 00:00:00 2001
-From: Robin Watts <Robin.Watts@artifex.com>
-Date: Fri, 22 Jan 2021 17:05:15 +0000
-Subject: [PATCH 1/1] Bug 703366: Fix double free of object during
- linearization.
-
-This appears to happen because we parse an illegal object from
-a broken file and assign it to object 0, which is defined to
-be free.
-
-Here, we fix the parsing code so this can't happen.
----
- source/pdf/pdf-parse.c | 6 ++++++
- source/pdf/pdf-xref.c  | 2 ++
- 2 files changed, 8 insertions(+)
-
-diff --git a/source/pdf/pdf-parse.c b/source/pdf/pdf-parse.c
-index 7abc8c3d4..5761c3351 100644
---- a/source/pdf/pdf-parse.c
-+++ b/source/pdf/pdf-parse.c
-@@ -749,6 +749,12 @@ pdf_parse_ind_obj(fz_context *ctx, pdf_document *doc,
- 		fz_throw(ctx, FZ_ERROR_SYNTAX, "expected generation number (%d ? obj)", num);
- 	}
- 	gen = buf->i;
-+	if (gen < 0 || gen >= 65536)
-+	{
-+		if (try_repair)
-+			*try_repair = 1;
-+		fz_throw(ctx, FZ_ERROR_SYNTAX, "invalid generation number (%d)", gen);
-+	}
- 
- 	tok = pdf_lex(ctx, file, buf);
- 	if (tok != PDF_TOK_OBJ)
-diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
-index 1b2bdcd59..30197b4b8 100644
---- a/source/pdf/pdf-xref.c
-+++ b/source/pdf/pdf-xref.c
-@@ -1190,6 +1190,8 @@ pdf_read_new_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf)
- 	{
- 		ofs = fz_tell(ctx, doc->file);
- 		trailer = pdf_parse_ind_obj(ctx, doc, doc->file, buf, &num, &gen, &stm_ofs, NULL);
-+		if (num == 0)
-+			fz_throw(ctx, FZ_ERROR_GENERIC, "Trailer object number cannot be 0\n");
- 	}
- 	fz_catch(ctx)
- 	{
--- 
-2.17.1
-

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
deleted file mode 100644
index 0576033a03a2..000000000000
--- a/app-text/mupdf/files/mupdf-1.18.0-cross-fixes.patch
+++ /dev/null
@@ -1,128 +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)
-+
- 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 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 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 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 := $(shell $(PKG_CONFIG) --cflags libjpeg)
-+	SYS_LIBJPEG_LIBS := $(shell $(PKG_CONFIG) --libs libjpeg)
-   endif
--  ifeq ($(shell pkg-config --exists libopenjp2 && echo yes),yes)
--	SYS_OPENJPEG_CFLAGS := $(shell pkg-config --cflags libopenjp2)
--	SYS_OPENJPEG_LIBS := $(shell pkg-config --libs libopenjp2)
-+  ifeq ($(shell $(PKG_CONFIG) --exists libopenjp2 && echo yes),yes)
-+	SYS_OPENJPEG_CFLAGS := $(shell $(PKG_CONFIG) --cflags libopenjp2)
-+	SYS_OPENJPEG_LIBS := $(shell $(PKG_CONFIG) --libs libopenjp2)
-   endif
--  ifeq ($(shell pkg-config --exists zlib && echo yes),yes)
--	SYS_ZLIB_CFLAGS := $(shell pkg-config --cflags zlib)
--	SYS_ZLIB_LIBS := $(shell pkg-config --libs zlib)
-+  ifeq ($(shell $(PKG_CONFIG) --exists zlib && echo yes),yes)
-+	SYS_ZLIB_CFLAGS := $(shell $(PKG_CONFIG) --cflags zlib)
-+	SYS_ZLIB_LIBS := $(shell $(PKG_CONFIG) --libs zlib)
-   endif
- 
--  HAVE_LEPTONICA := $(shell pkg-config --exists 'lept >= 1.7.4' && echo yes)
-+  HAVE_LEPTONICA := $(shell $(PKG_CONFIG) --exists 'lept >= 1.7.4' && echo yes)
-   ifeq ($(HAVE_LEPTONICA),yes)
--	SYS_LEPTONICA_CFLAGS := $(shell pkg-config --cflags lept)
--	SYS_LEPTONICA_LIBS := $(shell pkg-config --libs lept)
-+	SYS_LEPTONICA_CFLAGS := $(shell $(PKG_CONFIG) --cflags lept)
-+	SYS_LEPTONICA_LIBS := $(shell $(PKG_CONFIG) --libs lept)
-   endif
- 
--  HAVE_TESSERACT := $(shell pkg-config --exists 'tesseract-ocr >= 4.0.0' && echo yes)
-+  HAVE_TESSERACT := $(shell $(PKG_CONFIG) --exists 'tesseract-ocr >= 4.0.0' && echo yes)
-   ifeq ($(HAVE_TESSERACT),yes)
--	SYS_TESSERACT_CFLAGS := $(shell pkg-config --cflags tesseract)
--	SYS_TESSERACT_LIBS := $(shell pkg-config --libs tesseract)
-+	SYS_TESSERACT_CFLAGS := $(shell $(PKG_CONFIG) --cflags tesseract)
-+	SYS_TESSERACT_LIBS := $(shell $(PKG_CONFIG) --libs tesseract)
-   endif
- 
--  HAVE_SYS_CURL := $(shell pkg-config --exists libcurl && echo yes)
-+  HAVE_SYS_CURL := $(shell $(PKG_CONFIG) --exists libcurl && echo yes)
-   ifeq ($(HAVE_SYS_CURL),yes)
--	SYS_CURL_CFLAGS := $(shell pkg-config --cflags libcurl)
--	SYS_CURL_LIBS := $(shell pkg-config --libs libcurl)
-+	SYS_CURL_CFLAGS := $(shell $(PKG_CONFIG) --cflags libcurl)
-+	SYS_CURL_LIBS := $(shell $(PKG_CONFIG) --libs libcurl)
-   endif
- 
-   HAVE_GLUT := yes
-@@ -183,14 +183,14 @@ else ifeq ($(OS),Linux)
- 
-   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)
-+	X11_CFLAGS := $(shell $(PKG_CONFIG) --cflags x11 xext)
-+	X11_LIBS := $(shell $(PKG_CONFIG) --libs x11 xext)
-   endif
- 
-   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)
-+	LIBCRYPTO_CFLAGS := $(shell $(PKG_CONFIG) --cflags libcrypto) -DHAVE_LIBCRYPTO
-+	LIBCRYPTO_LIBS := $(shell $(PKG_CONFIG) --libs libcrypto)
-   endif
- 
-   HAVE_PTHREAD := yes

diff --git a/app-text/mupdf/files/mupdf-1.18.0-darwin.patch b/app-text/mupdf/files/mupdf-1.18.0-darwin.patch
deleted file mode 100644
index cdd8ccf0f40d..000000000000
--- a/app-text/mupdf/files/mupdf-1.18.0-darwin.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- 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/files/mupdf-1.18.0-fix-oob-in-pdf-layer.c b/app-text/mupdf/files/mupdf-1.18.0-fix-oob-in-pdf-layer.c
deleted file mode 100644
index dc4000b4cde6..000000000000
--- a/app-text/mupdf/files/mupdf-1.18.0-fix-oob-in-pdf-layer.c
+++ /dev/null
@@ -1,102 +0,0 @@
-From b82e9b6d6b46877e5c3763cc3bc641c66fa7eb54 Mon Sep 17 00:00:00 2001
-From: Robin Watts <Robin.Watts@artifex.com>
-Date: Thu, 8 Oct 2020 16:15:40 +0100
-Subject: [PATCH] Bug 701297: Harden populate_ui against unexpected repairs.
-
-We count the number of layers, and allocate space for them in
-an array. We then walk the tree reading details of those layers
-in. If we hit a problem that causes a repair while reading the
-information, the number of layers can magically increase. In
-the existing code we run off the end of the array.
-
-In the new code we watch for hitting the end of the array and
-realloc as required.
----
- source/pdf/pdf-layer.c | 32 +++++++++++++++++++++++++-------
- 1 file changed, 25 insertions(+), 7 deletions(-)
-
-diff --git a/source/pdf/pdf-layer.c b/source/pdf/pdf-layer.c
-index 177f0c947..b8e9d7cad 100644
---- a/source/pdf/pdf-layer.c
-+++ b/source/pdf/pdf-layer.c
-@@ -104,10 +104,27 @@ count_entries(fz_context *ctx, pdf_obj *obj)
- }
- 
- static pdf_ocg_ui *
--populate_ui(fz_context *ctx, pdf_ocg_descriptor *desc, pdf_ocg_ui *ui, pdf_obj *order, int depth, pdf_obj *rbgroups, pdf_obj *locked)
-+get_ocg_ui(fz_context *ctx, pdf_ocg_descriptor *desc, int fill)
-+{
-+	if (fill == desc->num_ui_entries)
-+	{
-+		/* Number of layers changed while parsing;
-+		 * probably due to a repair. */
-+		int newsize = desc->num_ui_entries * 2;
-+		if (newsize == 0)
-+			newsize = 4; /* Arbitrary non-zero */
-+		desc->ui = fz_realloc_array(ctx, desc->ui, newsize, pdf_ocg_ui);
-+		desc->num_ui_entries = newsize;
-+	}
-+	return &desc->ui[fill];
-+}
-+
-+static int
-+populate_ui(fz_context *ctx, pdf_ocg_descriptor *desc, int fill, pdf_obj *order, int depth, pdf_obj *rbgroups, pdf_obj *locked)
- {
- 	int len = pdf_array_len(ctx, order);
- 	int i, j;
-+	pdf_ocg_ui *ui;
- 
- 	for (i = 0; i < len; i++)
- 	{
-@@ -118,7 +135,7 @@ populate_ui(fz_context *ctx, pdf_ocg_descriptor *desc, pdf_ocg_ui *ui, pdf_obj *
- 				continue;
- 
- 			fz_try(ctx)
--				ui = populate_ui(ctx, desc, ui, o, depth+1, rbgroups, locked);
-+				fill = populate_ui(ctx, desc, fill, o, depth+1, rbgroups, locked);
- 			fz_always(ctx)
- 				pdf_unmark_obj(ctx, o);
- 			fz_catch(ctx)
-@@ -126,14 +143,14 @@ populate_ui(fz_context *ctx, pdf_ocg_descriptor *desc, pdf_ocg_ui *ui, pdf_obj *
- 
- 			continue;
- 		}
--		ui->depth = depth;
- 		if (pdf_is_string(ctx, o))
- 		{
-+			ui = get_ocg_ui(ctx, desc, fill++);
-+			ui->depth = depth;
- 			ui->ocg = -1;
- 			ui->name = pdf_to_str_buf(ctx, o);
- 			ui->button_flags = PDF_LAYER_UI_LABEL;
- 			ui->locked = 1;
--			ui++;
- 			continue;
- 		}
- 
-@@ -144,13 +161,14 @@ populate_ui(fz_context *ctx, pdf_ocg_descriptor *desc, pdf_ocg_ui *ui, pdf_obj *
- 		}
- 		if (j == desc->len)
- 			continue; /* OCG not found in main list! Just ignore it */
-+		ui = get_ocg_ui(ctx, desc, fill++);
-+		ui->depth = depth;
- 		ui->ocg = j;
- 		ui->name = pdf_dict_get_string(ctx, o, PDF_NAME(Name), NULL);
- 		ui->button_flags = pdf_array_contains(ctx, o, rbgroups) ? PDF_LAYER_UI_RADIOBOX : PDF_LAYER_UI_CHECKBOX;
- 		ui->locked = pdf_array_contains(ctx, o, locked);
--		ui++;
- 	}
--	return ui;
-+	return fill;
- }
- 
- static void
-@@ -188,7 +206,7 @@ load_ui(fz_context *ctx, pdf_ocg_descriptor *desc, pdf_obj *ocprops, pdf_obj *oc
- 	desc->ui = Memento_label(fz_calloc(ctx, count, sizeof(pdf_ocg_ui)), "pdf_ocg_ui");
- 	fz_try(ctx)
- 	{
--		(void)populate_ui(ctx, desc, desc->ui, order, 0, rbgroups, locked);
-+		desc->num_ui_entries = populate_ui(ctx, desc, 0, order, 0, rbgroups, locked);
- 	}
- 	fz_catch(ctx)
- 	{

diff --git a/app-text/mupdf/files/mupdf-1.18.0-fix-oob-in-pixmap.c b/app-text/mupdf/files/mupdf-1.18.0-fix-oob-in-pixmap.c
deleted file mode 100644
index d19f0593a119..000000000000
--- a/app-text/mupdf/files/mupdf-1.18.0-fix-oob-in-pixmap.c
+++ /dev/null
@@ -1,41 +0,0 @@
-From 32e4e8b4bcbacbf92af7c88337efae21986d9603 Mon Sep 17 00:00:00 2001
-From: Robin Watts <Robin.Watts@artifex.com>
-Date: Thu, 8 Oct 2020 18:10:28 +0100
-Subject: [PATCH] Bug 702958: Fix overflow in fz_clear_pixmap_with_value.
-
----
- source/fitz/pixmap.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
-index 66873d214..80d8bb62f 100644
---- a/source/fitz/pixmap.c
-+++ b/source/fitz/pixmap.c
-@@ -555,7 +555,8 @@ void
- fz_clear_pixmap_with_value(fz_context *ctx, fz_pixmap *pix, int value)
- {
- 	unsigned char *s;
--	int w, h, n, stride, len;
-+	int w, h, n;
-+	ptrdiff_t stride, len;
- 	int alpha = pix->alpha;
- 
- 	w = pix->w;
-@@ -572,7 +573,7 @@ fz_clear_pixmap_with_value(fz_context *ctx, fz_pixmap *pix, int value)
- 
- 	n = pix->n;
- 	stride = pix->stride;
--	len = w * n;
-+	len = (ptrdiff_t)w * n;
- 
- 	s = pix->samples;
- 	if (value == 255 || !alpha)
-@@ -584,7 +585,7 @@ fz_clear_pixmap_with_value(fz_context *ctx, fz_pixmap *pix, int value)
- 		}
- 		while (h--)
- 		{
--			memset(s, value, (unsigned int)len);
-+			memset(s, value, len);
- 			s += stride;
- 		}
- 	}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/
@ 2023-03-29 15:58 Florian Schmaus
  0 siblings, 0 replies; 5+ messages in thread
From: Florian Schmaus @ 2023-03-29 15:58 UTC (permalink / raw
  To: gentoo-commits

commit:     96848694b023c4b3033d5148188d797920f7018c
Author:     Philipp Rösner <rndxelement <AT> protonmail <DOT> com>
AuthorDate: Fri Mar 17 15:09:33 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Mar 29 15:58:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96848694

app-text/mupdf: remove unused patches

Signed-off-by: Philipp Rösner <rndxelement <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/30182
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-text/mupdf/files/mupdf-1.20.0-lcms2.patch | 69 ---------------------------
 1 file changed, 69 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 a5cb30e3b74c..000000000000
--- a/app-text/mupdf/files/mupdf-1.20.0-lcms2.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From d98de0bb0b627772625c1acf050ba0dd4b5ac9df Mon Sep 17 00:00:00 2001
-From: David Seifert <soap@gentoo.org>
-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, &tmp, sizeof(cmsUInt32Number), 1) != 1)
-+    if (io->Read(ContextID, io, &tmp.integer, sizeof(cmsUInt32Number), 1) != 1)
-         return FALSE;
- 
-     if (n != NULL) {
- 
--        tmp = _cmsAdjustEndianess32(tmp);
--        *n = *(cmsFloat32Number*)(void*)&tmp;
-+        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*) &n;
--    tmp = _cmsAdjustEndianess32(tmp);
--    if (io -> Write(ContextID, io, sizeof(cmsUInt32Number), &tmp) != 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), &tmp.integer) != 1)
-             return FALSE;
- 
-     return TRUE;


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-29 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-29 15:58 [gentoo-commits] repo/gentoo:master commit in: app-text/mupdf/files/ Florian Schmaus
  -- strict thread matches above, loose matches on Subject: below --
2022-10-07 21:07 Florian Schmaus
2021-01-19 15:16 Sam James
2020-11-03  4:11 Sam James
2016-10-30  8:17 Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox