forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qt-mobility-1.2.2_p20130703-r1.ebuild
151 lines (132 loc) · 3.58 KB
/
qt-mobility-1.2.2_p20130703-r1.ebuild
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit multilib qt4-r2
DESCRIPTION="Additional Qt APIs for mobile devices and desktop platforms"
HOMEPAGE="http://doc-snapshots.qt.io/qt-mobility/index.html"
SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${P}.tar.xz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86"
QT_MOBILITY_MODULES=(connectivity +contacts feedback gallery location
messaging multimedia organizer publishsubscribe
sensors serviceframework systeminfo versit)
IUSE="bluetooth debug doc networkmanager pulseaudio qml +tools
${QT_MOBILITY_MODULES[@]}"
REQUIRED_USE="
|| ( ${QT_MOBILITY_MODULES[@]#[+-]} )
versit? ( contacts )
"
RDEPEND="
>=dev-qt/qtcore-4.8.0:4
connectivity? (
>=dev-qt/qtdbus-4.8.0:4
bluetooth? ( net-wireless/bluez )
)
contacts? ( >=dev-qt/qtgui-4.8.0:4 )
gallery? ( >=dev-qt/qtdbus-4.8.0:4 )
location? (
>=dev-qt/qtdeclarative-4.8.0:4
>=dev-qt/qtgui-4.8.0:4
>=dev-qt/qtsql-4.8.0:4[sqlite]
)
messaging? ( >=net-libs/qmf-4.0 )
multimedia? (
>=dev-qt/qtgui-4.8.0-r4:4[xv]
>=dev-qt/qtopengl-4.8.0:4
media-libs/alsa-lib
media-libs/gstreamer:0.10
media-libs/gst-plugins-bad:0.10
media-libs/gst-plugins-base:0.10
x11-libs/libX11
x11-libs/libXext
x11-libs/libXv
pulseaudio? ( media-sound/pulseaudio[alsa] )
)
publishsubscribe? (
tools? ( >=dev-qt/qtgui-4.8.0:4 )
)
qml? ( >=dev-qt/qtdeclarative-4.8.0:4 )
serviceframework? (
>=dev-qt/qtdbus-4.8.0:4
>=dev-qt/qtsql-4.8.0:4[sqlite]
tools? ( >=dev-qt/qtgui-4.8.0:4 )
)
systeminfo? (
>=dev-qt/qtdbus-4.8.0:4
>=dev-qt/qtgui-4.8.0:4
sys-apps/util-linux
virtual/libudev:=
x11-libs/libX11
x11-libs/libXrandr
bluetooth? ( net-wireless/bluez )
networkmanager? ( net-misc/networkmanager )
)
versit? ( >=dev-qt/qtgui-4.8.0:4 )
"
DEPEND="${RDEPEND}
virtual/pkgconfig
doc? ( >=dev-qt/qthelp-4.8.0:4 )
multimedia? (
sys-kernel/linux-headers
x11-proto/videoproto
)
systeminfo? ( sys-kernel/linux-headers )
"
src_prepare() {
qt4-r2_src_prepare
# disable building of code snippets in doc/
# and translations (they aren't actually translated)
sed -i -re '/SUBDIRS \+= (doc|translations)/d' qtmobility.pro || die
# fix automagic dependency on qt-declarative
if ! use qml; then
sed -i -e '/SUBDIRS += declarative/d' plugins/plugins.pro || die
fi
}
src_configure() {
# figure out which modules to build
local modules=
for mod in "${QT_MOBILITY_MODULES[@]#[+-]}"; do
use ${mod} && modules+="${mod} "
done
# custom configure script
local myconf=(
./configure
-prefix "${EPREFIX}/usr"
-headerdir "${EPREFIX}/usr/include/qt4"
-libdir "${EPREFIX}/usr/$(get_libdir)/qt4"
-plugindir "${EPREFIX}/usr/$(get_libdir)/qt4/plugins"
$(use debug && echo -debug || echo -release)
$(use doc || echo -no-docs)
$(use tools || echo -no-tools)
-modules "${modules}"
)
echo "${myconf[@]}"
"${myconf[@]}" || die "configure failed"
# fix automagic dependency on bluez
if ! use bluetooth; then
sed -i -e '/^bluez_enabled =/s:yes:no:' config.pri || die
fi
# fix automagic dependency on networkmanager
if ! use networkmanager; then
sed -i -e '/^networkmanager_enabled =/s:yes:no:' config.pri || die
fi
# fix automagic dependency on pulseaudio
if ! use pulseaudio; then
sed -i -e '/^pulseaudio_enabled =/s:yes:no:' config.pri || die
fi
eqmake4 -recursive
}
src_compile() {
qt4-r2_src_compile
use doc && emake docs
}
src_install() {
qt4-r2_src_install
if use doc; then
dodoc -r doc/html
dodoc doc/qch/qtmobility.qch
docompress -x /usr/share/doc/${PF}/qtmobility.qch
fi
}