1 |
commit: e651007753d2b9c3a66a3ec2dd7f6913ed738e37 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 17 13:44:49 2022 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 17 16:21:05 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6510077 |
7 |
|
8 |
media-libs/jbig2dec: Drop old versions |
9 |
|
10 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
11 |
|
12 |
media-libs/jbig2dec/Manifest | 1 - |
13 |
.../jbig2dec-0.18-extra-overflow-checks.patch | 51 --------------- |
14 |
.../files/jbig2dec-0.18-overflow-IAID.patch | 36 ----------- |
15 |
media-libs/jbig2dec/jbig2dec-0.18.ebuild | 73 ---------------------- |
16 |
4 files changed, 161 deletions(-) |
17 |
|
18 |
diff --git a/media-libs/jbig2dec/Manifest b/media-libs/jbig2dec/Manifest |
19 |
index 3f593faa8362..10afa8ffcdf4 100644 |
20 |
--- a/media-libs/jbig2dec/Manifest |
21 |
+++ b/media-libs/jbig2dec/Manifest |
22 |
@@ -1,3 +1,2 @@ |
23 |
DIST jb2streams.zip 1285838 BLAKE2B 9a2b6047a7b970439693d6f5fdefb9488019a562e7f831288b27df09bb19dec2f84854cf7fea50b5b041d331e925145f37f2f89848058ecdc074e7d6c238033f SHA512 382890b36345b8aaebb3554e776a53f3276c6d835335ce41f3f41829ff62bba7ae646602544103ba8541a7a824dca92d682b682c254ab2918c7fe45b3e358b45 |
24 |
-DIST jbig2dec-0.18.tar.gz 148563 BLAKE2B a864fd5b00abca3ae0f847c1d8fd537d92d68a3c042c851b6bebd51bb674f5bc4a36811f2b4fd7753db4d3641e544e03ec184cb90d43da0247d8affd7cf62c11 SHA512 5931530ee3b811f9009c95d08ad65701564ef8ebf6511145acb969cc7c99dab5028daaee580dd83358b6bdc477cffe347712b9c9768c9b1a63395e366046267d |
25 |
DIST jbig2dec-0.19.tar.gz 149134 BLAKE2B 576f3a516499b6291d25dfdefe5af62899665167526dca11435bc07e04a3feb707f82d3a8bdda774f5cfe0d792c3147e77aa94fa57feac25ba1c0a7805c5fc58 SHA512 d5a27951cc9c06c184f454e258e81b6e4d5aa2742a4da821522b9a42ecc78e7e1b78058dabc23821618e62d62d8832011f16b5ef2d66beac463da6b809fd02af |
26 |
|
27 |
diff --git a/media-libs/jbig2dec/files/jbig2dec-0.18-extra-overflow-checks.patch b/media-libs/jbig2dec/files/jbig2dec-0.18-extra-overflow-checks.patch |
28 |
deleted file mode 100644 |
29 |
index 52a7f448e6f3..000000000000 |
30 |
--- a/media-libs/jbig2dec/files/jbig2dec-0.18-extra-overflow-checks.patch |
31 |
+++ /dev/null |
32 |
@@ -1,51 +0,0 @@ |
33 |
-https://github.com/ArtifexSoftware/jbig2dec/commit/873694419b3498708b90c5c36ee0a73795a90c84 |
34 |
----- |
35 |
-From 873694419b3498708b90c5c36ee0a73795a90c84 Mon Sep 17 00:00:00 2001 |
36 |
-From: Sebastian Rasmussen <sebras@×××××.com> |
37 |
-Date: Sun, 15 Sep 2019 17:31:48 +0200 |
38 |
-Subject: [PATCH] jbig2dec: Handle under-/overflow detection and messaging |
39 |
- better. |
40 |
- |
41 |
-Previously SYMWIDTH was capped too early in order to prevent underflow |
42 |
-Moreover TOTWIDTH was allowed to overflow. |
43 |
- |
44 |
-Now the value DW is checked compared to SYMWIDTH, preventing over |
45 |
-underflow and overflow at the correct limits, and an overflow |
46 |
-check has been added for TOTWIDTH. |
47 |
---- |
48 |
- jbig2_symbol_dict.c | 18 ++++++++++++++---- |
49 |
- 1 file changed, 14 insertions(+), 4 deletions(-) |
50 |
- |
51 |
-diff --git a/jbig2_symbol_dict.c b/jbig2_symbol_dict.c |
52 |
-index e606529..bc6e98c 100644 |
53 |
---- a/jbig2_symbol_dict.c |
54 |
-+++ b/jbig2_symbol_dict.c |
55 |
-@@ -428,14 +428,24 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx, |
56 |
- break; |
57 |
- } |
58 |
- |
59 |
-+ if (DW < 0 && SYMWIDTH < (uint32_t) -DW) { |
60 |
-+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "DW value (%d) would make SYMWIDTH (%u) negative at symbol %u", DW, SYMWIDTH, NSYMSDECODED + 1); |
61 |
-+ goto cleanup; |
62 |
-+ } |
63 |
-+ if (DW > 0 && DW > UINT32_MAX - SYMWIDTH) { |
64 |
-+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "DW value (%d) would make SYMWIDTH (%u) too large at symbol %u", DW, SYMWIDTH, NSYMSDECODED + 1); |
65 |
-+ goto cleanup; |
66 |
-+ } |
67 |
-+ |
68 |
- SYMWIDTH = SYMWIDTH + DW; |
69 |
-- TOTWIDTH = TOTWIDTH + SYMWIDTH; |
70 |
-- if ((int32_t) SYMWIDTH < 0) { |
71 |
-- code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "invalid SYMWIDTH value (%d) at symbol %d", SYMWIDTH, NSYMSDECODED + 1); |
72 |
-+ if (SYMWIDTH > UINT32_MAX - TOTWIDTH) { |
73 |
-+ code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number, "SYMWIDTH value (%u) would make TOTWIDTH (%u) too large at symbol %u", SYMWIDTH, TOTWIDTH, NSYMSDECODED + 1); |
74 |
- goto cleanup; |
75 |
- } |
76 |
-+ |
77 |
-+ TOTWIDTH = TOTWIDTH + SYMWIDTH; |
78 |
- #ifdef JBIG2_DEBUG |
79 |
-- jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number, "SYMWIDTH = %d TOTWIDTH = %d", SYMWIDTH, TOTWIDTH); |
80 |
-+ jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number, "SYMWIDTH = %u TOTWIDTH = %u", SYMWIDTH, TOTWIDTH); |
81 |
- #endif |
82 |
- /* 6.5.5 (4c.ii) */ |
83 |
- if (!params->SDHUFF || params->SDREFAGG) { |
84 |
|
85 |
diff --git a/media-libs/jbig2dec/files/jbig2dec-0.18-overflow-IAID.patch b/media-libs/jbig2dec/files/jbig2dec-0.18-overflow-IAID.patch |
86 |
deleted file mode 100644 |
87 |
index 7205c980fc28..000000000000 |
88 |
--- a/media-libs/jbig2dec/files/jbig2dec-0.18-overflow-IAID.patch |
89 |
+++ /dev/null |
90 |
@@ -1,36 +0,0 @@ |
91 |
-https://github.com/ArtifexSoftware/jbig2dec/commit/f6d326878893dc92b45cbd18e25ab4d2b3a8db73 |
92 |
----- |
93 |
-From f6d326878893dc92b45cbd18e25ab4d2b3a8db73 Mon Sep 17 00:00:00 2001 |
94 |
-From: Sebastian Rasmussen <sebras@×××××.com> |
95 |
-Date: Sun, 15 Sep 2019 18:12:31 +0200 |
96 |
-Subject: [PATCH] jbig2dec: Add overflow detection for IAID context size. |
97 |
- |
98 |
---- |
99 |
- jbig2_arith_iaid.c | 13 +++++++++++-- |
100 |
- 1 file changed, 11 insertions(+), 2 deletions(-) |
101 |
- |
102 |
-diff --git a/jbig2_arith_iaid.c b/jbig2_arith_iaid.c |
103 |
-index 78dc830..bbc38a0 100644 |
104 |
---- a/jbig2_arith_iaid.c |
105 |
-+++ b/jbig2_arith_iaid.c |
106 |
-@@ -44,9 +44,18 @@ struct _Jbig2ArithIaidCtx { |
107 |
- Jbig2ArithIaidCtx * |
108 |
- jbig2_arith_iaid_ctx_new(Jbig2Ctx *ctx, int SBSYMCODELEN) |
109 |
- { |
110 |
-- Jbig2ArithIaidCtx *result = jbig2_new(ctx, Jbig2ArithIaidCtx, 1); |
111 |
-- int ctx_size = 1 << SBSYMCODELEN; |
112 |
-+ Jbig2ArithIaidCtx *result; |
113 |
-+ size_t ctx_size; |
114 |
- |
115 |
-+ if (sizeof(ctx_size) * 8 <= SBSYMCODELEN) |
116 |
-+ { |
117 |
-+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "requested IAID arithmetic coding state size too large"); |
118 |
-+ return NULL; |
119 |
-+ } |
120 |
-+ |
121 |
-+ ctx_size = 1 << SBSYMCODELEN; |
122 |
-+ |
123 |
-+ result = jbig2_new(ctx, Jbig2ArithIaidCtx, 1); |
124 |
- if (result == NULL) { |
125 |
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "failed to allocate IAID arithmetic coding state"); |
126 |
- return NULL; |
127 |
|
128 |
diff --git a/media-libs/jbig2dec/jbig2dec-0.18.ebuild b/media-libs/jbig2dec/jbig2dec-0.18.ebuild |
129 |
deleted file mode 100644 |
130 |
index fd2742d804a1..000000000000 |
131 |
--- a/media-libs/jbig2dec/jbig2dec-0.18.ebuild |
132 |
+++ /dev/null |
133 |
@@ -1,73 +0,0 @@ |
134 |
-# Copyright 1999-2021 Gentoo Authors |
135 |
-# Distributed under the terms of the GNU General Public License v2 |
136 |
- |
137 |
-EAPI=7 |
138 |
- |
139 |
-PYTHON_COMPAT=( python3_{7,8,9} ) |
140 |
- |
141 |
-inherit autotools python-any-r1 |
142 |
- |
143 |
-DESCRIPTION="A decoder implementation of the JBIG2 image compression format" |
144 |
-HOMEPAGE="https://jbig2dec.com/" |
145 |
-SRC_URI="https://github.com/ArtifexSoftware/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz |
146 |
- test? ( http://jbig2dec.sourceforge.net/ubc/jb2streams.zip )" |
147 |
- |
148 |
-LICENSE="AGPL-3" |
149 |
-SLOT="0/$(ver_cut 1-2)" #698428 |
150 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
151 |
-IUSE="png static-libs test" |
152 |
-RESTRICT="!test? ( test )" |
153 |
- |
154 |
-BDEPEND=" |
155 |
- test? ( |
156 |
- app-arch/unzip |
157 |
- ${PYTHON_DEPS} |
158 |
- ) |
159 |
-" |
160 |
- |
161 |
-RDEPEND="png? ( media-libs/libpng:0= )" |
162 |
-DEPEND="${RDEPEND}" |
163 |
- |
164 |
-DOCS=( CHANGES README ) |
165 |
- |
166 |
-PATCHES=( |
167 |
- "${FILESDIR}/${P}-extra-overflow-checks.patch" |
168 |
- "${FILESDIR}/${P}-overflow-IAID.patch" |
169 |
-) |
170 |
- |
171 |
-pkg_setup() { |
172 |
- use test && python-any-r1_pkg_setup |
173 |
-} |
174 |
- |
175 |
-src_prepare() { |
176 |
- default |
177 |
- |
178 |
- if use test; then |
179 |
- mkdir "${WORKDIR}/ubc" || die |
180 |
- mv -v "${WORKDIR}"/*.jb2 "${WORKDIR}/ubc/" || die |
181 |
- mv -v "${WORKDIR}"/*.bmp "${WORKDIR}/ubc/" || die |
182 |
- fi |
183 |
- |
184 |
- # We only need configure.ac and config_types.h.in |
185 |
- sed -i \ |
186 |
- -e '/^# do we need automake?/,/^autoheader/d' \ |
187 |
- -e '/echo " $AUTOM.*/,$d' \ |
188 |
- autogen.sh \ |
189 |
- || die "failed to modify autogen.sh" |
190 |
- |
191 |
- ./autogen.sh || die |
192 |
- |
193 |
- eautoreconf |
194 |
-} |
195 |
- |
196 |
-src_configure() { |
197 |
- econf \ |
198 |
- $(use_enable static-libs static) \ |
199 |
- $(use_with png libpng) |
200 |
-} |
201 |
- |
202 |
-src_install() { |
203 |
- default |
204 |
- |
205 |
- find "${ED}" -name '*.la' -exec rm {} + || die |
206 |
-} |