diff options
author | bartus | 2019-04-12 09:30:00 +0200 |
---|---|---|
committer | bartus | 2019-04-12 09:30:00 +0200 |
commit | f9c233fb5d14ae01f847f6e1c77cbed41f8fa2e3 (patch) | |
tree | 0fa401f3cdcd4bbf45a549e8c9aa5f32efe608c9 | |
parent | a8e5e8d757716543a24051415cdd3de534f6eb72 (diff) | |
download | aur-f9c233fb5d14ae01f847f6e1c77cbed41f8fa2e3.tar.gz |
initial work
drop Thirdparty repo
replace xpdf with poppler
use system quazip
-rw-r--r-- | PKGBUILD | 29 | ||||
-rw-r--r-- | poppler.patch | 91 | ||||
-rw-r--r-- | quazip.diff | 62 |
3 files changed, 162 insertions, 20 deletions
@@ -9,10 +9,14 @@ arch=('x86_64') url="http://openboard.ch/index.en.html" license=('GPL3') depends=('qt5-base' 'qt5-multimedia' 'qt5-svg' 'qt5-script' 'qt5-webkit' 'qt5-tools' 'qt5-xmlpatterns' 'libpaper' 'bzip2' 'openssl' 'libfdk-aac' 'sdl' 'ffmpeg') +depends+=(poppler) #replace xpdf lib with poppler, simplify the package and remove internal dep. +depends+=(quazip) #drop internal quazip and use system one. source=("git://github.com/OpenBoard-org/OpenBoard.git${_fragment}" "git://github.com/OpenBoard-org/OpenBoard-ThirdParty.git" qchar.patch qwebkit.patch + quazip.diff + poppler.patch https://github.com/OpenBoard-org/OpenBoard/pull/218.diff https://github.com/OpenBoard-org/OpenBoard/pull/223.diff openboard.desktop) @@ -20,6 +24,8 @@ md5sums=('SKIP' 'SKIP' 'bf2c524f3897cfcfb4315bcd92d4206e' '60f64db6bf627015f4747879c4b30fd3' + 'a9876bd6bcf72e95203a874068d14978' + '8b774d204501bb8515ee224651a7d624' 'f484614cc48181287607afb5a45ef644' '04c421c140e983d41975943ede5fe61a' '21d1749400802f8fc0669feaf77de683') @@ -33,30 +39,13 @@ prepare() { cd $srcdir/OpenBoard patch -p1 < $srcdir/qchar.patch patch -p1 < $srcdir/qwebkit.patch + patch -p1 < $srcdir/quazip.diff + patch -p1 < $srcdir/poppler.patch patch -p1 < $srcdir/218.diff patch -p1 < $srcdir/223.diff } build() { - cd "$srcdir/OpenBoard-ThirdParty" - - cd freetype - qmake freetype.pro -spec linux-g++ - make - cd .. - - cd quazip - qmake quazip.pro -spec linux-g++ - make - cd .. - - cd xpdf/xpdf-3.04 - ./configure --with-freetype2-library="../../freetype/lib/linux" --with-freetype2-includes="../../freetype/freetype-2.6.1/include" - cd .. - qmake xpdf.pro -spec linux-g++ - make - cd .. - cd "$srcdir/OpenBoard" qmake OpenBoard.pro -spec linux-g++ make @@ -69,7 +58,7 @@ package() { for i in customizations etc i18n library; do cp -rp $srcdir/OpenBoard/resources/$i $pkgdir/opt/openboard; - done + done cp -rp $srcdir/OpenBoard/resources/images/OpenBoard.png $pkgdir/opt/openboard/ cp -rp build/linux/release/product/OpenBoard $pkgdir/opt/openboard/ diff --git a/poppler.patch b/poppler.patch new file mode 100644 index 000000000000..50c62230e093 --- /dev/null +++ b/poppler.patch @@ -0,0 +1,91 @@ +diff --git a/src/pdf/XPDFRenderer.cpp b/src/pdf/XPDFRenderer.cpp +index a3e828e4..583882aa 100644 +--- a/src/pdf/XPDFRenderer.cpp ++++ b/src/pdf/XPDFRenderer.cpp +@@ -32,6 +32,7 @@ + #include <QtGui> + + #include <frameworks/UBPlatformUtils.h> ++#include <poppler/cpp/poppler-version.h> + + #include "core/memcheck.h" + +@@ -51,7 +52,7 @@ XPDFRenderer::XPDFRenderer(const QString &filename, bool importingFile) + globalParams->setupBaseFonts(QFile::encodeName(UBPlatformUtils::applicationResourcesDirectory() + "/" + "fonts").data()); + } + +- mDocument = new PDFDoc(new GString(filename.toLocal8Bit()), 0, 0, 0); // the filename GString is deleted on PDFDoc desctruction ++ mDocument = new PDFDoc(new GooString(filename.toLocal8Bit()), 0, 0, 0); // the filename GString is deleted on PDFDoc desctruction + sInstancesCount.ref(); + } + +@@ -99,16 +100,28 @@ QString XPDFRenderer::title() const + { + if (isValid()) + { ++#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 55 ++ Object pdfInfo = mDocument->getDocInfo(); ++#else + Object pdfInfo; + mDocument->getDocInfo(&pdfInfo); ++#endif + if (pdfInfo.isDict()) + { +- Object title; + Dict *infoDict = pdfInfo.getDict(); +- if (infoDict->lookup((char*)"Title", &title)->isString()) ++#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 55 ++ Object title = infoDict->lookup((char*)"Title"); ++#else ++ Object title; ++ infoDict->lookup((char*)"Title", &title); ++#endif ++ if (title.isString()) + { +- GString *gstring = title.getString(); +- return QString(gstring->getCString()); ++#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 72 ++ return QString(title.getString()->c_str()); ++#else ++ return QString(title.getString()->getCString()); ++#endif + } + } + } +@@ -172,12 +185,12 @@ QImage* XPDFRenderer::createPDFImage(int pageNumber, qreal xscale, qreal yscale, + SplashColor paperColor = {0xFF, 0xFF, 0xFF}; // white + if(mSplash) + delete mSplash; +- mSplash = new SplashOutputDev(splashModeRGB8, 1, gFalse, paperColor); +- mSplash->startDoc(mDocument->getXRef()); ++ mSplash = new SplashOutputDev(splashModeRGB8, 1, false, paperColor); ++ mSplash->startDoc(mDocument); + int rotation = 0; // in degrees (get it from the worldTransform if we want to support rotation) +- GBool useMediaBox = gFalse; +- GBool crop = gTrue; +- GBool printing = gFalse; ++ bool useMediaBox = false; ++ bool crop = true; ++ bool printing = false; + mSliceX = 0.; + mSliceY = 0.; + +diff --git a/src/pdf/XPDFRenderer.h b/src/pdf/XPDFRenderer.h +index 8ab200bc..003a2055 100644 +--- a/src/pdf/XPDFRenderer.h ++++ b/src/pdf/XPDFRenderer.h +@@ -36,10 +36,10 @@ + #include "globals/UBGlobals.h" + + THIRD_PARTY_WARNINGS_DISABLE +-#include <xpdf/Object.h> +-#include <xpdf/GlobalParams.h> +-#include <xpdf/SplashOutputDev.h> +-#include <xpdf/PDFDoc.h> ++#include <poppler/Object.h> ++#include <poppler/GlobalParams.h> ++#include <poppler/SplashOutputDev.h> ++#include <poppler/PDFDoc.h> + THIRD_PARTY_WARNINGS_ENABLE + + class PDFDoc; diff --git a/quazip.diff b/quazip.diff new file mode 100644 index 000000000000..b73a205ba5ec --- /dev/null +++ b/quazip.diff @@ -0,0 +1,62 @@ +--- OpenBoard-1.5.3/OpenBoard.pro 2019-04-10 09:04:25.000000000 +0200 ++++ OpenBoard-1.5.3-quazip/OpenBoard.pro 2019-04-12 08:54:40.265598779 +0200 +@@ -71,9 +71,7 @@ + INCLUDEPATH += plugins/cffadaptor/src + + #ThirdParty +-DEPENDPATH += $$THIRD_PARTY_PATH/quazip/ +-INCLUDEPATH += $$THIRD_PARTY_PATH/quazip/ +-include($$THIRD_PARTY_PATH/quazip/quazip.pri) ++INCLUDEPATH += /usr/include/quazip5/ + + FORMS += resources/forms/mainWindow.ui \ + resources/forms/preferences.ui \ +@@ -164,11 +162,8 @@ + LIBS += -framework CoreMedia + LIBS += -lcrypto + +- LIBS += -L/usr/local/opt/quazip/lib +- LIBS += -L/usr/local/opt/ffmpeg/lib + INCLUDEPATH += /usr/local/opt/openssl/include + INCLUDEPATH += /usr/local/opt/ffmpeg/include +- INCLUDEPATH += /usr/local/opt/quazip/include + + CONFIG(release, debug|release):CONFIG += x86_64 + CONFIG(debug, debug|release):CONFIG += x86_64 +--- OpenBoard-1.5.3/plugins/cffadaptor/UBCFFAdaptor.pro 2019-04-10 09:04:25.000000000 +0200 ++++ OpenBoard-1.5.3-quazip/plugins/cffadaptor/UBCFFAdaptor.pro 2019-04-12 08:53:45.622844493 +0200 +@@ -14,7 +14,6 @@ + linux-g++-64: SUB_DIR = linux + + THIRD_PARTY_PATH = ../../../Sankore-ThirdParty +-QUAZIP_DIR = "$$PWD/../../../Sankore-ThirdParty/quazip/quazip-0.3" + + BUILD_DIR = build/$$SUB_DIR + CONFIG(debug, debug|release):BUILD_DIR = $$BUILD_DIR/debug +@@ -39,7 +38,7 @@ + QMAKE_POST_LINK += bash postScript_mac.sh "$$DESTDIR" "$$SANKORE_DIR/$$BUILD_DIR/product/Open-Sankore.app/Contents/MacOS" + } + +-LIBS += "-L$$THIRD_PARTY_PATH/quazip/lib/$$SUB_DIR" "-lquazip" ++LIBS += "-lquazip" + + QT += xml xmlpatterns core + QT += gui +@@ -51,9 +50,7 @@ + + INCLUDEPATH += src + +-DEPENDPATH += $$THIRD_PARTY_PATH/quazip/ +-INCLUDEPATH += $$THIRD_PARTY_PATH/quazip/ +-include($$THIRD_PARTY_PATH/quazip/quazip.pri) ++INCLUDEPATH += /usr/include/quazip5/ + + + SOURCES += \ +@@ -66,4 +63,4 @@ + src/UBCFFConstants.h + + RESOURCES += \ +- resources/resources.qrc +\ Brak znaku nowej linii na końcu pliku ++ resources/resources.qrc |