pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/web2c Switch to internal poppler due to reports ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/42e4bf0e8021
branches:  trunk
changeset: 367986:42e4bf0e8021
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Sep 09 17:06:51 2017 +0000

description:
Switch to internal poppler due to reports of crashes from the last change.
Bump PKGREVISION.

diffstat:

 print/web2c/Makefile                             |   18 +-
 print/web2c/distinfo                             |    4 +-
 print/web2c/patches/patch-pdftexdir_pdftoepdf.cc |  225 -----------------------
 print/web2c/patches/patch-pdftexdir_pdftosrc.cc  |  102 ----------
 4 files changed, 12 insertions(+), 337 deletions(-)

diffs (truncated from 404 to 300 lines):

diff -r c4a4e058581c -r 42e4bf0e8021 print/web2c/Makefile
--- a/print/web2c/Makefile      Sat Sep 09 17:03:02 2017 +0000
+++ b/print/web2c/Makefile      Sat Sep 09 17:06:51 2017 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.63 2017/09/06 16:49:47 wiz Exp $
+# $NetBSD: Makefile,v 1.64 2017/09/09 17:06:51 tnn Exp $
 
 DISTNAME=      texlive-20170524-source
 PKGNAME=       web2c-2017
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    print
 MASTER_SITES=  ftp://tug.org/historic/systems/texlive/2017/
 EXTRACT_SUFX=  .tar.xz
@@ -15,6 +15,8 @@
 DEPENDS+=      ptexenc>=1.3.4:../../print/ptexenc
 
 EXTRACT_ELEMENTS=      ${DISTNAME}/build-aux \
+                       ${DISTNAME}/libs/poppler \
+                       ${DISTNAME}/libs/xpdf \
                        ${DISTNAME}/texk/web2c
 
 GNU_CONFIGURE= yes
@@ -45,15 +47,17 @@
                        --with-mpfr-includes=${BUILDLINK_PREFIX.mpfr}/include \
                        --with-mpfr-libdir=${BUILDLINK_PREFIX.mpfr}/lib
 CONFIGURE_ARGS+=       --with-system-pixman
-CONFIGURE_ARGS+=       --with-system-poppler
+#CONFIGURE_ARGS+=      --with-system-poppler
+#CONFIGURE_ARGS+=      --with-system-xpdf
 CONFIGURE_ARGS+=       --with-system-ptexenc
-CONFIGURE_ARGS+=       --with-system-xpdf
 CONFIGURE_ARGS+=       --with-system-zlib \
                        --with-zlib-includes=${BUILDLINK_PREFIX.zlib}/include \
                        --with-zlib-libdir=${BUILDLINK_PREFIX.zlib}/lib
 LIBTOOL_OVERRIDE=      ../*/libtool */libtool
 
-CONFIGURE_DIRS=        ${WRKDIR}/${DISTNAME}/texk/web2c
+CONFIGURE_DIRS=                ${WRKDIR}/${DISTNAME}/texk/web2c
+CONFIGURE_DIRS+=       ${WRKDIR}/${DISTNAME}/libs/poppler
+CONFIGURE_DIRS+=       ${WRKDIR}/${DISTNAME}/libs/xpdf
 INSTALL_DIRS=  ${WRKDIR}/${DISTNAME}/texk/web2c
 
 .include "../../devel/zlib/buildlink3.mk"
@@ -61,8 +65,8 @@
 .include "../../graphics/png/buildlink3.mk"
 .include "../../math/mpfr/buildlink3.mk"
 .include "../../print/kpathsea/buildlink3.mk"
-.include "../../print/poppler/buildlink3.mk"
-.include "../../print/poppler-includes/buildlink3.mk"
+#.include "../../print/poppler/buildlink3.mk"
+#.include "../../print/poppler-includes/buildlink3.mk"
 .include "../../print/ptexenc/buildlink3.mk"
 .include "../../x11/pixman/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r c4a4e058581c -r 42e4bf0e8021 print/web2c/distinfo
