summaryrefslogtreecommitdiff
blob: 8a48d386661e62c3035edf5fe990d4ddeb6abf53 (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
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit eapi7-ver toolchain-funcs

MY_P=${PN}_$(ver_rs 1 _)

DESCRIPTION="3D geometrical postscript renderer"
HOMEPAGE="http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html"
SRC_URI="http://geant4.kek.jp/~tanaka/src/${MY_P}.tgz"

LICENSE="public-domain"
SLOT="0"

KEYWORDS="amd64 ~hppa ppc x86"
IUSE="doc opengl X"

RDEPEND="dev-lang/tk:*
	opengl? ( virtual/opengl )
	X? ( x11-libs/libX11 )"
DEPEND="${RDEPEND}
	app-shells/tcsh
	doc? ( virtual/latex-base )"

S="${WORKDIR}/${MY_P}"

PATCHES=(
	"${FILESDIR}"/${P}-no-interactive.patch
	"${FILESDIR}"/${P}-gcc7.patch
)

DOCS=( README.txt )

src_prepare() {
	default

	sed -i -e "s/\$(LIB_DIR)/\$(LDFLAGS) &/" \
		-e '/strip/d' Makefile*in || die

	if use X; then
		mv -f configure_xwin configure || die
	fi

	tc-export CXX
}

src_install() {
	dodir /usr/bin

	if use doc; then
		pdflatex DOC/G4PRIM_FORMAT_24.tex || die "pdf generation failed"
		DOCS+=( DOC/*.pdf )
		HTML_DOCS=( DOC/*.html )
	fi

	default
}