Scribus 1.5.5 su slackware 14.2

Postate qui per tutte le discussioni legate a Linux in generale.

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Gnu/Linux in genere, se l'argomento è specifico alla Slackware usate uno dei forum Slackware o Slackware64.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Rispondi
Avatar utente
joe
Iper Master
Iper Master
Messaggi: 3797
Iscritto il: ven 27 apr 2007, 11:21
Slackware: 15.0
Kernel: 5.15.38
Desktop: dwm

Scribus 1.5.5 su slackware 14.2

Messaggio da joe »

Come da oggetto, stavo provando a compilare l'ultima versione di Scribus su Slackware 14.2, ma non riesce, esce un errore al configure che riporta una dipendenza mancante in "libpoppler", pare che serva una versione più recente non presente sulla vecchia slack stabile.

Ora ho scribus 1.5.4, quello ero riuscito a compilarlo senza problemi.

Qualcuno ha provato?
Sapete se sia possibile in qualche modo oppure non si riesce proprio?

Grazie in anticipo! :)

Avatar utente
Loris
Admin
Admin
Messaggi: 7730
Iscritto il: lun 31 mar 2003, 0:00
Nome Cognome: Loris Vincenzi
Località: Gradisca D'Isonzo
Contatta:

Re: Scribus 1.5.5 su slackware 14.2

Messaggio da Loris »

Ciao, provare a ricompilare i sorgenti della versione aggiornata di libpopplet, magari usando lo SlackBuild di Patrick? Così vedi che dipendenze mancano...
"Ho una testa piuttosto balzana e comunque non sono quello che credete" - Roger Keith Barrett

Avatar utente
ponce
Iper Master
Iper Master
Messaggi: 3026
Iscritto il: mer 5 mar 2008, 16:45
Nome Cognome: Matteo Bernardini
Slackware: slackware64-current
Kernel: 6.6.16
Desktop: lxde
Località: Pisa
Contatta:

Re: Scribus 1.5.5 su slackware 14.2

Messaggio da ponce »

non credo che sia semplice farlo funzionare con una versione di poppler piu' vecchia della 0.58.0: nella revision 22738 hanno fatto diverse modifiche che hanno rotto la compatibilita' all'indietro

Codice: Seleziona tutto

Index: Scribus/cmake/modules/FindPOPPLER.cmake
===================================================================
--- Scribus/cmake/modules/FindPOPPLER.cmake	(revision 22737)
+++ Scribus/cmake/modules/FindPOPPLER.cmake	(revision 22738)
@@ -5,9 +5,9 @@
 	set(PKG_POPPLER_LIBRARIES ${_libPopplerLinkDir})
 else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
 	include(FindPkgConfig)
-	pkg_search_module(POPPLER libpoppler>=0.19.0 poppler>=0.19.0)
+	pkg_search_module(POPPLER libpoppler>=0.58.0 poppler>=0.58.0)
 	if (POPPLER_FOUND)
-		pkg_search_module(POPPLER_CPP REQUIRED libpoppler-cpp>=0.19.0 poppler-cpp>=0.19.0)
+		pkg_search_module(POPPLER_CPP REQUIRED libpoppler-cpp>=0.58.0 poppler-cpp>=0.58.0)
 	endif(POPPLER_FOUND)
 endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
  
Index: Scribus/scribus/plugins/import/pdf/importpdf.cpp
===================================================================
--- Scribus/scribus/plugins/import/pdf/importpdf.cpp	(revision 22737)
+++ Scribus/scribus/plugins/import/pdf/importpdf.cpp	(revision 22738)
@@ -5,8 +5,11 @@
 for which a new license (GPL+exception) is in place.
 */
 
+#include <cstdlib>
+
 #include <QByteArray>
 #include <QCursor>
+#include <QDebug>
 #include <QDrag>
 #include <QFile>
 #include <QInputDialog>
@@ -14,8 +17,7 @@
 #include <QMimeData>
 #include <QRegExp>
 #include <QStack>
-#include <QDebug>
-#include "slaoutput.h"
+
 #include <poppler/ErrorCodes.h>
 #include <poppler/GlobalParams.h>
 #include <poppler/OptionalContent.h>
@@ -27,9 +29,9 @@
 #include <poppler/splash/SplashBitmap.h>
 
 #include "importpdf.h"
+#include "importpdfconfig.h"
+#include "slaoutput.h"
 
-#include <cstdlib>
-
 #include "commonstrings.h"
 #include "loadsaveplugin.h"
 #include "pagesize.h"
@@ -60,12 +62,6 @@
 #include "ui/multiprogressdialog.h"
 #include "ui/propertiespalette.h"
 
-#define POPPLER_VERSION_ENCODE(major, minor, micro) (	\
-	  ((major) * 10000)				\
-	+ ((minor) *   100)				\
-	+ ((micro) *     1))
-#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MAJOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)
-
 PdfPlug::PdfPlug(ScribusDoc* doc, int flags)
 {
 	tmpSele = new Selection(this, false);
@@ -518,20 +514,10 @@
 							{
 								for (int i = 0; i < order->getLength (); ++i)
 								{
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 									Object orderItem = order->get(i);
-#else
-									Object orderItem;
-									order->get(i, &orderItem);
-#endif
 									if (orderItem.isDict())
 									{
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
-										Object ref = order->getNF(i);		
-#else
-										Object ref;
-										order->getNF(i, &ref);
-#endif
+										Object ref = order->getNF(i);
 										if (ref.isRef())
 										{
 											OptionalContentGroup *oc = ocg->findOcgByRef(ref.getRef());
@@ -542,9 +528,6 @@
 												ocgNames.append(ocgName);
 											}
 										}
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)
-										ref.free();
-#endif
 									}
 									else
 									{
@@ -615,8 +598,6 @@
 					rotate = 0;
 					if (importerFlags & LoadSavePlugin::lfCreateDoc)
 					{
-// POPPLER_VERSION appeared in 0.19.0 first
-#ifdef POPPLER_VERSION
 						if (hasOcg)
 						{
 							QString actL = m_Doc->activeLayerName();
@@ -641,9 +622,7 @@
 							}
 							dev->layersSetByOCG = true;
 						}
-#endif
 
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 						Object info = pdfDoc->getDocInfo();
 						if (info.isDict())
 						{
@@ -672,41 +651,7 @@
 							}
 						}
 						info = Object();
-#else
-						Object info;
-						pdfDoc->getDocInfo(&info);
-						if (info.isDict())
-						{
-							Object obj;
-							//	GooString *s1;
-							Dict *infoDict = info.getDict();
-							if (infoDict->lookup((char*)"Title", &obj)->isString())
-							{
-								//		s1 = obj.getString();
-								m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString()));
-								obj.free();
-							}
-							if (infoDict->lookup((char*)"Author", &obj)->isString())
-							{
-								//		s1 = obj.getString();
-								m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString()));
-								obj.free();
-							}
-							if (infoDict->lookup((char*)"Subject", &obj)->isString())
-							{
-								//		s1 = obj.getString();
-								m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getString()));
-								obj.free();
-							}
-							if (infoDict->lookup((char*)"Keywords", &obj)->isString())
-							{
-								//		s1 = obj.getString();
-								m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getString()));
-								obj.free();
-							}
-						}
-						info.free();
-#endif
+
 						if (cropped)
 						{
 							QRectF crBox = getCBox(contentRect, pageNs[0]);
@@ -822,14 +767,10 @@
 								else
 									pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, nullptr, nullptr, dev->annotations_callback, dev);
 							}
+
 							PDFPresentationData ef;
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 							Object trans = pdfDoc->getPage(pp)->getTrans();
 							Object *transi = &trans;
-#else
-							Object trans;
-							Object *transi = pdfDoc->getPage(pp)->getTrans(&trans);
-#endif
 							if (transi->isDict())
 							{
 								m_Doc->pdfOptions().PresentMode = true;
@@ -875,51 +816,25 @@
 								delete pgTrans;
 							}
 							m_Doc->currentPage()->PresentVals = ef;
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)
-							trans.free();
-							transi->free();
-#endif
 						}
 						int numjs = pdfDoc->getCatalog()->numJS();
 						if (numjs > 0)
 						{
 							NameTree *jsNameTreeP = new NameTree();
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 							Object catDict = pdfDoc->getXRef()->getCatalog();
-#else
-							Object catDict;
-							pdfDoc->getXRef()->getCatalog(&catDict);
-#endif
 							if (catDict.isDict())
 							{
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 								Object names = catDict.dictLookup("Names");
-#else
-								Object names;
-								catDict.dictLookup("Names", &names);
-#endif
 								if (names.isDict())
 								{
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 									Object obj = names.dictLookup("JavaScript");
 									jsNameTreeP->init(pdfDoc->getXRef(), &obj);
-#else
-									Object obj;
-									names.dictLookup("JavaScript", &obj);
-									jsNameTreeP->init(pdfDoc->getXRef(), &obj);
-									obj.free();
-#endif
 								}
 								for (int a = 0; a < numjs; a++)
 								{
 									m_Doc->JavaScripts.insert(UnicodeParsedString(jsNameTreeP->getName(a)), UnicodeParsedString(pdfDoc->getCatalog()->getJS(a)));
 								}
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 								names = catDict.dictLookup("OpenAction");
-#else
-								names.free();
-								catDict.dictLookup("OpenAction", &names);
-#endif
 								if (names.isDict())
 								{
 									LinkAction *linkAction = nullptr;
@@ -940,13 +855,7 @@
 										}
 									}
 								}
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)
-								names.free();
-#endif
 							}
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)
-							catDict.free();
-#endif
 							delete jsNameTreeP;
 						}
 						m_Doc->pdfOptions().Version = (PDFOptions::PDFVersion)qMin(15, qMax(13, pdfDoc->getPDFMajorVersion() * 10 + pdfDoc->getPDFMinorVersion()));
