summaryrefslogtreecommitdiff
path: root/user/phonon/APKBUILD
blob: 75a4375f31372b2c9057a5c2c47153aa2a8cd653 (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
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=phonon
pkgver=4.10.3
pkgrel=0
pkgdesc="Qt library for playing multimedia files"
url="https://phonon.kde.org/"
arch="all"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends=""
makedepends="cmake extra-cmake-modules pulseaudio-dev
	qt5-qtbase-dev qt5-qttools-dev"
subpackages="$pkgname-dev $pkgname-designer"
source="https://download.kde.org/stable/phonon/$pkgver/phonon-$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" \
		-DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=TRUE \
		-DWITH_GLIB2=TRUE \
		-DWITH_PulseAudio=TRUE \
		-DPHONON_BUILD_PHONON4QT5=TRUE \
		${CMAKE_CROSSOPTS}
	make
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

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

designer() {
	pkgdesc="$pkgdesc (Qt Designer plugin)"
	install_if="$pkgname=$pkgver-$pkgrel qt5-qttools"
	mkdir -p "$subpkgdir"/usr/lib/qt5/plugins/
	mv "$pkgdir"/usr/lib/qt5/plugins/designer \
		"$subpkgdir"/usr/lib/qt5/plugins/
	rmdir "$pkgdir"/usr/lib/qt5/plugins || true # Never mind
}

sha512sums="2619ac0d7873205a2773bdb226695b5a9e2deb4f47b1a0bb9dbf9a905e3f82f7834ced1b4b1e7a6dadf50fca289f92a5749e3057546c3e16a41e1d6420b594c6  phonon-4.10.3.tar.xz"