2021-01-09 02:08:27 -05:00
|
|
|
# Copyright 1999-2021 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2024-01-11 17:54:25 -05:00
|
|
|
EAPI=8
|
2021-01-09 02:08:27 -05:00
|
|
|
|
|
|
|
#CMAKE_MAKEFILE_GENERATOR="emake"
|
2023-12-12 12:16:43 -05:00
|
|
|
PYTHON_COMPAT=( python3_{10..11} )
|
2021-01-09 02:08:27 -05:00
|
|
|
|
2024-01-10 15:03:40 -05:00
|
|
|
inherit cmake distutils-r1 git-r3 ninja-utils
|
|
|
|
#inherit cmake-multilib distutils-r1 git-r3 ninja-utils
|
2024-01-08 13:02:26 -05:00
|
|
|
#inherit cmake distutils-r1 git-r3 multilib ninja-utils
|
2021-01-09 02:08:27 -05:00
|
|
|
|
|
|
|
GTS_HASH="962155a01f5a1b87bd64e3e3d880b4dbc2347ac7"
|
2024-01-11 16:35:38 -05:00
|
|
|
#NIFTI_HASH="65f801b9c2f1f15f4de4a19d45e6595c25765632"
|
|
|
|
NIFTI_HASH="da476fd27f46098f37f5c9c4c1baee01e559572c"
|
|
|
|
#GIFTI_HASH="5eae81ba1e87ef3553df3b6ba585f12dc81a0030"
|
|
|
|
GIFTI_HASH="d3e873d8539d9b469daf7db04093da1d7e73d4f7"
|
2021-01-09 02:08:27 -05:00
|
|
|
|
|
|
|
DESCRIPTION="Advanced Normalitazion Tools for neuroimaging"
|
|
|
|
HOMEPAGE="http://stnava.github.io/ANTs/"
|
|
|
|
SRC_URI="
|
|
|
|
https://github.com/NIFTI-Imaging/nifti_clib/archive/${NIFTI_HASH}.tar.gz
|
|
|
|
https://github.com/NIFTI-Imaging/gifti_clib/archive/${GIFTI_HASH}.tar.gz
|
|
|
|
"
|
2024-01-11 11:35:28 -05:00
|
|
|
#https://github.com/leej3/gts/archive/${GTS_HASH}.tar.gz
|
|
|
|
EGIT_REPO_URI="https://github.com/TheChymera/afni.git"
|
2024-01-11 12:38:18 -05:00
|
|
|
EGIT_BRANCH="packaging"
|
2021-01-09 02:08:27 -05:00
|
|
|
|
|
|
|
SLOT="0"
|
|
|
|
LICENSE="GPL-3+"
|
2021-01-11 07:03:49 -05:00
|
|
|
KEYWORDS=""
|
2024-01-12 15:37:58 -05:00
|
|
|
IUSE="test whirlgif"
|
2021-01-09 02:08:27 -05:00
|
|
|
RESTRICT="!test? ( test )"
|
|
|
|
|
|
|
|
RDEPEND="
|
|
|
|
dev-libs/glib:2
|
|
|
|
dev-libs/libf2c
|
|
|
|
dev-libs/expat
|
|
|
|
dev-util/ninja
|
|
|
|
media-libs/freeglut
|
|
|
|
media-libs/glu
|
|
|
|
media-libs/netpbm
|
|
|
|
media-libs/qhull
|
|
|
|
media-video/mpeg-tools
|
|
|
|
sci-libs/gsl
|
2024-01-11 11:35:28 -05:00
|
|
|
sci-libs/gts
|
2021-01-09 02:08:27 -05:00
|
|
|
sys-devel/llvm:*
|
|
|
|
sys-libs/libomp
|
|
|
|
dev-libs/libpthread-stubs
|
|
|
|
virtual/jpeg-compat:62
|
|
|
|
x11-libs/libGLw
|
|
|
|
x11-libs/libXft
|
|
|
|
x11-libs/libXi
|
|
|
|
x11-libs/libXmu
|
|
|
|
x11-libs/libXpm
|
|
|
|
x11-libs/libXt
|
|
|
|
x11-libs/motif[-static-libs]
|
|
|
|
"
|
|
|
|
DEPEND="
|
|
|
|
${RDEPEND}
|
|
|
|
app-shells/tcsh
|
|
|
|
"
|
|
|
|
# Prospectively:
|
|
|
|
#Update jpeg-compat to virtual/jpeg:0
|
|
|
|
# look for xmhtlm
|
|
|
|
|
2024-01-11 11:35:28 -05:00
|
|
|
#tar xf "${DISTDIR}/${GTS_HASH}.tar.gz" || die
|
2021-01-09 02:08:27 -05:00
|
|
|
src_prepare() {
|
|
|
|
tar xf "${DISTDIR}/${NIFTI_HASH}.tar.gz" || die
|
|
|
|
tar xf "${DISTDIR}/${GIFTI_HASH}.tar.gz" || die
|
|
|
|
cmake_src_prepare
|
|
|
|
default
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
#LDFLAGS="-L${S}/${LIBDIR} ${LDFLAGS}" econf --enable-progpath="${EPREFIX}/usr/bin"
|
2024-01-12 15:37:58 -05:00
|
|
|
if use !whirlgif; then
|
|
|
|
eapply "${FILESDIR}/${PN}-whirlgif.patch"
|
|
|
|
fi
|
2021-01-09 02:08:27 -05:00
|
|
|
export CFLAGS="-pthread ${CFLAGS}"
|
2021-09-30 05:54:18 -04:00
|
|
|
export GIT_REPO_VERSION=3.0.1.1
|
2024-01-18 02:15:03 -05:00
|
|
|
#export DO_NOT_USE_PIP=true
|
|
|
|
#export EXPLICIT_AFNIPY_INSTALL=false
|
2021-01-09 02:08:27 -05:00
|
|
|
#export LDFLAGS="-lpthread ${LDFLAGS}"
|
|
|
|
#-CC="$(tc-getCC)"
|
2024-01-11 11:35:28 -05:00
|
|
|
#-DFETCHCONTENT_SOURCE_DIR_GTS="${WORKDIR}/${P}/gts-${GTS_HASH}"
|
|
|
|
#-DUSE_SYSTEM_GTS=OFF
|
2021-01-09 02:08:27 -05:00
|
|
|
local mycmakeargs=(
|
2021-09-30 05:54:18 -04:00
|
|
|
-DLIBDIR=/usr/$(get_libdir)
|
|
|
|
-DNIFTI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
|
|
|
|
-DGIFTI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
|
2024-01-11 11:35:28 -05:00
|
|
|
-DGIFTI_INSTALL_LIB_DIR=/usr/$(get_libdir)
|
2021-09-30 05:54:18 -04:00
|
|
|
-DAFNI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=/usr/$(get_libdir)
|
|
|
|
-DCOMP_COREBINARIES=ON
|
2021-01-09 02:08:27 -05:00
|
|
|
-DUSE_SYSTEM_NIFTI=OFF
|
|
|
|
-DUSE_SYSTEM_GIFTI=OFF
|
|
|
|
-DUSE_SYSTEM_XMHTML=OFF
|
2024-01-11 11:35:28 -05:00
|
|
|
-DUSE_SYSTEM_GTS=ON
|
2021-01-09 02:08:27 -05:00
|
|
|
-DFETCHCONTENT_SOURCE_DIR_NIFTI_CLIB="${WORKDIR}/${P}/nifti_clib-${NIFTI_HASH}"
|
|
|
|
-DFETCHCONTENT_SOURCE_DIR_GIFTI_CLIB="${WORKDIR}/${P}/gifti_clib-${GIFTI_HASH}"
|
|
|
|
-DCOMP_GUI=ON
|
|
|
|
-DCOMP_PLUGINS=ON
|
|
|
|
-DUSE_OMP=ON
|
2024-01-18 02:15:03 -05:00
|
|
|
-DCOMP_PYTHON=OFF
|
|
|
|
#-DCOMP_PYTHON=ON
|
2024-01-16 13:05:23 -05:00
|
|
|
#-DSTANDARD_PYTHON_INSTALL=OFF
|
|
|
|
#-DPython_FIND_VIRTUALENV=STANDARD
|
|
|
|
#-DPython_FIND_STRATEGY=LOCATION
|
2024-01-16 09:47:56 -05:00
|
|
|
-DUSE_SYSTEM_F2C=ON
|
2021-01-09 02:08:27 -05:00
|
|
|
)
|
2024-01-11 17:54:25 -05:00
|
|
|
#-DBUILD_SHARED_LIBS=OFF
|
2021-01-09 02:08:27 -05:00
|
|
|
tc-export CC
|
2024-01-18 02:15:03 -05:00
|
|
|
cmake_src_configure
|
|
|
|
#python_foreach_impl cmake_src_configure
|
|
|
|
#python_foreach_impl python_optimize
|
2021-01-09 02:08:27 -05:00
|
|
|
}
|
2021-09-30 05:54:18 -04:00
|
|
|
|
|
|
|
src_compile() {
|
2024-01-18 02:15:03 -05:00
|
|
|
#python_foreach_impl cmake_src_compile
|
|
|
|
cmake_src_compile
|
|
|
|
pushd src/python_scripts
|
|
|
|
distutils-r1_src_compile
|
|
|
|
popd
|
2024-01-16 13:05:23 -05:00
|
|
|
#cmake_src_compile
|
|
|
|
#cd ../afni-9999_build
|
|
|
|
#default
|
|
|
|
#eninja || die
|
2021-09-30 05:54:18 -04:00
|
|
|
}
|
|
|
|
|
2021-01-09 02:08:27 -05:00
|
|
|
#/work/afni-9999/nifti_clib-65f801b9c2f1f15f4de4a19d45e6595c25765632
|
|
|
|
|
2021-09-30 05:54:18 -04:00
|
|
|
src_install() {
|
2024-01-18 02:15:03 -05:00
|
|
|
#python_foreach_impl cmake_src_install
|
|
|
|
#python_foreach_impl python_optimize
|
|
|
|
cmake_src_install
|
|
|
|
pushd src/python_scripts
|
|
|
|
distutils-r1_src_install
|
|
|
|
popd
|
2024-01-18 00:55:21 -05:00
|
|
|
#cd ../afni-9999_build
|
|
|
|
#DESTDIR=${D} eninja install
|
2024-01-11 16:35:38 -05:00
|
|
|
# File collision, upstream confirmation here:
|
|
|
|
# https://github.com/afni/afni/issues/558#issuecomment-1887693900
|
2024-01-12 15:37:58 -05:00
|
|
|
cd ${D}
|
2024-01-18 00:55:21 -05:00
|
|
|
#pwd
|
|
|
|
#ls -lah
|
2024-01-16 13:05:23 -05:00
|
|
|
#exit
|
2024-01-12 15:37:58 -05:00
|
|
|
rm usr/bin/mpeg_encode
|
2021-09-30 05:54:18 -04:00
|
|
|
}
|