1SUMMARY="Interfacing with pseudo terminal devices"
2DESCRIPTION="This library provides primitives to interface with pseudo terminal \
3devices as well as a KProcess derived class for running child processes and \
4communicating with them using a pty.."
5HOMEPAGE="https://invent.kde.org/frameworks/kpty/"
6COPYRIGHT="2010-2024 KDE Organisation"
7LICENSE="GNU LGPL v2"
8REVISION="2"
9SOURCE_URI="https://download.kde.org/stable/frameworks/${portVersion%.*}/kpty-${portVersion}.tar.xz"
10CHECKSUM_SHA256="844c03068b266fa0805a015af2752923b42d55e8d9d4d65b3e600a19a2805419"
11PATCHES="kpty-$portVersion.patchset"
12
13ARCHITECTURES="all !x86_gcc2"
14SECONDARY_ARCHITECTURES="x86"
15
16PROVIDES="
17	kpty$secondaryArchSuffix = $portVersion
18	lib:libKF5Pty$secondaryArchSuffix = $portVersion compat >= 5
19	"
20REQUIRES="
21	haiku$secondaryArchSuffix
22	lib:libKF5ConfigGui$secondaryArchSuffix
23	lib:libKF5CoreAddons$secondaryArchSuffix
24	lib:libKF5I18n$secondaryArchSuffix
25	lib:libKF5WidgetsAddons$secondaryArchSuffix
26	lib:libQt5Core$secondaryArchSuffix
27	lib:libQt5Gui$secondaryArchSuffix
28	lib:libQt5Xml$secondaryArchSuffix
29	"
30
31PROVIDES_devel="
32	kpty${secondaryArchSuffix}_devel = $portVersion
33	devel:libKF5Pty$secondaryArchSuffix = $portVersion compat >= 5
34	"
35REQUIRES_devel="
36	kpty$secondaryArchSuffix == $portVersion base
37	"
38
39BUILD_REQUIRES="
40	haiku${secondaryArchSuffix}_devel
41	extra_cmake_modules$secondaryArchSuffix >= $portVersion
42	devel:libKF5ConfigGui$secondaryArchSuffix == $portVersion
43	devel:libKF5CoreAddons$secondaryArchSuffix == $portVersion
44	devel:libKF5I18n$secondaryArchSuffix
45	devel:libKF5WidgetsAddons$secondaryArchSuffix == $portVersion
46	devel:libQt5Core$secondaryArchSuffix
47	"
48BUILD_PREREQUIRES="
49	cmd:cmake
50	cmd:g++$secondaryArchSuffix
51	cmd:lrelease$secondaryArchSuffix >= 5
52	cmd:make
53	"
54
55PATCH()
56{
57	sed -e '/platforms:/ a \ \ \ \ - name: Haiku' -i $sourceDir/metainfo.yaml
58}
59
60BUILD()
61{
62	mkdir -p build
63	cd build
64
65	cmake .. $cmakeDirArgs \
66		-DCMAKE_BUILD_TYPE=Release \
67		-DCMAKE_CXX_FLAGS=-D_BSD_SOURCE \
68		-DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt5/mkspecs \
69		-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
70
71	make $jobArgs
72}
73
74INSTALL()
75{
76	cd build
77	make install
78
79	prepareInstalledDevelLibs \
80		libKF5Pty
81
82	packageEntries devel \
83		$libDir/cmake \
84		$dataDir/Qt5 \
85		$developDir
86}
87
88TEST()
89{
90	cd build
91	make test
92}
93