1SUMMARY="Unicode input method for Haiku"
2DESCRIPTION="Allows entering Unicode characters by pressing: CMD + Shift + u and then the \
3hexadecimal numeric value of the desired character (eg: 'CMD+Shift+u 262e' -> ���)."
4HOMEPAGE="https://github.com/puckipedia/UnicodeInputServerMethod/"
5COPYRIGHT="2015-2023 Puck Meerburg"
6LICENSE="MIT"
7REVISION="1"
8srcGitRev="26a7cdc0bc5901138262a34dab2a62e5b9e30f3a"
9SOURCE_URI="https://github.com/puckipedia/UnicodeInputServerMethod/archive/$srcGitRev.tar.gz"
10CHECKSUM_SHA256="3f7bd452c554eb78877bfd30fe11549abfbc875d6a1fda98b1f38db3acf6f449"
11SOURCE_DIR="UnicodeInputServerMethod-$srcGitRev"
12
13ARCHITECTURES="all"
14
15PROVIDES="
16	unicode_input_method = $portVersion
17	addon:UnicodeInputServerMethod = $portVersion
18	"
19REQUIRES="
20	haiku
21	"
22
23BUILD_REQUIRES="
24	haiku_devel
25	"
26BUILD_PREREQUIRES="
27	makefile_engine
28	cmd:gcc
29	cmd:make
30	"
31
32PATCH()
33{
34	# Undefine DEBUG, as it spams the syslog too much.
35	sed -i -e "s|#define DEBUG 1|//#define DEBUG 1|" UnicodeInputServerMethod.cpp
36}
37
38BUILD()
39{
40	make OBJ_DIR=objects
41}
42
43INSTALL()
44{
45	mkdir -p "$addOnsDir/input_server/filters" "$addOnsDir/input_server/methods"
46	mv objects/UnicodeInputServerMethod "$addOnsDir/input_server/methods"
47	ln -sr "$addOnsDir/input_server/methods/UnicodeInputServerMethod" \
48		"$addOnsDir/input_server/filters/UnicodeInputServerMethod"
49}
50