1
0
mirror of synced 2024-12-22 12:50:33 +01:00

Added ants packages

This commit is contained in:
Horea Christian 2019-10-13 23:16:50 +02:00
parent b131d90ce5
commit 633a5877b4
5 changed files with 112 additions and 70 deletions

View File

@ -1 +1 @@
DIST 84cf0e06646142e0aa4c3d3324a62701 46161 SHA256 6c40c155a97d383438bc8a66eeb96df51517502bab0b1e8670711c141e71f689 SHA512 20942c444831f9dd71d41809acf0eac6fb351bda9a6e2d6826a645121b09d781a7feacdcd5edf4b7e9708f9e5de380bdfdfcb9f7c4b25fa1a03d506d817c3e1d WHIRLPOOL 5c772213fe6ad3c7a032a61024188a1eaeed93137967e2996cd3ceaf39538e9a522b5e8cdf8826816ba2727191bed510b7616056ab32e95d13bcdef0ef12ced9
DIST ants_testdata-2.3.1_p20191013.tar.xz 25056144 SHA256 583db72588a110dba2c798325dbdad79165b7973f3974b5f90decdbaddd01ee4 SHA512 5a636f11952355be3c85d4a36faa84409bace15a7fcd675b20bc8eee83f1969773f6fe5cde31cb7c46bd1baeca21dc8324b1007e6126717f1653bdeb906c8e50 WHIRLPOOL 1d8f58f1f3b61f1f7d16716180d8e9d48e51a686c6df3531bc7a1317ce133c895b23c6e3f5f24b53060adea037d86cf869d9236c71d9a23361ea2408724a9298

View File

@ -1,49 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake-utils git-r3 multilib
MY_HASH="84cf0e06646142e0aa4c3d3324a62701"
DESCRIPTION="Advanced Normalitazion Tools for neuroimaging"
HOMEPAGE="http://stnava.github.io/ANTs/"
SRC_URI="http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=${MY_HASH} -> ${MY_HASH}"
EGIT_REPO_URI="https://github.com/stnava/ANTs.git"
EGIT_COMMIT="1d2e5bf497cd71667d6f7d79ff858387c08bb93e"
SLOT="0"
LICENSE="BSD"
KEYWORDS="~amd64 ~x86"
IUSE="test"
DEPEND=">=dev-util/cmake-3.10.3"
RDEPEND="
sci-libs/vtk
>=sci-libs/itk-5.0_rc1
"
#src_prepare() {
#}
src_configure() {
local mycmakeargs=(
-DITK_DIR="/usr/include/ITK-5.0/"
-DUSE_SYSTEM_ITK=ON
-DUSE_SYSTEM_VTK=ON
-DBUILD_TESTING="$(usex test ON OFF)"
)
cmake-utils_src_configure
cp "../../distdir/84cf0e06646142e0aa4c3d3324a62701" "../${P}_build/ANTS-build"
}
src_install() {
cd "${WORKDIR}/${P}_build/ANTS-build" || die "build dir not found"
default
cd "${WORKDIR}/${P}/Scripts" || die "scripts dir not found"
dobin *.sh
dodir /usr/$(get_libdir)/ants
install -t "${D}"usr/$(get_libdir)/ants *
doenvd "${FILESDIR}"/99ants
}

View File

@ -0,0 +1,71 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CMAKE_MAKEFILE_GENERATOR="emake"
inherit cmake-utils git-r3 multilib
DESCRIPTION="Advanced Normalitazion Tools for neuroimaging"
HOMEPAGE="http://stnava.github.io/ANTs/"
SRC_URI="
test? (
http://chymera.eu/distfiles/ants_testdata-${PV}.tar.xz
)
"
EGIT_REPO_URI="https://github.com/stnava/ANTs.git"
EGIT_COMMIT="f78b2d4a382d3090230641b5ade5da28962dad04"
SLOT="0"
LICENSE="BSD"
KEYWORDS="~amd64 ~x86"
IUSE="test vtk"
RDEPEND=""
DEPEND="
>=dev-util/cmake-3.10.3
vtk? (
~sci-libs/itk-5.0.1[vtkglue]
sci-libs/vtk
)
!vtk? ( ~sci-libs/itk-5.0.1 )
"
PATCHES=(
"${FILESDIR}/${P}-logic.patch"
"${FILESDIR}/${P}-paths.patch"
)
src_prepare () {
use test && mkdir -p "${S}/.ExternalData/MD5"
use test && tar xvf "${DISTDIR}/ants_testdata-${PV}.tar.xz" -C "${S}/.ExternalData/MD5/"
cmake-utils_src_prepare
}
src_configure() {
local mycmakeargs=(
-DUSE_SYSTEM_ITK=ON
-DITK_DIR="/usr/include/ITK-5.0/"
-DBUILD_TESTING="$(usex test ON OFF)"
-DUSE_VTK=$(usex vtk ON OFF)
-DUSE_SYSTEM_VTK=$(usex vtk ON OFF)
)
use vtk && mycmakeargs+=(
-DVTK_DIR="/usr/include/vtk-8.1/"
)
use test && mycmakeargs+=(
-DExternalData_OBJECT_STORES="${S}/.ExternalData/MD5"
)
cmake-utils_src_configure
}
src_install() {
BUILD_DIR="${WORKDIR}/${P}_build/ANTS-build"
cmake-utils_src_install
cd "${WORKDIR}/${P}/Scripts" || die "scripts dir not found"
dobin *.sh
dodir /usr/$(get_libdir)/ants
install -t "${D}"/usr/$(get_libdir)/ants * || die
doenvd "${FILESDIR}"/99ants
}

