1SUMMARY="Gomoku like game for two players"
2DESCRIPTION="Bovo is a Gomoku (from Japanese ������������ - lit. \"five points\") like \
3game for two players, where the opponents alternate in placing their respective \
4pictogram on the game board. (Also known as: Connect Five, Five in a row, X and O, \
5Naughts and Crosses)."
6HOMEPAGE="https://apps.kde.org/bovo"
7COPYRIGHT="2010-2024 KDE Organisation"
8LICENSE="GNU GPL v2"
9REVISION="1"
10SOURCE_URI="https://download.kde.org/stable/release-service/$portVersion/src/bovo-$portVersion.tar.xz"
11CHECKSUM_SHA256="db79b3cc909f1348b2fdf57705085ff9684c35f377c0cb962854e284a51f1e4b"
12PATCHES="bovo-$portVersion.patchset"
13ADDITIONAL_FILES="bovo.rdef.in"
14
15ARCHITECTURES="all !x86_gcc2"
16SECONDARY_ARCHITECTURES="x86"
17
18PROVIDES="
19	bovo$secondaryArchSuffix = $portVersion
20	app:Bovo$secondaryArchSuffix = $portVersion
21	"
22REQUIRES="
23	haiku$secondaryArchSuffix
24	lib:libKF5Archive$secondaryArchSuffix
25	lib:libKF5Auth$secondaryArchSuffix
26	lib:libKF5Bookmarks$secondaryArchSuffix
27	lib:libKF5Codecs$secondaryArchSuffix
28	lib:libKF5Completion$secondaryArchSuffix
29	lib:libKF5ConfigCore$secondaryArchSuffix
30	lib:libKF5ConfigGui$secondaryArchSuffix
31	lib:libKF5ConfigWidgets$secondaryArchSuffix
32	lib:libKF5CoreAddons$secondaryArchSuffix
33	lib:libKF5Crash$secondaryArchSuffix
34	lib:libKF5DBusAddons$secondaryArchSuffix
35	lib:libKF5GuiAddons$secondaryArchSuffix
36	lib:libKF5I18n$secondaryArchSuffix
37	lib:libKF5IconThemes$secondaryArchSuffix
38	lib:libKF5ItemViews$secondaryArchSuffix
39	lib:libKF5JobWidgets$secondaryArchSuffix
40	lib:libKF5KDEGames$secondaryArchSuffix
41	lib:libKF5KIOCore$secondaryArchSuffix
42	lib:libKF5Service$secondaryArchSuffix
43	lib:libKF5Solid$secondaryArchSuffix
44	lib:libKF5TextEditor$secondaryArchSuffix
45	lib:libKF5TextWidgets$secondaryArchSuffix
46	lib:libKF5WidgetsAddons$secondaryArchSuffix
47	lib:libKF5WindowSystem$secondaryArchSuffix
48	lib:libKF5XmlGui$secondaryArchSuffix
49	lib:libQt5Core$secondaryArchSuffix
50	lib:libQt5DBus$secondaryArchSuffix
51	lib:libQt5Gui$secondaryArchSuffix
52	lib:libQt5Widgets$secondaryArchSuffix
53	lib:libQt5Xml$secondaryArchSuffix
54	"
55
56BUILD_REQUIRES="
57	haiku${secondaryArchSuffix}_devel
58	extra_cmake_modules$secondaryArchSuffix
59	devel:libKF5Archive$secondaryArchSuffix
60	devel:libKF5Auth$secondaryArchSuffix
61	devel:libKF5Bookmarks$secondaryArchSuffix
62	devel:libKF5Codecs$secondaryArchSuffix
63	devel:libKF5Completion$secondaryArchSuffix
64	devel:libKF5ConfigCore$secondaryArchSuffix
65	devel:libKF5ConfigWidgets$secondaryArchSuffix
66	devel:libKF5CoreAddons$secondaryArchSuffix
67	devel:libKF5Crash$secondaryArchSuffix
68	devel:libKF5DBusAddons$secondaryArchSuffix
69	devel:libKF5DocTools$secondaryArchSuffix
70	devel:libKF5GuiAddons$secondaryArchSuffix
71	devel:libKF5I18n$secondaryArchSuffix
72	devel:libKF5IconThemes$secondaryArchSuffix
73	devel:libKF5ItemModels$secondaryArchSuffix
74	devel:libKF5ItemViews$secondaryArchSuffix
75	devel:libKF5JobWidgets$secondaryArchSuffix
76	devel:libKF5KDEGames$secondaryArchSuffix
77	devel:libKF5KIOCore$secondaryArchSuffix
78	devel:libKF5Service$secondaryArchSuffix
79	devel:libKF5Solid$secondaryArchSuffix
80	devel:libKF5TextEditor$secondaryArchSuffix
81	devel:libKF5TextWidgets$secondaryArchSuffix
82	devel:libKF5WidgetsAddons$secondaryArchSuffix
83	devel:libKF5WindowSystem$secondaryArchSuffix
84	devel:libKF5XmlGui$secondaryArchSuffix
85	devel:libQt5Core$secondaryArchSuffix
86	"
87BUILD_PREREQUIRES="
88	cmd:cmake
89	cmd:g++$secondaryArchSuffix
90	cmd:lrelease$secondaryArchSuffix >= 5
91	cmd:make
92	cmd:pkg_config$secondaryArchSuffix
93	"
94
95BUILD()
96{
97	# disable docs generation
98	sed -e '/add_subdirectory (doc)/ s/^#*/#/' -i CMakeLists.txt
99	sed -e '/kdoctools_install(po)/ s/^#*/#/' -i CMakeLists.txt
100
101	mkdir -p build
102	cd build
103
104	cmake .. \
105		-DCMAKE_BUILD_TYPE=Release \
106		-DCMAKE_INSTALL_PREFIX=$appsDir \
107		-DCMAKE_INSTALL_DATADIR=$dataDir \
108		-DCMAKE_INSTALL_DATAROOTDIR=$dataDir \
109		-DSHARE_INSTALL_PREFIX=$dataDir \
110		-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
111	make $jobArgs
112}
113
114INSTALL()
115{
116	cd build
117	make install
118
119	mv $appsDir/bin/bovo $appsDir/Bovo
120	rm -rf $appsDir/bin
121
122	local APP_SIGNATURE="application/x-vnd.kde-bovo"
123	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
124	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
125	local MINOR="`echo "$portVersion" | cut -d. -f3`"
126	local LONG_INFO="$SUMMARY"
127	sed \
128		-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
129		-e "s|@MAJOR@|$MAJOR|" \
130		-e "s|@MIDDLE@|$MIDDLE|" \
131		-e "s|@MINOR@|$MINOR|" \
132		-e "s|@LONG_INFO@|$LONG_INFO|" \
133		$portDir/additional-files/bovo.rdef.in > bovo.rdef
134
135	addResourcesToBinaries bovo.rdef $appsDir/Bovo
136	addAppDeskbarSymlink $appsDir/Bovo
137}
138