aboutsummaryrefslogtreecommitdiff
path: root/srcpkgs/telepathy-qt5/template
blob: 5c8be2df306a097bcbdb60327839c97f95873a86 (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
# Template file for 'telepathy-qt5'
pkgname=telepathy-qt5
version=0.9.7
revision=1
wrksrc=${pkgname//5/}-${version}
build_style=cmake
configure_args="
 -DENABLE_EXAMPLES=OFF
 -DENABLE_TESTS=OFF
 -DDESIRED_QT_VERSION=5
 -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt5"
hostmakedepends="python pkg-config"
makedepends="qt5-devel telepathy-farstream-devel telepathy-glib-devel gstreamer1-devel"
short_desc="Qt5 bindings for the Telepathy D-Bus protocol"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="LGPL-2.1"
homepage="http://telepathy.freedesktop.org/"
distfiles="http://telepathy.freedesktop.org/releases/${pkgname//5/}/${pkgname//5/}-${version}.tar.gz"
checksum=21bad30be7ebc4ba667d53d92cd1cec1be23114103f2149404d9740721693d4f

if [ -n "$CROSS_BUILD" ]; then
	hostmakedepends+=" qt5-host-tools qt5-devel"
	configure_args+=" -DPYTHON_SHORT_VERSION=2.7"
	configure_args+=" -DPYTHON_LONG_VERSION=2.7.3"
	configure_args+=" -DPYTHON_SITE_PACKAGES_DIR=${XBPS_CROSS_BASE}/usr/lib/python2.7/site-packages"
	configure_args+=" -DPYTHON_INCLUDE_PATH=${XBPS_CROSS_BASE}/usr/include/python2.7"
	configure_args+=" -DCMAKE_PYTHON_LIBRARIES=${XBPS_CROSS_BASE}/usr/lib"
fi

CXXFLAGS="-D_DEFAULT_SOURCE"

subpackages="telepathy-qt5-farstream telepathy-qt5-devel"

post_extract() {
	if [ -n "$CROSS_BUILD" ]; then
		# cmake/FindPythonLibrary.cmake fails when cross compiling
		sed -i CMakeLists.txt -e "/find_package(PythonLibrary ${REQUIRED_PY} REQUIRED)/d"
	fi
}

telepathy-qt5-farstream_package() {
	short_desc+=" - farstream component"
	depends="telepathy-qt5>=${version}_${revision}"
	pkg_install() {
		vmove usr/lib/*-farstream.so.*
	}
}
telepathy-qt5-devel_package() {
	depends="telepathy-qt5>=${version}_${revision} telepathy-qt5-farstream>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/cmake/TelepathyQt5*
		vmove usr/lib/*.so
		vmove usr/lib/pkgconfig
	}
}