summaryrefslogtreecommitdiff
blob: 2b12a55927ca1b88ad0d175077b220619c6ce390 (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
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5
inherit eutils

DESCRIPTION="A library of code shared between tuxmath and tuxtype"
HOMEPAGE="https://github.com/tux4kids/t4kcommon"
SRC_URI="https://github.com/tux4kids/t4kcommon/archive/upstream/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="static-libs svg"

RDEPEND="dev-libs/libxml2:2
	media-libs/libsdl
	media-libs/sdl-image
	media-libs/sdl-mixer
	media-libs/sdl-net
	media-libs/sdl-ttf
	media-libs/sdl-pango
	svg? (
		gnome-base/librsvg:2
		media-libs/libpng:0
		x11-libs/cairo
	)"
DEPEND="${RDEPEND}
	virtual/pkgconfig"

S=${WORKDIR}/t4kcommon-upstream-${PV}

src_prepare() {
	epatch "${FILESDIR}"/${P}-libpng.patch
}

src_configure() {
	econf \
		$(usex svg "" "--without-rsvg") \
		$(use_enable static-libs static)
}

src_install() {
	default
	use static-libs || prune_libtool_files --all
}