summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-01-01 14:38:58 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2019-01-01 20:40:08 +0100
commit3c55b2008f5417f6ddf252fddde26820cdad6b44 (patch)
treea353b2fabd0346336f8d7c1920c0b0460553c942 /app-office/calligra
parentapp-office/calligraplan: New package (diff)
downloadgentoo-3c55b2008f5417f6ddf252fddde26820cdad6b44.tar.gz
gentoo-3c55b2008f5417f6ddf252fddde26820cdad6b44.tar.bz2
gentoo-3c55b2008f5417f6ddf252fddde26820cdad6b44.zip
app-office/calligra: Split out plan, fix build with >=poppler-0.71
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'app-office/calligra')
-rw-r--r--app-office/calligra/calligra-3.1.0-r3.ebuild211
-rw-r--r--app-office/calligra/files/calligra-3.1.0-poppler-0.69.patch83
-rw-r--r--app-office/calligra/files/calligra-3.1.0-poppler-0.71.patch202
3 files changed, 496 insertions, 0 deletions
diff --git a/app-office/calligra/calligra-3.1.0-r3.ebuild b/app-office/calligra/calligra-3.1.0-r3.ebuild
new file mode 100644
index 000000000000..46e011852b1e
--- /dev/null
+++ b/app-office/calligra/calligra-3.1.0-r3.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CHECKREQS_DISK_BUILD="4G"
+KDE_DOC_DIR="xxx" # contains no language subdirs
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="forceoptional"
+inherit check-reqs kde5
+
+DESCRIPTION="KDE Office Suite"
+HOMEPAGE="https://www.calligra.org/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+CAL_FTS=( karbon sheets words )
+
+IUSE="activities +crypt +fontconfig gemini gsl import-filter +lcms okular openexr +pdf
+ phonon pim spacenav +truetype X $(printf 'calligra_features_%s ' ${CAL_FTS[@]})
+ calligra_experimental_features_stage"
+
+# TODO: Not packaged: Cauchy (https://bitbucket.org/cyrille/cauchy)
+# Required for the matlab/octave formula tool
+COMMON_DEPEND="
+ $(add_frameworks_dep karchive)
+ $(add_frameworks_dep kcmutils)
+ $(add_frameworks_dep kcodecs)
+ $(add_frameworks_dep kcompletion)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kdelibs4support)
+ $(add_frameworks_dep kemoticons)
+ $(add_frameworks_dep kglobalaccel)
+ $(add_frameworks_dep kguiaddons)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep kitemmodels)
+ $(add_frameworks_dep kitemviews)
+ $(add_frameworks_dep kjobwidgets)
+ $(add_frameworks_dep knotifications)
+ $(add_frameworks_dep knotifyconfig)
+ $(add_frameworks_dep kparts)
+ $(add_frameworks_dep kross)
+ $(add_frameworks_dep ktextwidgets)
+ $(add_frameworks_dep kwallet)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kwindowsystem)
+ $(add_frameworks_dep kxmlgui)
+ $(add_frameworks_dep sonnet)
+ $(add_qt_dep designer)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtdeclarative)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork)
+ $(add_qt_dep qtprintsupport)
+ $(add_qt_dep qtscript)
+ $(add_qt_dep qtsvg)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ dev-lang/perl
+ sys-libs/zlib
+ virtual/libiconv
+ activities? ( $(add_frameworks_dep kactivities) )
+ crypt? ( app-crypt/qca:2[qt5(+)] )
+ fontconfig? ( media-libs/fontconfig )
+ gemini? ( $(add_qt_dep qtdeclarative 'widgets') )
+ gsl? ( sci-libs/gsl )
+ import-filter? (
+ $(add_frameworks_dep khtml)
+ app-text/libetonyek
+ app-text/libodfgen
+ app-text/libwpd:*
+ app-text/libwpg:*
+ >=app-text/libwps-0.4
+ dev-libs/librevenge
+ media-libs/libvisio
+ )
+ lcms? (
+ media-libs/ilmbase:=
+ media-libs/lcms:2
+ )
+ openexr? ( media-libs/openexr )
+ pdf? ( >=app-text/poppler-0.64:=[qt5] )
+ phonon? ( media-libs/phonon[qt5(+)] )
+ pim? ( $(add_kdeapps_dep kcalcore) )
+ spacenav? ( dev-libs/libspnav )
+ truetype? ( media-libs/freetype:2 )
+ X? (
+ $(add_qt_dep qtx11extras)
+ x11-libs/libX11
+ )
+ calligra_experimental_features_stage? (
+ $(add_qt_dep qtwebkit)
+ okular? ( $(add_kdeapps_dep okular) )
+ )
+ calligra_features_sheets? ( dev-cpp/eigen:3 )
+ calligra_features_words? (
+ dev-libs/libxslt
+ okular? ( $(add_kdeapps_dep okular) )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-libs/boost
+ sys-devel/gettext
+ x11-misc/shared-mime-info
+ test? ( $(add_frameworks_dep threadweaver) )
+"
+RDEPEND="${COMMON_DEPEND}
+ calligra_features_karbon? ( media-gfx/pstoedit[plotutils] )
+ !app-office/calligra:4
+ !app-office/calligra-l10n:4
+"
+RESTRICT+=" test"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-arch-detection.patch
+ "${FILESDIR}"/${P}-doc.patch
+ "${FILESDIR}"/${P}-qt-5.11.patch
+ "${FILESDIR}"/${P}-stage-qt-5.11.patch
+ "${FILESDIR}"/${P}-poppler-0.69.patch
+ "${FILESDIR}"/${P}-poppler-0.71.patch
+)
+
+pkg_pretend() {
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ kde5_pkg_setup
+ check-reqs_pkg_setup
+}
+
+src_prepare() {
+ kde5_src_prepare
+
+ if ! use test; then
+ sed -e "/add_subdirectory( *benchmarks *)/s/^/#DONT/" \
+ -i libs/pigment/CMakeLists.txt || die
+ fi
+
+ # Unconditionally disable deprecated deps (required by QtQuick1)
+ punt_bogus_dep Qt5 Declarative
+ punt_bogus_dep Qt5 OpenGL
+
+ if ! use calligra_experimental_features_stage; then
+ punt_bogus_dep Qt5 WebKitWidgets
+ punt_bogus_dep Qt5 WebKit
+ fi
+
+ # Hack around the excessive use of CMake macros
+ if use okular && ! use calligra_features_words; then
+ sed -i -e "/add_subdirectory( *okularodtgenerator *)/ s/^/#DONT/" \
+ extras/CMakeLists.txt || die "Failed to disable OKULAR_GENERATOR_ODT"
+ fi
+
+ if use okular && ! use calligra_experimental_features_stage; then
+ sed -i -e "/add_subdirectory( *okularodpgenerator *)/ s/^/#DONT/" \
+ extras/CMakeLists.txt || die "Failed to disable OKULAR_GENERATOR_ODP"
+ fi
+}
+
+src_configure() {
+ local cal_ft myproducts
+
+ # applications
+ for cal_ft in ${CAL_FTS[@]}; do
+ use calligra_features_${cal_ft} && myproducts+=( "${cal_ft^^}" )
+ done
+
+ use calligra_experimental_features_stage && myproducts+=( STAGE )
+
+ use lcms && myproducts+=( PLUGIN_COLORENGINES )
+ use spacenav && myproducts+=( PLUGIN_SPACENAVIGATOR )
+
+ local mycmakeargs=(
+ -DPACKAGERS_BUILD=OFF
+ -DRELEASE_BUILD=ON
+ -DWITH_Iconv=ON
+ -DPRODUCTSET="${myproducts[*]}"
+ $(cmake-utils_use_find_package activities KF5Activities)
+ -DWITH_Qca-qt5=$(usex crypt)
+ -DWITH_Fontconfig=$(usex fontconfig)
+ $(cmake-utils_use_find_package gemini Libgit2)
+ $(cmake-utils_use_find_package gemini Qt5QuickWidgets)
+ -DWITH_GSL=$(usex gsl)
+ -DWITH_LibEtonyek=$(usex import-filter)
+ -DWITH_LibOdfGen=$(usex import-filter)
+ -DWITH_LibRevenge=$(usex import-filter)
+ -DWITH_LibVisio=$(usex import-filter)
+ -DWITH_LibWpd=$(usex import-filter)
+ -DWITH_LibWpg=$(usex import-filter)
+ -DWITH_LibWps=$(usex import-filter)
+ $(cmake-utils_use_find_package phonon Phonon4Qt5)
+ $(cmake-utils_use_find_package pim KF5CalendarCore)
+ -DWITH_LCMS2=$(usex lcms)
+ -DWITH_Okular5=$(usex okular)
+ -DWITH_OpenEXR=$(usex openexr)
+ -DWITH_Poppler=$(usex pdf)
+ -DWITH_Eigen3=$(usex calligra_features_sheets)
+ -DBUILD_UNMAINTAINED=$(usex calligra_experimental_features_stage)
+ -ENABLE_CSTESTER_TESTING=$(usex test)
+ -DWITH_Freetype=$(usex truetype)
+ )
+
+ kde5_src_configure
+}
diff --git a/app-office/calligra/files/calligra-3.1.0-poppler-0.69.patch b/app-office/calligra/files/calligra-3.1.0-poppler-0.69.patch
new file mode 100644
index 000000000000..c82fbd242b8a
--- /dev/null
+++ b/app-office/calligra/files/calligra-3.1.0-poppler-0.69.patch
@@ -0,0 +1,83 @@
+From 56bd4bab320b0c0a893751caee9a15a2241e3ef8 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Wed, 24 Oct 2018 08:28:00 +0200
+Subject: Fix build with poppler>=0.69
+
+Remove no longer available Object::memCheck usage (which didn't do anything anyway since DEBUG_MEM was not set); add some const's
+
+Differential Revision: https://phabricator.kde.org/D16388
+---
+ filters/karbon/pdf/PdfImport.cpp | 3 ---
+ filters/karbon/pdf/SvgOutputDev.cpp | 8 ++++----
+ filters/karbon/pdf/SvgOutputDev.h | 2 +-
+ 3 files changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp
+index c3e96b0..48b08df 100644
+--- a/filters/karbon/pdf/PdfImport.cpp
++++ b/filters/karbon/pdf/PdfImport.cpp
+@@ -102,9 +102,6 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt
+ delete globalParams;
+ globalParams = 0;
+
+- // check for memory leaks
+- Object::memCheck(stderr);
+-
+ return KoFilter::OK;
+ }
+
+diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp
+index 931917a..7901317 100644
+--- a/filters/karbon/pdf/SvgOutputDev.cpp
++++ b/filters/karbon/pdf/SvgOutputDev.cpp
+@@ -212,7 +212,7 @@ QString SvgOutputDev::convertMatrix(const QMatrix &matrix)
+ .arg(matrix.dx()) .arg(matrix.dy());
+ }
+
+-QString SvgOutputDev::convertMatrix(double * matrix)
++QString SvgOutputDev::convertMatrix(const double * matrix)
+ {
+ return QString("matrix(%1 %2 %3 %4 %5 %6)")
+ .arg(matrix[0]).arg(matrix[1])
+@@ -402,7 +402,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s)
+
+ QString str;
+
+- char * p = s->getCString();
++ const char * p = s->getCString();
+ int len = s->getLength();
+ CharCode code;
+ Unicode *u = nullptr;
+@@ -429,7 +429,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s)
+ double x = state->getCurX();
+ double y = state->getCurY();
+
+- double * ctm = state->getCTM();
++ const double * ctm = state->getCTM();
+ QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+
+ QMatrix mirror;
+@@ -522,7 +522,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str,
+ return;
+ }
+
+- double * ctm = state->getCTM();
++ const double * ctm = state->getCTM();
+ QMatrix m;
+ m.setMatrix(ctm[0] / width, ctm[1] / width, -ctm[2] / height, -ctm[3] / height, ctm[2] + ctm[4], ctm[3] + ctm[5]);
+
+diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h
+index 85fe55d..2a44908 100644
+--- a/filters/karbon/pdf/SvgOutputDev.h
++++ b/filters/karbon/pdf/SvgOutputDev.h
+@@ -84,7 +84,7 @@ public:
+ private:
+ QString convertPath(GfxPath *path);
+ QString convertMatrix(const QMatrix &matrix);
+- QString convertMatrix(double * matrix);
++ QString convertMatrix(const double * matrix);
+ QString printFill();
+ QString printStroke();
+
+--
+cgit v1.1
diff --git a/app-office/calligra/files/calligra-3.1.0-poppler-0.71.patch b/app-office/calligra/files/calligra-3.1.0-poppler-0.71.patch
new file mode 100644
index 000000000000..6b50e3a42ed0
--- /dev/null
+++ b/app-office/calligra/files/calligra-3.1.0-poppler-0.71.patch
@@ -0,0 +1,202 @@
+From fa4c2961b8280456d4c1484565b973d312e0bd1c Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Thu, 25 Oct 2018 23:04:39 +0200
+Subject: Mark the functions as override
+
+So when poppler API breaks (as it often does) it stops compiling and
+someone has to fix it
+
+From 82d68cebf870ac97fd27b626a08c3fb4dd94ea3e Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Thu, 25 Oct 2018 23:06:34 +0200
+Subject: GBool -> bool
+
+It was just a typedef in poppler and it'll die in next versions
+
+From f099b8e143bbeb1de3c7e89f4764006c3de61ae4 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Fri, 2 Nov 2018 21:23:13 +0100
+Subject: Fix build with poppler 0.71
+
+Port away from removed API
+
+diff -u a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp
+--- a/filters/karbon/pdf/SvgOutputDev.cpp
++++ b/filters/karbon/pdf/SvgOutputDev.cpp
+@@ -39,7 +39,7 @@
+ {
+ public:
+ Private(const QString &fname)
+- : svgFile(fname), defs(0), body(0), state(gTrue)
++ : svgFile(fname), defs(0), body(0), state(true)
+ , brush(Qt::SolidPattern) {}
+
+ ~Private() {
+@@ -52,7 +52,7 @@
+ QString defsData;
+ QTextStream * defs;
+ QTextStream * body;
+- GBool state;
++ bool state;
+ QSizeF pageSize;
+ QPen pen;
+ QBrush brush;
+@@ -62,7 +62,7 @@
+ : d(new Private(fileName))
+ {
+ if (! d->svgFile.open(QIODevice::WriteOnly)) {
+- d->state = gFalse;
++ d->state = false;
+ return;
+ }
+
+@@ -75,24 +75,24 @@
+ delete d;
+ }
+
+-GBool SvgOutputDev::isOk()
++bool SvgOutputDev::isOk()
+ {
+ return d->state;
+ }
+
+-GBool SvgOutputDev::upsideDown()
++bool SvgOutputDev::upsideDown()
+ {
+- return gTrue;
++ return true;
+ }
+
+-GBool SvgOutputDev::useDrawChar()
++bool SvgOutputDev::useDrawChar()
+ {
+- return gFalse;
++ return false;
+ }
+
+-GBool SvgOutputDev::interpretType3Chars()
++bool SvgOutputDev::interpretType3Chars()
+ {
+- return gFalse;
++ return false;
+ }
+
+ void SvgOutputDev::startPage(int pageNum, GfxState *state, XRef */*xref*/)
+@@ -387,7 +387,7 @@
+ return stroke;
+ }
+
+-void SvgOutputDev::drawString(GfxState * state, GooString * s)
++void SvgOutputDev::drawString(GfxState * state, const GooString * s)
+ {
+ int render = state->getRender();
+ // check for invisible text -- this is used by Acrobat Capture
+@@ -476,7 +476,7 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s)
+
+ void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+- int *maskColors, GBool /*inlineImg*/)
++ bool /*interpolate*/, int *maskColors, bool inlineImg)
+ {
+ ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
+ imgStr->reset();
+@@ -550,7 +549,0 @@
+-void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+- int width, int height, GfxImageColorMap *colorMap,
+- GBool /*interpolate*/, int *maskColors, GBool inlineImg)
+-{
+- drawImage(state, ref, str, width, height, colorMap, maskColors, inlineImg);
+-}
+-
+
+--- a/filters/karbon/pdf/SvgOutputDev.h
++++ b/filters/karbon/pdf/SvgOutputDev.h
+@@ -20,11 +20,6 @@
+ #ifndef SVGOUTPUTDEV_H
+ #define SVGOUTPUTDEV_H
+
+-// Don't show this warning: it's an issue in poppler
+-#ifdef __GNUC__
+-#pragma GCC diagnostic ignored "-Wunused-parameter"
+-#endif
+-
+ #include <poppler/Object.h>
+ #include <poppler/OutputDev.h>
+
+@@ -44,40 +44,37 @@
+ explicit SvgOutputDev(const QString &fileName);
+ virtual ~SvgOutputDev();
+
+- GBool isOk();
++ bool isOk();
+
+- virtual GBool upsideDown();
+- virtual GBool useDrawChar();
+- virtual GBool interpretType3Chars();
+- virtual void startPage(int pageNum, GfxState *state, XRef *xref);
+- virtual void endPage();
++ bool upsideDown() override;
++ bool useDrawChar() override;
++ bool interpretType3Chars() override;
++ void startPage(int pageNum, GfxState *state, XRef *xref) override;
++ void endPage() override;
+
+ // path painting
+- virtual void stroke(GfxState * state);
+- virtual void fill(GfxState * state);
+- virtual void eoFill(GfxState *state);
++ void stroke(GfxState * state) override;
++ void fill(GfxState * state) override;
++ void eoFill(GfxState *state) override;
+
+ // text
+- virtual void drawString(GfxState * state, GooString * s);
++ void drawString(GfxState * state, const GooString * s) override;
+
+ // images
+- virtual void drawImage(GfxState *state, Object *ref, Stream *str,
++ void drawImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height, GfxImageColorMap *colorMap,
+- int *maskColors, GBool inlineImg);
+- virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+- int width, int height, GfxImageColorMap *colorMap,
+- GBool interpolate, int *maskColors, GBool inlineImg);
++ bool interpolate, int *maskColors, bool inlineImg) override;
+
+ // styles
+- virtual void updateAll(GfxState *state);
+- virtual void updateFillColor(GfxState *state);
+- virtual void updateStrokeColor(GfxState *state);
+- virtual void updateFillOpacity(GfxState *state);
+- virtual void updateStrokeOpacity(GfxState *state);
+- virtual void updateLineJoin(GfxState *state);
+- virtual void updateLineCap(GfxState *state);
+- virtual void updateMiterLimit(GfxState *state);
+- virtual void updateLineWidth(GfxState *state);
++ void updateAll(GfxState *state) override;
++ void updateFillColor(GfxState *state) override;
++ void updateStrokeColor(GfxState *state) override;
++ void updateFillOpacity(GfxState *state) override;
++ void updateStrokeOpacity(GfxState *state) override;
++ void updateLineJoin(GfxState *state) override;
++ void updateLineCap(GfxState *state) override;
++ void updateMiterLimit(GfxState *state) override;
++ void updateLineWidth(GfxState *state) override;
+
+ /// Dumps content to svg file
+ void dumpContent();
+--- a/filters/karbon/pdf/PdfImport.cpp
++++ b/filters/karbon/pdf/PdfImport.cpp
+@@ -88,9 +88,9 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt
+ SvgOutputDev * dev = new SvgOutputDev(m_chain->outputFile());
+ if (dev->isOk()) {
+ int rotate = 0;
+- GBool useMediaBox = gTrue;
+- GBool crop = gFalse;
+- GBool printing = gFalse;
++ bool useMediaBox = true;
++ bool crop = false;
++ bool printing = false;
+ pdfDoc->displayPages(dev, firstPage, lastPage, hDPI, vDPI, rotate, useMediaBox, crop, printing);
+ dev->dumpContent();
+ }