aboutsummaryrefslogtreecommitdiffstats
path: root/testing/widelands/APKBUILD
blob: 495dcc39b1dbb9b44fac325e32ae0dea167d0c85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=widelands
pkgver=20
pkgrel=3
pkgdesc="Real-time strategy game inspired by The Settlers II"
url="http://www.widelands.org"
arch="all"
license="GPL-2.0-or-later"
makedepends="cmake python3 boost-dev icu-dev minizip-dev gettext-dev glu-dev
	glew-dev sdl2_ttf-dev sdl2_mixer-dev sdl2_net-dev sdl2_image-dev sdl2-dev"
options="!check" # no tests
source="https://launchpad.net/widelands/build$pkgver/build$pkgver/+download/widelands-build$pkgver.tar.bz2
	fix_nl_msg_cat_cntr.patch
	fix-execinfo.patch
	widelands.desktop
	search-for-libintl.patch
	45249a2c7172fdc2d5cd856a1ee05670f21f0db7.patch
	"
builddir="$srcdir/widelands-build$pkgver"

export LDFLAGS="$LDFLAGS -lintl" CXXFLAGS="$CXXFLAGS -DU_USING_ICU_NAMESPACE=1"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	mkdir build && cd build
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DWL_INSTALL_DATADIR=/usr/share/widelands \
		${CMAKE_CROSSOPTS} ..
	make
}

package() {
	make -C build DESTDIR="$pkgdir" install

	install -Dm0644 "$srcdir"/widelands.desktop -t "$pkgdir"/usr/share/applications

	mkdir -p "$pkgdir"/usr/bin
	mv "$pkgdir"/usr/widelands \
		"$pkgdir"/usr/wl_map_object_info \
		"$pkgdir"/usr/wl_map_info \
		"$pkgdir"/usr/bin

	rm -f "$pkgdir"/usr/VERSION "$pkgdir"/usr/ChangeLog "$pkgdir"/usr/CREDITS
}

sha512sums="25280db6a57adeb37d13db35ce9eb41a5478534b04772240f6228c180f5a41a55fc414dab66e724945442985cbbba7a8a59a582291aca176e0bd8ae6c08760e5  widelands-build20.tar.bz2
1254437952230b90db23d1fd7dd285a1d8a5b24483316065bfc96e01450cbb6f164d7ffc6fe48a96e5e5e2a9501cd6df5d1ba53c6d2b8c3a76dd47263b495e6b  fix_nl_msg_cat_cntr.patch
90d3068c822d021f7323db7f1e6a92ee8defce7f0b9ead4d11a248fb1396e49f565fa3e351ffbaa3df56f8ba976c90becc28fb2da016317d9a8ff0a3d697840c  fix-execinfo.patch
2c45958bd7f5af273663431e02c8e2f1a6cc389c174d427032dca707cfc938181c95614d1feb743dd4c677ecb442feffb2fb7d3d41e856c5bdc12033c7d2c0d8  widelands.desktop
8b2fb971bc282bacaa2727cdf49b55d0bee3697d02fdb2b9f7d0cad5bd1ffe6467e865515d0c13b7efff2fb1f257d91ef073ae935e9c062d8dc5aade0713feb1  search-for-libintl.patch
4e3d1026189cd278d6ae310a7279a1d5dbfaf1bda582589c27e4cc1e4212e1c27de9e1cd3d487f7f2f794f6fd0f1f57fea1b96bb6a9594ad82940825581b2fe8  45249a2c7172fdc2d5cd856a1ee05670f21f0db7.patch"