1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 CHECKREQS_DISK_BUILD="4G"
7 KDE_APPS_MINIMAL="17.12.0"
8 KDE_DOC_DIR="xxx" # contains no language subdirs
9 KDE_HANDBOOK="forceoptional"
10 KDE_PO_DIRS="po plan/po"
11 KDE_TEST="forceoptional"
12 inherit check-reqs kde5 versionator
14 DESCRIPTION="KDE Office Suite"
15 HOMEPAGE="https://www.calligra.org/"
16 [[ ${KDE_BUILD_TYPE} == release ]] && \
17 SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz
18 calligra_features_plan? ( mirror://kde/stable/${PN}/${PV}/${PN}plan-${PV}.tar.xz )"
22 [[ ${KDE_BUILD_TYPE} == release ]] && \
25 CAL_FTS=( karbon plan sheets words )
27 IUSE="activities +crypt +fontconfig gemini gsl import-filter +lcms okular openexr +pdf
28 phonon pim spacenav +truetype X $(printf 'calligra_features_%s ' ${CAL_FTS[@]})
29 calligra_experimental_features_stage"
31 # TODO: Not packaged: Cauchy (https://bitbucket.org/cyrille/cauchy)
32 # Required for the matlab/octave formula tool
33 # FIXME: Disabled by upstream for good reason
34 # Crashes plan (https://bugs.kde.org/show_bug.cgi?id=311940)
35 # $(add_kdeapps_dep akonadi)
36 # $(add_kdeapps_dep akonadi-contacts)
37 # Currently upstream-disabled in plan
38 # =dev-libs/kproperty-3.0*:5
39 # =dev-libs/kreport-3.0*:5
41 $(add_frameworks_dep karchive)
42 $(add_frameworks_dep kcmutils)
43 $(add_frameworks_dep kcodecs)
44 $(add_frameworks_dep kcompletion)
45 $(add_frameworks_dep kconfig)
46 $(add_frameworks_dep kconfigwidgets)
47 $(add_frameworks_dep kcoreaddons)
48 $(add_frameworks_dep kdelibs4support)
49 $(add_frameworks_dep kemoticons)
50 $(add_frameworks_dep kglobalaccel)
51 $(add_frameworks_dep kguiaddons)
52 $(add_frameworks_dep ki18n)
53 $(add_frameworks_dep kiconthemes)
54 $(add_frameworks_dep kio)
55 $(add_frameworks_dep kitemmodels)
56 $(add_frameworks_dep kitemviews)
57 $(add_frameworks_dep kjobwidgets)
58 $(add_frameworks_dep knotifications)
59 $(add_frameworks_dep knotifyconfig)
60 $(add_frameworks_dep kparts)
61 $(add_frameworks_dep kross)
62 $(add_frameworks_dep ktextwidgets)
63 $(add_frameworks_dep kwallet)
64 $(add_frameworks_dep kwidgetsaddons)
65 $(add_frameworks_dep kwindowsystem)
66 $(add_frameworks_dep kxmlgui)
67 $(add_frameworks_dep sonnet)
68 $(add_qt_dep designer)
70 $(add_qt_dep qtdeclarative)
72 $(add_qt_dep qtnetwork)
73 $(add_qt_dep qtprintsupport)
74 $(add_qt_dep qtscript)
76 $(add_qt_dep qtwidgets)
81 activities? ( $(add_frameworks_dep kactivities) )
82 crypt? ( app-crypt/qca:2[qt5(+)] )
83 fontconfig? ( media-libs/fontconfig )
84 gemini? ( $(add_qt_dep qtdeclarative 'widgets') )
87 $(add_frameworks_dep khtml)
100 openexr? ( media-libs/openexr )
101 pdf? ( app-text/poppler[qt5] )
102 phonon? ( media-libs/phonon[qt5(+)] )
103 spacenav? ( dev-libs/libspnav )
104 truetype? ( media-libs/freetype:2 )
106 $(add_qt_dep qtx11extras)
109 calligra_experimental_features_stage? (
110 $(add_qt_dep qtwebkit)
111 okular? ( $(add_kdeapps_dep okular) )
113 calligra_features_plan? (
114 $(add_frameworks_dep khtml)
115 $(add_frameworks_dep kholidays)
118 $(add_kdeapps_dep kcalcore)
119 $(add_kdeapps_dep kcontacts)
122 calligra_features_sheets? ( dev-cpp/eigen:3 )
123 calligra_features_words? (
125 okular? ( $(add_kdeapps_dep okular) )
128 DEPEND="${COMMON_DEPEND}
131 x11-misc/shared-mime-info
132 test? ( $(add_frameworks_dep threadweaver) )
134 RDEPEND="${COMMON_DEPEND}
135 calligra_features_karbon? ( media-gfx/pstoedit[plotutils] )
136 !app-office/calligra:4
137 !app-office/calligra-l10n:4
142 "${FILESDIR}"/${P}-no-arch-detection.patch
143 "${FILESDIR}"/${P}-doc.patch
144 "${FILESDIR}"/${P}-qt-5.11.patch
145 "${FILESDIR}"/${P}-stage-qt-5.11.patch
149 check-reqs_pkg_pretend
158 if use calligra_features_plan && [[ ${KDE_BUILD_TYPE} == release ]]; then
159 mv ../${PN}plan-${PV} plan || die
160 sed -e "/add_subdirectory(plan)/s/#//" \
161 -e "/^calligra_disable_product(APP_PLAN/s/^/#/" \
162 -i CMakeLists.txt || die
164 eapply "${FILESDIR}"/${P}-plan-qt-5.11.patch
169 sed -e "/add_subdirectory( *benchmarks *)/s/^/#DONT/" \
170 -i libs/pigment/CMakeLists.txt || die
173 # Unconditionally disable deprecated deps (required by QtQuick1)
174 punt_bogus_dep Qt5 Declarative
175 punt_bogus_dep Qt5 OpenGL
177 if ! use calligra_experimental_features_stage; then
178 punt_bogus_dep Qt5 WebKitWidgets
179 punt_bogus_dep Qt5 WebKit
182 # Hack around the excessive use of CMake macros
183 if use okular && ! use calligra_features_words; then
184 sed -i -e "/add_subdirectory( *okularodtgenerator *)/ s/^/#DONT/" \
185 extras/CMakeLists.txt || die "Failed to disable OKULAR_GENERATOR_ODT"
188 if use okular && ! use calligra_experimental_features_stage; then
189 sed -i -e "/add_subdirectory( *okularodpgenerator *)/ s/^/#DONT/" \
190 extras/CMakeLists.txt || die "Failed to disable OKULAR_GENERATOR_ODP"
195 local cal_ft myproducts
198 for cal_ft in ${CAL_FTS[@]}; do
199 use calligra_features_${cal_ft} && myproducts+=( "${cal_ft^^}" )
202 use calligra_experimental_features_stage && myproducts+=( STAGE )
204 use lcms && myproducts+=( PLUGIN_COLORENGINES )
205 use spacenav && myproducts+=( PLUGIN_SPACENAVIGATOR )
208 -DPACKAGERS_BUILD=OFF
211 -DPRODUCTSET="${myproducts[*]}"
212 $(cmake-utils_use_find_package activities KF5Activities)
213 -DWITH_Qca-qt5=$(usex crypt)
214 -DWITH_Fontconfig=$(usex fontconfig)
215 $(cmake-utils_use_find_package gemini Libgit2)
216 $(cmake-utils_use_find_package gemini Qt5QuickWidgets)
217 -DWITH_GSL=$(usex gsl)
218 -DWITH_LibEtonyek=$(usex import-filter)
219 -DWITH_LibOdfGen=$(usex import-filter)
220 -DWITH_LibRevenge=$(usex import-filter)
221 -DWITH_LibVisio=$(usex import-filter)
222 -DWITH_LibWpd=$(usex import-filter)
223 -DWITH_LibWpg=$(usex import-filter)
224 -DWITH_LibWps=$(usex import-filter)
225 $(cmake-utils_use_find_package phonon Phonon4Qt5)
226 $(cmake-utils_use_find_package pim KF5CalendarCore)
227 $(cmake-utils_use_find_package pim KF5Contacts)
228 -DWITH_LCMS2=$(usex lcms)
229 -DWITH_Okular5=$(usex okular)
230 -DWITH_OpenEXR=$(usex openexr)
231 -DWITH_Poppler=$(usex pdf)
232 -DWITH_Eigen3=$(usex calligra_features_sheets)
233 -DBUILD_UNMAINTAINED=$(usex calligra_experimental_features_stage)
234 -ENABLE_CSTESTER_TESTING=$(usex test)
235 -DWITH_Freetype=$(usex truetype)