1SUMMARY="Provides access to position, satellite and area monitoring classes"
2DESCRIPTION="Qt is a cross-platform application framework that is widely \
3used for developing software with a graphical user interface, and also used \
4for developing non-GUI programs such as command-line tools and consoles for \
5servers."
6HOMEPAGE="https://qt.io/"
7COPYRIGHT="2015-2024 The Qt Company Ltd."
8LICENSE="GNU LGPL v2.1
9	GNU LGPL v3
10	GNU FDL v1"
11REVISION="1"
12QT_MIRROR_URI="https://qt-mirror.dannhauer.de/archive"
13SOURCE_URI="$QT_MIRROR_URI/qt/${portVersion%.*}/$portVersion/submodules/qtpositioning-everywhere-src-$portVersion.tar.xz"
14CHECKSUM_SHA256="1d601ba43c26c8a01db81eeaaeea5943c015da98caa59d7905b86e0e9d609ddf"
15SOURCE_DIR="qtpositioning-everywhere-src-$portVersion"
16
17ARCHITECTURES="all !x86_gcc2"
18SECONDARY_ARCHITECTURES="x86"
19
20PROVIDES="
21	qt6_positioning$secondaryArchSuffix = $portVersion compat >= 6
22	lib:libQt6Positioning$secondaryArchSuffix = $portVersion compat >= 6
23	lib:libQt6PositioningQuick$secondaryArchSuffix = $portVersion compat >= 6
24	"
25REQUIRES="
26	haiku$secondaryArchSuffix
27	lib:libcrypto$secondaryArchSuffix
28	lib:libGL$secondaryArchSuffix
29	lib:libQt6Core$secondaryArchSuffix
30	lib:libQt6Gui$secondaryArchSuffix
31	lib:libQt6QmlModels$secondaryArchSuffix
32	lib:libQt6Quick$secondaryArchSuffix
33	lib:libQt6Qml$secondaryArchSuffix
34	lib:libQt6SerialPort$secondaryArchSuffix
35	lib:libssl$secondaryArchSuffix
36	lib:libz$secondaryArchSuffix
37	"
38
39PROVIDES_devel="
40	qt6_positioning${secondaryArchSuffix}_devel = $portVersion compat >= 6
41	devel:libQt6Positioning$secondaryArchSuffix = $portVersion compat >= 6
42	devel:libQt6PositioningQuick$secondaryArchSuffix = $portVersion compat >= 6
43	"
44REQUIRES_devel="
45	qt6_positioning$secondaryArchSuffix == $portVersion base
46	qt6_base${secondaryArchSuffix}_devel
47	"
48
49BUILD_REQUIRES="
50	haiku${secondaryArchSuffix}_devel
51	devel:libcrypto$secondaryArchSuffix
52	devel:libGL$secondaryArchSuffix
53	devel:libQt6Core$secondaryArchSuffix
54	devel:libQt6Gui$secondaryArchSuffix
55	devel:libQt6QmlModels$secondaryArchSuffix
56	devel:libQt6Quick$secondaryArchSuffix
57	devel:libQt6Qml$secondaryArchSuffix
58	devel:libQt6SerialPort$secondaryArchSuffix
59	devel:libssl$secondaryArchSuffix
60	devel:libz$secondaryArchSuffix
61	"
62BUILD_PREREQUIRES="
63	cmd:awk
64	cmd:cmake
65	cmd:find
66	cmd:g++$secondaryArchSuffix
67	cmd:ld$secondaryArchSuffix
68	cmd:make
69	cmd:ninja
70	cmd:perl
71	cmd:pkg_config$secondaryArchSuffix
72	cmd:python3
73	cmd:sed
74	cmd:xargs
75	"
76
77BUILD()
78{
79	export DISABLE_ASLR=1
80
81	cmake -B build -S $sourceDir -G Ninja \
82		-DCMAKE_BUILD_TYPE=Release \
83		-DCMAKE_CXX_FLAGS=-fPIC
84
85	find -name cmake_install.cmake -exec sed -i "s|set(CMAKE_INSTALL_PREFIX.*|set(CMAKE_INSTALL_PREFIX \"$prefix\")|" {} \;
86
87	ninja -v -C build $jobArgs
88}
89
90INSTALL()
91{
92	ninja -C build install
93
94	prepareInstalledDevelLibs \
95		libQt6Positioning \
96		libQt6PositioningQuick
97
98	# fix pkgconfig files
99	fixPkgconfig
100	sed -i "s|includedir=.*|includedir=$includeDir/Qt6|" \
101		$developLibDir/pkgconfig/*.pc
102
103	cd $libDir
104	for i in lib*.so.6.*;do
105		ln -fs $i $(echo $i | cut -f1,2 -d.)
106	done
107
108	packageEntries devel \
109		$developDir \
110		$libDir/cmake \
111		$dataDir/Qt6/mkspecs
112}
113