blob: da8e446cf7c4b7879aef062a2e1dc6f78df9ed51 (
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
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PN="MRIcroGL"
inherit desktop xdg-utils
DESCRIPTION="A simple medical imaging visualization tool"
HOMEPAGE="https://github.com/neurolabusc/MRIcroGL"
SRC_URI="https://github.com/rordenlab/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="dicom python"
BDEPEND="dev-lang/lazarus"
DEPEND="
dev-lang/fpc
x11-misc/appmenu-gtk-module[gtk2]
"
RDEPEND="dicom? ( sci-biology/dcm2niix )"
S="${WORKDIR}/${MY_PN}-${PV}"
src_compile() {
# Allegedly the Debian recipe contains some sort of Python support, wasn't able to test.
if use python; then
lazbuild -B \
--lazarusdir="/usr/share/lazarus/" \
--pcp="system-lazarus-config" \
MRIcroGL_Debian.lpi || die
else
lazbuild -B \
--lazarusdir="/usr/share/lazarus/" \
--pcp="system-lazarus-config" \
MRIcroGL_NoPython.lpi || die
fi
}
src_install() {
dobin MRIcroGL
pushd Resources > /dev/null
insinto /usr/share/MRIcroGL
doins -r lut matcap Roboto.* script shader
doicon -s scalable mricrogl.svg
make_desktop_entry MRIcroGL MRIcroGL /usr/share/icons/hicolor/scalable/apps/mricrogl.svg
popd
}
pkg_postinst(){
xdg_icon_cache_update
ewarn "This package might exhibit nondeterministic lag at startup manifesting as a blank"
ewarn "window, which can either be closed (e.g. Alt+F4) manually leading to the actual"
ewarn "interface being launched, or will close itself after 10-20s and start the proper GUI"
ewarn "For more details on this look up: https://github.com/rordenlab/MRIcroGL/issues/49"
}
pkg_postrm() {
xdg_icon_cache_update
xdg_mimeinfo_database_update
xdg_desktop_database_update
}
|