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

EAPI=7

inherit cmake optfeature

DESCRIPTION="DICOM to NIfTI converter"
HOMEPAGE="https://github.com/rordenlab/dcm2niix"
SRC_URI="https://github.com/rordenlab/dcm2niix/archive/v${PV}.tar.gz -> ${P}.tar.gz"

SLOT="0"
LICENSE="BSD"
KEYWORDS="~amd64 ~x86"
IUSE="static system-jpeg +jpeg-ls jpeg2k"

DEPEND="
	system-jpeg? ( media-libs/libjpeg-turbo )
	jpeg2k? ( media-libs/openjpeg )
"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"

PATCHES=(
	"${FILESDIR}"/${PN}-disable_find_git.patch
)

src_configure() {
	local mycmakeargs=(
		-DUSE_STATIC_RUNTIME=$(usex static)
		-DUSE_TURBOJPEG=$(usex system-jpeg)
		-DUSE_JPEGLS=$(usex jpeg-ls)
		-DUSE_OPENJPEG=$(usex jpeg2k)
	)

	cmake_src_configure
}

pkg_postinst() {
	optfeature "parallel gzip support" app-arch/pigz
}