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

EAPI=7

inherit toolchain-funcs virtualx

DESCRIPTION="DVI to Grace translator"
HOMEPAGE="https://plasma-gate.weizmann.ac.il/Grace/"
SRC_URI="ftp://plasma-gate.weizmann.ac.il/pub/grace/src/devel/${P}.tar.gz"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"

IUSE="examples test"
#RESTRICT="!test? ( test )"
# Still missing some fontpackage, but which?
RESTRICT="test"

DEPEND="media-libs/t1lib"
RDEPEND="${DEPEND}"
BDEPEND="test? (
	sci-visualization/grace
)"

src_prepare() {
	tc-export CC
	default
	# respect flags
	sed -i \
		-e '/^LDFLAGS/d' -e '/^CFLAGS/d' -e '/^CC/d' \
		Makefile || die
	sed -i -e 's/DVI2GR=\.\/dvi2gr/DVI2GR=$(which dvi2gr)/g' runtest.sh || die
}

src_install() {
	dobin ${PN}

	if use examples; then
		docinto examples
		dodoc *.ti runtest.sh
	fi

	insinto /usr/share/${PN}
	doins -r fonts
}

src_test() {
	virtx default
}

pkg_postinst() {
	einfo "Don't forget install the TeX-Fonts in Grace"
	einfo "  /usr/share/${PN}/fonts/FontDataBase"
}