From aea999128a0ffb6ab26c935dc6d51c9ec7db7f3b Mon Sep 17 00:00:00 2001 From: Ray-V Date: Mon, 30 Apr 2018 12:49:54 +0100 Subject: [PATCH] Some Misc builds version updates Fixed tidy-html5 localization --- Apps/digikam/README | 1 + Apps/kile/README | 1 + Apps/knights/README | 1 + Core/tde-i18n/README | 1 + Deps/libart_lgpl/README | 1 + Misc/GraphicsMagick/GraphicsMagick.SlackBuild | 4 +- Misc/graphviz/README | 1 + ...cf03162cd2e46d962822d5507865f3451168c.diff | 1376 ----------------- Misc/inkscape/inkscape.SlackBuild | 11 +- Misc/lxml/README | 1 + Misc/lxml/lxml.SlackBuild | 2 +- Misc/moodbar/README | 4 + Misc/potrace/README | 2 +- Misc/potrace/potrace.SlackBuild | 10 +- Misc/speex/speex.SlackBuild | 12 +- Misc/tidy-html5/tidy-html5.SlackBuild | 31 +- Misc/xmedcon/xmedcon.SlackBuild | 4 +- 17 files changed, 49 insertions(+), 1414 deletions(-) delete mode 100644 Misc/inkscape/93ccf03162cd2e46d962822d5507865f3451168c.diff create mode 100644 Misc/moodbar/README diff --git a/Apps/digikam/README b/Apps/digikam/README index a8d526c..71fa7e6 100755 --- a/Apps/digikam/README +++ b/Apps/digikam/README @@ -7,3 +7,4 @@ Showfoto is an image editor. If Digikam is to be built with Kipi Plugins support, build and install kipi-plugins first. Added work-around for showfoto language support. + diff --git a/Apps/kile/README b/Apps/kile/README index 180f6b8..973cb9c 100755 --- a/Apps/kile/README +++ b/Apps/kile/README @@ -26,5 +26,6 @@ By default there are also tools for the following programs defined: - Lilypond (Music Typesetting) - Konqueror/Mozilla/Firefox (Viewing HTML) - Kbibtex, KBib, JabRef, pybliographer, gbib (View Bibtex files) + diff --git a/Apps/knights/README b/Apps/knights/README index cdcb624..16e59bf 100755 --- a/Apps/knights/README +++ b/Apps/knights/README @@ -4,3 +4,4 @@ Any involvement from a Spanish speaker to check and correct will be welcome. Kbabel is not necessary, it will display in a text editor just fine. Tested with gnuchess-6.2.2, stockfish-7-linux, and komodo-7, in UCI mode. + diff --git a/Core/tde-i18n/README b/Core/tde-i18n/README index 8d3e0bc..672552a 100755 --- a/Core/tde-i18n/README +++ b/Core/tde-i18n/README @@ -6,3 +6,4 @@ Any number of packages can be built - set by the I18N variable Language identification is shown in the '\Zb\Z3Select Additional Languages\Zn' screen README. + diff --git a/Deps/libart_lgpl/README b/Deps/libart_lgpl/README index 912a717..04730eb 100755 --- a/Deps/libart_lgpl/README +++ b/Deps/libart_lgpl/README @@ -7,3 +7,4 @@ libart-lgpl is another dependency package that the Trinity Project has taken ove This version of libart provided by the Trinity Project includes those patches and is intended to be a replacement for any version of libart currently installed by any distro. Build this patched version of libart and replace the stock libart installed with the distro. + diff --git a/Misc/GraphicsMagick/GraphicsMagick.SlackBuild b/Misc/GraphicsMagick/GraphicsMagick.SlackBuild index 85c2857..c2d7f64 100755 --- a/Misc/GraphicsMagick/GraphicsMagick.SlackBuild +++ b/Misc/GraphicsMagick/GraphicsMagick.SlackBuild @@ -24,11 +24,11 @@ # SUCH DAMAGE. PRGNAM=GraphicsMagick -VERSION=${VERSION:-1.3.25} +VERSION=${VERSION:-1.3.28} BUILD=${BUILD:-1} TAG=${TAG:-} -SRCURL="https://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/${VERSION}/GraphicsMagick-${VERSION}.tar.xz" +SRCURL="https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/$VERSION/GraphicsMagick-$VERSION.tar.xz" ARCHIVE_TYPE="tar.xz" source ../../get-source.sh getsource_fn diff --git a/Misc/graphviz/README b/Misc/graphviz/README index dc0e629..19129de 100644 --- a/Misc/graphviz/README +++ b/Misc/graphviz/README @@ -12,3 +12,4 @@ gts is an optional dependency. ------------------------------ pdf and html documentation is not built by default in the SB. To build it, comment out 'rmdoc' in the script [c. line 70]. + diff --git a/Misc/inkscape/93ccf03162cd2e46d962822d5507865f3451168c.diff b/Misc/inkscape/93ccf03162cd2e46d962822d5507865f3451168c.diff deleted file mode 100644 index 00dff87..0000000 --- a/Misc/inkscape/93ccf03162cd2e46d962822d5507865f3451168c.diff +++ /dev/null @@ -1,1376 +0,0 @@ -diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake -index 836cfd9..c33a3bf 100644 ---- a/CMakeScripts/DefineDependsandFlags.cmake -+++ b/CMakeScripts/DefineDependsandFlags.cmake -@@ -124,6 +124,10 @@ if(ENABLE_POPPLER) - POPPLER_VERSION VERSION_EQUAL "0.29.0") - set(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API ON) - endif() -+ if(POPPLER_VERSION VERSION_GREATER "0.58.0" OR -+ POPPLER_VERSION VERSION_EQUAL "0.58.0") -+ set(POPPLER_NEW_OBJECT_API ON) -+ endif() - else() - set(ENABLE_POPPLER_CAIRO OFF) - endif() -diff --git a/config.h.cmake b/config.h.cmake -index 00d6fb8..7af7da8 100644 ---- a/config.h.cmake -+++ b/config.h.cmake -@@ -149,6 +149,9 @@ - /* Use color space API from Poppler >= 0.29.0 */ - #cmakedefine POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API 1 - -+/* Use object API from Poppler >= 0.58.0 */ -+#cmakedefine POPPLER_NEW_OBJECT_API 1 -+ - /* Define to 1 if you have the `pow' function. */ - #cmakedefine HAVE_POW 1 - -diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp -index c1940b1..e311562 100644 ---- a/src/extension/internal/pdfinput/pdf-input.cpp -+++ b/src/extension/internal/pdfinput/pdf-input.cpp -@@ -840,14 +840,20 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { - } - - // Parse the document structure -+#if defined(POPPLER_NEW_OBJECT_API) -+ Object obj = page->getContents(); -+#else - Object obj; - page->getContents(&obj); -+#endif - if (!obj.isNull()) { - pdf_parser->parse(&obj); - } - - // Cleanup -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); -+#endif - delete pdf_parser; - delete builder; - g_free(docname); -diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp -index 5ede59b..604b7f8 100644 ---- a/src/extension/internal/pdfinput/pdf-parser.cpp -+++ b/src/extension/internal/pdfinput/pdf-parser.cpp -@@ -414,13 +414,21 @@ void PdfParser::parse(Object *obj, GBool topLevel) { - - if (obj->isArray()) { - for (int i = 0; i < obj->arrayGetLength(); ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj2 = obj->arrayGet(i); -+#else - obj->arrayGet(i, &obj2); -+#endif - if (!obj2.isStream()) { - error(errInternal, -1, "Weird page contents"); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - return; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - } - } else if (!obj->isStream()) { - error(errInternal, -1, "Weird page contents"); -@@ -439,7 +447,11 @@ void PdfParser::go(GBool /*topLevel*/) - - // scan a sequence of objects - int numArgs = 0; -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj = parser->getObj(); -+#else - parser->getObj(&obj); -+#endif - while (!obj.isEOF()) { - - // got a command - execute it -@@ -457,14 +469,20 @@ void PdfParser::go(GBool /*topLevel*/) - // Run the operation - execOp(&obj, args, numArgs); - -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); - for (int i = 0; i < numArgs; ++i) - args[i].free(); -+#endif - numArgs = 0; - - // got an argument - save it - } else if (numArgs < maxArgs) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ args[numArgs++] = std::move(obj); -+#else - args[numArgs++] = obj; -+#endif - - // too many arguments - something is wrong - } else { -@@ -475,13 +493,21 @@ void PdfParser::go(GBool /*topLevel*/) - printf("\n"); - fflush(stdout); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); -+#endif - } - - // grab the next object -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj = parser->getObj(); -+#else - parser->getObj(&obj); -+#endif - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); -+#endif - - // args at end with no command - if (numArgs > 0) { -@@ -495,8 +521,10 @@ void PdfParser::go(GBool /*topLevel*/) - printf("\n"); - fflush(stdout); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - for (int i = 0; i < numArgs; ++i) - args[i].free(); -+#endif - } - } - -@@ -692,9 +720,13 @@ void PdfParser::opSetDash(Object args[], int /*numArgs*/) - if (length != 0) { - dash = (double *)gmallocn(length, sizeof(double)); - for (int i = 0; i < length; ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ dash[i] = a->get(i).getNum(); -+#else - Object obj; - dash[i] = a->get(i, &obj)->getNum(); - obj.free(); -+#endif - } - } - state->setLineDash(dash, length, args[1].getNum()); -@@ -744,12 +776,18 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) - GBool haveBackdropColor = gFalse; - GBool alpha = gFalse; - -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj1 = res->lookupGState(args[0].getName())).isNull()) { -+#else - if (!res->lookupGState(args[0].getName(), &obj1)) { -+#endif - return; - } - if (!obj1.isDict()) { - error(errSyntaxError, getPos(), "ExtGState '{0:s}' is wrong type"), args[0].getName(); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - return; - } - if (printCommands) { -@@ -759,7 +797,11 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) - } - - // transparency support: blend mode, fill/stroke opacity -+#if defined(POPPLER_NEW_OBJECT_API) -+ if (!((obj2 = obj1.dictLookup(const_cast("BM"))).isNull())) { -+#else - if (!obj1.dictLookup(const_cast("BM"), &obj2)->isNull()) { -+#endif - GfxBlendMode mode = gfxBlendNormal; - if (state->parseBlendMode(&obj2, &mode)) { - state->setBlendMode(mode); -@@ -767,40 +809,71 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) - error(errSyntaxError, getPos(), "Invalid blend mode in ExtGState"); - } - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj2 = obj1.dictLookup(const_cast("ca"))).isNum()) { -+#else - obj2.free(); - if (obj1.dictLookup(const_cast("ca"), &obj2)->isNum()) { -+#endif - state->setFillOpacity(obj2.getNum()); - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj2 = obj1.dictLookup(const_cast("CA"))).isNum()) { -+#else - obj2.free(); - if (obj1.dictLookup(const_cast("CA"), &obj2)->isNum()) { -+#endif - state->setStrokeOpacity(obj2.getNum()); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - - // fill/stroke overprint - GBool haveFillOP = gFalse; -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((haveFillOP = (obj2 = obj1.dictLookup(const_cast("op"))).isBool())) { -+#else - if ((haveFillOP = (obj1.dictLookup(const_cast("op"), &obj2)->isBool()))) { -+#endif - state->setFillOverprint(obj2.getBool()); - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj2 = obj1.dictLookup(const_cast("OP"))).isBool()) { -+#else - obj2.free(); - if (obj1.dictLookup(const_cast("OP"), &obj2)->isBool()) { -+#endif - state->setStrokeOverprint(obj2.getBool()); - if (!haveFillOP) { - state->setFillOverprint(obj2.getBool()); - } - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - - // stroke adjust -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj2 = obj1.dictLookup(const_cast("SA"))).isBool()) { -+#else - if (obj1.dictLookup(const_cast("SA"), &obj2)->isBool()) { -+#endif - state->setStrokeAdjust(obj2.getBool()); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - - // transfer function -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj2 = obj1.dictLookup(const_cast("TR2"))).isNull()) { -+ obj2 = obj1.dictLookup(const_cast("TR")); -+#else - if (obj1.dictLookup(const_cast("TR2"), &obj2)->isNull()) { - obj2.free(); - obj1.dictLookup(const_cast("TR"), &obj2); -+#endif - } - if (obj2.isName(const_cast("Default")) || - obj2.isName(const_cast("Identity"))) { -@@ -809,9 +882,15 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) - } else if (obj2.isArray() && obj2.arrayGetLength() == 4) { - int pos = 4; - for (int i = 0; i < 4; ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj3 = obj2.arrayGet(i); -+#else - obj2.arrayGet(i, &obj3); -+#endif - funcs[i] = Function::parse(&obj3); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj3.free(); -+#endif - if (!funcs[i]) { - pos = i; - break; -@@ -828,21 +907,37 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) - } else if (!obj2.isNull()) { - error(errSyntaxError, getPos(), "Invalid transfer function in ExtGState"); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - - // soft mask -+#if defined(POPPLER_NEW_OBJECT_API) -+ if (!((obj2 = obj1.dictLookup(const_cast("SMask"))).isNull())) { -+#else - if (!obj1.dictLookup(const_cast("SMask"), &obj2)->isNull()) { -+#endif - if (obj2.isName(const_cast("None"))) { - builder->clearSoftMask(state); - } else if (obj2.isDict()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj3 = obj2.dictLookup(const_cast("S"))).isName(const_cast("Alpha"))) { -+#else - if (obj2.dictLookup(const_cast("S"), &obj3)->isName(const_cast("Alpha"))) { -+#endif - alpha = gTrue; - } else { // "Luminosity" - alpha = gFalse; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj3.free(); -+#endif - funcs[0] = NULL; -+#if defined(POPPLER_NEW_OBJECT_API) -+ if (!((obj3 = obj2.dictLookup(const_cast("TR"))).isNull())) { -+#else - if (!obj2.dictLookup(const_cast("TR"), &obj3)->isNull()) { -+#endif - funcs[0] = Function::parse(&obj3); - if (funcs[0]->getInputSize() != 1 || - funcs[0]->getOutputSize() != 1) { -@@ -851,26 +946,45 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) - funcs[0] = NULL; - } - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((haveBackdropColor = (obj3 = obj2.dictLookup(const_cast("BC"))).isArray())) { -+#else - obj3.free(); - if ((haveBackdropColor = obj2.dictLookup(const_cast("BC"), &obj3)->isArray())) { -+#endif - for (int i = 0; i < gfxColorMaxComps; ++i) { - backdropColor.c[i] = 0; - } - for (int i = 0; i < obj3.arrayGetLength() && i < gfxColorMaxComps; ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj4 = obj3.arrayGet(i); -+#else - obj3.arrayGet(i, &obj4); -+#endif - if (obj4.isNum()) { - backdropColor.c[i] = dblToCol(obj4.getNum()); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj4.free(); -+#endif - } - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj3 = obj2.dictLookup(const_cast("G"))).isStream()) { -+ if ((obj4 = obj3.streamGetDict()->lookup(const_cast("Group"))).isDict()) { -+#else - obj3.free(); - if (obj2.dictLookup(const_cast("G"), &obj3)->isStream()) { - if (obj3.streamGetDict()->lookup(const_cast("Group"), &obj4)->isDict()) { -+#endif - GfxColorSpace *blendingColorSpace = 0; - GBool isolated = gFalse; - GBool knockout = gFalse; -+#if defined(POPPLER_NEW_OBJECT_API) -+ if (!((obj5 = obj4.dictLookup(const_cast("CS"))).isNull())) { -+#else - if (!obj4.dictLookup(const_cast("CS"), &obj5)->isNull()) { -+#endif - #if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) - blendingColorSpace = GfxColorSpace::parse(NULL, &obj5, NULL, NULL); - #elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) -@@ -879,15 +993,25 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) - blendingColorSpace = GfxColorSpace::parse(&obj5, NULL); - #endif - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj5 = obj4.dictLookup(const_cast("I"))).isBool()) { -+#else - obj5.free(); - if (obj4.dictLookup(const_cast("I"), &obj5)->isBool()) { -+#endif - isolated = obj5.getBool(); - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj5 = obj4.dictLookup(const_cast("K"))).isBool()) { -+#else - obj5.free(); - if (obj4.dictLookup(const_cast("K"), &obj5)->isBool()) { -+#endif - knockout = obj5.getBool(); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj5.free(); -+#endif - if (!haveBackdropColor) { - if (blendingColorSpace) { - blendingColorSpace->getDefaultColor(&backdropColor); -@@ -906,18 +1030,24 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) - } else { - error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState - missing group"); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj4.free(); -+#endif - } else { - error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState - missing group"); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj3.free(); -+#endif - } else if (!obj2.isNull()) { - error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState"); - } - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); - - obj1.free(); -+#endif - } - - void PdfParser::doSoftMask(Object *str, GBool alpha, -@@ -938,43 +1068,79 @@ void PdfParser::doSoftMask(Object *str, GBool alpha, - dict = str->streamGetDict(); - - // check form type -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("FormType")); -+#else - dict->lookup(const_cast("FormType"), &obj1); -+#endif - if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) { - error(errSyntaxError, getPos(), "Unknown form type"); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - - // get bounding box -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("BBox")); -+#else - dict->lookup(const_cast("BBox"), &obj1); -+#endif - if (!obj1.isArray()) { -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - error(errSyntaxError, getPos(), "Bad form bounding box"); - return; - } - for (i = 0; i < 4; ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj2 = obj1.arrayGet(i); -+#else - obj1.arrayGet(i, &obj2); -+#endif - bbox[i] = obj2.getNum(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ } -+#else - obj2.free(); - } - obj1.free(); -+#endif - - // get matrix -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("Matrix")); -+#else - dict->lookup(const_cast("Matrix"), &obj1); -+#endif - if (obj1.isArray()) { - for (i = 0; i < 6; ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj2 = obj1.arrayGet(i); -+#else - obj1.arrayGet(i, &obj2); -+#endif - m[i] = obj2.getNum(); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - } - } else { - m[0] = 1; m[1] = 0; - m[2] = 0; m[3] = 1; - m[4] = 0; m[5] = 0; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - - // get resources -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("Resources")); -+#else - dict->lookup(const_cast("Resources"), &obj1); -+#endif - resDict = obj1.isDict() ? obj1.getDict() : (Dict *)NULL; - - // draw it -@@ -987,7 +1153,9 @@ void PdfParser::doSoftMask(Object *str, GBool alpha, - if (blendingColorSpace) { - delete blendingColorSpace; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - } - - void PdfParser::opSetRenderingIntent(Object /*args*/[], int /*numArgs*/) -@@ -1084,7 +1252,11 @@ void PdfParser::opSetFillColorSpace(Object args[], int /*numArgs*/) - Object obj; - - state->setFillPattern(NULL); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj = res->lookupColorSpace(args[0].getName()); -+#else - res->lookupColorSpace(args[0].getName(), &obj); -+#endif - - GfxColorSpace *colorSpace = 0; - #if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) -@@ -1106,7 +1278,9 @@ void PdfParser::opSetFillColorSpace(Object args[], int /*numArgs*/) - colorSpace = GfxColorSpace::parse(&obj, NULL); - } - #endif -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); -+#endif - if (colorSpace) { - GfxColor color; - state->setFillColorSpace(colorSpace); -@@ -1125,7 +1299,11 @@ void PdfParser::opSetStrokeColorSpace(Object args[], int /*numArgs*/) - GfxColorSpace *colorSpace = 0; - - state->setStrokePattern(NULL); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj = res->lookupColorSpace(args[0].getName()); -+#else - res->lookupColorSpace(args[0].getName(), &obj); -+#endif - #if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) - if (obj.isNull()) { - colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL); -@@ -1145,7 +1323,9 @@ void PdfParser::opSetStrokeColorSpace(Object args[], int /*numArgs*/) - colorSpace = GfxColorSpace::parse(&obj, NULL); - } - #endif -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); -+#endif - if (colorSpace) { - GfxColor color; - state->setStrokeColorSpace(colorSpace); -@@ -2375,7 +2555,11 @@ void PdfParser::opShowSpaceText(Object args[], int /*numArgs*/) - wMode = state->getFont()->getWMode(); - a = args[0].getArray(); - for (int i = 0; i < a->getLength(); ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj = a->get(i); -+#else - a->get(i, &obj); -+#endif - if (obj.isNum()) { - // this uses the absolute value of the font size to match - // Acrobat's behavior -@@ -2392,7 +2576,9 @@ void PdfParser::opShowSpaceText(Object args[], int /*numArgs*/) - } else { - error(errSyntaxError, getPos(), "Element of show/space array must be number or string"); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); -+#endif - } - } - -@@ -2465,7 +2651,11 @@ void PdfParser::doShowText(GooString *s) { - //out->updateCTM(state, 1, 0, 0, 1, 0, 0); - if (0){ /*!out->beginType3Char(state, curX + riseX, curY + riseY, tdx, tdy, - code, u, uLen)) {*/ -+#if defined(POPPLER_NEW_OBJECT_API) -+ charProc = ((Gfx8BitFont *)font)->getCharProc(code); -+#else - ((Gfx8BitFont *)font)->getCharProc(code, &charProc); -+#endif - if ((resDict = ((Gfx8BitFont *)font)->getResources())) { - pushResources(resDict); - } -@@ -2478,7 +2668,9 @@ void PdfParser::doShowText(GooString *s) { - if (resDict) { - popResources(); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - charProc.free(); -+#endif - } - restoreState(); - // GfxState::restore() does *not* restore the current position, -@@ -2541,23 +2733,43 @@ void PdfParser::opXObject(Object args[], int /*numArgs*/) - Object obj1, obj2, obj3, refObj; - - char *name = args[0].getName(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj1 = res->lookupXObject(name)).isNull()) { -+#else - if (!res->lookupXObject(name, &obj1)) { -+#endif - return; - } - if (!obj1.isStream()) { - error(errSyntaxError, getPos(), "XObject '{0:s}' is wrong type", name); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - return; - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj2 = obj1.streamGetDict()->lookup(const_cast("Subtype")); -+#else - obj1.streamGetDict()->lookup(const_cast("Subtype"), &obj2); -+#endif - if (obj2.isName(const_cast("Image"))) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ refObj = res->lookupXObjectNF(name); -+#else - res->lookupXObjectNF(name, &refObj); -+#endif - doImage(&refObj, obj1.getStream(), gFalse); -+#if !defined(POPPLER_NEW_OBJECT_API) - refObj.free(); -+#endif - } else if (obj2.isName(const_cast("Form"))) { - doForm(&obj1); - } else if (obj2.isName(const_cast("PS"))) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj3 = obj1.streamGetDict()->lookup(const_cast("Level1")); -+#else - obj1.streamGetDict()->lookup(const_cast("Level1"), &obj3); -+#endif - /* out->psXObject(obj1.getStream(), - obj3.isStream() ? obj3.getStream() : (Stream *)NULL);*/ - } else if (obj2.isName()) { -@@ -2565,8 +2777,10 @@ void PdfParser::opXObject(Object args[], int /*numArgs*/) - } else { - error(errSyntaxError, getPos(), "XObject subtype is missing or wrong type"); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); - obj1.free(); -+#endif - } - - void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) -@@ -2593,10 +2807,18 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - dict = str->getDict(); - - // get size -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("Width")); -+#else - dict->lookup(const_cast("Width"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("W")); -+#else - obj1.free(); - dict->lookup(const_cast("W"), &obj1); -+#endif - } - if (obj1.isInt()){ - width = obj1.getInt(); -@@ -2607,11 +2829,19 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - else { - goto err2; - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("Height")); -+#else - obj1.free(); - dict->lookup(const_cast("Height"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("H")); -+#else - obj1.free(); - dict->lookup(const_cast("H"), &obj1); -+#endif - } - if (obj1.isInt()) { - height = obj1.getInt(); -@@ -2622,26 +2852,46 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - else { - goto err2; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - - // image interpolation -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup("Interpolate"); -+#else - dict->lookup("Interpolate", &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup("I"); -+#else - obj1.free(); - dict->lookup("I", &obj1); -+#endif - } - if (obj1.isBool()) - interpolate = obj1.getBool(); - else - interpolate = gFalse; -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - maskInterpolate = gFalse; - - // image or mask? -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("ImageMask")); -+#else - dict->lookup(const_cast("ImageMask"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("IM")); -+#else - obj1.free(); - dict->lookup(const_cast("IM"), &obj1); -+#endif - } - mask = gFalse; - if (obj1.isBool()) { -@@ -2650,14 +2900,24 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - else if (!obj1.isNull()) { - goto err2; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - - // bit depth - if (bits == 0) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("BitsPerComponent")); -+#else - dict->lookup(const_cast("BitsPerComponent"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("BPC")); -+#else - obj1.free(); - dict->lookup(const_cast("BPC"), &obj1); -+#endif - } - if (obj1.isInt()) { - bits = obj1.getInt(); -@@ -2666,7 +2926,9 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - } else { - goto err2; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - } - - // display a mask -@@ -2676,21 +2938,37 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - goto err1; - } - invert = gFalse; -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("Decode")); -+#else - dict->lookup(const_cast("Decode"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("D")); -+#else - obj1.free(); - dict->lookup(const_cast("D"), &obj1); -+#endif - } - if (obj1.isArray()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj2 = obj1.arrayGet(0); -+#else - obj1.arrayGet(0, &obj2); -+#endif - if (obj2.isInt() && obj2.getInt() == 1) { - invert = gTrue; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - } else if (!obj1.isNull()) { - goto err2; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - - // draw it - builder->addImageMask(state, str, width, height, invert, interpolate); -@@ -2698,18 +2976,36 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - } else { - // get color space and color map - GfxColorSpace *colorSpace; -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("ColorSpace")); -+#else - dict->lookup(const_cast("ColorSpace"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("CS")); -+#else - obj1.free(); - dict->lookup(const_cast("CS"), &obj1); -+#endif - } - if (obj1.isName()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj2 = res->lookupColorSpace(obj1.getName()); -+#else - res->lookupColorSpace(obj1.getName(), &obj2); -+#endif - if (!obj2.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = std::move(obj2); -+#else - obj1.free(); - obj1 = obj2; -+#endif - } else { -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - } - } - if (!obj1.isNull()) { -@@ -2729,17 +3025,29 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - } else { - colorSpace = NULL; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - if (!colorSpace) { - goto err1; - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("Decode")); -+#else - dict->lookup(const_cast("Decode"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("D")); -+#else - obj1.free(); - dict->lookup(const_cast("D"), &obj1); -+#endif - } - GfxImageColorMap *colorMap = new GfxImageColorMap(bits, &obj1, colorSpace); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - if (!colorMap->isOk()) { - delete colorMap; - goto err1; -@@ -2753,8 +3061,13 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - int maskHeight = 0; - maskInvert = gFalse; - GfxImageColorMap *maskColorMap = NULL; -+#if defined(POPPLER_NEW_OBJECT_API) -+ maskObj = dict->lookup(const_cast("Mask")); -+ smaskObj = dict->lookup(const_cast("SMask")); -+#else - dict->lookup(const_cast("Mask"), &maskObj); - dict->lookup(const_cast("SMask"), &smaskObj); -+#endif - Dict* maskDict; - if (smaskObj.isStream()) { - // soft mask -@@ -2763,58 +3076,108 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - } - maskStr = smaskObj.getStream(); - maskDict = smaskObj.streamGetDict(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("Width")); -+#else - maskDict->lookup(const_cast("Width"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("W")); -+#else - obj1.free(); - maskDict->lookup(const_cast("W"), &obj1); -+#endif - } - if (!obj1.isInt()) { - goto err2; - } - maskWidth = obj1.getInt(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("Height")); -+#else - obj1.free(); - maskDict->lookup(const_cast("Height"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("H")); -+#else - obj1.free(); - maskDict->lookup(const_cast("H"), &obj1); -+#endif - } - if (!obj1.isInt()) { - goto err2; - } - maskHeight = obj1.getInt(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("BitsPerComponent")); -+#else - obj1.free(); - maskDict->lookup(const_cast("BitsPerComponent"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("BPC")); -+#else - obj1.free(); - maskDict->lookup(const_cast("BPC"), &obj1); -+#endif - } - if (!obj1.isInt()) { - goto err2; - } - int maskBits = obj1.getInt(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("Interpolate")); -+#else - obj1.free(); - maskDict->lookup("Interpolate", &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("I")); -+#else - obj1.free(); - maskDict->lookup("I", &obj1); -+#endif - } - if (obj1.isBool()) - maskInterpolate = obj1.getBool(); - else - maskInterpolate = gFalse; -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("ColorSpace")); -+#else - obj1.free(); - maskDict->lookup(const_cast("ColorSpace"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("CS")); -+#else - obj1.free(); - maskDict->lookup(const_cast("CS"), &obj1); -+#endif - } - if (obj1.isName()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj2 = res->lookupColorSpace(obj1.getName()); -+#else - res->lookupColorSpace(obj1.getName(), &obj2); -+#endif - if (!obj2.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = std::move(obj2); -+#else - obj1.free(); - obj1 = obj2; -+#endif - } else { -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - } - } - #if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) -@@ -2824,17 +3187,29 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - #else - GfxColorSpace *maskColorSpace = GfxColorSpace::parse(&obj1, NULL); - #endif -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - if (!maskColorSpace || maskColorSpace->getMode() != csDeviceGray) { - goto err1; - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("Decode")); -+#else - maskDict->lookup(const_cast("Decode"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("D")); -+#else - obj1.free(); - maskDict->lookup(const_cast("D"), &obj1); -+#endif - } - maskColorMap = new GfxImageColorMap(maskBits, &obj1, maskColorSpace); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - if (!maskColorMap->isOk()) { - delete maskColorMap; - goto err1; -@@ -2845,9 +3220,15 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - // color key mask - int i; - for (i = 0; i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps; ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskObj.arrayGet(i); -+#else - maskObj.arrayGet(i, &obj1); -+#endif - maskColors[i] = obj1.getInt(); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - } - haveColorKeyMask = gTrue; - } else if (maskObj.isStream()) { -@@ -2857,61 +3238,111 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - } - maskStr = maskObj.getStream(); - maskDict = maskObj.streamGetDict(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("Width")); -+#else - maskDict->lookup(const_cast("Width"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("W")); -+#else - obj1.free(); - maskDict->lookup(const_cast("W"), &obj1); -+#endif - } - if (!obj1.isInt()) { - goto err2; - } - maskWidth = obj1.getInt(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("Height")); -+#else - obj1.free(); - maskDict->lookup(const_cast("Height"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("H")); -+#else - obj1.free(); - maskDict->lookup(const_cast("H"), &obj1); -+#endif - } - if (!obj1.isInt()) { - goto err2; - } - maskHeight = obj1.getInt(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("ImageMask")); -+#else - obj1.free(); - maskDict->lookup(const_cast("ImageMask"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("IM")); -+#else - obj1.free(); - maskDict->lookup(const_cast("IM"), &obj1); -+#endif - } - if (!obj1.isBool() || !obj1.getBool()) { - goto err2; - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup("Interpolate"); -+#else - obj1.free(); - maskDict->lookup("Interpolate", &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup("I"); -+#else - obj1.free(); - maskDict->lookup("I", &obj1); -+#endif - } - if (obj1.isBool()) - maskInterpolate = obj1.getBool(); - else - maskInterpolate = gFalse; -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - maskInvert = gFalse; -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("Decode")); -+#else - maskDict->lookup(const_cast("Decode"), &obj1); -+#endif - if (obj1.isNull()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = maskDict->lookup(const_cast("D")); -+#else - obj1.free(); - maskDict->lookup(const_cast("D"), &obj1); -+#endif - } - if (obj1.isArray()) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj2 = obj1.arrayGet(0); -+#else - obj1.arrayGet(0, &obj2); -+#endif - if (obj2.isInt() && obj2.getInt() == 1) { - maskInvert = gTrue; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj2.free(); -+#endif - } else if (!obj1.isNull()) { - goto err2; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - haveExplicitMask = gTrue; - } - -@@ -2929,14 +3360,18 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) - } - delete colorMap; - -+#if !defined(POPPLER_NEW_OBJECT_API) - maskObj.free(); - smaskObj.free(); -+#endif - } - - return; - - err2: -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - err1: - error(errSyntaxError, getPos(), "Bad image parameters"); - } -@@ -2961,52 +3396,97 @@ void PdfParser::doForm(Object *str) { - dict = str->streamGetDict(); - - // check form type -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = dict->lookup(const_cast("FormType")); -+#else - dict->lookup(const_cast("FormType"), &obj1); -+#endif - if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) { - error(errSyntaxError, getPos(), "Unknown form type"); - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - - // get bounding box -+#if defined(POPPLER_NEW_OBJECT_API) -+ bboxObj = dict->lookup(const_cast("BBox")); -+#else - dict->lookup(const_cast("BBox"), &bboxObj); -+#endif - if (!bboxObj.isArray()) { -+#if !defined(POPPLER_NEW_OBJECT_API) - bboxObj.free(); -+#endif - error(errSyntaxError, getPos(), "Bad form bounding box"); - return; - } - for (i = 0; i < 4; ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = bboxObj.arrayGet(i); -+#else - bboxObj.arrayGet(i, &obj1); -+#endif - bbox[i] = obj1.getNum(); -+#if defined(POPPLER_NEW_OBJECT_API) -+ } -+#else - obj1.free(); - } - bboxObj.free(); -+#endif - - // get matrix -+#if defined(POPPLER_NEW_OBJECT_API) -+ matrixObj = dict->lookup(const_cast("Matrix")); -+#else - dict->lookup(const_cast("Matrix"), &matrixObj); -+#endif - if (matrixObj.isArray()) { - for (i = 0; i < 6; ++i) { -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj1 = matrixObj.arrayGet(i); -+#else - matrixObj.arrayGet(i, &obj1); -+#endif - m[i] = obj1.getNum(); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj1.free(); -+#endif - } - } else { - m[0] = 1; m[1] = 0; - m[2] = 0; m[3] = 1; - m[4] = 0; m[5] = 0; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - matrixObj.free(); -+#endif - - // get resources -+#if defined(POPPLER_NEW_OBJECT_API) -+ resObj = dict->lookup(const_cast("Resources")); -+#else - dict->lookup(const_cast("Resources"), &resObj); -+#endif - resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL; - - // check for a transparency group - transpGroup = isolated = knockout = gFalse; - blendingColorSpace = NULL; -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj1 = dict->lookup(const_cast("Group"))).isDict()) { -+ if ((obj2 = obj1.dictLookup(const_cast("S"))).isName(const_cast("Transparency"))) { -+#else - if (dict->lookup(const_cast("Group"), &obj1)->isDict()) { - if (obj1.dictLookup(const_cast("S"), &obj2)->isName(const_cast("Transparency"))) { -+#endif - transpGroup = gTrue; -+#if defined(POPPLER_NEW_OBJECT_API) -+ if (!((obj3 = obj1.dictLookup(const_cast("CS"))).isNull())) { -+#else - if (!obj1.dictLookup(const_cast("CS"), &obj3)->isNull()) { -+#endif - #if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) - blendingColorSpace = GfxColorSpace::parse(NULL, &obj3, NULL, NULL); - #elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) -@@ -3015,19 +3495,32 @@ void PdfParser::doForm(Object *str) { - blendingColorSpace = GfxColorSpace::parse(&obj3, NULL); - #endif - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj3 = obj1.dictLookup(const_cast("I"))).isBool()) { -+#else - obj3.free(); - if (obj1.dictLookup(const_cast("I"), &obj3)->isBool()) { -+#endif - isolated = obj3.getBool(); - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ if ((obj3 = obj1.dictLookup(const_cast("K"))).isBool()) { -+#else - obj3.free(); - if (obj1.dictLookup(const_cast("K"), &obj3)->isBool()) { -+#endif - knockout = obj3.getBool(); - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ } -+ } -+#else - obj3.free(); - } - obj2.free(); - } - obj1.free(); -+#endif - - // draw it - ++formDepth; -@@ -3038,7 +3531,9 @@ void PdfParser::doForm(Object *str) { - if (blendingColorSpace) { - delete blendingColorSpace; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - resObj.free(); -+#endif - } - - void PdfParser::doForm1(Object *str, Dict *resDict, double *matrix, double *bbox, -@@ -3166,35 +3661,61 @@ Stream *PdfParser::buildImageStream() { - Stream *str; - - // build dictionary -+#if defined(POPPLER_NEW_OBJECT_API) -+ dict = Object(new Dict(xref)); -+ obj = parser->getObj(); -+#else - dict.initDict(xref); - parser->getObj(&obj); -+#endif - while (!obj.isCmd(const_cast("ID")) && !obj.isEOF()) { - if (!obj.isName()) { - error(errSyntaxError, getPos(), "Inline image dictionary key must be a name object"); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); -+#endif - } else { - key = copyString(obj.getName()); -+#if defined(POPPLER_NEW_OBJECT_API) -+ obj = parser->getObj(); -+#else - obj.free(); - parser->getObj(&obj); -+#endif - if (obj.isEOF() || obj.isError()) { - gfree(key); - break; - } -+#if defined(POPPLER_NEW_OBJECT_API) -+ dict.dictAdd(key, std::move(obj)); -+ } -+ obj = parser->getObj(); -+#else - dict.dictAdd(key, &obj); - } - parser->getObj(&obj); -+#endif - } - if (obj.isEOF()) { - error(errSyntaxError, getPos(), "End of file in inline image"); -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); - dict.free(); -+#endif - return NULL; - } -+#if !defined(POPPLER_NEW_OBJECT_API) - obj.free(); -+#endif - - // make stream -+#if defined(POPPLER_NEW_OBJECT_API) -+ str = new EmbedStream(parser->getStream(), dict.copy(), gFalse, 0); -+ str = str->addFilters(dict.getDict()); -+#else - str = new EmbedStream(parser->getStream(), &dict, gFalse, 0); - str = str->addFilters(&dict); -+#endif - - return str; - } diff --git a/Misc/inkscape/inkscape.SlackBuild b/Misc/inkscape/inkscape.SlackBuild index c8457c1..07cb44d 100755 --- a/Misc/inkscape/inkscape.SlackBuild +++ b/Misc/inkscape/inkscape.SlackBuild @@ -24,18 +24,15 @@ # SUCH DAMAGE. PRGNAM=inkscape -VERSION=${VERSION:-0.92.2} +VERSION=${VERSION:-0.92.3} BUILD=${BUILD:-1} -SRCURL="https://media.inkscape.org/dl/resources/file/$PRGNAM-$VERSION.tar.bz2" +SRCURL="https://media.inkscape.org/dl/resources/file/inkscape-$VERSION.tar.bz2" source ../../get-source.sh getsource_fn untar_fn -## patch for poppler-0.58+ -patch -p1 < $SRCDIR/93ccf03162cd2e46d962822d5507865f3451168c.diff - ## install to .../lib64 on 64-bit system [[ -d /lib64 ]] && \ { ## set RPATH @@ -118,8 +115,8 @@ cd_builddir_fn -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ - -DCMAKE_C_COMPILER=${COMPILER} \ - -DCMAKE_CXX_COMPILER=${COMPILER_CXX} \ + -DCMAKE_C_COMPILER=$COMPILER \ + -DCMAKE_CXX_COMPILER=$COMPILER_CXX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DWITH_NLS="ON" \ diff --git a/Misc/lxml/README b/Misc/lxml/README index c52fc43..5669463 100755 --- a/Misc/lxml/README +++ b/Misc/lxml/README @@ -6,3 +6,4 @@ Required for online help functions for Inkscape. Cython, python3 and pysetuptools are optional build dependencies. cssselect and html5lib are optional runtime dependencies. + diff --git a/Misc/lxml/lxml.SlackBuild b/Misc/lxml/lxml.SlackBuild index 78134b1..c027dbb 100755 --- a/Misc/lxml/lxml.SlackBuild +++ b/Misc/lxml/lxml.SlackBuild @@ -28,7 +28,7 @@ # All rights reserved. PRGNAM=lxml -VERSION=${VERSION:-3.5.0} +VERSION=${VERSION:-4.2.1} BUILD=${BUILD:-1} TAG=${TAG:-} diff --git a/Misc/moodbar/README b/Misc/moodbar/README new file mode 100644 index 0000000..68d33c3 --- /dev/null +++ b/Misc/moodbar/README @@ -0,0 +1,4 @@ +For set up and usage - + +https://userbase.kde.org/Amarok/Manual/Various/Moodbar + diff --git a/Misc/potrace/README b/Misc/potrace/README index eb7db04..6825251 100755 --- a/Misc/potrace/README +++ b/Misc/potrace/README @@ -1,4 +1,3 @@ - POTRACE - transform bitmaps into vector graphics Potrace is a tool for tracing a bitmap, which means transforming a @@ -20,3 +19,4 @@ as a pre-processor for Potrace, applying scaling and various filters to an image before converting it to a bitmap. This is useful for potracing greyscale and color images. + diff --git a/Misc/potrace/potrace.SlackBuild b/Misc/potrace/potrace.SlackBuild index dd87ed9..80e510a 100755 --- a/Misc/potrace/potrace.SlackBuild +++ b/Misc/potrace/potrace.SlackBuild @@ -24,11 +24,11 @@ # SUCH DAMAGE. PRGNAM=potrace -VERSION=${VERSION:-1.13} +VERSION=${VERSION:-1.15} BUILD=${BUILD:-1} TAG=${TAG:-} -SRCURL="http://$PRGNAM.sourceforge.net/download/$VERSION/$PRGNAM-$VERSION.tar.gz" +SRCURL="https://sourceforge.net/projects/potrace/files/$VERSION/potrace-$VERSION.tar.gz" ARCHIVE_TYPE="tar.gz" source ../../get-source.sh getsource_fn @@ -43,11 +43,11 @@ cd_builddir_fn LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -CC=${COMPILER} \ -CXX=${COMPILER_CXX} \ +CC=$COMPILER \ +CXX=$COMPILER_CXX \ ../configure \ --prefix=/usr/local \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ + --libdir=/usr/lib$LIBDIRSUFFIX \ --with-libpotrace \ --mandir=/usr/man \ diff --git a/Misc/speex/speex.SlackBuild b/Misc/speex/speex.SlackBuild index cb67790..8f32a89 100755 --- a/Misc/speex/speex.SlackBuild +++ b/Misc/speex/speex.SlackBuild @@ -30,11 +30,11 @@ # All rights reserved. PRGNAM=speex -VERSION=${VERSION:-1.2rc2} +VERSION=${VERSION:-1.2.0} BUILD=${BUILD:-1} TAG=${TAG:-} -SRCURL="http://downloads.xiph.org/releases/${PRGNAM}/${PRGNAM}-${VERSION}.tar.gz" +SRCURL="https://ftp.osuosl.org/pub/xiph/releases/speex/speex-$VERSION.tar.gz" ARCHIVE_TYPE="tar.gz" source ../../get-source.sh getsource_fn @@ -53,11 +53,11 @@ cd_builddir_fn LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -CC=${COMPILER} \ -CXX=${COMPILER_CXX} \ +CC=$COMPILER \ +CXX=$COMPILER_CXX \ ../configure \ --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ + --libdir=/usr/lib$LIBDIRSUFFIX \ --mandir=/usr/man \ --enable-static=no \ --enable-binaries \ @@ -70,7 +70,7 @@ installdocs_fn mangzip_fn # Fix libspeex.la Thanks SBo script: -sed -i "s|-L$PKG.*/lib${LIBDIRSUFFIX} ||" $PKG/usr/lib${LIBDIRSUFFIX}/libspeex.la +sed -i "s|-L$PKG.*/lib$LIBDIRSUFFIX ||" $PKG/usr/lib$LIBDIRSUFFIX/libspeex.la strip_fn diff --git a/Misc/tidy-html5/tidy-html5.SlackBuild b/Misc/tidy-html5/tidy-html5.SlackBuild index 8c99313..cbcc33b 100755 --- a/Misc/tidy-html5/tidy-html5.SlackBuild +++ b/Misc/tidy-html5/tidy-html5.SlackBuild @@ -38,35 +38,38 @@ source ../../get-source.sh getsource_fn cd $TMP/tmp-$PRGNAM -unzip ${SOURCE} +unzip $SOURCE -cd ${PRGNAM}-${VERSION} +cd $PRGNAM-$VERSION VERSION=$(head -n 1 version.txt) listdocs_fn -# don't build in other locales if tidy doesn't support those set as additional languages +# Include tidy support only for additional languages set by I18N +## Set SUPPORT_LOCALIZATIONS default option to OFF +sed -i 's|languages." ON|languages." OFF|' CMakeLists.txt I18N=$(echo $I18N | tr '[:upper:]' '[:lower:]') for lang in $I18N do -[[ $(ls -1 src/language_*.h|grep _$lang) != "" ]] && LOCALize="ON" && langs="$lang ${langs:-}" +[[ $(ls -1 src/language_*.h|grep _$lang) != "" ]] && { +langs="${langs:-}$lang " +sed -i "s|\"locale.h\"|&\n#include \"language_$lang.h\"|" src/language.c +sed -i "s| \&language_en,|& \&language_$lang,|" src/language.c +} done -[[ ${langs:-} != "" ]] && langs=$langs" + other locales" - cd build/cmake cmake ../.. \ --DCMAKE_C_COMPILER=${COMPILER} \ --DCMAKE_CXX_COMPILER=${COMPILER_CXX} \ +-DCMAKE_C_COMPILER=$COMPILER \ +-DCMAKE_CXX_COMPILER=$COMPILER_CXX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ --DLIB_SUFFIX=${LIBDIRSUFFIX:-} \ +-DLIB_SUFFIX=$LIBDIRSUFFIX \ -DBUILD_SHARED_LIB="ON" \ -DTIDY_CONSOLE_SHARED="ON" \ -DBUILD_TAB2SPACE="ON" \ --DBUILD_SAMPLE_CODE="OFF" \ --DSUPPORT_LOCALIZATIONS=${LOCALize:-"OFF"} +-DBUILD_SAMPLE_CODE="OFF" chown_fn @@ -88,16 +91,16 @@ echo " # exactly 11 lines for the formatting to be correct. It's also customary to # leave one space after the ':'. |-----handy-ruler------------------------------------------------------| -$PRGNAM: $PRGNAM (corrects and cleans up HTML and XML documents) -$PRGNAM: $PRGNAM: Tidy corrects and cleans up HTML and XML documents by fixing markup $PRGNAM: errors and upgrading legacy code to modern standards. $PRGNAM: Optional with Quanta+ $PRGNAM: $PRGNAM: http://www.html-tidy.org $PRGNAM: +$PRGNAM: +$PRGNAM: $PRGNAM: For languages: -$PRGNAM: en $(echo ${langs:-}) +$PRGNAM: en ${langs:-} $PRGNAM: $PRGNAM: " > $PKG/install/slack-desc diff --git a/Misc/xmedcon/xmedcon.SlackBuild b/Misc/xmedcon/xmedcon.SlackBuild index 6fcf66a..821a131 100755 --- a/Misc/xmedcon/xmedcon.SlackBuild +++ b/Misc/xmedcon/xmedcon.SlackBuild @@ -25,11 +25,11 @@ # # PRGNAM=xmedcon -VERSION=${VERSION:-0.14.1} +VERSION=${VERSION:-0.15.0} BUILD=${BUILD:-1} TAG=${TAG:-_tde} -SRCURL="https://sourceforge.net/projects/xmedcon/files/XMedCon-Source/$VERSION/$PRGNAM-$VERSION.tar.bz2/download" +SRCURL="https://downloads.sourceforge.net/project/xmedcon/XMedCon-Source/$VERSION/xmedcon-$VERSION.tar.bz2" source ../../get-source.sh getsource_fn