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

EAPI=8

inherit desktop toolchain-funcs

DESCRIPTION="Interactive tool for astronomical ephemeris and sky simulation"
HOMEPAGE="https://xephem.github.io/XEphem/Site/xephem.html"
SRC_URI="https://github.com/XEphem/XEphem/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/XEphem-${PV}"

LICENSE="MIT"
SLOT=0
KEYWORDS="~amd64 ppc ppc64 ~x86 ~amd64-linux ~x86-linux"

RDEPEND="
	dev-libs/openssl:=
	>=x11-libs/motif-2.3:0
	virtual/jpeg:0
	media-libs/libpng:0=
	x11-libs/libXext
	x11-libs/libXmu
	x11-libs/libXt
"
DEPEND="${RDEPEND}"
BDEPEND="sys-apps/groff"

HTML_DOCS=( GUI/xephem/help/. )

PATCHES=(
	"${FILESDIR}/${PN}-3.7.7-implicits.patch"
	"${FILESDIR}/${P}-respect_env_vars.patch"
)

src_compile() {
	tc-export CC AR RANLIB
	emake -C GUI/xephem
}

src_install() {
	insinto /usr/share/X11/app-defaults
	newins - XEphem <<-EOF
		XEphem.ShareDir: /usr/share/${PN}
	EOF
	newenvd - 99xephem <<-EOF
		XEHELPURL=/usr/share/doc/${PF}/html/xephem.html
	EOF
	einstalldocs

	cd GUI/xephem || die
	dobin xephem
	doman xephem.1
	newicon XEphem.png ${PN}.png
	insinto /usr/share/${PN}
	doins -r auxil catalogs fifos fits gallery lo
	make_desktop_entry xephem XEphem ${PN}
}