void-packages/srcpkgs/calligra/template

183 lines
5.1 KiB
Bash

# Template file for 'calligra'
pkgname=calligra
version=3.2.1
revision=1
build_style=cmake
configure_args="-Wno-dev -DCALLIGRA_SHOULD_BUILD_UNMAINTAINED=ON
-DBUILD_TESTING=OFF"
hostmakedepends="perl pkg-config extra-cmake-modules gettext"
makedepends="akonadi-contacts-devel akonadi5-devel ecm-devel eigen3.2
exiv2-devel kactivities5-devel gsl-devel qt5-declarative-devel
kcmutils-devel kcontacts-devel kdelibs4support-devel kdiagram-devel
kholidays-devel khtml-devel knotifyconfig-devel kross-devel lcms2-devel
libetonyek-devel libgit2-devel libodfgen-devel libokular-devel
libopenexr-devel libspnav-devel libvisio-devel libwpg-devel libwps-devel
poppler-qt5-devel qca-qt5-devel threadweaver-devel marble5-devel
kauth-devel kparts-devel kcmutils-devel kdelibs4support-devel
ktextwidgets-devel kross-devel kservice-devel kcrash-devel"
short_desc="Illustration application"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-or-later, LGPL-2.0-or-later, GFDL-1.2-or-later"
homepage="http://www.calligra-suite.org/"
distfiles="${KDE_SITE}/calligra/${version}/calligra-${version}.tar.xz"
checksum=b1f8a6eb8208543a2f908caa83d089075fcd1e530d00e19f5362b2f9cc371147
replaces="calligra-braindump>=0 calligra-flow>=0"
subpackages="calligra-filters calligra-libs calligra-plugins calligra-karbon
calligra-kexi calligra-stage calligra-krita calligra-sheets calligra-extras
calligra-words calligra-handbook calligra-gemini calligra-devtools"
depends="calligra-filters calligra-libs calligra-plugins calligra-karbon
calligra-kexi calligra-stage calligra-sheets calligra-extras
calligra-words calligra-handbook calligra-gemini calligra-plan"
build_options="webengine"
desc_option_webengine="Use Qt5 WebEngine for Calligra Gemini"
if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then
# webengine does not cross-build from 64bit to 32bit, use webkit
if [ "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ]; then
build_options_default="webengine"
fi
fi
CXXFLAGS="-DKDE_NO_DEBUG_OUTPUT"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-qmake qt5-host-tools calligra-devtools kcoreaddons"
configure_args+=" -DMODERN_ICONV_RUN=1 -DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson"
fi
post_patch() {
[ "$build_option_webengine" ] && return 0
msg_normal "Applying gemini-webkit.patch\n"
patch -sNp1 -i ${FILESDIR}/gemini-webkit.patch
}
# cmake doesn't detect the functions correctly
pre_build() {
case $XBPS_TARGET_MACHINE in
*-musl) cat >> build/filters/words/msword-odf/wv2/src/config.h <<_EOF
#define HAVE_FUNC_ISNAN 1
#define HAVE_FUNC_ISINF 1
#define HAVE_FUNC_ISFINITE 1
_EOF
;;
esac
}
do_install() {
vdoc README
}
calligra-filters_package() {
short_desc+=" - filters"
depends="pstoedit"
pkg_install() {
cd ${wrksrc}/build/filters
make DESTDIR=$PKGDESTDIR install
}
}
calligra-libs_package() {
short_desc+=" - libraries"
pkg_install() {
for d in interfaces libs pics servicetypes; do
cd ${wrksrc}/build/${d}
make DESTDIR=$PKGDESTDIR install
done
}
}
calligra-plugins_package() {
short_desc+=" - plugins"
pkg_install() {
cd ${wrksrc}/build/plugins
make DESTDIR=$PKGDESTDIR install
}
}
calligra-karbon_package() {
short_desc+=" - Create scalable vector drawings"
pkg_install() {
cd ${wrksrc}/build/karbon
make DESTDIR=$PKGDESTDIR install
}
}
calligra-kexi_package() {
build_style=meta
depends="kexi"
short_desc+=" - Develop desktop db apps (transitional dummy package)"
}
calligra-stage_package() {
short_desc+=" - Write presentation documents"
pkg_install() {
cd ${wrksrc}/build/stage
make DESTDIR=$PKGDESTDIR install
#cd ../doc/stage
#make DESTDIR=$PKGDESTDIR install
}
}
calligra-krita_package() {
build_style=meta
short_desc+=" - Edit and paint images (transitional dummy package)"
depends="krita>=${version}_${revision}"
}
calligra-sheets_package() {
short_desc+=" - Write spreadsheet documents"
pkg_install() {
cd ${wrksrc}/build/sheets
make DESTDIR=$PKGDESTDIR install
#cd ../doc/sheets
#make DESTDIR=$PKGDESTDIR install
}
}
calligra-words_package() {
short_desc+=" - Word Processor"
depends="calligra-plugins"
pkg_install() {
cd ${wrksrc}/build/words
make DESTDIR=$PKGDESTDIR install
}
}
calligra-handbook_package() {
build_style=meta
archs=noarch
short_desc+=" - Documentation (removed temporarily)"
#pkg_install() {
# cd ${wrksrc}/build/doc/calligra
# make DESTDIR=$PKGDESTDIR install
#}
}
calligra-extras_package() {
short_desc+=" - Extras"
pkg_install() {
cd ${wrksrc}/build/extras
make DESTDIR=$PKGDESTDIR install
cd ${wrksrc}/build/data
make DESTDIR=$PKGDESTDIR install
}
}
calligra-devtools_package() {
short_desc+=" - Developer tools"
pkg_install() {
cd ${wrksrc}/build/devtools
make DESTDIR=$PKGDESTDIR install
vbin rng2cpp/rng2cpp
vbin ../filters/sheets/excel/sidewinder/recordsxml2cpp
}
}
calligra-gemini_package() {
short_desc+=" - QML interface for Calligra Words and Stage"
depends="qt5-quickcontrols kirigami2"
if [ "$build_option_webengine" ]; then
depends+=" qt5-webengine"
else
depends+=" qt5-webkit"
fi
pkg_install() {
cd ${wrksrc}/build/components
make DESTDIR=$PKGDESTDIR install
cd ${wrksrc}/build/gemini
make DESTDIR=$PKGDESTDIR install
}
}