diff --git a/Apps/tdeamarok/tdeamarok.SlackBuild b/Apps/tdeamarok/tdeamarok.SlackBuild index 3932f19..0f06dfb 100755 --- a/Apps/tdeamarok/tdeamarok.SlackBuild +++ b/Apps/tdeamarok/tdeamarok.SlackBuild @@ -112,7 +112,7 @@ Error: Workaround: Point the build to the exact location .. Comment -[[ $YAUAP == ON ]] && sed -i "s|-ldbus-tqt-1|$INSTALL_TDE/lib/libdbus-tqt-1.so.0.0.0|" amarok/src/engine/yauap/CMakeFiles/libamarok_yauap-engine_plugin-module.dir/link.txt +[[ ${YAUAP:-} == ON ]] && sed -i "s|-ldbus-tqt-1|$INSTALL_TDE/lib$LIBDIRSUFFIX/libdbus-tqt-1.so.0.0.0|" amarok/src/engine/yauap/CMakeFiles/libamarok_yauap-engine_plugin-module.dir/link.txt make_fn diff --git a/BUILD-TDE.sh b/BUILD-TDE.sh index 971c5fd..a7dcd56 100755 --- a/BUILD-TDE.sh +++ b/BUILD-TDE.sh @@ -518,10 +518,10 @@ export PREPEND=$(cat $TMPVARS/PREPEND) # See which compiler was selected and use the appropriate C++ compiler [[ $(cat $TMPVARS/COMPILER) == gcc ]] && export COMPILER_CXX="g++" || export COMPILER_CXX="clang++" -LIBDIRSUFFIX="" + # Is this a 64 bit system? # 'uname -m' won't identify a 32 bit system with a 64 bit kernel -[[ -d /lib64 ]] && LIBDIRSUFFIX="64" +[[ ! -d /lib64 ]] && LIBDIRSUFFIX="" || LIBDIRSUFFIX="64" TQTDIR=$INSTALL_TDE/lib$LIBDIRSUFFIX/tqt3 @@ -541,6 +541,8 @@ export CPLUS_INCLUDE_PATH export PKG_CONFIG_PATH export PATH export TQT_INCLUDE_PATH +## to provide an ARCH suffix for the package name - see makepkg_fn in get-source.sh +export ARM_FABI=$(readelf -Ah $(which bash)|grep -oE "soft|hard") ### set up variables for the summary list: ## New build diff --git a/Misc/inkscape/93ccf03162cd2e46d962822d5507865f3451168c.diff b/Misc/inkscape/93ccf03162cd2e46d962822d5507865f3451168c.diff new file mode 100644 index 0000000..00dff87 --- /dev/null +++ b/Misc/inkscape/93ccf03162cd2e46d962822d5507865f3451168c.diff @@ -0,0 +1,1376 @@ +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 ac7a866..c8457c1 100755 --- a/Misc/inkscape/inkscape.SlackBuild +++ b/Misc/inkscape/inkscape.SlackBuild @@ -24,201 +24,137 @@ # SUCH DAMAGE. PRGNAM=inkscape -VERSION=${VERSION:-0.91} +VERSION=${VERSION:-0.92.2} BUILD=${BUILD:-1} -TAG=${TAG:-} SRCURL="https://media.inkscape.org/dl/resources/file/$PRGNAM-$VERSION.tar.bz2" source ../../get-source.sh getsource_fn untar_fn -langs="" -# don't package non-english man pages in man/man.1 - add them during make install for required languages -sed -i -e '556,559d' -e '550,554d' -e '533,537d' Makefile.in -if [[ $I18N == "" ]] -then -# no locales -NLS="--disable-nls" -else -# set support for additional language(s) as per I18N variable -# but only for languages available with this package -for Lang in $I18N;do [[ -e po/$Lang".po" ]] && langs="$langs $Lang";done -sed -i "s|PO_LINGUAS=.*$|PO_LINGUAS=$langs|" po/Makefile.in.in -fi -chown_fn +## patch for poppler-0.58+ +patch -p1 < $SRCDIR/93ccf03162cd2e46d962822d5507865f3451168c.diff + +## install to .../lib64 on 64-bit system +[[ -d /lib64 ]] && \ +{ ## set RPATH +sed -i "s|ORIGIN/../lib/inkscape|ORIGIN/../lib$LIBDIRSUFFIX/inkscape|" CMakeLists.txt +## set output directory +sed -i "s|/lib |/lib$LIBDIRSUFFIX |" CMakeLists.txt +## for dynamic lib +sed -i "s|lib/inkscape|lib$LIBDIRSUFFIX/inkscape|" src/CMakeLists.txt +## for static libs +sed -i "s|lib/inkscape|lib$LIBDIRSUFFIX/inkscape|" CMakeScripts/HelperMacros.cmake +} + +## only build for required locales +{ +## .. for po/LINGUAS +LOCALES=$(cat po/LINGUAS) +rm po/LINGUAS +for locale in $I18N + do + [[ $LOCALES == *$locale* ]] && \ + echo $locale >> po/LINGUAS + done + +## set up a directory to store the required locale files temporarily +TEMP_DIR=$TMP/tmp-$PRGNAM/loc_tmp +mkdir $TEMP_DIR + +## .. for READMEs +for locale in $I18N + do + mv README.$locale.txt $TEMP_DIR + done +rm README.*.txt +mv $TEMP_DIR/* . +RM_LIST=$(ls -1 README*) + +## .. for keys.*.html +for locale in $I18N + do + mv doc/keys.$locale.html $TEMP_DIR + done +rm doc/keys.*.html +mv $TEMP_DIR/* doc/ +KEYS_LIST=$(ls -1 doc/keys.*) + +## .. for translations +for locale in $I18N + do + mv po/$locale.po $TEMP_DIR + done +rm -rf po/*.po +mv $TEMP_DIR/* po/ + +## .. for tutorials +for locale in $I18N + do + mv share/tutorials/*.$locale.* $TEMP_DIR + done +rm share/tutorials/*.*.* +mv $TEMP_DIR/* share/tutorials/ + +## .. for templates +for locale in $I18N + do + mv share/templates/*.$locale.* $TEMP_DIR + done +rm share/templates/*.*.* +mv $TEMP_DIR/* share/templates/ +} || true -# only include README..txt for required languages -RM_LIST="" -for po in $I18N;do RM_LIST="$RM_LIST $(ls -1 README.$po.txt)";done || true # fails without true if no README.$po.txt -# only include keys..html for required languages -KEYS_LIST="doc/keys.css doc/keys.en.html" -for po in $I18N;do KEYS_LIST="$KEYS_LIST $(ls -1 doc/keys.$po.html)";done || true +chown_fn listdocs_fn -#cd_builddir_fn - don't use - -## gcc7 patches -## fix for: ui/clipboard.cpp:1405:28: error: ‘ScopedPtr’ is not a member of ‘Glib’ -## thank you, Gentoo -echo "--- src/ui/clipboard.cpp -+++ src/ui/clipboard.cpp -@@ -148,2 +147,0 @@ -- void _inkscape_wait_for_targets(std::list &); -- -@@ -1225,3 +1223 @@ -- // GTKmm's wait_for_targets() is broken, see the comment in _inkscape_wait_for_targets() -- std::list targets; // = _clipboard->wait_for_targets(); -- _inkscape_wait_for_targets(targets); -+ std::list targets = _clipboard->wait_for_targets(); -@@ -1377,33 +1372,0 @@ --} -- -- --// GTKMM's clipboard::wait_for_targets is buggy and might return bogus, see --// --// https://bugs.launchpad.net/inkscape/+bug/296778 --// http://mail.gnome.org/archives/gtk-devel-list/2009-June/msg00062.html --// --// for details. Until this has been fixed upstream we will use our own implementation --// of this method, as copied from /gtkmm-2.16.0/gtk/gtkmm/clipboard.cc. --void ClipboardManagerImpl::_inkscape_wait_for_targets(std::list &listTargets) --{ -- //Get a newly-allocated array of atoms: -- GdkAtom* targets = NULL; -- gint n_targets = 0; -- gboolean test = gtk_clipboard_wait_for_targets( gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), &targets, &n_targets ); -- if (!test || (targets == NULL)) { -- return; -- } -- -- //Add the targets to the C++ container: -- for (int i = 0; i < n_targets; i++) -- { -- //Convert the atom to a string: -- gchar* const atom_name = gdk_atom_name(targets[i]); -- -- Glib::ustring target; -- if (atom_name) { -- target = Glib::ScopedPtr(atom_name).get(); //This frees the gchar*. -- } -- -- listTargets.push_back(target); -- }" | while read line -do -patch -p0 -done +cd_builddir_fn + +## default options have been pulled from CMakeLists.txt + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -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_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DWITH_NLS="ON" \ + -DWITH_DBUS="OFF" \ + -DENABLE_LCMS="ON" \ + -DWITH_GNOME_VFS="ON" \ + -DWITH_SVG2="ON" \ + -DWITH_LPETOOL="OFF" \ + -DWITH_INKJAR="ON" \ + -DWITH_OPENMP="ON" \ + -DWITH_PROFILING="OFF" \ + -DENABLE_POPPLER="ON" \ + -DENABLE_POPPLER_CAIRO="ON" \ + -DWITH_IMAGE_MAGICK="ON" \ + -DWITH_LIBCDR="ON" \ + -DWITH_LIBVISIO="ON" \ + -DWITH_LIBWPG="ON" \ + -DWITH_GTK3_EXPERIMENTAL="OFF" \ + -DENABLE_BINRELOC="OFF" \ + .. -## fix for: ui/tools/flood-tool.cpp:255:49: error: call of overloaded ‘abs(guint32)’ is ambiguous -## thank you, Debian bug #853453 -echo "--- src/ui/tools/flood-tool.cpp -+++ src/ui/tools/flood-tool.cpp -@@ -196,6 +196,21 @@ - } - - /** -+ * \brief Check whether two unsigned integers are close to each other -+ * -+ * \param[in] a The 1st unsigned int -+ * \param[in] b The 2nd unsigned int -+ * \param[in] d The threshold for comparison -+ * -+ * \return true if |a-b| <= d; false otherwise -+ */ -+static bool compare_guint32(guint32 const a, guint32 const b, guint32 const d) -+{ -+ const int difference = std::abs(static_cast(a) - static_cast(b)); -+ return difference <= d; -+} -+ -+/** - * Compare a pixel in a pixel buffer with another pixel to determine if a point should be included in the fill operation. - * @param check The pixel in the pixel buffer to check. - * @param orig The original selected pixel to use as the fill target color. -@@ -232,27 +247,35 @@ - - switch (method) { - case FLOOD_CHANNELS_ALPHA: -- return abs(static_cast(ac) - ao) <= threshold; -+ return compare_guint32(ac, ao, threshold); - case FLOOD_CHANNELS_R: -- return abs(static_cast(ac ? unpremul_alpha(rc, ac) : 0) - (ao ? unpremul_alpha(ro, ao) : 0)) <= threshold; -+ return compare_guint32(ac ? unpremul_alpha(rc, ac) : 0, -+ ao ? unpremul_alpha(ro, ao) : 0, -+ threshold); - case FLOOD_CHANNELS_G: -- return abs(static_cast(ac ? unpremul_alpha(gc, ac) : 0) - (ao ? unpremul_alpha(go, ao) : 0)) <= threshold; -+ return compare_guint32(ac ? unpremul_alpha(gc, ac) : 0, -+ ao ? unpremul_alpha(go, ao) : 0, -+ threshold); - case FLOOD_CHANNELS_B: -- return abs(static_cast(ac ? unpremul_alpha(bc, ac) : 0) - (ao ? unpremul_alpha(bo, ao) : 0)) <= threshold; -+ return compare_guint32(ac ? unpremul_alpha(bc, ac) : 0, -+ ao ? unpremul_alpha(bo, ao) : 0, -+ threshold); - case FLOOD_CHANNELS_RGB: -- guint32 amc, rmc, bmc, gmc; -- //amc = 255*255 - (255-ac)*(255-ad); amc = (amc + 127) / 255; -- //amc = (255-ac)*ad + 255*ac; amc = (amc + 127) / 255; -- amc = 255; // Why are we looking at desktop? Cairo version ignores destop alpha -- rmc = (255-ac)*rd + 255*rc; rmc = (rmc + 127) / 255; -- gmc = (255-ac)*gd + 255*gc; gmc = (gmc + 127) / 255; -- bmc = (255-ac)*bd + 255*bc; bmc = (bmc + 127) / 255; -- -- diff += abs(static_cast(amc ? unpremul_alpha(rmc, amc) : 0) - (amop ? unpremul_alpha(rmop, amop) : 0)); -- diff += abs(static_cast(amc ? unpremul_alpha(gmc, amc) : 0) - (amop ? unpremul_alpha(gmop, amop) : 0)); -- diff += abs(static_cast(amc ? unpremul_alpha(bmc, amc) : 0) - (amop ? unpremul_alpha(bmop, amop) : 0)); -- return ((diff / 3) <= ((threshold * 3) / 4)); -- -+ { -+ guint32 amc, rmc, bmc, gmc; -+ //amc = 255*255 - (255-ac)*(255-ad); amc = (amc + 127) / 255; -+ //amc = (255-ac)*ad + 255*ac; amc = (amc + 127) / 255; -+ amc = 255; // Why are we looking at desktop? Cairo version ignores destop alpha -+ rmc = (255-ac)*rd + 255*rc; rmc = (rmc + 127) / 255; -+ gmc = (255-ac)*gd + 255*gc; gmc = (gmc + 127) / 255; -+ bmc = (255-ac)*bd + 255*bc; bmc = (bmc + 127) / 255; -+ -+ int diff = 0; // The total difference between each of the 3 color components -+ diff += std::abs(static_cast(amc ? unpremul_alpha(rmc, amc) : 0) - static_cast(amop ? unpremul_alpha(rmop, amop) : 0)); -+ diff += std::abs(static_cast(amc ? unpremul_alpha(gmc, amc) : 0) - static_cast(amop ? unpremul_alpha(gmop, amop) : 0)); -+ diff += std::abs(static_cast(amc ? unpremul_alpha(bmc, amc) : 0) - static_cast(amop ? unpremul_alpha(bmop, amop) : 0)); -+ return ((diff / 3) <= ((threshold * 3) / 4)); -+ } - case FLOOD_CHANNELS_H: - return ((int)(fabs(hsl_check[0] - hsl_orig[0]) * 100.0) <= threshold); - case FLOOD_CHANNELS_S:" | while read line -do -patch -p0 -done - - -LDFLAGS="$SLKLDFLAGS" \ -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS -std=c++11" \ -CC=${COMPILER} \ -CXX=${COMPILER_CXX} \ -./configure ${NLS:-} \ - --prefix=/usr/local \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --mandir=/usr/man \ - --disable-static - make_fn -# remove all man pages .. -rm -rf $PKG/usr/man -# .. and re-install those required -# English always .. -make DESTDIR=$PKG install-man1 -# .. and other languages when required -for PO in $I18N; do [[ -s inkscape.$PO.1 ]] && make DESTDIR=$PKG install-man$(echo $PO|tr [:upper:] [:lower:] | tr -d "_")DATA;done -installdocs_fn +## only package man pages for required locales +{ for locale in $I18N + do + mv $PKG/usr/local/share/man/man1/inkscape.$locale.1 $TEMP_DIR + done +rm $PKG/usr/local/share/man/man1/inkscape.*.1 +mv $TEMP_DIR/* $PKG/usr/local/share/man/man1/ +} || true -mangzip_fn +installdocs_fn +#mangzip_fn strip_fn @@ -241,7 +177,7 @@ $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: With language support for: -$PRGNAM: en $(echo $langs) +$PRGNAM: en $(echo $(cat ../po/LINGUAS)) $PRGNAM: $PRGNAM: Homepage: http://www.inkscape.org/ " > $PKG/install/slack-desc @@ -249,7 +185,7 @@ $PRGNAM: Homepage: http://www.inkscape.org/ cat <> $PKG/install/doinst.sh # Update the desktop database: if [ -x usr/bin/update-desktop-database ]; then - chroot . /usr/bin/update-desktop-database /usr/local/share//applications > /dev/null 2>&1 + chroot . /usr/bin/update-desktop-database /usr/local/share/applications > /dev/null 2>&1 fi # Update hicolor theme cache: diff --git a/README-Raspberry-Pi3.md b/README-Raspberry-Pi3.md index cc0e98a..8643c99 100644 --- a/README-Raspberry-Pi3.md +++ b/README-Raspberry-Pi3.md @@ -2,122 +2,126 @@ BUILD-TDE.sh has been set up with an option to build TDE on the Raspberry Pi3, with [Sarpi](http://sarpi.fatdog.eu/index.php?p=home) supplied kernel/modules/firmware. -All packages build on Slackware current, but because the gcc version is 7.x.x, there have been a number of patches to the source code. Building on Slackware 14.2 has not been completely tested. +All packages build on Slackware current and 14.2. There have been a number of patches to the source code for gcc 7.x.x, which is used on current. -Build times are as shown, with the number of parallel jobs set at 8 [1], and with one internationalization locale being included. The build was run with the top off the Pi casing, and the cpu temperature generally remained below 80 °C, occasionally peaking at about 82.5 °C without heatsinks. All four cpus ran @ 1200MHz [2]. +Build times are as shown, with the number of parallel jobs set at 8 [1], and with one internationalization locale being included. The build was run with the top off the Pi casing, and the cpu temperature generally remained below 80 °C, occasionally peaking at about 82.5 °C. All four cpus ran @ 1200MHz [2].
-[1] This may not be the optimum. Based on a sample, builds may be quicker or slower at -j6, some with little difference at -j4, so YMMV. I assume this is because performance is degraded at temperatures in excess of [80 °C](https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md) +[1] This may not be the optimum. Based on a sample, builds may be quicker or slower at -j6, some with little difference at -j4, so YMMV. I assume this is because [performance is degraded](https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md) at temperatures in excess of 80 °C. -[2] -`echo ondemand > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor` if needed. +[2] `echo ondemand > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor` if needed. -[3] -Avahi-tqt needs libdaemon and avahi packages installed, and these can be built on the Pi from the SlackBuilds.org scripts. +[3] Avahi-tqt needs libdaemon and avahi packages installed, and these can be built on the Pi from the SlackBuilds.org scripts. -[4] -inkscape needs too much memory for a build with more than one make process, and using swap slows the build, so the build was done with 'make -j1'. +[4] The inkscape build is memory intensive, and using too much swap slows the build. The best compromise is to build it separately and set NUMJOBS to -j3. ( [a] - inkscape-0.91, built with '-j1'/gcc-7.1.0/poppler-0.57 // [b] inkscape 0.92.2 cmake build with '-j3'/gcc-7.2.0/poppler-0.59.). + +[5] Both inkscape 0.91 and tdegraphics builds on current with poppler 0.59 failed because of the introduction of a new Object API in poppler 0.58. The tdegraphics build was done with poppler 0.57. **Build times**
+              Current - hard float     Current - hard float    14.2 - soft float
+                without heatsinks         with heatsinks         with heatsinks
+
 Required:
-tqt3                   50:39
-tqtinterface            4:26
-arts                    6:47
-dbus-tqt                  24
-dbus-1-tqt                51
-libart_lgpl               35
-tqca-tls                  22
-tdelibs                52:12
-tdebase                54:47
-                                   2:51:03
+tqt3                   50:39                  45:52                  39:48
+tqtinterface            4:26                   3:43                   2:11
+arts                    6:47                   6:07                   5:37
+dbus-tqt                  24                     26                     23
+dbus-1-tqt                51                     45                     40
+libart_lgpl               35                     35                     30
+tqca-tls                  22                     21                     18
+tdelibs                52:12                  49:32                  42:59
+tdebase                54:47                  49:01                  44:02
+                     -------                -------                -------
+                     2:51:03                2:36:22                2:16:28
 
 Core:
-tdeutils               12:29
-tdemultimedia          43:46
-tdeartwork              4:53
-tdegraphics            21:21
-tdegames               14:21
-libcaldav               1:51
-libcarddav              1:18
-tdepim               1:00:09
-tdeaddons               8:46
-tdesdk                 24:38
-tdevelop               41:40
-tdetoys                 2:13
-tdeedu                 36:07
-tdewebdev              23:48
-tidy-html5              1:19
-speex                     47
-tdenetwork             38:49
-tdeadmin                6:31
-tdeaccessibility       10:27
-tde-i18n               13:42
-                                   6:08:55        8:59:58
+tdeutils               12:29                  10:57                  10:24
+tdemultimedia          43:46                  42:13                  39:02
+tdeartwork              4:53                   4:20                   4:01
+tdegraphics            21:21                  21:14 [5]              17:59
+tdegames               14:21                  12:43                  12:20
+libcaldav               1:51                   1:20                   1:23
+libcarddav              1:18                   1:13                   1:17
+tdepim               1:00:09                  53:01                  47:20
+tdeaddons               8:46                   8:19                   7:19
+tdesdk                 24:38                  21:20                  18:37
+tdevelop               41:40                  36:17                  31:32
+tdetoys                 2:13                   2:09                   1:58
+tdeedu                 36:07                  35:04                  34:31
+tdewebdev              23:48                  23:26                  21:06
+tidy-html5              1:19                   1:11                     59
+speex                     47                     44                     42
+tdenetwork             38:49                  33:12                  28:58
+tdeadmin                6:31                   6:27                   5:50
+tdeaccessibility       10:27                  10:41                   9:48
+tde-i18n               13:42                  13:13                  12:41
+                     -------                -------                -------
+                     6:08:55                5:39:04                5:07:47
 
 Apps/Libs/Misc:
-GraphicsMagick          7:08
-abakus                  1:05
-avahi-tqt [3]           2:16
-digikam                32:17
-dolphin                 1:18
-graphviz               21:36
-gtk-qt-engine             46
-gtk3-tqt-engine         2:35
-inkscape             3:11:11 [4]
-k9copy                  5:27
-kaffeine                6:28
-kbfx                    2:03
-kbookreader             1:45
-kdbg                    2:26
-kdbusnotification       1:36
-kile                    5:40
-kipi-plugins           13:02
-knemo                   2:46
-knights                 2:45
-knmap                   2:09
-koffice              3:40:32
-koffice-i18n            1:08
-krusader                8:23
-kscope                  3:16
-ksensors                2:24
-kshutdown               2:24
-ksquirrel               5:37
-kvkbd                   1:51
-kvpnc                   8:14
-libksquirrel           11:54
-libmp4v2                3:21
-libpng                    39
-lxml                    9:00
-moodbar                   37
-piklab                 19:18
-potrace                 1:09
-potracegui              1:53
-rosegarden             28:04
-soundkonverter          4:42
-tde-style-lipstik       1:50
-tde-style-qtcurve       1:25
-tdeamarok               9:30
-tdefilelight              49
-tdegwenview             5:31
-tdegwenview-i18n        2:20
-tdeio-locate              37
-tdek3b                  9:25
-tdek3b-i18n               30
-tdektorrent            13:04
-tdelibkdcraw            2:42
-tdelibkexiv2            1:51
-tdelibkipi              2:25
-tdesudo                 1:31
-tdmtheme                1:35
-twin-style-crystal      1:55
-xmedcon                 1:58
-yakuake                 2:09
-yauap                      5
-                                  11:41:57       20:41:55
-
- - +GraphicsMagick 7:08 5:36 +abakus 1:05 53 +avahi-tqt [3] 2:16 1:35 1:31 +digikam 32:17 25:28 +dolphin 1:18 1:05 +graphviz 21:36 17:34 +gtk-qt-engine 46 39 +gtk3-tqt-engine 2:35 2:31 +inkscape [4] 3:11:11 [a] 1:33:28 [b] 1:29:09 +k9copy 5:27 5:22 +kaffeine 6:28 6:19 +kbfx 2:03 1:47 +kbookreader 1:45 1:40 +kdbg 2:26 2:11 +kdbusnotification 1:36 1:36 +kile 5:40 5:22 +kipi-plugins 13:02 13:10 +knemo 2:46 2:33 +knights 2:45 2:33 +knmap 2:09 2:07 +koffice 3:40:32 3:24:30 +koffice-i18n 1:08 1:10 +krusader 8:23 8:19 +kscope 3:16 3:00 +ksensors 2:24 2:17 +kshutdown 2:24 2:19 +ksquirrel 5:37 5:26 +kvkbd 1:51 1:41 +kvpnc 8:14 7:48 +libksquirrel 11:54 11:53 +libmp4v2 3:21 2:12 +libpng 39 31 +lxml 9:00 7:19 +moodbar 37 34 +piklab 19:18 16:24 +potrace 1:09 36 +potracegui 1:53 1:46 +rosegarden 28:04 19:35 +soundkonverter 4:42 4:18 +tde-style-lipstik 1:50 1:52 +tde-style-qtcurve 1:25 1:19 +tdeamarok 9:30 9:12 +tdefilelight 49 43 +tdegwenview 5:31 4:46 +tdegwenview-i18n 2:20 2:27 +tdeio-locate 37 35 +tdek3b 9:25 8:08 +tdek3b-i18n 30 20 +tdektorrent 13:04 12:17 +tdelibkdcraw 2:42 2:34 +tdelibkexiv2 1:51 1:52 +tdelibkipi 2:25 2:19 +tdesudo 1:31 1:35 +tdmtheme 1:35 1:36 +twin-style-crystal 1:55 1:55 +xmedcon 1:58 1:46 +yakuake 2:09 2:08 +yauap 5 5 + -------- ------- + 11:41:57 9:08:13 +Overall total 20:41:55 16:32:28 + diff --git a/get-source.sh b/get-source.sh index 6d7d200..de97941 100755 --- a/get-source.sh +++ b/get-source.sh @@ -192,10 +192,12 @@ mkdir -p $PKG/install makepkg_fn () { cd $PKG -makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} +[[ ! $ARM_FABI ]] || { [[ $ARM_FABI == hard ]] && ARCH=${ARCH}_hf || ARCH=${ARCH}_sf +} +makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.${PKGTYPE:-txz} cd $OUTPUT -md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5 -cat $PKG/install/slack-desc | grep "^${PRGNAM}" | grep -v handy > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt +md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.${PKGTYPE:-txz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.${PKGTYPE:-txz}.md5 +cat $PKG/install/slack-desc | grep "^${PRGNAM}" | grep -v handy > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt # Restore the original umask: umask ${_UMASK_}