Index: Scribus/scribus/plugins/import/pdf/slaoutput.cpp
===================================================================
--- Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(revision 22737)
+++ Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(revision 22738)
@@ -25,7 +25,7 @@
 	Object obj1, obj2, obj3;
 	fileName = nullptr;
 	m_flags = 0;
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
+
 	if (actionObj->isDict())
 	{
 		obj1 = actionObj->dictLookup("F");
@@ -56,38 +56,6 @@
 				m_flags = obj1.getInt();
 		}
 	}
-#else
-	if (actionObj->isDict())
-	{
-		if (!actionObj->dictLookup("F", &obj1)->isNull())
-		{
-			if (obj1.isDict())
-			{
-				if (!obj1.dictLookup("FS", &obj3)->isNull())
-				{
-					if (obj3.isName())
-					{
-						char *name = obj3.getName();
-						if (!strcmp(name, "URL"))
-						{
-							if (!obj1.dictLookup("F", &obj2)->isNull())
-								fileName = obj2.getString()->copy();
-						}
-						obj2.free();
-					}
-				}
-				obj3.free();
-			}
-		}
-		obj1.free();
-		if (!actionObj->dictLookup("Flags", &obj1)->isNull())
-		{
-			if (obj1.isNum())
-				m_flags = obj1.getInt();
-		}
-		obj1.free();
-	}
-#endif
 }
 
 LinkSubmitForm::~LinkSubmitForm()
@@ -99,7 +67,7 @@
 {
 	Object obj1, obj3;
 	fileName = nullptr;
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
+
 	if (actionObj->isDict())
 	{
 		obj1 = actionObj->dictLookup("F");
@@ -112,20 +80,6 @@
 			}
 		}
 	}
-#else
-	if (actionObj->isDict())
-	{
-		if (!actionObj->dictLookup("F", &obj1)->isNull())
-		{
-			if (getFileSpecNameForPlatform(&obj1, &obj3))
-			{
-				fileName = obj3.getString()->copy();
-				obj3.free();
-			}
-		}
-		obj1.free();
-	}
-#endif
 }
 
 LinkImportData::~LinkImportData()
@@ -324,7 +278,6 @@
 	Object obj;
 	Ref refa = ano->getRef();
 	Object additionalActions;
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 	obj = xref->fetch(refa.num, refa.gen);
 	if (obj.isDict())
 	{
@@ -344,35 +297,6 @@
 			}
 		}
 	}
-#else
-	Object *act = xref->fetch(refa.num, refa.gen, &obj);
-	if (act)
-	{
-		if (act->isDict())
-		{
-			Dict* adic = act->getDict();
-			adic->lookupNF("A", &additionalActions);
-			Object additionalActionsObject;
-			if (additionalActions.fetch(pdfDoc->getXRef(), &additionalActionsObject)->isDict())
-			{
-				Object actionObject;
-				additionalActionsObject.dictLookup("S", &actionObject);
-				if (actionObject.isName("ImportData"))
-				{
-					linkAction = new LinkImportData(&additionalActionsObject);
-				}
-				else if (actionObject.isName("SubmitForm"))
-				{
-					linkAction = new LinkSubmitForm(&additionalActionsObject);
-				}
-				actionObject.free();
-			}
-			additionalActionsObject.free();
-			additionalActions.free();
-		}
-	}
-	obj.free();
-#endif
 	return linkAction;
 }
 
@@ -384,7 +308,6 @@
 	Ref refa = ano->getRef();
 	Object additionalActions;
 
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 	obj = xref->fetch(refa.num, refa.gen);
 	if (obj.isDict())
 	{
@@ -398,28 +321,6 @@
 				linkAction = LinkAction::parseAction(&actionObject, pdfDoc->getCatalog()->getBaseURI());
 		}
 	}
-#else
-	Object *act = xref->fetch(refa.num, refa.gen, &obj);
-	if (act)
-	{
-		if (act->isDict())
-		{
-			Dict* adic = act->getDict();
-			adic->lookupNF("AA", &additionalActions);
-			Object additionalActionsObject;
-			if (additionalActions.fetch(pdfDoc->getXRef(), &additionalActionsObject)->isDict())
-			{
-				Object actionObject;
-				if (additionalActionsObject.dictLookup(key, &actionObject)->isDict())
-					linkAction = LinkAction::parseAction(&actionObject, pdfDoc->getCatalog()->getBaseURI());
-				actionObject.free();
-			}
-			additionalActionsObject.free();
-			additionalActions.free();
-		}
-	}
-	obj.free();
-#endif
 	return linkAction;
 }
 
@@ -753,12 +654,7 @@
 			if (apa || !achar)
 			{
 				AnoOutputDev *Adev = new AnoOutputDev(m_doc, m_importedColors);
-				Gfx *gfx;
-#ifdef POPPLER_VERSION
-				gfx = new Gfx(pdfDoc, Adev, pdfDoc->getPage(m_actPage)->getResourceDict(), annota->getRect(), nullptr);
-#else
-				gfx = new Gfx(xref, Adev, pdfDoc->getPage(m_actPage)->getResourceDict(), catalog, annota->getRect(), nullptr);
-#endif
+				Gfx *gfx = new Gfx(pdfDoc, Adev, pdfDoc->getPage(m_actPage)->getResourceDict(), annota->getRect(), nullptr);
 				ano->draw(gfx, false);
 				if (!bgFound)
 					CurrColorFill = Adev->CurrColorFill;
@@ -945,7 +841,6 @@
 	{
 		Object obj1;
 		Ref refa = annota->getRef();
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 		obj1 = xref->fetch(refa.num, refa.gen);
 		if (obj1.isDict())
 		{
@@ -971,43 +866,6 @@
 				m_radioMap.insert(tmTxt, radList);
 			}
 		}
-#else
-		Object *act = xref->fetch(refa.num, refa.gen, &obj1);
-		if (act && act->isDict())
-		{
-			Dict* dict = act->getDict();
-			Object obj2;
-			//childs
-			if (dict->lookup("Kids", &obj2)->isArray())
-			{
-				// Load children
-				QList<int> radList;
-				for (int i = 0 ; i < obj2.arrayGetLength(); i++)
-				{
-					Object childRef, childObj;
-					if (!obj2.arrayGetNF(i, &childRef)->isRef())
-					{
-						childRef.free();
-						continue;
-					}
-					if (!obj2.arrayGet(i, &childObj)->isDict())
-					{
-						childObj.free();
-						childRef.free();
-						continue;
-					}
-					const Ref ref = childRef.getRef();
-					radList.append(ref.num);
-					childObj.free();
-					childRef.free();
-				}
-				QString tmTxt = UnicodeParsedString(annota->getName());
-				m_radioMap.insert(tmTxt, radList);
-			}
-			obj2.free();
-		}
-		obj1.free();
-#endif
 	}
 	return retVal;
 }
@@ -2348,17 +2206,13 @@
 	box.y1 = bbox[1];
 	box.x2 = bbox[2];
 	box.y2 = bbox[3];
-	double *ctm;
-	ctm = state->getCTM();
+
+	double *ctm = state->getCTM();
 	m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
 	QTransform mm = QTransform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
 	QTransform mmx = mm * m_ctm;
 
-#ifdef POPPLER_VERSION
 	gfx = new Gfx(pdfDoc, this, resDict, &box, nullptr);
-#else
-	gfx = new Gfx(xref, this, resDict, catalog, &box, nullptr);
-#endif
 	inPattern++;
 	gfx->display(str);
 	inPattern--;
@@ -3146,7 +3000,6 @@
 		}
 		else
 		{
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 			dictObj = dictRef->fetch(xref);
 			if (!dictObj.isDict())
 				return;
@@ -3162,28 +3015,6 @@
 					mSte.ocgName = UnicodeParsedString(oc->getName());
 				}
 			}
