1SUMMARY="Provides a set of easy to use chart components"
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/qtcharts-everywhere-src-$portVersion.tar.xz"
14CHECKSUM_SHA256="899d5498c91bfb01fde2ff2438c82adf4d4d9b3cf646e7ad7b0036dbf32b7ca4"
15SOURCE_DIR="qtcharts-everywhere-src-$portVersion"
16
17ARCHITECTURES="all !x86_gcc2"
18SECONDARY_ARCHITECTURES="x86"
19
20PROVIDES="
21	qt6_charts$secondaryArchSuffix = $portVersion compat >= 6
22	lib:libQt6Charts$secondaryArchSuffix = $portVersion compat >= 6
23	lib:libQt6ChartsQml$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:libssl$secondaryArchSuffix
35	lib:libz$secondaryArchSuffix
36	"
37
38PROVIDES_devel="
39	qt6_charts${secondaryArchSuffix}_devel = $portVersion compat >= 6
40	devel:libQt6Charts$secondaryArchSuffix = $portVersion compat >= 6
41	devel:libQt6ChartsQml$secondaryArchSuffix = $portVersion compat >= 6
42	"
43REQUIRES_devel="
44	qt6_charts$secondaryArchSuffix == $portVersion base
45	qt6_base${secondaryArchSuffix}_devel
46	"
47
48BUILD_REQUIRES="
49	haiku${secondaryArchSuffix}_devel
50	devel:libcrypto$secondaryArchSuffix
51	devel:libGL$secondaryArchSuffix
52	devel:libQt6Core$secondaryArchSuffix
53	devel:libQt6Gui$secondaryArchSuffix
54	devel:libQt6QmlModels$secondaryArchSuffix
55	devel:libQt6Quick$secondaryArchSuffix
56	devel:libQt6Qml$secondaryArchSuffix
57	devel:libssl$secondaryArchSuffix
58	devel:libz$secondaryArchSuffix
59	"
60BUILD_PREREQUIRES="
61	cmd:awk
62	cmd:cmake
63	cmd:find
64	cmd:g++$secondaryArchSuffix
65	cmd:ld$secondaryArchSuffix
66	cmd:make
67	cmd:ninja
68	cmd:perl
69	cmd:pkg_config$secondaryArchSuffix
70	cmd:python3
71	cmd:sed
72	cmd:xargs
73	"
74
75BUILD()
76{
77	export DISABLE_ASLR=1
78
79	cmake -B build -S $sourceDir -G Ninja \
80		-DCMAKE_BUILD_TYPE=Release \
81		-DCMAKE_CXX_FLAGS=-fPIC
82
83	find -name cmake_install.cmake -exec sed -i "s|set(CMAKE_INSTALL_PREFIX.*|set(CMAKE_INSTALL_PREFIX \"$prefix\")|" {} \;
84
85	ninja -v -C build $jobArgs
86}
87
88INSTALL()
89{
90	ninja -C build install
91
92	prepareInstalledDevelLibs \
93		libQt6Charts \
94		libQt6ChartsQml
95
96	# fix pkgconfig files
97	fixPkgconfig
98	sed -i "s|includedir=.*|includedir=$includeDir/Qt6|" \
99		$developLibDir/pkgconfig/*.pc
100
101	cd $libDir
102	for i in lib*.so.6.*;do
103		ln -fs $i $(echo $i | cut -f1,2 -d.)
104	done
105
106	packageEntries devel \
107		$developDir \
108		$libDir/cmake \
109		$dataDir/Qt6/mkspecs
110}
111