summaryrefslogtreecommitdiff
blob: 581d092126e23dfcb4ba3e8722b5f3e0250e3d88 (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
63
64
65
66
67
68
69
70
71
72
73
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit autotools flag-o-matic toolchain-funcs

DESCRIPTION="Render images of the earth into the X root window"
HOMEPAGE="http://xplanet.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ~hppa ppc ppc64 ~sparc x86"
IUSE="gif jpeg png tiff truetype X"

RDEPEND="
	gif? ( media-libs/giflib:= )
	jpeg? ( virtual/jpeg:0 )
	png? (
		media-libs/libpng:0=
		media-libs/netpbm
	)
	tiff? ( media-libs/tiff:0 )
	truetype? (
		media-libs/freetype:2
		x11-libs/pango
	)
	X? (
		x11-libs/libX11
		x11-libs/libXScrnSaver
		x11-libs/libXext
		x11-libs/libXt
	)
"
DEPEND="${RDEPEND}"
BDEPEND="
	truetype? ( virtual/pkgconfig )
	X? ( x11-base/xorg-proto )
"

PATCHES=(
	"${FILESDIR}"/${P}-giflib.patch
	"${FILESDIR}"/${P}-narrowing_conversion.patch
	"${FILESDIR}"/${P}-remove-null-comparison.patch
	"${FILESDIR}"/${P}-freetype_pkgconfig.patch #788136
)

src_prepare() {
	default
	eautoreconf #788136
}

src_configure() {
	# econf says 'checking pnm.h presence... no'
	use png && append-cppflags -I"${EPREFIX}"/usr/include/netpbm

	local myconf=(
		--with-freetype$(usex truetype '' '=no')
		--with-gif$(usex gif '' '=no')
		--with-jpeg$(usex jpeg '' '=no')
		--with-pango$(usex truetype '' '=no')
		--with-png$(usex png '' '=no')
		--with-pnm$(usex png '' '=no')
		--with-tiff$(usex tiff '' '=no')
		--with-x$(usex X '' '=no')
		--with-xscreensaver$(usex X '' '=no')
	)
	econf --with-cspice=no "${myconf[@]}"
}

src_compile() {
	emake AR=$(tc-getAR)
}