diff options
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 56 | ||||
-rw-r--r-- | poppler0.58.patch | 195 |
3 files changed, 31 insertions, 248 deletions
@@ -1,24 +1,16 @@ -# Generated by mksrcinfo v8 -# Sun Apr 29 19:15:42 UTC 2018 pkgbase = boomaga - pkgdesc = Is a virtual printer for viewing a document before printing it out using the physical printer - pkgver = 1.3.0 + pkgdesc = Virtual printer for viewing a document before printing it out using the physical printer + pkgver = 3.0.0 pkgrel = 1 - url = https://www.linux-apps.com/p/1152844/ - arch = i686 + url = https://www.boomaga.org/ arch = x86_64 - license = LGPL + license = GPL2 + license = LGPL2.1 makedepends = cmake - makedepends = gcc - depends = kdebase-runtime - depends = ghostscript - depends = snappy - depends = poppler>=0.58 - options = !emptydirs - source = https://github.com/Boomaga/boomaga/archive/v1.3.0.tar.gz - source = poppler0.58.patch - md5sums = 412769d55f72afc6a646a00725274b1a - md5sums = 781dd4766689c5fb765ecf76845facc4 + makedepends = qt5-tools + depends = qt5-base + depends = poppler + source = boomaga-3.0.0.tar.gz::https://github.com/Boomaga/boomaga/archive/v3.0.0.tar.gz + sha256sums = 74af10ec5a78008d335011eca0f63ed7ccd4bc2fdac2f4cffa73db7acc05e767 pkgname = boomaga - @@ -1,48 +1,34 @@ -# Contributer: giacomogiorgianni@gmail.com +# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix +# Contributor: giacomogiorgianni@gmail.com pkgname=boomaga -name=Boomaga -pkgver=1.3.0 -_name=boomaga +pkgver=3.0.0 pkgrel=1 -pkgdesc="Is a virtual printer for viewing a document before printing it out using the physical printer" -arch=('i686' 'x86_64') -url="https://www.linux-apps.com/p/1152844/" -license=('LGPL') -depends=('kdebase-runtime' 'ghostscript' 'snappy' 'poppler>=0.58') -makedepends=('cmake' 'gcc') -options=(!emptydirs) - -source=(https://github.com/Boomaga/${pkgname}/archive/v${pkgver}.tar.gz poppler0.58.patch) -#source="${pkgname}-${pkgver}.tar.gz::https://github.com/Boomaga/${pkgname}/archive/v${pkgver}.tar.gz" - -md5sums=('a2176489b343f6bd1813a82a4ff9a8cb') +pkgdesc="Virtual printer for viewing a document before printing it out using the physical printer" +arch=(x86_64) +url="https://www.boomaga.org/" +license=(GPL2 LGPL2.1) +depends=(qt5-base poppler) +makedepends=(cmake qt5-tools) +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Boomaga/boomaga/archive/v${pkgver}.tar.gz") +sha256sums=('74af10ec5a78008d335011eca0f63ed7ccd4bc2fdac2f4cffa73db7acc05e767') prepare() { - cd $_name-$pkgver - patch -Np1 -i ../poppler0.58.patch + cd "${srcdir}/${pkgname}-${pkgver}" + [[ -d build ]] || mkdir build } build() { - cd $srcdir/$pkgname-$pkgver - if [ -d build ] ; then - rm build/* -rf - else - mkdir build - fi - cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr .. - make + cd "${srcdir}/${pkgname}-${pkgver}/build" + cmake .. -Wno-dev \ + -DBUILD_TESTS=Yes \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr + make } package() { - cd ${srcdir}/${pkgname}-${pkgver}/build + cd "${srcdir}/${pkgname}-${pkgver}/build" make DESTDIR="$pkgdir/" install - install -D -m755 $srcdir/$pkgname-$pkgver/scripts/installPrinter.sh ${pkgdir}/usr/bin/ - - #if [ 'pacman -Q poppler | tr -s " "|cut -d" " -f2 | sed 's/..$//'' = '0.28.1' ]; then - # ln -s "/usr/lib/libpoppler.so" "${pkgdir}/usr/liblibpoppler.so.46.0.0" || return 1 - #fi + #install -D -m755 "$srcdir/$pkgname-$pkgver/scripts/installPrinter.sh" "${pkgdir}/usr/bin/" } -md5sums=('412769d55f72afc6a646a00725274b1a' - '781dd4766689c5fb765ecf76845facc4') diff --git a/poppler0.58.patch b/poppler0.58.patch deleted file mode 100644 index 6d38c489193d..000000000000 --- a/poppler0.58.patch +++ /dev/null @@ -1,195 +0,0 @@ -From bee6187c7d70ea3e66b5428433b15ddb9e849200 Mon Sep 17 00:00:00 2001 -From: David Tardon <dtardon@redhat.com> -Date: Tue, 5 Sep 2017 17:23:29 +0200 -Subject: [PATCH] adapt to poppler 0.58 - ---- - gui/kernel/boomagapoppler.cpp | 16 ++++++++++++++++ - gui/pdfmerger/pdfmerger.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 59 insertions(+) - -diff --git a/gui/kernel/boomagapoppler.cpp b/gui/kernel/boomagapoppler.cpp -index 0a9d8c7..f975a94 100644 ---- a/gui/kernel/boomagapoppler.cpp -+++ b/gui/kernel/boomagapoppler.cpp -@@ -134,7 +134,11 @@ class PJLFileStream: protected PJLFileStreamData, public FileStream - public: - PJLFileStream(const QString &fileName, qint64 startPos, qint64 endPos): - PJLFileStreamData(fileName, startPos, endPos), -+#if POPPLER_VERSION < 5800 - FileStream(mFile, mStartPos, true, mLength, new Object()) -+#else -+ FileStream(mFile, mStartPos, true, mLength, Object()) -+#endif - { - } - -@@ -189,12 +193,20 @@ QString BoomagaPDFDoc::getMetaInfo(const char *tag) - QString result; - Object docInfo; - -+#if POPPLER_VERSION < 5800 - getDocInfo(&docInfo); -+#else -+ docInfo = getDocInfo(); -+#endif - if (docInfo.isDict()) - { - Dict *dict = docInfo.getDict(); - Object obj; -+#if POPPLER_VERSION < 5800 - dict->lookup((char*)tag, &obj); -+#else -+ obj = dict->lookup((char*)tag); -+#endif - - if (obj.isString()) - { -@@ -211,10 +223,14 @@ QString BoomagaPDFDoc::getMetaInfo(const char *tag) - } - } - -+#if POPPLER_VERSION < 5800 - obj.free(); -+#endif - - } -+#if POPPLER_VERSION < 5800 - docInfo.free(); -+#endif - - return result; - } -diff --git a/gui/pdfmerger/pdfmerger.cpp b/gui/pdfmerger/pdfmerger.cpp -index 848ae09..ff85868 100644 ---- a/gui/pdfmerger/pdfmerger.cpp -+++ b/gui/pdfmerger/pdfmerger.cpp -@@ -109,11 +109,18 @@ void writeTrailer(XRef *xRef, int rootNum, OutStream* stream) - ref.num = rootNum; - ref.gen = 0; - -+#if POPPLER_VERSION < 5800 - Dict *trailerDict = PDFDoc::createTrailerDict(xRef->getNumObjects(), false, 0, &ref, xRef, - "fileName", stream->getPos()); - PDFDoc::writeXRefTableTrailer(trailerDict, xRef, false /* do not write unnecessary entries */, - uxrefOffset, stream, xRef); - delete trailerDict; -+#else -+ Object trailerDict = PDFDoc::createTrailerDict(xRef->getNumObjects(), false, 0, &ref, xRef, -+ "fileName", stream->getPos()); -+ PDFDoc::writeXRefTableTrailer(std::move(trailerDict), xRef, false /* do not write unnecessary entries */, -+ uxrefOffset, stream, xRef); -+#endif - #endif - } - -@@ -238,9 +245,15 @@ OutStream &operator<<(OutStream &stream, const int value) - OutStream &operator<<(OutStream &stream, Stream &value) - { - Object obj1; -+#if POPPLER_VERSION < 5800 - value.getDict()->lookup((char*)"Length", &obj1); -+#else -+ obj1 = value.getDict()->lookup((char*)"Length"); -+#endif - const int length = obj1.getInt(); -+#if POPPLER_VERSION < 5800 - obj1.free(); -+#endif - - value.unfilteredReset(); - -@@ -278,8 +291,10 @@ class PdfMergerPageInfo: public PdfPageInfo - - ~PdfMergerPageInfo() - { -+#if POPPLER_VERSION < 5800 - page.free(); - stream.free(); -+#endif - } - - PDFDoc *doc; -@@ -308,7 +323,11 @@ QString PdfMergerPageInfo::dump() - for (int i=0; i < array->getLength(); ++i) - { - Object o; -+#if POPPLER_VERSION < 5800 - array->get(i, &o); -+#else -+ o = array->get(i); -+#endif - res += QString(" * %1 - %2\n").arg(i).arg(o.getTypeName()); - } - } -@@ -448,7 +467,11 @@ bool PdfMerger::run(const QString &outFileName) - - pageInfo->doc = doc; - pageInfo->numOffset = numOffset; -+#if POPPLER_VERSION < 5800 - doc->getXRef()->fetch(refPage->num, refPage->gen, &(pageInfo->page)); -+#else -+ pageInfo->page = doc->getXRef()->fetch(refPage->num, refPage->gen); -+#endif - Dict *pageDict = pageInfo->page.getDict(); - - PDFRectangle *mediaBox = page->getMediaBox(); -@@ -469,7 +492,11 @@ bool PdfMerger::run(const QString &outFileName) - pageInfo->pageNum = i; - if (pageDict->hasKey((char *)"Contents")) - { -+#if POPPLER_VERSION < 5800 - pageDict->lookup((char *)"Contents", &(pageInfo->stream)); -+#else -+ pageInfo->stream = pageDict->lookup((char *)"Contents"); -+#endif - pageDict->remove((char *)"Contents"); - } - -@@ -575,11 +602,17 @@ void PdfMerger::writeStreamAsXObject(PdfMergerPageInfo *pageInfo, Stream *stream - for (int i=0; i<dict->getLength(); ++i) - { - Object value; -+#if POPPLER_VERSION < 5800 - dict->getVal(i, &value); -+#else -+ dict->getVal(i); -+#endif - *mStream << "/" << dict->getKey(i) << " "; - POPPLER_WriteObject(&value, 0, mStream, &mXRef, pageInfo->numOffset); - *mStream << "\n"; -+#if POPPLER_VERSION < 5800 - value.free(); -+#endif - } - *mStream << " >>\n"; - -@@ -617,7 +650,11 @@ bool PdfMerger::writePageAsXObject(PdfMergerPageInfo *pageInfo) - for (int i=0; i < array->getLength(); ++i) - { - Object o; -+#if POPPLER_VERSION < 5800 - array->get(i, &o); -+#else -+ o = array->get(i); -+#endif - if (!o.isStream()) - { - warning("Page content is array with incorrect item type:\n" + pageInfo->dump() + "\n"); -@@ -643,10 +680,16 @@ bool PdfMerger::writeDictValue(Dict *dict, const char *key, Guint numOffset) - return false; - - Object value; -+#if POPPLER_VERSION < 5800 - dict->lookupNF((char*)key, &value); -+#else -+ value = dict->lookupNF((char*)key); -+#endif - *mStream << "/" << key << " "; - POPPLER_WriteObject(&value, 0, mStream, &mXRef, numOffset); - *mStream << "\n"; -+#if POPPLER_VERSION < 5800 - value.free(); -+#endif - return true; - }
\ No newline at end of file |