--- a/print/web2c/distinfo      Sat Sep 09 17:03:02 2017 +0000
+++ b/print/web2c/distinfo      Sat Sep 09 17:06:51 2017 +0000
@@ -1,9 +1,7 @@
-$NetBSD: distinfo,v 1.22 2017/09/07 14:15:52 tnn Exp $
+$NetBSD: distinfo,v 1.23 2017/09/09 17:06:51 tnn Exp $
 
 SHA1 (texlive-20170524-source.tar.xz) = 1c1383ddb1b871c6b8ce49a4ae3c1a33d454a7b6
 RMD160 (texlive-20170524-source.tar.xz) = a8430c19fe1727cf308fe03e5838105260c0d71e
 SHA512 (texlive-20170524-source.tar.xz) = 18c18940992ab94ce22e22ccd4ad798253ea14ac2ab296a10ea5e9a8da9f33989f2e2641b42b564d1d5fb53bd371da3e68726b676d706b469016ad146cd19daa
 Size (texlive-20170524-source.tar.xz) = 63483372 bytes
 SHA1 (patch-am) = b7b81b1161a2117e756b25b80f9a676575267bdd
-SHA1 (patch-pdftexdir_pdftoepdf.cc) = a9e138d9c286152150550af9f58279310039b114
-SHA1 (patch-pdftexdir_pdftosrc.cc) = 8eb487c63a6e31d0584f36ba411d97f7dfebaa82
diff -r c4a4e058581c -r 42e4bf0e8021 print/web2c/patches/patch-pdftexdir_pdftoepdf.cc
--- a/print/web2c/patches/patch-pdftexdir_pdftoepdf.cc  Sat Sep 09 17:03:02 2017 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-$NetBSD: patch-pdftexdir_pdftoepdf.cc,v 1.1 2017/09/07 14:15:52 tnn Exp $
-
-Try to adapt to new poppler-0.59 Object API.
-
---- pdftexdir/pdftoepdf.cc.orig        2016-11-25 18:09:21.000000000 +0000
-+++ pdftexdir/pdftoepdf.cc
-@@ -94,7 +94,6 @@ class PdfObject {
-   public:
-     PdfObject() {               // nothing
-     } ~PdfObject() {
--        iObject.free();
-     }
-     Object *operator->() {
-         return &iObject;
-@@ -217,10 +216,9 @@ static void delete_document(PdfDocument 
- 
- static void initDictFromDict(PdfObject & obj, Dict * dict)
- {
--    obj->initDict(xref);
-+    obj.iObject = Object(objDict);
-     for (int i = 0, l = dict->getLength(); i < l; i++) {
--        Object obj1;
--        obj->dictAdd(copyString(dict->getKey(i)), dict->getValNF(i, &obj1));
-+        obj->dictAdd(copyString(dict->getKey(i)), dict->getValNF(i));
-     }
- }
- 
-@@ -323,7 +321,7 @@ static void copyDictEntry(Object * obj, 
-     PdfObject obj1;
-     copyName(obj->dictGetKey(i));
-     pdf_puts(" ");
--    obj->dictGetValNF(i, &obj1);
-+    obj1.iObject = obj->dictGetValNF(i);
-     copyObject(&obj1);
-     pdf_puts("\n");
- }
-@@ -382,7 +380,7 @@ static void copyProcSet(Object * obj)
-                     obj->getTypeName());
-     pdf_puts("/ProcSet [ ");
-     for (i = 0, l = obj->arrayGetLength(); i < l; ++i) {
--        obj->arrayGetNF(i, &procset);
-+        procset.iObject = obj->arrayGetNF(i);
-         if (!procset->isName())
-             pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>",
-                         procset->getTypeName());
-@@ -413,25 +411,25 @@ static void copyFont(char *tag, Object *
-     }
-     // Only handle included Type1 (and Type1C) fonts; anything else will be copied.
-     // Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true.
--    if (!fixedinclusioncopyfont && fontRef->fetch(xref, &fontdict)->isDict()
--        && fontdict->dictLookup("Subtype", &subtype)->isName()
-+    if (!fixedinclusioncopyfont && (fontdict.iObject = fontRef->fetch(xref), fontdict->isDict())
-+        && (subtype.iObject = fontdict->dictLookup("Subtype"), subtype->isName())
-         && !strcmp(subtype->getName(), "Type1")
--        && fontdict->dictLookup("BaseFont", &basefont)->isName()
--        && fontdict->dictLookupNF("FontDescriptor", &fontdescRef)->isRef()
--        && fontdescRef->fetch(xref, &fontdesc)->isDict()
--        && (fontdesc->dictLookup("FontFile", &fontfile)->isStream()
-+        && (basefont.iObject = fontdict->dictLookup("BaseFont"), basefont->isName())
-+        && (fontdescRef.iObject = fontdict->dictLookupNF("FontDescriptor"), fontdescRef->isRef())
-+        && (fontdesc.iObject = fontdescRef->fetch(xref), fontdesc->isDict())
-+        && ((fontfile.iObject = fontdesc->dictLookup("FontFile"), fontfile->isStream())
-             || (REPLACE_TYPE1C
--                && fontdesc->dictLookup("FontFile3", &fontfile)->isStream()
--                && fontfile->streamGetDict()->lookup("Subtype",
--                                                     &ffsubtype)->isName()
-+                && (fontfile.iObject = fontdesc->dictLookup("FontFile3"), fontfile->isStream())
-+                && (ffsubtype.iObject = fontfile->streamGetDict()->lookup("Subtype"), 
-+                                                     ffsubtype->isName())
-                 && !strcmp(ffsubtype->getName(), "Type1C")))
-         && (fontmap = lookup_fontmap(basefont->getName())) != NULL) {
-         // round /StemV value, since the PDF input is a float
-         // (see Font Descriptors in PDF reference), but we only store an
-         // integer, since we don't want to change the struct.
--        fontdesc->dictLookup("StemV", &stemV);
-+        stemV.iObject = fontdesc->dictLookup("StemV");
-         fd = epdf_create_fontdescriptor(fontmap, zround(stemV->getNum()));
--        if (fontdesc->dictLookup("CharSet", &charset) &&
-+        if ((charset.iObject = fontdesc->dictLookup("CharSet"), !charset->isNull()) &&
-             charset->isString() && is_subsetable(fontmap))
-             epdf_mark_glyphs(fd, charset->getString()->getCString());
-         else
-@@ -458,7 +456,7 @@ static void copyFontResources(Object * o
-                     obj->getTypeName());
-     pdf_puts("/Font << ");
-     for (i = 0, l = obj->dictGetLength(); i < l; ++i) {
--        obj->dictGetValNF(i, &fontRef);
-+        fontRef.iObject = obj->dictGetValNF(i);
-         if (fontRef->isRef())
-             copyFont(obj->dictGetKey(i), &fontRef);
-         else if (fontRef->isDict()) {   // some programs generate pdf with embedded font object
-@@ -601,7 +599,7 @@ static void copyObject(Object * obj)
-     } else if (obj->isArray()) {
-         pdf_puts("[");
-         for (i = 0, l = obj->arrayGetLength(); i < l; ++i) {
--            obj->arrayGetNF(i, &obj1);
-+            obj1.iObject = obj->arrayGetNF(i);
-             if (!obj1->isName())
-                 pdf_puts(" ");
-             copyObject(&obj1);
-@@ -640,7 +638,7 @@ static void writeRefs()
-         if (!r->written) {
-             Object obj1;
-             r->written = 1;
--            xref->fetch(r->ref.num, r->ref.gen, &obj1);
-+            obj1 = xref->fetch(r->ref.num, r->ref.gen);
-             if (r->type == objFont) {
-                 assert(!obj1.isStream());
-                 pdfbeginobj(r->num, 2);         // \pdfobjcompresslevel = 2 is for this
-@@ -656,7 +654,7 @@ static void writeRefs()
-                 pdf_puts("\n");
-                 pdfendobj();
-             }
--            obj1.free();
-+            obj1.setToNull();
-         }
-     }
- }
-@@ -867,7 +865,7 @@ void write_epdf(void)
-     encodingList = 0;
-     page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page);
-     pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page);
--    xref->fetch(pageRef->num, pageRef->gen, &pageObj);
-+    pageObj.iObject = xref->fetch(pageRef->num, pageRef->gen);
-     pageDict = pageObj->getDict();
-     rotate = page->getRotate();
-     PDFRectangle *pagebox;
-@@ -886,7 +884,7 @@ void write_epdf(void)
-         pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page);
-     }
-     if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) {
--        pdf_doc->doc->getDocInfoNF(&info);
-+        info = pdf_doc->doc->getDocInfoNF();
-         if (info.isRef()) {
-             // the info dict must be indirect (PDF Ref p. 61)
-             pdf_printf("/%s.InfoDict ", pdfkeyprefix);
-@@ -942,13 +940,13 @@ void write_epdf(void)
-     pdf_puts(stripzeros(s));
- 
-     // Metadata validity check (as a stream it must be indirect)
--    pageDict->lookupNF("Metadata", &dictObj);
-+    dictObj.iObject = pageDict->lookupNF("Metadata");
-     if (!dictObj->isNull() && !dictObj->isRef())
-         pdftex_warn("PDF inclusion: /Metadata must be indirect object");
- 
-     // copy selected items in Page dictionary except Resources & Group
-     for (i = 0; pageDictKeys[i] != NULL; i++) {
--        pageDict->lookupNF(pageDictKeys[i], &dictObj);
-+        dictObj.iObject = pageDict->lookupNF(pageDictKeys[i]);
-         if (!dictObj->isNull()) {
-             pdf_newline();
-             pdf_printf("/%s ", pageDictKeys[i]);
-@@ -957,7 +955,7 @@ void write_epdf(void)
-     } 
- 
-     // handle page group
--    pageDict->lookupNF("Group", &dictObj);
-+    dictObj.iObject = pageDict->lookupNF("Group");
-     if (!dictObj->isNull()) {
-         if (pdfpagegroupval == 0) { 
-             // another pdf with page group was included earlier on the
-@@ -972,7 +970,7 @@ void write_epdf(void)
-             copyObject(&dictObj);
-         } else {
-             // write Group dict as a separate object, since the Page dict also refers to it
--            pageDict->lookup("Group", &dictObj);
-+            dictObj.iObject = pageDict->lookup("Group");
-             if (!dictObj->isDict())
-                 pdftex_fail("PDF inclusion: /Group dict missing");
-             writeSepGroup = true;
-@@ -996,7 +994,7 @@ void write_epdf(void)
-         pdf_newline();
-         pdf_puts("/Resources <<\n");
-         for (i = 0, l = obj1->dictGetLength(); i < l; ++i) {
--            obj1->dictGetVal(i, &obj2);
-+            obj2.iObject = obj1->dictGetVal(i);
-             key = obj1->dictGetKey(i);
-             if (strcmp("Font", key) == 0)
-                 copyFontResources(&obj2);
-@@ -1009,7 +1007,7 @@ void write_epdf(void)
-     }
- 
-     // write the page contents
--    page->getContents(&contents);
-+    contents.iObject = page->getContents();
-     if (contents->isStream()) {
- 
-         // Variant A: get stream and recompress under control
-@@ -1021,21 +1019,21 @@ void write_epdf(void)
- 
-         // Variant B: copy stream without recompressing
-         //
--        contents->streamGetDict()->lookup("F", &obj1);
-+        obj1.iObject = contents->streamGetDict()->lookup("F");
-         if (!obj1->isNull()) {
-             pdftex_fail("PDF inclusion: Unsupported external stream");
-         }
--        contents->streamGetDict()->lookup("Length", &obj1);
-+        obj1.iObject = contents->streamGetDict()->lookup("Length");
-         assert(!obj1->isNull());
-         pdf_puts("/Length ");
-         copyObject(&obj1);
-         pdf_puts("\n");
--        contents->streamGetDict()->lookup("Filter", &obj1);
-+        obj1.iObject = contents->streamGetDict()->lookup("Filter");
-         if (!obj1->isNull()) {
-             pdf_puts("/Filter ");
-             copyObject(&obj1);
-             pdf_puts("\n");
--            contents->streamGetDict()->lookup("DecodeParms", &obj1);
-+            obj1.iObject = contents->streamGetDict()->lookup("DecodeParms");
-             if (!obj1->isNull()) {
-                 pdf_puts("/DecodeParms ");
-                 copyObject(&obj1);
-@@ -1048,9 +1046,7 @@ void write_epdf(void)
-     } else if (contents->isArray()) {
-         pdfbeginstream();
-         for (i = 0, l = contents->arrayGetLength(); i < l; ++i) {
--            Object contentsobj;
--            copyStream((contents->arrayGet(i, &contentsobj))->getStream());
--            contentsobj.free();
-+            copyStream((contents->arrayGet(i)).getStream());
-             if (i < l - 1)
-                 pdf_newline();  // add a newline after each stream except the last
-         }
diff -r c4a4e058581c -r 42e4bf0e8021 print/web2c/patches/patch-pdftexdir_pdftosrc.cc
--- a/print/web2c/patches/patch-pdftexdir_pdftosrc.cc   Sat Sep 09 17:03:02 2017 +0000



Home | Main Index | Thread Index | Old Index