-#else
-			dictRef->fetch(xref, &dictObj);
-			if (!dictObj.isDict())
-			{
-				dictObj.free();
-				return;
-			}
-			dict = dictObj.getDict();
-			dict->lookup("Type", &dictType);
-			if (dictType.isName("OCG"))
-			{
-				oc = contentConfig->findOcgByRef(dictRef->getRef());
-				if (oc)
-				{
-//					qDebug() << "Begin OCG Content with Name " << UnicodeParsedString(oc->getName());
-					m_doc->setActiveLayer(UnicodeParsedString(oc->getName()));
-					mSte.ocgName = UnicodeParsedString(oc->getName());
-				}
-			}
-			dictType.free();
-			dictObj.free();
-#endif
 		}
 	}
 	m_mcStack.push(mSte);
@@ -3204,19 +3035,9 @@
 			if (layersSetByOCG)
 				return;
 			QString lName = QString("Layer_%1").arg(layerNum + 1);
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
 			Object obj = properties->lookup((char*) "Title");
 			if (obj.isString())
 				lName = QString(obj.getString()->getCString());
-#else
-			Object obj;
-			if (properties->lookup((char*)"Title", &obj))
-			{
-				if (obj.isString())
-					lName =  QString(obj.getString()->getCString());
-				obj.free();
-			}
-#endif
 			for (ScLayers::iterator it = m_doc->Layers.begin(); it != m_doc->Layers.end(); ++it)
 			{
 				if (it->Name == lName)
@@ -3229,7 +3050,7 @@
 			if (!firstLayer)
 				currentLayer = m_doc->addLayer(lName, true);
 			firstLayer = false;
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
+
 			obj = properties->lookup((char*) "Visible");
 			if (obj.isBool())
 				m_doc->setLayerVisible(currentLayer, obj.getBool());
@@ -3251,44 +3072,6 @@
 				int b = obj1.getNum() / 256;
 				m_doc->setLayerMarker(currentLayer, QColor(r, g, b));
 			}
-#else
-			if (properties->lookup((char*)"Visible", &obj))
-			{
-				if (obj.isBool())
-					m_doc->setLayerVisible(currentLayer, obj.getBool());
-				obj.free();
-			}
-			if (properties->lookup((char*)"Editable", &obj))
-			{
-				if (obj.isBool())
-					m_doc->setLayerLocked(currentLayer, !obj.getBool());
-				obj.free();
-			}
-			if (properties->lookup((char*)"Printed", &obj))
-			{
-				if (obj.isBool())
-					m_doc->setLayerPrintable(currentLayer, obj.getBool());
-				obj.free();
-			}
-			if (properties->lookup((char*)"Color", &obj))
-			{
-				if (obj.isArray())
-				{
-					Object obj1;
-					obj.arrayGet(0, &obj1);
-					int r = obj1.getNum() / 256;
-					obj1.free();
-					obj.arrayGet(1, &obj1);
-					int g = obj1.getNum() / 256;
-					obj1.free();
-					obj.arrayGet(2, &obj1);
-					int b = obj1.getNum() / 256;
-					obj1.free();
-					m_doc->setLayerMarker(currentLayer, QColor(r, g, b));
-				}
-				obj.free();
-			}
-#endif
 		}
 	}
 }
@@ -3327,8 +3110,6 @@
 	beginMarkedContent(name, properties);
 }
 
-// POPPLER_VERSION appeared in 0.19.0 first
-#ifdef POPPLER_VERSION
 void SlaOutputDev::updateFont(GfxState *state)
 {
 	GfxFont *gfxFont;
@@ -3563,215 +3344,7 @@
 	if (fontsrc && !fontsrc->isFile)
 		fontsrc->unref();
 }
