Rebuild for poppler 22.08.0 - bootstrap on

This commit is contained in:
Marek Kasik 2022-08-09 01:32:01 +02:00
parent 81e0707660
commit 7b63621e6d
2 changed files with 102 additions and 2 deletions

View File

@ -0,0 +1,91 @@
--- texlive-base-20210325/source/configure
+++ texlive-base-20210325/source/configure
@@ -22090,7 +22090,7 @@ $as_echo_n "checking requested system \`
int
main ()
{
-GfxFont *gfxFont; gfxFont->decRefCnt();
+GfxFont *gfxFont; gfxFont->getFlags();
;
return 0;
}
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -167,8 +167,8 @@ static PdfDocument *find_add_document(ch
p->file_name = xstrdup(file_name);
p->xref = xref = 0;
p->occurences = 0;
- GString *docName = new GString(p->file_name);
- p->doc = new PDFDoc(docName); // takes ownership of docName
+ std::unique_ptr<GString> docName = std::make_unique<GString>(p->file_name);
+ p->doc = new PDFDoc(std::move(docName)); // takes ownership of docName
if (!p->doc->isOk() || !p->doc->okToPrint()) {
pdftex_fail("xpdf: reading PDF image failed");
}
@@ -395,7 +395,7 @@ static void copyFont(const char *tag, Ob
{
Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset,
stemV;
- GfxFont *gfont;
+ std::shared_ptr<GfxFont> gfont;
fd_entry *fd;
fm_entry *fontmap;
// Check whether the font has already been embedded before analysing it.
@@ -444,7 +444,7 @@ static void copyFont(const char *tag, Ob
gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(),
fontdict.getDict());
pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd,
- addEncoding(gfont)));
+ addEncoding(gfont.get())));
} else {
copyName(tag);
pdf_puts(" ");
@@ -682,7 +682,6 @@ static void writeEncodings()
}
for (r = encodingList; r != 0; r = n) {
n = r->next;
- r->font->decRefCnt();
delete r;
}
}
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
{
char *p, buf[1024];
PDFDoc *doc;
- GString *fileName;
+ std::unique_ptr<GooString> fileName;
Stream *s;
Object srcStream, srcName, catalogDict;
FILE *outfile;
@@ -86,9 +86,9 @@ int main(int argc, char *argv[])
"Usage: pdftosrc <PDF-file> [<stream-object-number>]\n");
exit(1);
}
- fileName = new GString(argv[1]);
+ fileName = std::make_unique<GString>(argv[1]);
globalParams = std::unique_ptr<GlobalParams>(new GlobalParams());
- doc = new PDFDoc(fileName);
+ doc = new PDFDoc(std::move(fileName));
if (!doc->isOk()) {
fprintf(stderr, "Invalid PDF file\n");
exit(1);
@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Not a Stream object\n");
exit(1);
}
- sprintf(buf, "%s", fileName->c_str());
+ sprintf(buf, "%s", argv[1]);
if ((p = strrchr(buf, '.')) == 0)
p = strchr(buf, 0);
if (objgen == 0)
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
outname = buf;
} else { // objnum < 0 means we are extracting the XRef table
extract_xref_table = true;
- sprintf(buf, "%s", fileName->c_str());
+ sprintf(buf, "%s", argv[1]);
if ((p = strrchr(buf, '.')) == 0)
p = strchr(buf, 0);
sprintf(p, ".xref");

View File

@ -16,11 +16,11 @@
%global __brp_mangle_shebangs_exclude ^$
# We have a circular dep on latex due to xindy
%bcond_with bootstrap
%bcond_without bootstrap
Name: %{shortname}-base
Version: %{source_date}
Release: 49%{?dist}
Release: 50%{?dist}
Epoch: 9
Summary: TeX formatting system
# The only files in the base package are directories, cache, and license texts
@ -479,6 +479,8 @@ Patch33: texlive-base-20210325-no-setpdfwrite.patch
Patch34: texlive-base-20210325-poppler-22.01.0.patch
# Fix crash in handling Group
Patch35: texlive-base-20210325-pdftoepdf-fix-crash.patch
# Poppler 22.08.0
Patch36: texlive-base-20210325-poppler-22.08.0.patch
# Can't do this because it causes everything else to be noarch
# BuildArch: noarch
@ -6746,6 +6748,10 @@ xz -dc %{SOURCE0} | tar x
%patch35 -p1 -b .poppler-crash-fix
%endif
%if 0%{?fedora} >= 37
%patch36 -p1 -b .poppler-22.08.0
%endif
# Setup copies of the licenses
for l in `unxz -c %{SOURCE3} | tar t`; do
ln -s %{_texdir}/licenses/$l $l
@ -9407,6 +9413,9 @@ yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || :
%doc %{_texdir}/texmf-dist/doc/latex/yplan/
%changelog
* Mon Aug 08 2022 Marek Kasik <mkasik@redhat.com> - 9:20210325-50
- Rebuild for poppler 22.08.0 - bootstrap on
* Wed Aug 03 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 9:20210325-49
- Rebuild for ICU 71.1