1SUMMARY="Make a fortune dealing drugs on the streets of New York"
2DESCRIPTION="dopewars is a free Unix/Win32 rewrite of a game originally based \
3on \"Drug Wars\" by John E. Dell. The idea of dopewars is to deal in drugs on \
4the streets of New York, amassing a huge fortune and paying off the loan \
5shark, while avoiding the ever-annoying police. The Unix/Win32 rewrite, as \
6featuring a so-called \"antique\" mode which closely follows the original, \
7introduces new features such as the ability to take part in multi-player \
8games. dopewars aims to be highly configurable, and what you can't change in \
9the configuration files you can change by poking around in the source, which \
10is freely available under the terms of the GNU General Public License.
11
12ADVISORY: dopewars is not recommended for children below 16 without parental \
13supervision. We also do not condone real-life drug dealing."
14HOMEPAGE="https://dopewars.sourceforge.io/
15	https://github.com/benmwebb/dopewars"
16COPYRIGHT="1999-2020 dopewars developers"
17LICENSE="GNU GPL v2"
18REVISION="1"
19SOURCE_URI="https://downloads.sourceforge.net/dopewars/dopewars-$portVersion.tar.gz"
20CHECKSUM_SHA256="83127903a61d81cda251a022f9df150d11e27bdd040e858c09c57927cc0edea6"
21PATCHES="dopewars-$portVersion.patchset"
22
23ARCHITECTURES="all !x86_gcc2"
24SECONDARY_ARCHITECTURES="x86"
25
26commandBinDir=$binDir
27commandSuffix=$secondaryArchSuffix
28if [ "$targetArchitecture" = x86_gcc2 ]; then
29	commandSuffix=
30	commandBinDir=$prefix/bin
31fi
32
33GLOBAL_WRITABLE_FILES="
34	var/dopewars.sco keep-old
35	"
36
37PROVIDES="
38	dopewars$secondaryArchSuffix = $portVersion
39	cmd:dopewars$commandSuffix
40	"
41REQUIRES="
42	haiku$secondaryArchSuffix
43	lib:libcurl$secondaryArchSuffix
44	lib:libglib_2.0$secondaryArchSuffix
45	lib:libiconv$secondaryArchSuffix
46	lib:libintl$secondaryArchSuffix
47	lib:libncurses$secondaryArchSuffix
48	lib:libSDL2_2.0$secondaryArchSuffix
49	lib:libSDL2_mixer_2.0$secondaryArchSuffix
50	"
51
52BUILD_REQUIRES="
53	haiku${secondaryArchSuffix}_devel
54	devel:libcurl$secondaryArchSuffix
55	devel:libglib_2.0$secondaryArchSuffix
56	devel:libiconv$secondaryArchSuffix
57	devel:libintl$secondaryArchSuffix
58	devel:libncurses$secondaryArchSuffix
59	devel:libSDL2_2.0$secondaryArchSuffix
60	devel:libSDL2_mixer_2.0$secondaryArchSuffix
61	"
62BUILD_PREREQUIRES="
63	cmd:aclocal
64	cmd:autoreconf
65	cmd:awk
66	cmd:make
67	cmd:gcc$secondaryArchSuffix
68	cmd:libtoolize$secondaryArchSuffix
69	cmd:pkg_config$secondaryArchSuffix
70	"
71
72BUILD()
73{
74	autoreconf -vfi
75	runConfigure --omit-dirs "binDir dataRootDir docDir" \
76		./configure \
77		--bindir=$commandBinDir
78	make $jobArgs
79}
80
81INSTALL()
82{
83	make install
84	install -m 755 -d "$docDir"
85	mv $prefix/share/doc/dopewars/* "$docDir"
86	rm -rf "$dataDir/gnome" "$dataDir/pixmaps" "$prefix/share"
87}
88