1SUMMARY="A fast anagram generator for alphabetic languages"
2DESCRIPTION="an is a fast anagram generator that uses the system's built-in \
3word dictionary to form anagrams. an supports Unicode and theoretically should \
4work for any alphabetic language."
5HOMEPAGE="https://salsa.debian.org/pm/an"
6COPYRIGHT="2012-2014 Paul Martin"
7LICENSE="GNU GPL v2"
8REVISION="3"
9srcGitRev="403d9a4fd75a5cfae9d5388c4a0e7f889145177f"
10SOURCE_URI="https://salsa.debian.org/pm/an/-/archive/$srcGitRev.tar.gz"
11CHECKSUM_SHA256="e4f717f65f5cccaf610f66aaa1755a42370e1d6d7c26411255a283cdb4febdb9"
12SOURCE_FILENAME="an-$portVersion-$srcGitRev.tar.gz"
13SOURCE_DIR="an-$srcGitRev"
14
15ARCHITECTURES="all !x86_gcc2"
16SECONDARY_ARCHITECTURES="x86"
17
18PROVIDES="
19	an$secondaryArchSuffix = $portVersion
20	cmd:an = $portVersion
21	"
22REQUIRES="
23	haiku$secondaryArchSuffix
24	lib:libicui18n$secondaryArchSuffix
25	lib:libicuuc$secondaryArchSuffix
26	lib:libicudata$secondaryArchSuffix
27	"
28
29BUILD_REQUIRES="
30	haiku${secondaryArchSuffix}_devel
31	devel:libicui18n$secondaryArchSuffix >= 74
32	devel:libicuuc$secondaryArchSuffix >= 74
33	devel:libicudata$secondaryArchSuffix >= 74
34	"
35BUILD_PREREQUIRES="
36	cmd:gcc$secondaryArchSuffix
37	cmd:make
38	cmd:sed
39	"
40
41PATCH()
42{
43	sed -i\
44	"s|/usr.*|/boot/system/data/spell_check/word_dictionary/words\"|"\
45	an.h
46}
47
48BUILD()
49{
50	make INSTALLDIR=$prefix/bin MANDIR=$manDir/man6 $jobArgs
51}
52
53INSTALL()
54{
55	mkdir -p $prefix/bin $manDir/man6
56	sed -i "s|/usr.*|/boot/system/data/spell_check/word_dictionary/words|"\
57	an.6
58
59	make install INSTALLDIR=$prefix/bin MANDIR=$manDir/man6
60}
61