-#else
-void SlaOutputDev::updateFont(GfxState *state)
-{
-	GfxFont *gfxFont;
-	GfxFontType fontType;
-	SplashOutFontFileID *id;
-	SplashFontFile *fontFile;
-	SplashFontSrc *fontsrc = nullptr;
-	FoFiTrueType *ff;
-	Ref embRef;
-	Object refObj, strObj;
-	GooString *fileName;
-	char *tmpBuf;
-	int tmpBufLen;
-	Gushort *codeToGID;
-	DisplayFontParam *dfp;
-	double *textMat;
-	double m11, m12, m21, m22, fontSize;
-	SplashCoord mat[4];
-	int n;
-	int faceIndex = 0;
-	SplashCoord matrix[6];
 
-	m_font = nullptr;
-	fileName = nullptr;
-	tmpBuf = nullptr;
-
-	if (!(gfxFont = state->getFont()))
-		goto err1;
-	fontType = gfxFont->getType();
-	if (fontType == fontType3)
-		goto err1;
-
-  // check the font file cache
-	id = new SplashOutFontFileID(gfxFont->getID());
-	if ((fontFile = m_fontEngine->getFontFile(id)))
-	{
-		delete id;
-	}
-	else
-	{
-		// if there is an embedded font, write it to disk
-		if (gfxFont->getEmbeddedFontID(&embRef))
-		{
-			tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
-			if (!tmpBuf)
-				goto err2;
-			// if there is an external font file, use it
-		}
-		else if (!(fileName = gfxFont->getExtFontFile()))
-		{
-			// look for a display font mapping or a substitute font
-			dfp = nullptr;
-			if (gfxFont->getName())
-			{
-				dfp = globalParams->getDisplayFont(gfxFont);
-			}
-			if (!dfp)
-			{
-		//		error(-1, "Couldn't find a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-				goto err2;
-			}
-			switch (dfp->kind)
-			{
-				case displayFontT1:
-					fileName = dfp->t1.fileName;
-					fontType = gfxFont->isCIDFont() ? fontCIDType0 : fontType1;
-					break;
-				case displayFontTT:
-					fileName = dfp->tt.fileName;
-					fontType = gfxFont->isCIDFont() ? fontCIDType2 : fontTrueType;
-					faceIndex = dfp->tt.faceIndex;
-					break;
-			}
-		}
-		fontsrc = new SplashFontSrc;
-		if (fileName)
-			fontsrc->setFile(fileName, gFalse);
-		else
-			fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue);
-		// load the font file
-		switch (fontType)
-		{
-			case fontType1:
-				if (!(fontFile = m_fontEngine->loadType1Font( id, fontsrc, ((Gfx8BitFont *)gfxFont)->getEncoding())))
-				{
-			//		error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-					goto err2;
-				}
-				break;
-			case fontType1C:
-				if (!(fontFile = m_fontEngine->loadType1CFont( id, fontsrc, ((Gfx8BitFont *)gfxFont)->getEncoding())))
-				{
-		//			error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-					goto err2;
-				}
-				break;
-			case fontType1COT:
-				if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont( id, fontsrc, ((Gfx8BitFont *)gfxFont)->getEncoding())))
-				{
-		//			error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-					goto err2;
-				}
-				break;
-			case fontTrueType:
-			case fontTrueTypeOT:
-				if (fileName)
-					ff = FoFiTrueType::load(fileName->getCString());
-				else
-					ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
-				if (ff)
-				{
-					codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
-					n = 256;
-					delete ff;
-				}
-				else
-				{
-					codeToGID = nullptr;
-					n = 0;
-				}
-				if (!(fontFile = m_fontEngine->loadTrueTypeFont( id, fontsrc, codeToGID, n)))
-				{
-	//				error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-					goto err2;
-				}
-			break;
-		case fontCIDType0:
-		case fontCIDType0C:
-			if (!(fontFile = m_fontEngine->loadCIDFont( id, fontsrc)))
-			{
-	//			error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-				goto err2;
-			}
-			break;
-		case fontCIDType0COT:
-			if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont( id, fontsrc)))
-			{
-	//			error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-				goto err2;
-			}
-			break;
-		case fontCIDType2:
-		case fontCIDType2OT:
-			codeToGID = nullptr;
-			n = 0;
-			if (((GfxCIDFont *)gfxFont)->getCIDToGID())
-			{
-				n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
-				if (n)
-				{
-					codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
-					memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(Gushort));
-				}
-			}
-			else
-			{
-				if (fileName)
-					ff = FoFiTrueType::load(fileName->getCString());
-				else
-					ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
-				if (!ff)
-					goto err2;
-				codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
-				delete ff;
-			}
-			if (!(fontFile = m_fontEngine->loadTrueTypeFont( id, fontsrc, codeToGID, n, faceIndex)))
-			{
-	//			error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-				goto err2;
-			}
-			break;
-		default:
-			// this shouldn't happen
-			goto err2;
-		}
-	}
-	// get the font matrix
-	textMat = state->getTextMat();
-	fontSize = state->getFontSize();
-	m11 = textMat[0] * fontSize * state->getHorizScaling();
-	m12 = textMat[1] * fontSize * state->getHorizScaling();
-	m21 = textMat[2] * fontSize;
-	m22 = textMat[3] * fontSize;
-	matrix[0] = 1;
-	matrix[1] = 0;
-	matrix[2] = 0;
-	matrix[3] = 1;
-	matrix[4] = 0;
-	matrix[5] = 0;
-	// create the scaled font
-	mat[0] = m11;
-	mat[1] = -m12;
-	mat[2] = m21;
-	mat[3] = -m22;
-	m_font = m_fontEngine->getFont(fontFile, mat, matrix);
-	if (fontsrc && !fontsrc->isFile)
-		fontsrc->unref();
-	return;
-
-err2:
-	delete id;
-err1:
-	if (fontsrc && !fontsrc->isFile)
-		fontsrc->unref();
-	return;
-}
-#endif
-
 void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen)
 {
 	double x1, y1, x2, y2;
non credo che tu possa fare il revert di questo commit (con "patch -R") perche' il codice non funzionerebbe (o potrebbe anche essere stato ulteriormente modificato).

se, sulla 14.2, aggiorni poppler alla 0.58.0 credo che diverse cose che lo usano come dipendenza smetteranno di funzionare.

Avatar utente
joe
Iper Master
Iper Master
Messaggi: 3797
Iscritto il: ven 27 apr 2007, 11:21
Slackware: 15.0
Kernel: 5.15.38
Desktop: dwm

Re: Scribus 1.5.5 su slackware 14.2

Messaggio da joe »

Intanto grazie per le risposte!

E, magari dico una scemenza... ma mettere in una dir tipo /opt/lib/ o /usr/local/lib/poppler la libreria poppler più recente e fare in modo che solo scribus utilizzi quella?
Non che saprei come farlo ma butto lì l'idea (a volte nei configure si poteva indirizzare il path di destinazione in modo da non sovrascrivere la roba di sistema e anche specificare il path in cui andare poi a cercare la tale librerira.. non so se mi sono spiegato chiaramente...)

Avatar utente
ponce
Iper Master
Iper Master
Messaggi: 3026
Iscritto il: mer 5 mar 2008, 16:45
Nome Cognome: Matteo Bernardini
Slackware: slackware64-current
Kernel: 6.6.16
Desktop: lxde
Località: Pisa
Contatta:

Re: Scribus 1.5.5 su slackware 14.2

Messaggio da ponce »

joe ha scritto:ma mettere in una dir tipo /opt/lib/ o /usr/local/lib/poppler la libreria poppler più recente e fare in modo che solo scribus utilizzi quella?
Non che saprei come farlo
probabilmente qualche esperto di cmake potra' aiutarti, senno' potresti anche chiedere direttamente agli sviluppatori di scribus.

Avatar utente
joe
Iper Master
Iper Master
Messaggi: 3797
Iscritto il: ven 27 apr 2007, 11:21
Slackware: 15.0
Kernel: 5.15.38
Desktop: dwm

Re: Scribus 1.5.5 su slackware 14.2

Messaggio da joe »

Sì alla fine ero riuscito a compilare poppler della current con lo slackbuild di Pat, modificato in modo che vada ad installare tutto in /opt/poppler-new.
In pratica ora ho sia la versione di default che la 0.68 della current (avrei dovuto cambiare nome al pacchetto a dirla tutta, in modo che non facesse poi casini con la versione più vecchia, ma va be', tanto per testare va bene anche così).
Per capirci:

Codice: Seleziona tutto

$ ls -1 /var/log/packages/poppler-*
/var/log/packages/poppler-0.45.0-x86_64-1
/var/log/packages/poppler-0.68.0-x86_64-1
/var/log/packages/poppler-data-0.4.7-noarch-1
/var/log/packages/poppler-qt5-0.45.0-x86_64-2_SBo

Codice: Seleziona tutto

FILE LIST:
./
install/
install/doinst.sh
install/slack-desc
opt/
opt/poppler-new/
opt/poppler-new/bin/
opt/poppler-new/bin/pdfdetach
opt/poppler-new/bin/pdffonts
opt/poppler-new/bin/pdfimages
opt/poppler-new/bin/pdfinfo
opt/poppler-new/bin/pdfseparate
opt/poppler-new/bin/pdfsig
opt/poppler-new/bin/pdftocairo
opt/poppler-new/bin/pdftohtml
opt/poppler-new/bin/pdftoppm
opt/poppler-new/bin/pdftops
opt/poppler-new/bin/pdftotext
opt/poppler-new/bin/pdfunite
opt/poppler-new/doc/
opt/poppler-new/doc/poppler-0.68.0/
opt/poppler-new/doc/poppler-0.68.0/AUTHORS
opt/poppler-new/doc/poppler-0.68.0/COPYING
opt/poppler-new/doc/poppler-0.68.0/COPYING3
opt/poppler-new/doc/poppler-0.68.0/ChangeLog
opt/poppler-new/doc/poppler-0.68.0/INSTALL
opt/poppler-new/doc/poppler-0.68.0/NEWS
opt/poppler-new/doc/poppler-0.68.0/README
opt/poppler-new/doc/poppler-0.68.0/README-XPDF
opt/poppler-new/doc/poppler-0.68.0/README.contributors
opt/poppler-new/include/
opt/poppler-new/include/poppler/
opt/poppler-new/include/poppler/Annot.h
opt/poppler-new/include/poppler/Array.h
opt/poppler-new/include/poppler/BuiltinFont.h
opt/poppler-new/include/poppler/BuiltinFontTables.h
opt/poppler-new/include/poppler/CMap.h
opt/poppler-new/include/poppler/CachedFile.h
opt/poppler-new/include/poppler/Catalog.h
opt/poppler-new/include/poppler/CharCodeToUnicode.h
opt/poppler-new/include/poppler/CharTypes.h
opt/poppler-new/include/poppler/CompactFontTables.h
opt/poppler-new/include/poppler/CurlCachedFile.h
opt/poppler-new/include/poppler/CurlPDFDocBuilder.h
opt/poppler-new/include/poppler/DateInfo.h
opt/poppler-new/include/poppler/Decrypt.h
opt/poppler-new/include/poppler/Dict.h
opt/poppler-new/include/poppler/Error.h
opt/poppler-new/include/poppler/ErrorCodes.h
opt/poppler-new/include/poppler/FileSpec.h
opt/poppler-new/include/poppler/FontEncodingTables.h
opt/poppler-new/include/poppler/FontInfo.h
opt/poppler-new/include/poppler/Form.h
opt/poppler-new/include/poppler/Function.h
opt/poppler-new/include/poppler/Gfx.h
opt/poppler-new/include/poppler/GfxFont.h
opt/poppler-new/include/poppler/GfxState.h
opt/poppler-new/include/poppler/GfxState_helpers.h
opt/poppler-new/include/poppler/GlobalParams.h
opt/poppler-new/include/poppler/Hints.h
opt/poppler-new/include/poppler/JArithmeticDecoder.h
opt/poppler-new/include/poppler/JBIG2Stream.h
opt/poppler-new/include/poppler/JPEG2000Stream.h
opt/poppler-new/include/poppler/Lexer.h
opt/poppler-new/include/poppler/Linearization.h
opt/poppler-new/include/poppler/Link.h
opt/poppler-new/include/poppler/LocalPDFDocBuilder.h
opt/poppler-new/include/poppler/MarkedContentOutputDev.h
opt/poppler-new/include/poppler/Movie.h
opt/poppler-new/include/poppler/NameToCharCode.h
opt/poppler-new/include/poppler/NameToUnicodeTable.h
opt/poppler-new/include/poppler/Object.h
opt/poppler-new/include/poppler/OptionalContent.h
opt/poppler-new/include/poppler/Outline.h
opt/poppler-new/include/poppler/OutputDev.h
opt/poppler-new/include/poppler/PDFDoc.h
opt/poppler-new/include/poppler/PDFDocBuilder.h
opt/poppler-new/include/poppler/PDFDocEncoding.h
opt/poppler-new/include/poppler/PDFDocFactory.h
opt/poppler-new/include/poppler/PSOutputDev.h
opt/poppler-new/include/poppler/PSTokenizer.h
opt/poppler-new/include/poppler/Page.h
opt/poppler-new/include/poppler/PageTransition.h
opt/poppler-new/include/poppler/Parser.h
opt/poppler-new/include/poppler/PopplerCache.h
opt/poppler-new/include/poppler/PreScanOutputDev.h
opt/poppler-new/include/poppler/ProfileData.h
opt/poppler-new/include/poppler/Rendition.h
opt/poppler-new/include/poppler/SecurityHandler.h
opt/poppler-new/include/poppler/Sound.h
opt/poppler-new/include/poppler/SplashOutputDev.h
opt/poppler-new/include/poppler/StdinCachedFile.h
opt/poppler-new/include/poppler/StdinPDFDocBuilder.h
opt/poppler-new/include/poppler/Stream-CCITT.h
opt/poppler-new/include/poppler/Stream.h
opt/poppler-new/include/poppler/StructElement.h
opt/poppler-new/include/poppler/StructTreeRoot.h
opt/poppler-new/include/poppler/TextOutputDev.h
opt/poppler-new/include/poppler/UTF.h
opt/poppler-new/include/poppler/UnicodeCClassTables.h
opt/poppler-new/include/poppler/UnicodeCompTables.h
opt/poppler-new/include/poppler/UnicodeDecompTables.h
opt/poppler-new/include/poppler/UnicodeMap.h
opt/poppler-new/include/poppler/UnicodeMapFuncs.h
opt/poppler-new/include/poppler/UnicodeMapTables.h
opt/poppler-new/include/poppler/UnicodeTypeTable.h
opt/poppler-new/include/poppler/ViewerPreferences.h
opt/poppler-new/include/poppler/XRef.h
opt/poppler-new/include/poppler/XpdfPluginAPI.h
opt/poppler-new/include/poppler/cpp/
opt/poppler-new/include/poppler/cpp/poppler-document.h
opt/poppler-new/include/poppler/cpp/poppler-embedded-file.h
opt/poppler-new/include/poppler/cpp/poppler-font.h
opt/poppler-new/include/poppler/cpp/poppler-global.h
opt/poppler-new/include/poppler/cpp/poppler-image.h
opt/poppler-new/include/poppler/cpp/poppler-page-renderer.h
opt/poppler-new/include/poppler/cpp/poppler-page-transition.h
opt/poppler-new/include/poppler/cpp/poppler-page.h
opt/poppler-new/include/poppler/cpp/poppler-rectangle.h
opt/poppler-new/include/poppler/cpp/poppler-toc.h
opt/poppler-new/include/poppler/cpp/poppler-version.h
opt/poppler-new/include/poppler/fofi/
opt/poppler-new/include/poppler/fofi/FoFiBase.h
opt/poppler-new/include/poppler/fofi/FoFiEncodings.h
opt/poppler-new/include/poppler/fofi/FoFiIdentifier.h
opt/poppler-new/include/poppler/fofi/FoFiTrueType.h
opt/poppler-new/include/poppler/fofi/FoFiType1.h
opt/poppler-new/include/poppler/fofi/FoFiType1C.h
opt/poppler-new/include/poppler/glib/
opt/poppler-new/include/poppler/glib/poppler-action.h
opt/poppler-new/include/poppler/glib/poppler-annot.h
opt/poppler-new/include/poppler/glib/poppler-attachment.h
opt/poppler-new/include/poppler/glib/poppler-date.h
opt/poppler-new/include/poppler/glib/poppler-document.h
opt/poppler-new/include/poppler/glib/poppler-enums.h
opt/poppler-new/include/poppler/glib/poppler-features.h
opt/poppler-new/include/poppler/glib/poppler-form-field.h
opt/poppler-new/include/poppler/glib/poppler-layer.h
opt/poppler-new/include/poppler/glib/poppler-media.h
opt/poppler-new/include/poppler/glib/poppler-movie.h
opt/poppler-new/include/poppler/glib/poppler-page.h
opt/poppler-new/include/poppler/glib/poppler-structure-element.h
opt/poppler-new/include/poppler/glib/poppler.h
opt/poppler-new/include/poppler/goo/
opt/poppler-new/include/poppler/goo/FixedPoint.h
opt/poppler-new/include/poppler/goo/GooLikely.h
opt/poppler-new/include/poppler/goo/GooList.h
opt/poppler-new/include/poppler/goo/GooMutex.h
opt/poppler-new/include/poppler/goo/GooString.h
opt/poppler-new/include/poppler/goo/GooTimer.h
opt/poppler-new/include/poppler/goo/ImgWriter.h
opt/poppler-new/include/poppler/goo/JpegWriter.h
opt/poppler-new/include/poppler/goo/PNGWriter.h
opt/poppler-new/include/poppler/goo/TiffWriter.h
opt/poppler-new/include/poppler/goo/gfile.h
opt/poppler-new/include/poppler/goo/gmem.h
opt/poppler-new/include/poppler/goo/grandom.h
opt/poppler-new/include/poppler/goo/gstrtod.h
opt/poppler-new/include/poppler/goo/gtypes.h
opt/poppler-new/include/poppler/poppler-config.h
opt/poppler-new/include/poppler/qt4/
opt/poppler-new/include/poppler/qt4/poppler-annotation.h
opt/poppler-new/include/poppler/qt4/poppler-export.h
opt/poppler-new/include/poppler/qt4/poppler-form.h
opt/poppler-new/include/poppler/qt4/poppler-link.h
opt/poppler-new/include/poppler/qt4/poppler-media.h
opt/poppler-new/include/poppler/qt4/poppler-optcontent.h
opt/poppler-new/include/poppler/qt4/poppler-page-transition.h
opt/poppler-new/include/poppler/qt4/poppler-qt4.h
opt/poppler-new/include/poppler/splash/
opt/poppler-new/include/poppler/splash/Splash.h
opt/poppler-new/include/poppler/splash/SplashBitmap.h
opt/poppler-new/include/poppler/splash/SplashClip.h
opt/poppler-new/include/poppler/splash/SplashErrorCodes.h
opt/poppler-new/include/poppler/splash/SplashFTFont.h
opt/poppler-new/include/poppler/splash/SplashFTFontEngine.h
opt/poppler-new/include/poppler/splash/SplashFTFontFile.h
opt/poppler-new/include/poppler/splash/SplashFont.h
opt/poppler-new/include/poppler/splash/SplashFontEngine.h
opt/poppler-new/include/poppler/splash/SplashFontFile.h
opt/poppler-new/include/poppler/splash/SplashFontFileID.h
opt/poppler-new/include/poppler/splash/SplashGlyphBitmap.h
opt/poppler-new/include/poppler/splash/SplashMath.h
opt/poppler-new/include/poppler/splash/SplashPath.h
opt/poppler-new/include/poppler/splash/SplashPattern.h
opt/poppler-new/include/poppler/splash/SplashScreen.h
opt/poppler-new/include/poppler/splash/SplashState.h
opt/poppler-new/include/poppler/splash/SplashTypes.h
opt/poppler-new/include/poppler/splash/SplashXPath.h
opt/poppler-new/include/poppler/splash/SplashXPathScanner.h
opt/poppler-new/lib64/
opt/poppler-new/lib64/girepository-1.0/
opt/poppler-new/lib64/girepository-1.0/Poppler-0.18.typelib
opt/poppler-new/lib64/libpoppler-cpp.so.0.5.0
opt/poppler-new/lib64/libpoppler-glib.so.8.9.0
opt/poppler-new/lib64/libpoppler-qt4.so.4.11.0
opt/poppler-new/lib64/libpoppler.so.79.0.0
opt/poppler-new/lib64/pkgconfig/
opt/poppler-new/lib64/pkgconfig/poppler-cairo.pc
opt/poppler-new/lib64/pkgconfig/poppler-cpp.pc
opt/poppler-new/lib64/pkgconfig/poppler-glib.pc
opt/poppler-new/lib64/pkgconfig/poppler-qt4.pc
opt/poppler-new/lib64/pkgconfig/poppler-splash.pc
opt/poppler-new/lib64/pkgconfig/poppler.pc
opt/poppler-new/man/
opt/poppler-new/man/man1/
opt/poppler-new/man/man1/pdfdetach.1.gz
opt/poppler-new/man/man1/pdffonts.1.gz
opt/poppler-new/man/man1/pdfimages.1.gz
opt/poppler-new/man/man1/pdfinfo.1.gz
opt/poppler-new/man/man1/pdfseparate.1.gz
opt/poppler-new/man/man1/pdfsig.1.gz
opt/poppler-new/man/man1/pdftocairo.1.gz
opt/poppler-new/man/man1/pdftohtml.1.gz
opt/poppler-new/man/man1/pdftoppm.1.gz
opt/poppler-new/man/man1/pdftops.1.gz
opt/poppler-new/man/man1/pdftotext.1.gz
opt/poppler-new/man/man1/pdfunite.1.gz
opt/poppler-new/share/
opt/poppler-new/share/gir-1.0/
opt/poppler-new/share/gir-1.0/Poppler-0.18.gir
opt/poppler-new/share/gtk-doc/
opt/poppler-new/share/gtk-doc/html/
opt/poppler-new/share/gtk-doc/html/poppler/
opt/poppler-new/share/gtk-doc/html/poppler/PopplerAction.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerAnnot.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerAttachment.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerColor.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerDocument.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerFormField.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerLayer.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerMedia.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerMovie.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerPage.html
opt/poppler-new/share/gtk-doc/html/poppler/PopplerStructureElement.html
opt/poppler-new/share/gtk-doc/html/poppler/annotation-glossary.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-0-12.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-0-14.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-0-16.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-0-18.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-0-20.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-0-22.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-0-26.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-0-33.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-0-46.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-deprecated.html
opt/poppler-new/share/gtk-doc/html/poppler/api-index-full.html
opt/poppler-new/share/gtk-doc/html/poppler/ch01.html
opt/poppler-new/share/gtk-doc/html/poppler/home.png
opt/poppler-new/share/gtk-doc/html/poppler/index.html
opt/poppler-new/share/gtk-doc/html/poppler/index.sgml
opt/poppler-new/share/gtk-doc/html/poppler/left-insensitive.png
opt/poppler-new/share/gtk-doc/html/poppler/left.png
opt/poppler-new/share/gtk-doc/html/poppler/poppler-Error-handling.html
opt/poppler-new/share/gtk-doc/html/poppler/poppler-PDF-Utility-functions.html
opt/poppler-new/share/gtk-doc/html/poppler/poppler-poppler-features.html
opt/poppler-new/share/gtk-doc/html/poppler/poppler.devhelp2
opt/poppler-new/share/gtk-doc/html/poppler/right-insensitive.png
opt/poppler-new/share/gtk-doc/html/poppler/right.png
opt/poppler-new/share/gtk-doc/html/poppler/style.css
opt/poppler-new/share/gtk-doc/html/poppler/up-insensitive.png
opt/poppler-new/share/gtk-doc/html/poppler/up.png
Ho poi dato un'occhiata ai sorgenti di scribus in particolare questo file:

Codice: Seleziona tutto

cmake/modules/FindPOPPLER.cmake
E lì dentro si trova robo molto "esplicativa":
https://gitlab.com/scribus/scribus/blob ... PLER.cmake

Potrei provare a modificare i path in cui va a cercare i vari "pezzi" di poppler: librerie intestazioni ecc, aggiungendo /opt/poppler-new/eccecc

Ok, ad ogni modo grazie del consiglio sulla chat IRC degli sviluppatori.
Un altro canale dove ottenere informazioni e suggerimenti potrebbe essere questo sul loro forum (per chi come me non è troppo in confidenza con la chat irc): http://forums.scribus.net/index.php/board,14.0.html

Avatar utente
joe
Iper Master
Iper Master
Messaggi: 3797
Iscritto il: ven 27 apr 2007, 11:21
Slackware: 15.0
Kernel: 5.15.38
Desktop: dwm

Re: Scribus 1.5.5 su slackware 14.2

Messaggio da joe »

Ci sono novità, allora, cmake prevede la possibilità di passare la variabile d'ambiente PKG_CONFIG_PATH da esportare prima del lancio di cmake.
Questa variabile deve contenere il percorso in cui si trova poppler, nella sua versione nuova, quella installata per lo scopo in /opt.

Precisamente si tratta della dir contenente i files "*.pc":

Codice: Seleziona tutto

$ find /opt/poppler-new/ -iname "*.pc"
/opt/poppler-new/lib64/pkgconfig/poppler-splash.pc
/opt/poppler-new/lib64/pkgconfig/poppler.pc
/opt/poppler-new/lib64/pkgconfig/poppler-cairo.pc
/opt/poppler-new/lib64/pkgconfig/poppler-qt4.pc
/opt/poppler-new/lib64/pkgconfig/poppler-cpp.pc
/opt/poppler-new/lib64/pkgconfig/poppler-glib.pc
In soldoni:

Codice: Seleziona tutto

/opt/poppler-new/lib64/pkgconfig
Allora ecco l'estratto dello slackbuild rivisto con l'aggiunta di quella variabile d'ambiente:

Codice: Seleziona tutto

export CC=clang
export CXX=clang++
export PKG_CONFIG_PATH=/opt/poppler-new/lib64/pkgconfig
cmake . \
  -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
  -DCMAKE_INSTALL_PREFIX:PATH=/usr \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_SKIP_RPATH=ON \
  -DLIB_SUFFIX=${LIBDIRSUFFIX} \
  -DWANT_CPP11=1 \
  -DRENDER_LIB=CAIRO \
  -DWANT_GRAPHICSMAGICK=1
In questo modo il controllo del configure lo passa e l'errore relativo a poppler sparisce, specifica proprio di aver trovato la versione nuova in /opt/poppler-new.

Quindi problema risolto...
Oqquasi...

Sì perchè poi dopo diverso macinare salta fuori un altro errore!
Riporto qui sotto un po' di righe in più precedenti a quelle con cui tarmina la compilazione:

Codice: Seleziona tutto

[ 84%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/modetoolbar.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/pdftoolbar.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/viewtoolbar.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/unicodesearch.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/vruler.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/useprintermarginsdialog.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/ui/weldedit.cpp.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/imagedataloaders/scimgdataloader_gmagick.cpp.o
[ 85%] Building C object scribus/CMakeFiles/scribus.dir/third_party/hyphen/hnjalloc.c.o
[ 85%] Building C object scribus/CMakeFiles/scribus.dir/third_party/hyphen/hyphen.c.o
[ 85%] Building CXX object scribus/CMakeFiles/scribus.dir/main.cpp.o
[ 85%] Linking CXX executable scribus
[ 85%] Built target scribus
[ 85%] Generating moc_xpsexplugin.cpp
[ 85%] Generating moc_svgexplugin.cpp
[ 85%] Generating ui_exportform.h
[ 85%] Generating moc_dialog.cpp
Scanning dependencies of target xpsexplugin
[ 85%] Generating moc_export.cpp
Scanning dependencies of target svgexplugin
Scanning dependencies of target scribusexportpixmap
[ 85%] Building CXX object scribus/plugins/export/xpsexport/CMakeFiles/xpsexplugin.dir/xpsexplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/export/svgexplugin/CMakeFiles/svgexplugin.dir/svgexplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/export/pixmapexport/CMakeFiles/scribusexportpixmap.dir/dialog.cpp.o
[ 85%] Building CXX object scribus/plugins/export/pixmapexport/CMakeFiles/scribusexportpixmap.dir/export.cpp.o
[ 85%] Building CXX object scribus/plugins/export/pixmapexport/CMakeFiles/scribusexportpixmap.dir/moc_dialog.cpp.o
[ 85%] Building CXX object scribus/plugins/export/pixmapexport/CMakeFiles/scribusexportpixmap.dir/moc_export.cpp.o
[ 85%] Building CXX object scribus/plugins/export/xpsexport/CMakeFiles/xpsexplugin.dir/moc_xpsexplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/export/svgexplugin/CMakeFiles/svgexplugin.dir/moc_svgexplugin.cpp.o
[ 85%] Linking CXX shared module libscribusexportpixmap.so
[ 85%] Linking CXX shared module libxpsexplugin.so
[ 85%] Built target scribusexportpixmap
[ 85%] Generating moc_importaiplugin.cpp
[ 85%] Generating moc_importai.cpp
Scanning dependencies of target importai
[ 85%] Building CXX object scribus/plugins/import/ai/CMakeFiles/importai.dir/importai.cpp.o
[ 85%] Built target xpsexplugin
[ 85%] Generating moc_importcdrplugin.cpp
[ 85%] Linking CXX shared module libsvgexplugin.so
[ 85%] Generating moc_importcdr.cpp
Scanning dependencies of target importcdr
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/__/revenge/rawpainter.cpp.o
[ 85%] Built target svgexplugin
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/importcdr.cpp.o
[ 85%] Generating moc_importcgmplugin.cpp
[ 85%] Generating moc_importcgm.cpp
Scanning dependencies of target importcgm
[ 85%] Building CXX object scribus/plugins/import/cgm/CMakeFiles/importcgm.dir/importcgm.cpp.o
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/importcdrplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/moc_importcdr.cpp.o
[ 85%] Building CXX object scribus/plugins/import/cgm/CMakeFiles/importcgm.dir/importcgmplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/import/cdr/CMakeFiles/importcdr.dir/moc_importcdrplugin.cpp.o
[ 85%] Building CXX object scribus/plugins/import/ai/CMakeFiles/importai.dir/importaiplugin.cpp.o
[ 86%] Building CXX object scribus/plugins/import/cgm/CMakeFiles/importcgm.dir/moc_importcgm.cpp.o
[ 86%] Linking CXX shared module libimportcdr.so
[ 86%] Built target importcdr
[ 86%] Generating moc_importcvgplugin.cpp
[ 86%] Building CXX object scribus/plugins/import/ai/CMakeFiles/importai.dir/moc_importai.cpp.o
[ 86%] Generating moc_importcvg.cpp
[ 86%] Building CXX object scribus/plugins/import/cgm/CMakeFiles/importcgm.dir/moc_importcgmplugin.cpp.o
Scanning dependencies of target importcvg
[ 86%] Building CXX object scribus/plugins/import/cvg/CMakeFiles/importcvg.dir/importcvg.cpp.o
[ 86%] Building CXX object scribus/plugins/import/ai/CMakeFiles/importai.dir/moc_importaiplugin.cpp.o
[ 86%] Linking CXX shared module libimportcgm.so
[ 86%] Built target importcgm
[ 86%] Generating moc_importdrwplugin.cpp
[ 86%] Generating moc_importdrw.cpp
Scanning dependencies of target importdrw
[ 86%] Building CXX object scribus/plugins/import/drw/CMakeFiles/importdrw.dir/importdrw.cpp.o
[ 86%] Building CXX object scribus/plugins/import/cvg/CMakeFiles/importcvg.dir/importcvgplugin.cpp.o
[ 86%] Linking CXX shared module libimportai.so
[ 86%] Built target importai
[ 86%] Building CXX object scribus/plugins/import/drw/CMakeFiles/importdrw.dir/importdrwplugin.cpp.o
[ 86%] Building CXX object scribus/plugins/import/cvg/CMakeFiles/importcvg.dir/moc_importcvg.cpp.o
[ 86%] Building CXX object scribus/plugins/import/drw/CMakeFiles/importdrw.dir/moc_importdrw.cpp.o
[ 86%] Building CXX object scribus/plugins/import/cvg/CMakeFiles/importcvg.dir/moc_importcvgplugin.cpp.o
[ 86%] Building CXX object scribus/plugins/import/drw/CMakeFiles/importdrw.dir/moc_importdrwplugin.cpp.o
[ 86%] Generating moc_importemfplugin.cpp
[ 86%] Generating moc_importemf.cpp
Scanning dependencies of target importemf
[ 86%] Building CXX object scribus/plugins/import/emf/CMakeFiles/importemf.dir/importemf.cpp.o
[ 86%] Linking CXX shared module libimportcvg.so
[ 86%] Linking CXX shared module libimportdrw.so
[ 86%] Built target importdrw
[ 86%] Generating moc_importfhplugin.cpp
[ 86%] Built target importcvg
[ 86%] Generating moc_importidmlplugin.cpp
[ 86%] Generating moc_importfh.cpp
[ 86%] Generating moc_importidml.cpp
Scanning dependencies of target importfh
Scanning dependencies of target importidml
[ 86%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/__/revenge/rawpainter.cpp.o
[ 86%] Building CXX object scribus/plugins/import/idml/CMakeFiles/importidml.dir/importidml.cpp.o
[ 87%] Building CXX object scribus/plugins/import/emf/CMakeFiles/importemf.dir/importemfplugin.cpp.o
[ 87%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/importfh.cpp.o
[ 87%] Building CXX object scribus/plugins/import/emf/CMakeFiles/importemf.dir/moc_importemf.cpp.o
[ 87%] Building CXX object scribus/plugins/import/emf/CMakeFiles/importemf.dir/moc_importemfplugin.cpp.o
[ 87%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/importfhplugin.cpp.o
[ 87%] Building CXX object scribus/plugins/import/idml/CMakeFiles/importidml.dir/importidmlplugin.cpp.o
[ 87%] Linking CXX shared module libimportemf.so
[ 87%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/moc_importfh.cpp.o
[ 87%] Built target importemf
[ 88%] Generating moc_importodgplugin.cpp
[ 88%] Generating moc_importodg.cpp
Scanning dependencies of target importodg
[ 88%] Building CXX object scribus/plugins/import/odg/CMakeFiles/importodg.dir/importodg.cpp.o
[ 88%] Building CXX object scribus/plugins/import/fh/CMakeFiles/importfh.dir/moc_importfhplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/idml/CMakeFiles/importidml.dir/moc_importidml.cpp.o
[ 88%] Linking CXX shared module libimportfh.so
[ 88%] Built target importfh
[ 88%] Generating moc_importpagesplugin.cpp
[ 88%] Generating moc_importpages.cpp
Scanning dependencies of target importpages
[ 88%] Building CXX object scribus/plugins/import/idml/CMakeFiles/importidml.dir/moc_importidmlplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pages/CMakeFiles/importpages.dir/importpages.cpp.o
[ 88%] Linking CXX shared module libimportidml.so
[ 88%] Built target importidml
[ 88%] Building CXX object scribus/plugins/import/pages/CMakeFiles/importpages.dir/importpagesplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pages/CMakeFiles/importpages.dir/moc_importpages.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pages/CMakeFiles/importpages.dir/moc_importpagesplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/odg/CMakeFiles/importodg.dir/importodgplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/odg/CMakeFiles/importodg.dir/moc_importodg.cpp.o
[ 88%] Linking CXX shared module libimportpages.so
[ 88%] Built target importpages
[ 88%] Generating moc_importpctplugin.cpp
[ 88%] Generating moc_importpct.cpp
Scanning dependencies of target importpct
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/importpct.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/importpctplugin.cpp.o
[ 88%] Building CXX object scribus/plugins/import/odg/CMakeFiles/importodg.dir/moc_importodgplugin.cpp.o
[ 88%] Linking CXX shared module libimportodg.so
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/moc_importpct.cpp.o
[ 88%] Built target importodg
[ 88%] Generating ui_pdfimportoptions.h
[ 88%] Generating moc_importpdf.cpp
[ 88%] Generating moc_importpdfplugin.cpp
[ 88%] Generating moc_pdfimportoptions.cpp
Scanning dependencies of target importpdf
[ 88%] Building CXX object scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o
[ 88%] Building CXX object scribus/plugins/import/pct/CMakeFiles/importpct.dir/moc_importpctplugin.cpp.o
[ 88%] Generating moc_importpmplugin.cpp
[ 88%] Generating moc_importpm.cpp
Scanning dependencies of target importpm
[ 88%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/__/revenge/rawpainter.cpp.o
[ 89%] Linking CXX shared module libimportpct.so
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:518:36: error: too few arguments to function call, expected at least 2, have 1; did
      you mean 'std::get'?
                                                                        Object orderItem = order->get(i);
                                                                                                  ^~~
                                                                                                  std::get
/usr/bin/../lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../include/c++/5.5.0/utility:147:5: note: 'std::get' declared here
    get(std::pair<_Tp1, _Tp2>& __in) noexcept
    ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:521:68: error: too few arguments to function call, expected 2, have 1
                                                                                POPPLER_CONST_075 Object POPPLER_REF ref = order->getNF(i);
                                                                                                                           ~~~~~~~~~~~~  ^
/usr/include/poppler/Array.h:69:3: note: 'getNF' declared here
  Object *getNF(int i, Object *obj);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:627:40: error: too few arguments to function call, single argument 'obj' was not
      specified
                                                Object info = pdfDoc->getDocInfo();
                                                              ~~~~~~~~~~~~~~~~~~ ^
/usr/include/poppler/PDFDoc.h:231:3: note: 'getDocInfo' declared here
  Object *getDocInfo(Object *obj) { return xref->getDocInfo(obj); }
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:632:46: error: too few arguments to function call, expected at least 2, have 1
                                                        obj = infoDict->lookup((char*) "Title");
                                                              ~~~~~~~~~~~~~~~~                ^
/usr/include/poppler/Dict.h:79:3: note: 'lookup' declared here
  Object *lookup(const char *key, Object *obj, int recursion = 0);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:637:47: error: too few arguments to function call, expected at least 2, have 1
                                                        obj = infoDict->lookup((char*) "Author");
                                                              ~~~~~~~~~~~~~~~~                 ^
/usr/include/poppler/Dict.h:79:3: note: 'lookup' declared here
  Object *lookup(const char *key, Object *obj, int recursion = 0);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:642:48: error: too few arguments to function call, expected at least 2, have 1
                                                        obj = infoDict->lookup((char*) "Subject");
                                                              ~~~~~~~~~~~~~~~~                  ^
/usr/include/poppler/Dict.h:79:3: note: 'lookup' declared here
  Object *lookup(const char *key, Object *obj, int recursion = 0);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:647:49: error: too few arguments to function call, expected at least 2, have 1
                                                        obj = infoDict->lookup((char*) "Keywords");
                                                              ~~~~~~~~~~~~~~~~                   ^
/usr/include/poppler/Dict.h:79:3: note: 'lookup' declared here
  Object *lookup(const char *key, Object *obj, int recursion = 0);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:773:53: error: too few arguments to function call, single argument 'obj' was not
      specified
                                                        Object trans = pdfDoc->getPage(pp)->getTrans();
                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/poppler/Page.h:203:3: note: 'getTrans' declared here
  Object *getTrans(Object *obj) { return trans.fetch(xref, obj); }
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:825:55: error: too few arguments to function call, single argument 'obj' was not
      specified
                                                        Object catDict = pdfDoc->getXRef()->getCatalog();
                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/include/poppler/XRef.h:143:3: note: 'getCatalog' declared here
  Object *getCatalog(Object *obj);
  ^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:828:50: error: too few arguments to function call, expected at least 2, have 1
                                                                Object names = catDict.dictLookup("Names");
                                                                               ~~~~~~~~~~~~~~~~~~        ^
/usr/include/poppler/Object.h:329:1: note: 'dictLookup' declared here
inline Object *Object::dictLookup(const char *key, Object *obj, int recursion)
^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:831:52: error: too few arguments to function call, expected at least 2, have 1
                                                                        Object obj = names.dictLookup("JavaScript");
                                                                                     ~~~~~~~~~~~~~~~~             ^
/usr/include/poppler/Object.h:329:1: note: 'dictLookup' declared here
inline Object *Object::dictLookup(const char *key, Object *obj, int recursion)
^
/tmp/SBo/scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp:838:48: error: too few arguments to function call, expected at least 2, have 1
                                                                names = catDict.dictLookup("OpenAction");
                                                                        ~~~~~~~~~~~~~~~~~~             ^
/usr/include/poppler/Object.h:329:1: note: 'dictLookup' declared here
inline Object *Object::dictLookup(const char *key, Object *obj, int recursion)
^
[ 89%] Built target importpct
[ 89%] Building CXX object scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdfplugin.cpp.o
12 errors generated.
scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/build.make:77: set di istruzioni per l'obiettivo "scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o" non riuscito
make[2]: *** [scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/importpdf.cpp.o] Errore 1
make[2]: *** Attesa per i processi non terminati....
[ 89%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/importpm.cpp.o
CMakeFiles/Makefile2:1831: set di istruzioni per l'obiettivo "scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/all" non riuscito
make[1]: *** [scribus/plugins/import/pdf/CMakeFiles/importpdf.dir/all] Errore 2
make[1]: *** Attesa per i processi non terminati....
[ 89%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/importpmplugin.cpp.o
[ 89%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/moc_importpm.cpp.o
[ 89%] Building CXX object scribus/plugins/import/pm/CMakeFiles/importpm.dir/moc_importpmplugin.cpp.o
[ 90%] Linking CXX shared module libimportpm.so
[ 90%] Built target importpm
Makefile:149: set di istruzioni per l'obiettivo "all" non riuscito
Se avete qualche idea di dove possa stare il problema e quali controlli fare...

Metto anche qualche riferimento allo slackbuild usato se non l'avevo già scritto nei post precedenti, mi sono servito da giorgio peron:
https://github.com/gperon/mmyy_slackbui ... ce/scribus

Poi ho chiesto lumi sul forum di scribus dove mi hanno indirizzato alla chat irc #cmake su Freenode. Lì mi hanno suggerito la variabile d'ambiente PKG_CONFIG_PATH.
Ok, vedo anche lì se sanno dirmi qualcosa sull'errore con cui tarmina la compilazione...
Intanto grazie per le dritte!

Avatar utente
joe
Iper Master
Iper Master
Messaggi: 3797
Iscritto il: ven 27 apr 2007, 11:21
Slackware: 15.0
Kernel: 5.15.38
Desktop: dwm

Re: Scribus 1.5.5 su slackware 14.2

Messaggio da joe »

Un aggiornamento.
Sono riuscito a compilare il pacchetto usando la versione di poppler più recente (quella della current) installata in /opt, in modo che non dia fastidio alla vecchia di default.
Però all'avvio di scribus persistono problemi. In pratica poppler non riesce comuque a trovarlo in opt

Problemi che gli sviluppatori di scribus dovrebbero aver in parte risolto introducendo alcuni fix nella versione 1.5.6 SVN.
Ho provato a compilarla ma richiede la versione di CMake più recente::

Codice: Seleziona tutto

CMake Error at CMakeLists.txt:9 (cmake_minimum_required):
  CMake 3.12.0 or higher is required.  You are running version 3.5.2
A questo punto direi che su slackwarre 14.2 non convenga installare cmake più recente in quanto immagino che mezzo sistema dipenda dalla versione attualmente installata.
Di conseguenza non si riesce a compilare versioni di Scribus superiori alla 1.5.5, e comunque anche compilando la 1.5.5, ci sono problemi con poppler perchè quelle della 14.2 sono vecchie e appunto aggiornandole si devono aggiornare un sacco di altri pacchetti in cascata. Un macello insomma.

In soldoni la versione 1.5.4 si può compilare ed è funzionante senza errori.
Quelle superiori, meglio avere un sistema più recente della 14.2. O si aspetta la 15.0 (che non ho ancora cpito quando dovrebbe su per giù uscire) oppure si installa la current con tutto ciò che comporta (in primis tanti pacchetti non pronti e tanti slackbuilds preparati per la stabile m potenzialmente da rivedere per la current tipo quelli di SBo).

Pazienza... Io mi sa che rinuncio.
Se avete idee consigli commenti...

Avatar utente
joe
Iper Master
Iper Master
Messaggi: 3797
Iscritto il: ven 27 apr 2007, 11:21
Slackware: 15.0
Kernel: 5.15.38
Desktop: dwm

Re: Scribus 1.5.5 su slackware 14.2

Messaggio da joe »

joe ha scritto: Sono riuscito a compilare il pacchetto usando la versione di poppler più recente (quella della current) installata in /opt, in modo che non dia fastidio alla vecchia di default.
Però all'avvio di scribus persistono problemi. In pratica poppler non riesce comuque a trovarlo in opt
Aggiorno un attimo la situazione:
l'utente A.L.E. sul forum scribus ha inserito una patch che può essere applicata alla versione scribus-1.5.5.
Serve alla compilazione di scribus indicando una installazione alternativa di poppler, avente librerie e intestazioni ecc in directories non convenzionali: ad esempio nel mio caso ho installato sulla mia slackware 14.2 il poppler della current, messo in /opt/poppler-new, quindi mantenendo inalterata la versione precedente che resta installata nelle solite directories /usr/...
Da poppler 0.45 della 14.2 dipende troppa roba del sistema, ma per compilare scribus 1.5.5 serve una versione di poppler molto più recente (>0.58 se non ricordo male). Purtroppo per slack-14.2 non ci sono pacchetti di poppler così recenti, pertanto l'unica è compilarsene una versione recente per conto proprio ed installarla in una directory "esotica" tipo /opt/poppler-new appunto, così da non risultare "invasiva".
(Visto che mi serve solo per scribus, forse si potrebbe anche linkare staticamente senza dover quindi installare poppler nel sistema... ma non sono un esperto quindi posso dire una sciocchezza).

Ad ogni modo:
- poppler installato dallo slackbuild della current, versione 0.68, modificando in modo che il pacchetto si chiami poppler_new e che abbia come prefix la dir /opt/poppler-new: https://mirrors.slackware.com/slackware ... /l/poppler
- scribus 1.5.5 dal repo github di gperon: https://github.com/gperon/mmyy_slackbui ... ce/scribus
- patch: https://gitlab.com/a.l.e/scribus/commit ... 94dadf3ed9
- slackbuild di Giorgio Peron modificato appunto per cercare poppler in /opt/poppler-new e in modo da applicare la patch di cui sopra

Come fare per testare
- installare poppler scaricando il contenuto della dir linkata sopra dal repo slackware, sostituendovi però lo slackbuild corrispondente in allegato
poppler.Slackbuild.TXT
(4.82 KiB) Scaricato 103 volte
- scaricare il contenuto della dir scribus del repo git di gperon
- aggiungervi il tarball dei sorgenti di scribus 1.5.5: https://sourceforge.net/projects/scribu ... z/download
- aggiungere la patch 20190312-ale.diff in allegato
20191203-ale.diff.TXT
(4.47 KiB) Scaricato 99 volte
- sostituire lo slackbuild di scribus con quello in allegato
scribus.SlackBuild.TXT
(4.33 KiB) Scaricato 105 volte
Ok, in questo modo si riesce, almeno sul mio sistema, a compilare ed installare scribus-1.5.5.
Come dicevo nel messaggio precedente, all'avvio di Scribus salta fuori un poupup che lamenta qualche problema con la libreria libimportpdf.
Dando un bel

Codice: Seleziona tutto

ldd /usr/lib64/scribus/plugins/libimportpdf.so|grep not
Salta fuori che non trova la libreria libpoppler.79.so.
Per risolvere questo inghippo probabilmente la soluzione corretta sta nel aggiustare ancora qualcosa nei sorgenti di Scribus, quindi mi sa che servirà un'ulteriore patch (perché nella compilazione gli abbiamo detto di andare a prendere la libreria poppler in /opt/poppler-new, e poi però in runtime, la cerca, segno che durante la compilazione l'ha trovata, ma non la trova perchè non va a guardare in /opt... quindi c'è qualcosa che non và).
In attesa che gli sviluppatori di Scribus, ci mettano mano, a noi poveri diavoli non resta che la soluzione sporca:

Codice: Seleziona tutto

cd /usr/lib64; ln -s /opt/poppler-new/lib64/libpoppler.so.79.0.0 libpoppler.so.79
In realtà in /opt/poppler-new/lib64/ c'è anche il link simbolico libpoppler.so.79 che punta all'altro file libpoppler.so.79.0.0, link che in ogni caso non viene trovato all'avvio di Scribus.
Questo escamotage del link simbolico potrebbe essere anche incluso nello slackbuild di poppler, ma per il momento ho preferito farlo a mano perché se come sospetto dipende da qualche problema nei sorgenti di scribus, quando lo correggono non dovrebbe più essere necessario.

Ok, facendo questi passaggi si ottiene una versione 1.5.5 di scribus, che si avvia senza errori e al momento è apparentemente funzionante senza problemi.
Se volete provare anche voi a fare un test ben venga! :thumbright:

Se avete consigli eventualmente sul linking statico di scribus a poppler, in modo da non dover installare la versione nuova in /opt e complicare le cose, fate sapere!
Buon publishing!

Rispondi