View File

@ -3,51 +3,68 @@
EAPI=7
inherit cmake-utils git-r3 multilib
CMAKE_MAKEFILE_GENERATOR="emake"
MY_HASH="84cf0e06646142e0aa4c3d3324a62701"
inherit cmake-utils git-r3 multilib
DESCRIPTION="Advanced Normalitazion Tools for neuroimaging"
HOMEPAGE="http://stnava.github.io/ANTs/"
SRC_URI="http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=${MY_HASH} -> ${MY_HASH}"
SRC_URI="
test? (
http://chymera.eu/distfiles/ants_testdata-2.3.1_p20191013.tar.xz
)
"
EGIT_REPO_URI="https://github.com/stnava/ANTs.git"
#EGIT_COMMIT="1d2e5bf497cd71667d6f7d79ff858387c08bb93e"
SLOT="0"
LICENSE="BSD"
KEYWORDS=""
IUSE="test"
IUSE="test vtk"
DEPEND=">=dev-util/cmake-3.10.3"
RDEPEND="
sci-libs/vtk
>=sci-libs/itk-5.0_rc1
"
RDEPEND=""
DEPEND="
>=dev-util/cmake-3.10.3
vtk? (
~sci-libs/itk-5.0.1[vtkglue]
sci-libs/vtk
)
!vtk? ( ~sci-libs/itk-5.0.1 )
"
#S="${WORKDIR}/ANTs-${PV}"
PATCHES=(
"${FILESDIR}/${P}-logic.patch"
"${FILESDIR}/${P}-paths.patch"
)
src_prepare() {
pwd
ln -s
die
src_prepare () {
use test && mkdir -p "${S}/.ExternalData/MD5"
use test && tar xvf "${DISTDIR}/ants_testdata-2.3.1_p20191013.tar.xz" -C "${S}/.ExternalData/MD5/"
cmake-utils_src_prepare
}
src_configure() {
local mycmakeargs=(
-DITK_DIR="/usr/include/ITK-5.0/"
-DUSE_SYSTEM_ITK=ON
-DUSE_SYSTEM_VTK=ON
-DITK_DIR="/usr/include/ITK-5.0/"
-DBUILD_TESTING="$(usex test ON OFF)"
-DUSE_VTK=$(usex vtk ON OFF)
-DUSE_SYSTEM_VTK=$(usex vtk ON OFF)
)
use vtk && mycmakeargs+=(
-DVTK_DIR="/usr/include/vtk-8.1/"
)
use test && mycmakeargs+=(
-DExternalData_OBJECT_STORES="${S}/.ExternalData/MD5"
)
cmake-utils_src_configure
}
src_install() {
cd "${WORKDIR}/${P}_build/ANTS-build" || die "build dir not found"
default
BUILD_DIR="${WORKDIR}/${P}_build/ANTS-build"
cmake-utils_src_install
cd "${WORKDIR}/${P}/Scripts" || die "scripts dir not found"
dobin *.sh
dodir /usr/$(get_libdir)/ants
install -t "${D}"usr/$(get_libdir)/ants *
install -t "${D}"/usr/$(get_libdir)/ants * || die
doenvd "${FILESDIR}"/99ants
}

View File

@ -18,4 +18,7 @@
image analysis. ANTs depends on the Insight ToolKit (ITK), a widely used
medical image processing library to which ANTs developers contribute.
</longdescription>
<use>
<flag name="vtk">Optional support for a number of surface enabled tools (via sci-libs/vtk).</flag>
</use>
</pkgmetadata>