1 |
commit: 5be1efe1c29a989f03b635bc179b5181150f45eb |
2 |
Author: Horea Christian <chr <AT> chymera <DOT> eu> |
3 |
AuthorDate: Mon Nov 25 17:58:40 2019 +0000 |
4 |
Commit: Horea Christian <horea.christ <AT> gmail <DOT> com> |
5 |
CommitDate: Mon Nov 25 17:58:40 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=5be1efe1 |
7 |
|
8 |
sci-biology/ants: EAPI bump and other live ebuild fixes |
9 |
|
10 |
Package-Manager: Portage-2.3.79, Repoman-2.3.18 |
11 |
Signed-off-by: Horea Christian <chr <AT> chymera.eu> |
12 |
|
13 |
sci-biology/ants/ants-9999.ebuild | 60 +++++++++++++++++++++++++++++++++------ |
14 |
1 file changed, 51 insertions(+), 9 deletions(-) |
15 |
|
16 |
diff --git a/sci-biology/ants/ants-9999.ebuild b/sci-biology/ants/ants-9999.ebuild |
17 |
index da7514fca..b759acb50 100644 |
18 |
--- a/sci-biology/ants/ants-9999.ebuild |
19 |
+++ b/sci-biology/ants/ants-9999.ebuild |
20 |
@@ -1,28 +1,70 @@ |
21 |
-# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
-EAPI=6 |
26 |
+EAPI=7 |
27 |
+ |
28 |
+CMAKE_MAKEFILE_GENERATOR="emake" |
29 |
|
30 |
inherit cmake-utils git-r3 multilib |
31 |
|
32 |
DESCRIPTION="Advanced Normalitazion Tools for neuroimaging" |
33 |
HOMEPAGE="http://stnava.github.io/ANTs/" |
34 |
-SRC_URI="" |
35 |
+SRC_URI=" |
36 |
+ test? ( |
37 |
+ http://chymera.eu/distfiles/ants_testdata-2.3.1_p20191013.tar.xz |
38 |
+ ) |
39 |
+" |
40 |
EGIT_REPO_URI="https://github.com/stnava/ANTs.git" |
41 |
|
42 |
SLOT="0" |
43 |
LICENSE="BSD" |
44 |
KEYWORDS="" |
45 |
+IUSE="test vtk" |
46 |
+ |
47 |
+DEPEND=" |
48 |
+ vtk? ( |
49 |
+ ~sci-libs/itk-5.0.1[vtkglue] |
50 |
+ sci-libs/vtk |
51 |
+ ) |
52 |
+ !vtk? ( ~sci-libs/itk-5.0.1 ) |
53 |
+" |
54 |
+RDEPEND="${DEPEND}" |
55 |
+ |
56 |
+PATCHES=( |
57 |
+ "${FILESDIR}/${PN}-2.3.1_p20191013-paths.patch" |
58 |
+) |
59 |
|
60 |
-DEPEND=">=dev-util/cmake-3.10.3" |
61 |
-RDEPEND="" |
62 |
+src_unpack() { |
63 |
+ git-r3_src_unpack |
64 |
+ if use test; then |
65 |
+ mkdir -p "${S}/.ExternalData/MD5" || die "Could not create test data directory." |
66 |
+ tar xvf "${DISTDIR}/ants_testdata-2.3.1_p20191013.tar.xz" -C "${S}/.ExternalData/MD5/" > /dev/null || die "Could not unpack test data." |
67 |
+ fi |
68 |
+} |
69 |
+ |
70 |
+src_configure() { |
71 |
+ local mycmakeargs=( |
72 |
+ -DUSE_SYSTEM_ITK=ON |
73 |
+ -DITK_DIR="/usr/include/ITK-5.0/" |
74 |
+ -DBUILD_TESTING="$(usex test ON OFF)" |
75 |
+ -DUSE_VTK=$(usex vtk ON OFF) |
76 |
+ -DUSE_SYSTEM_VTK=$(usex vtk ON OFF) |
77 |
+ ) |
78 |
+ use vtk && mycmakeargs+=( |
79 |
+ -DVTK_DIR="/usr/include/vtk-8.1/" |
80 |
+ ) |
81 |
+ use test && mycmakeargs+=( |
82 |
+ -DExternalData_OBJECT_STORES="${S}/.ExternalData/MD5" |
83 |
+ ) |
84 |
+ cmake-utils_src_configure |
85 |
+} |
86 |
|
87 |
src_install() { |
88 |
- cd "${WORKDIR}/${P}_build/ANTS-build" || die "build dir not found" |
89 |
- default |
90 |
- cd "${WORKDIR}/ANTs-${PV}/Scripts" || die "scripts dir not found" |
91 |
+ BUILD_DIR="${WORKDIR}/${P}_build/ANTS-build" |
92 |
+ cmake-utils_src_install |
93 |
+ cd "${WORKDIR}/${P}/Scripts" || die "scripts dir not found" |
94 |
dobin *.sh |
95 |
dodir /usr/$(get_libdir)/ants |
96 |
- install -t "${D}"usr/$(get_libdir)/ants * |
97 |
+ install -t "${D}"/usr/$(get_libdir)/ants * || die |
98 |
doenvd "${FILESDIR}"/99ants |
99 |
} |