forked from pool/texlive
Accepting request 1167063 from Publishing:TeXLive
- Add patch source-dvipdfm-x.dif * dvipdfmx: repeated inclusion of the same image did not share the image data, but had separate copies for each inclusion. OBS-URL: https://build.opensuse.org/request/show/1167063 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/texlive?expand=0&rev=95
This commit is contained in:
commit
2006f28aad
55
source-dvipdfm-x.dif
Normal file
55
source-dvipdfm-x.dif
Normal file
@ -0,0 +1,55 @@
|
||||
2024-04-07 Yukimasa Morimi <h20y6m@yahoo.co.jp>
|
||||
* pdfximage.c: fix an issue where the PDF becomes large when
|
||||
inserting the same image multiple times.
|
||||
https://github.com/texjporg/tex-jp-build/pull/169
|
||||
|
||||
---
|
||||
texk/dvipdfm-x/pdfximage.c | 29 ++++++++++++++++-------------
|
||||
1 file changed, 16 insertions(+), 13 deletions(-)
|
||||
|
||||
--- texk/dvipdfm-x/pdfximage.c 2024-03-05 00:40:55.000000000 +0100
|
||||
+++ texk/dvipdfm-x/pdfximage.c 2024-04-12 14:22:48.800914761 +0200
|
||||
@@ -396,6 +396,8 @@ load_image (const char *ident, const cha
|
||||
int utf8name_failed = 0;
|
||||
#endif /* WIN32 */
|
||||
|
||||
+#define dpx_streq(a, b) ((a) == (b) || (a) && (b) && strcmp(a, b) == 0)
|
||||
+
|
||||
int
|
||||
pdf_ximage_load_image (const char *ident, const char *filename, load_options options)
|
||||
{
|
||||
@@ -408,20 +410,21 @@ pdf_ximage_load_image (const char *ident
|
||||
|
||||
for (i = 0; i < ic->count; i++) {
|
||||
I = &ic->ximages[i];
|
||||
- if (I->filename && !strcmp(filename, I->filename)) {
|
||||
- id = i;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- if (id >= 0) {
|
||||
- if (I->attr.page_no == options.page_no &&
|
||||
- (I->attr.page_name && options.page_name &&
|
||||
- strcmp(I->attr.page_name, options.page_name) == 0) &&
|
||||
- !pdf_compare_object(I->attr.dict, options.dict) && /* ????? */
|
||||
- I->attr.bbox_type == options.bbox_type) {
|
||||
- return id;
|
||||
- }
|
||||
+ if (I->filename == NULL || strcmp(filename, I->filename) != 0)
|
||||
+ continue;
|
||||
+ id = i;
|
||||
f = I->fullname;
|
||||
+
|
||||
+ if (I->attr.page_no != options.page_no)
|
||||
+ continue;
|
||||
+ if (!dpx_streq(I->attr.page_name, options.page_name))
|
||||
+ continue;
|
||||
+ if (pdf_compare_object(I->attr.dict, options.dict) != 0) /* ????? */
|
||||
+ continue;
|
||||
+ if (I->attr.bbox_type != options.bbox_type)
|
||||
+ continue;
|
||||
+
|
||||
+ return id;
|
||||
}
|
||||
if (f) {
|
||||
/* we already have converted this file; f is the temporary file name */
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 12 13:10:45 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add patch source-dvipdfm-x.dif
|
||||
* dvipdfmx: repeated inclusion of the same image did not share
|
||||
the image data, but had separate copies for each inclusion.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 21 13:47:14 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
|
@ -264,6 +264,8 @@ Patch17: source-64.dif
|
||||
Patch18: source-a2ping.dif
|
||||
Patch19: source-dvipng.dif
|
||||
Patch21: source-ppc64.dif
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch22: source-dvipdfm-x.dif
|
||||
# PATCH-FIX-SUSE Make biber work with our perl
|
||||
Patch42: biblatex-encoding.dif
|
||||
Patch43: biblatex-ms-encoding.dif
|
||||
@ -4243,6 +4245,7 @@ This package is required by the package texlive-biber-bin.
|
||||
%patch -P18 -p0 -b .a2p
|
||||
%patch -P19 -p0 -b .dvipng
|
||||
%patch -P21 -p0 -b .ppcelf
|
||||
%patch -P22 -p0 -b .sameimg
|
||||
pushd libs/luajit/LuaJIT-src/
|
||||
#Missed patch ppc and risc
|
||||
%patch -P106 -p1 -b .arm64
|
||||
|
Loading…
Reference in New Issue
Block a user