aboutsummaryrefslogtreecommitdiffstats
path: root/community/akonadi/APKBUILD
blob: 8d4924600bd6579d8515ddad1a786a2b105aec3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=akonadi
pkgver=22.12.2
pkgrel=0
pkgdesc="A cross-desktop storage service for PIM data and meta data providing concurrent read, write, and query access"
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by kaccounts-integration
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://community.kde.org/KDE_PIM"
license="LGPL-2.0-or-later"
depends="
	mariadb
	qt5-qtbase-mysql
	qt5-qtbase-sqlite
	"
depends_dev="
	boost-dev
	kaccounts-integration-dev
	kcompletion-dev
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kcrash-dev
	kdbusaddons-dev
	ki18n-dev
	kiconthemes-dev
	kio-dev
	kitemmodels-dev
	kitemviews-dev
	kwidgetsaddons-dev
	kwindowsystem-dev
	kxmlgui-dev
	libaccounts-qt-dev
	libxml2-dev
	qt5-qtbase-dev
	samurai
	shared-mime-info
	sqlite-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	qt5-qttools-dev
	"
checkdepends="
	cmd:dbus-run-session
	xvfb-run
	"
source="https://download.kde.org/stable/release-service/$pkgver/src/akonadi-$pkgver.tar.xz"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-lang"

build() {
	# make -dbg smaller
	export CFLAGS="$CFLAGS -g1"
	export CXXFLAGS="$CXXFLAGS -g1"
	# akonadi recurses while walking e-mail threads, so give it a decent stack
	LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1024768" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_DESIGNERPLUGIN=ON
	cmake --build build
}

check() {
	cd build
	# akonadixml-xmldocumenttest, mimetypecheckertest and akonadi-mysql-testenvironmenttest are broken
	# All sqlite tests are hanging
	# All mysql tests are broken "Cannot connect to non-local host <hostname>"
	# tagmodeltest fails on 32-bit architectures
	local skipped_tests="("
	local tests="
		akonadixml-xmldocument
		mimetypechecker
		akonadi-mysql-testenvironment
		.*sqlite.*
		.*mysql.*
		tagmodel
		"
	case "$CARCH" in
		s390x) tests="$tests
			AkonadiServer-itemcreatehandler
			AkonadiServer-relationhandler
			" ;;
	esac
	for test in $tests; do
		skipped_tests="$skipped_tests|$test"
	done
	skipped_tests="$skipped_tests)test"
	CTEST_OUTPUT_ON_FAILURE=TRUE dbus-run-session xvfb-run ctest -E "$skipped_tests"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
7d065738cc75ad0046b40d5340562a740b7b7116d94c0ccaeafa315e83cddcd0c1f0570ea98fc260c9404fabfc941a222d64ab18fe6021d2ae1df6ea9de835e4  akonadi-22.12.2.tar.xz
"