1SUMMARY="A simple wordgame"
2DESCRIPTION="Anagramarama is a simple wordgame in which one tries to guess all the different \
3permutations of a scrambled word which form another word within the time limit. Guess the \
4original word and you move on to the next level."
5HOMEPAGE="https://identicalsoftware.com/anagramarama/
6	https://github.com/dulsi/anagramarama"
7COPYRIGHT="2003-2010 Colm Gallagher et al."
8LICENSE="GNU GPL v2"
9REVISION="1"
10SOURCE_URI="https://identicalsoftware.com/anagramarama/anagramarama-$portVersion.tgz"
11CHECKSUM_SHA256="112f0c7740d50af8371dc8a76922b32125309f2ef6173df652298d7b23f06923"
12PATCHES="anagramarama-$portVersion.patchset"
13ADDITIONAL_FILES="anagramarama.rdef.in"
14
15ARCHITECTURES="all !x86_gcc2"
16SECONDARY_ARCHITECTURES="x86"
17
18PROVIDES="
19	anagramarama$secondaryArchSuffix = $portVersion
20	cmd:anagramarama = $portVersion
21	"
22REQUIRES="
23	haiku$secondaryArchSuffix
24	lib:libSDL2_2.0$secondaryArchSuffix
25	lib:libSDL2_image_2.0$secondaryArchSuffix
26	lib:libSDL2_mixer_2.0$secondaryArchSuffix
27	"
28
29BUILD_REQUIRES="
30	haiku${secondaryArchSuffix}_devel
31	devel:libSDL2_2.0$secondaryArchSuffix
32	devel:libSDL2_image_2.0$secondaryArchSuffix
33	devel:libSDL2_mixer_2.0$secondaryArchSuffix
34	"
35BUILD_PREREQUIRES="
36	cmd:cmake
37	cmd:gcc$secondaryArchSuffix
38	cmd:make
39	cmd:pkg_config$secondaryArchSuffix
40	"
41
42BUILD()
43{
44	cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
45		-DBINDIR=$prefix/bin \
46		-DDATAROOTDIR=$dataDir
47	make -C build $jobArgs
48}
49
50INSTALL()
51{
52	make -C build install
53
54	local MAJOR="`echo "$portVersion" | cut -d. -f1`"
55	local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
56	local APP_NAME="anagramarama"
57	local LONG_INFO="$SUMMARY"
58	local APP_SIGNATURE="application/x-vnd.anagramarama"
59	sed \
60		-e "s|@MAJOR@|$MAJOR|" \
61		-e "s|@MIDDLE@|$MIDDLE|" \
62		-e "s|@MINOR@|$MINOR|" \
63		-e "s|@LONG_INFO@|$LONG_INFO|" \
64		-e "s|@APP_NAME@|$APP_NAME|" \
65		-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
66		$portDir/additional-files/anagramarama.rdef.in > anagramarama.rdef
67
68	addResourcesToBinaries anagramarama.rdef $prefix/bin/anagramarama
69
70	addAppDeskbarSymlink $prefix/bin/anagramarama Anagramarama
71}
72