1SUMMARY="The Cross Platform code and text editor"
2DESCRIPTION="CudaText is a cross-platform text editor, written in Object Pascal.
3It is open source project and can be used free of charge, even for business.
4It starts quite fast: ~0.3 sec with ~30 plugins, on Linux on CPU Intel Core i3 3Hz.
5It is extensible by Python add-ons: plugins, linters, code tree parsers, external tools.
6Syntax parser is feature-rich, based on EControl engine (though not as fast as in some \
7competitors).
8
9Features:
10* Syntax highlight for lot of languages (250+ lexers).
11* Code tree: structure of functions/classes/etc, if lexer allows it.
12* Code folding.
13* Multi-carets and multi-selections.
14* Find/Replace with regular expressions.
15* Configs in JSON format. Including lexer-specific configs.
16* Tabbed UI.
17* Split view to primary/secondary. Split window to 2/3/4/6 groups of tabs.
18* Command palette, with fuzzy matching.
19* Minimap. Micromap.
20* Show unprinted whitespace.
21* Support for many encodings.
22* Customizable hotkeys.
23* Binary/Hex viewer for files of unlimited size (can show 10 Gb logs).
24* Correctly saves binary files."
25HOMEPAGE="https://cudatext.github.io/
26	https://github.com/Alexey-T/CudaText"
27COPYRIGHT="2024 Alexey-T"
28LICENSE="MPL v2.0"
29REVISION="2"
30SOURCE_URI="https://github.com/Begasus/CudaText-Haikuports/archive/refs/tags/$portVersion-2.tar.gz"
31CHECKSUM_SHA256="2dcaf2534d22e12eb1e46695d2cb5583ebac20320f3cf8620b65092af869c0e8"
32SOURCE_DIR="CudaText-Haikuports-$portVersion-2/files"
33ADDITIONAL_FILES="CudaText.rdef.in
34	setup-cudatext.sh
35	"
36
37ARCHITECTURES="!all x86_64"
38SECONDARY_ARCHITECTURES="x86"
39
40POST_INSTALL_SCRIPTS="$relativePostInstallDir/setup-cudatext.sh"
41
42PROVIDES="
43	cudatext$secondaryArchSuffix = $portVersion
44	app:CudaText
45	"
46REQUIRES="
47	haiku$secondaryArchSuffix
48	lib:libiconv$secondaryArchSuffix
49	"
50if [ "$targetArchitecture" = x86_gcc2 ]; then
51	REQUIRES+="
52	lib:libQt5Pas$secondaryArchSuffix
53	"
54elif [ "$targetArchitecture" = x86_64 ]; then
55	REQUIRES+="
56	lib:libQt6Pas$secondaryArchSuffix
57	"
58fi
59INSTALL()
60{
61	mkdir -p $appsDir $dataDir $postInstallDir
62if [ "$targetArchitecture" = x86_gcc2 ]; then
63	cp 32bit/apps/CudaText $appsDir
64elif [ "$targetArchitecture" = x86_64 ]; then
65	cp 64bit/apps/CudaText $appsDir
66fi
67	cp -rf data/cudatext $dataDir
68
69	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
70	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
71	local MINOR="`echo "$portVersion" | cut -d. -f3`"
72	local INTERNAL="`echo "$portVersion" | cut -d. -f4`"
73	sed \
74		-e "s|@MAJOR@|$MAJOR|" \
75		-e "s|@MIDDLE@|$MIDDLE|" \
76		-e "s|@MINOR@|$MINOR|" \
77		-e "s|@INTERNAL@|$INTERNAL|" \
78		$portDir/additional-files/CudaText.rdef.in > CudaText.rdef
79
80	addResourcesToBinaries CudaText.rdef \
81		$appsDir/CudaText
82
83	cp -f $portDir/additional-files/setup-cudatext.sh $postInstallDir
84
85	addAppDeskbarSymlink $appsDir/CudaText
86}
87