1 |
|
# Copyright 1999-2023 Gentoo Authors
|
|
1 |
# Copyright 2021-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
QT5_MODULE="qtlocation"
|
7 |
|
inherit qt5-build
|
|
6 |
inherit qt6-build
|
8 |
7 |
|
9 |
|
DESCRIPTION="Physical position determination library for the Qt5 framework"
|
|
8 |
DESCRIPTION="Physical position determination library for the Qt6 framework"
|
10 |
9 |
|
11 |
|
if [[ ${QT5_BUILD_TYPE} == release ]]; then
|
12 |
|
KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86"
|
|
10 |
if [[ ${QT6_BUILD_TYPE} == release ]]; then
|
|
11 |
KEYWORDS="amd64"
|
13 |
12 |
fi
|
14 |
13 |
|
15 |
|
IUSE="geoclue +qml"
|
|
14 |
IUSE="geoclue nmea +qml"
|
16 |
15 |
|
17 |
|
RDEPEND="
|
18 |
|
=dev-qt/qtcore-${QT5_PV}*
|
19 |
|
geoclue? ( =dev-qt/qtdbus-${QT5_PV}* )
|
20 |
|
qml? ( =dev-qt/qtdeclarative-${QT5_PV}* )
|
|
16 |
DEPEND="
|
|
17 |
~dev-qt/qtbase-${PV}:6
|
|
18 |
geoclue? ( ~dev-qt/qtbase-${PV}:6[dbus] )
|
|
19 |
nmea? (
|
|
20 |
~dev-qt/qtbase-${PV}:6[network]
|
|
21 |
~dev-qt/qtserialport-${PV}:6
|
|
22 |
)
|
|
23 |
qml? ( ~dev-qt/qtdeclarative-${PV}:6 )
|
21 |
24 |
"
|
22 |
|
DEPEND="${RDEPEND}"
|
23 |
|
PDEPEND="
|
|
25 |
RDEPEND="
|
|
26 |
${DEPEND}
|
24 |
27 |
geoclue? ( app-misc/geoclue:2.0 )
|
25 |
28 |
"
|
26 |
29 |
|
27 |
|
QT5_TARGET_SUBDIRS=(
|
28 |
|
src/3rdparty/clipper
|
29 |
|
src/3rdparty/poly2tri
|
30 |
|
src/3rdparty/clip2tri
|
31 |
|
src/positioning
|
32 |
|
src/plugins/position/positionpoll
|
33 |
|
)
|
34 |
|
|
35 |
|
pkg_setup() {
|
36 |
|
use geoclue && QT5_TARGET_SUBDIRS+=( src/plugins/position/geoclue2 )
|
37 |
|
use qml && QT5_TARGET_SUBDIRS+=(
|
38 |
|
src/positioningquick
|
39 |
|
src/imports/positioning
|
|
30 |
src_prepare() {
|
|
31 |
qt6-build_src_prepare
|
|
32 |
|
|
33 |
# unfortunately cmake_use_find_package would break things with qtbase
|
|
34 |
use geoclue ||
|
|
35 |
sed -e 's/TARGET Qt::DBus/FALSE/' \
|
|
36 |
-i src/plugins/position/CMakeLists.txt || die
|
|
37 |
use nmea ||
|
|
38 |
sed -e 's/TARGET Qt::Network/FALSE/' \
|
|
39 |
-i src/plugins/position/CMakeLists.txt || die
|
|
40 |
}
|
|
41 |
|
|
42 |
src_configure() {
|
|
43 |
local mycmakeargs=(
|
|
44 |
$(cmake_use_find_package qml Qt6Qml)
|
40 |
45 |
)
|
|
46 |
|
|
47 |
qt6-build_src_configure
|
|
48 |
}
|
|
49 |
|
|
50 |
src_install() {
|
|
51 |
qt6-build_src_install
|
|
52 |
|
|
53 |
if use test; then
|
|
54 |
local delete=( # sigh
|
|
55 |
"${D}${QT6_LIBDIR}"/cmake/Qt6Positioning/*DummyPlugin*.cmake
|
|
56 |
"${D}${QT6_LIBDIR}"/cmake/Qt6Positioning/*TestPlugin*.cmake
|
|
57 |
"${D}${QT6_PLUGINDIR}"/position/libqtposition_satellitesourcetest.so
|
|
58 |
"${D}${QT6_PLUGINDIR}"/position/libqtposition_testplugin{,2}.so
|
|
59 |
)
|
|
60 |
# using -f given not tracking which tests may be skipped or not
|
|
61 |
rm -f -- "${delete[@]}" || die
|
|
62 |
fi
|
41 |
63 |
}
|