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

EAPI=8

inherit desktop flag-o-matic xdg

DESCRIPTION="For the visualisation of molecular and crystal structures."

HOMEPAGE="http://www.xcrysden.org/"

SRC_URI="http://www.xcrysden.org/download/${P}.tar.gz"

LICENSE="GPL-2+"

SLOT="0"

KEYWORDS="~amd64"

RDEPEND=">=x11-base/xorg-server-21.1.4
	>=virtual/glu-9.0-r2
	>=dev-lang/tcl-8.6.12
	>=dev-lang/tk-8.6.12
	>=dev-tcltk/togl-2.0-r3
	>=dev-tcltk/bwidget-1.9.14
	>=media-libs/mesa-22.1.3
	>=sci-libs/fftw-3.3.10"

DEPEND="${RDEPEND}"

PATCHES=(
	"${FILESDIR}/${P}-ext-bwidget.patch"
	"${FILESDIR}/${P}-Togl-lib.patch"
	"${FILESDIR}/${P}-wrapper-paths.patch"
)

src_prepare() {
	default
	cp "${S}/system/Make.sys-shared" "${S}/Make.sys" || die 'Copying Make.sys to build dir failed.'
}

src_compile() {
	append-cflags "-fcommon"
	emake xcrysden
}

src_install() {
	emake \
		prefix="${D}"/usr \
		install

	domenu "${FILESDIR}/${PN}.desktop"
	doicon -s 32x32 "${FILESDIR}/icons/${PN}.png"
	docompress -x /usr/share/doc/${P}/examples/GAUSSIAN_files/ \
		/usr/share/doc/${P}/examples/Orca_files/ \
		/usr/share/doc/${P}/examples/XSF_Files/ \
		/usr/share/doc/${P}/examples/Scripting/ \
		/usr/share/doc/${P}/examples/FermiSurface \
		/usr/share/man/
}