summaryrefslogtreecommitdiff
blob: 793d68044eab4269e3650d85e87118337cdf7f3b (plain)
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
60
61
62
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools multiprocessing toolchain-funcs

DESCRIPTION="City simulation game"
HOMEPAGE="https://github.com/lincity-ng/lincity-ng"
SRC_URI="https://github.com/lincity-ng/lincity-ng/archive/lincity-ng-${PV/_/-}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${P/_/-}"

LICENSE="GPL-2+ BitstreamVera CC-BY-SA-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
	dev-games/physfs
	dev-libs/libxml2:2
	media-libs/libsdl[joystick,opengl,sound,video]
	media-libs/sdl-gfx
	media-libs/sdl-image[png]
	media-libs/sdl-mixer[vorbis]
	media-libs/sdl-ttf
	sys-libs/zlib
	virtual/opengl"
DEPEND="${RDEPEND}"
BDEPEND="
	dev-libs/libxslt
	dev-util/ftjam
	sys-devel/gettext
	virtual/pkgconfig"

PATCHES=(
	"${FILESDIR}"/${P}-flags.patch
)

src_prepare() {
	default

	AT_M4DIR=mk/autoconf eautoreconf

	# strip down autogen.sh / makerelease.sh for needed additional actions
	sed -i -e '1a\set -e' -e '1n;/# generate Jam/,$!d;/^$/,$d' autogen.sh || die
	sed -i -e '1a\set -e' -e '/^$/,$d' makerelease.sh || die

	./autogen.sh || die "Failed to generate Jamconfig.in"
	./makerelease.sh || die "Failed to generate CREDITS"
}

src_compile() {
	tc-export CC RANLIB
	export AR="$(tc-getAR) cru" #739376

	jam -q -dx -j$(makeopts_jobs) || die
}

src_install() {
	jam -q -dx -sDESTDIR="${D}" -sPACKAGE_VERSION=${PVR} install || die

	rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
}