summaryrefslogtreecommitdiff
path: root/user/libkdegames/APKBUILD
blob: d527985e5a152d190720cfcd41a3bfd9b035cba5 (plain) (blame)
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
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libkdegames
pkgver=19.12.0
pkgrel=0
pkgdesc="Library for common routines shared between KDE games"
url="https://www.kde.org/applications/games/"
arch="all"
options="!check"  # Tests require X11
license="LGPL-2.1-only"
depends=""
depends_dev="qt5-qtbase-dev qt5-qtdeclarative-dev kcompletion-dev"
makedepends="$depends_dev cmake extra-cmake-modules qt5-qtsvg-dev
	libsndfile-dev openal-soft-dev
	karchive-dev kbookmarks-dev kcodecs-dev kconfig-dev kconfigwidgets-dev
	kcoreaddons-dev kcrash-dev kdbusaddons-dev kdeclarative-dev kdnssd-dev
	kglobalaccel-dev kguiaddons-dev ki18n-dev kiconthemes-dev kio-dev
	kitemviews-dev kjobwidgets-dev knewstuff-dev kservice-dev kxmlgui-dev
	ktextwidgets-dev kwidgetsaddons-dev"
subpackages="$pkgname-dev $pkgname-lang $pkgname-carddecks::noarch"
source="https://download.kde.org/stable/release-service/$pkgver/src/libkdegames-$pkgver.tar.xz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS} .
	make
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	make DESTDIR="$pkgdir" install

	# causes crashes in KPat:
	# https://bugs.kde.org/show_bug.cgi?id=402220
	# Qt doesn't care:
	# https://bugreports.qt.io/browse/QTBUG-72779
	cd "$pkgdir"/usr/share/carddecks
	local i; for i in ancient-egyptians future jolly-royal \
		konqi-modern standard xskat-french
	do
		rm -r "svg-$i"
	done
}

carddecks() {
	pkgdesc="Card decks for KDE card games"
	mkdir -p "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/carddecks "$subpkgdir"/usr/share/
}

sha512sums="7e3fdc24fb7f7e906b1f25ec8ca4181406389af81712f7b3d0881c354ebaf49e8c6234ec227036aa47843d5175a24b7c1a651e3f11ea83872453e0e3feb9d2e7  libkdegames-19.12.0.tar.xz"