aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-biology/afni')
-rw-r--r--sci-biology/afni/Manifest9
-rw-r--r--sci-biology/afni/afni-20.1.16.ebuild73
-rw-r--r--sci-biology/afni/afni-20.3.03.ebuild73
-rw-r--r--sci-biology/afni/afni-22.0.21.ebuild75
-rw-r--r--sci-biology/afni/afni-24.0.08-r3.ebuild125
-rw-r--r--sci-biology/afni/afni-24.1.15.ebuild125
-rw-r--r--sci-biology/afni/afni-24.1.16.ebuild127
-rw-r--r--sci-biology/afni/files/97afni1
-rw-r--r--sci-biology/afni/files/afni-20.1.16-python.patch11
-rw-r--r--sci-biology/afni/files/afni-24.0.04-whirlgif.patch39
-rw-r--r--sci-biology/afni/files/afni-24.1.16-niftiio.patch27
-rw-r--r--sci-biology/afni/metadata.xml3
12 files changed, 453 insertions, 235 deletions
diff --git a/sci-biology/afni/Manifest b/sci-biology/afni/Manifest
index e8caa43d1..cc0d96468 100644
--- a/sci-biology/afni/Manifest
+++ b/sci-biology/afni/Manifest
@@ -1,3 +1,6 @@
-DIST afni-20.1.16.tar.gz 43355499 BLAKE2B ad7750e64dd9f4c2ca7e5c67bd99faeb8595a41d8a16192e77202f3d307e912083affc11dcbb5da3530079b9e3cf3c2b6b470050f57d5d7af2bb35cc2322772f SHA512 e6fdb8baea6165865bae5bb186375bd65e862564c48470523a8fe026a12f00715fd21bd852bd77c4077ea444a97642c4c3d2ca8060640ba5ddd57bd7883901a6
-DIST afni-20.3.03.tar.gz 43263734 BLAKE2B 7fdaf3de874edff9b32950a2724ba8b4cbcdda538b09effb12658a042326d5c8badf48f1a4dfb4555eb069347099cf3cdb08c4fe1a12999e6eca3ca6f8dca639 SHA512 3c5007f59d6c46093d38f9419c72aa36fb5701314690811f757d9568561b386cf3cd602ddf910ae08fd071ea7ae1e51f5762081217f7a29b23e32f1490f5db65
-DIST afni-22.0.21.tar.gz 43934548 BLAKE2B 3efd5b7fcbbb7b98000e8de51c363ec936a691fcbd505871ff406824ba6ecd5fef358102f6dd2e4d0991b0a40589db6416c1ef14966138c5c36499d7efa3b089 SHA512 1c741e36227075bd8b4f9983510eef95528084cbc4971f9d6d028726ffc2bb211da7a74df98991538d8f6caed041633fdceb0c4366e04d6594faa0160a0e6d2b
+DIST afni-24.0.08.gh.tar.gz 52917832 BLAKE2B 4cf61f3474c2c69d8373fbf9413c2236fbda77408535b142e6860effbf49ebcc6007ef9fb18943c07299b4815be6692477cc79423d7ac5a09bfe3d125565058c SHA512 90a9c8a48e1084dcc19d90e62b313057f0e71e87740f6ac63a305d19a4ded8ee01722b55546d2aaa2d4dfbfd0a206d4a9d25969592646c101cabe4743b8962c6
+DIST afni-24.1.15.gh.tar.gz 53136605 BLAKE2B aab19b572b3d3f32e4d91414c127a8ef5cfd5cef04cb55836060298340c3d0e6cf0ec2f5f324590ce432e920842358007858a278198b37b47e6eeb8f318855b3 SHA512 ca8e3d26a32feea0118e4219c5915f8541bf5194f0db8e4b51637fb79a08c15d1772bc75499b71a47af5cac831bbd484efb3fce848d499f51ef002f9f52a6e10
+DIST afni-24.1.16.gh.tar.gz 53139168 BLAKE2B dff31b9b6e89cd2c62e2ab8cb1b7d1ed28e7bc3bbeb586ae7218ccc276237b0632d06c65928469560684871b8fd25dc382e5bdffcc4c5181c5b9855565398df8 SHA512 c507bc8d3bbad8b61daef3321e48bd88c2f020c940c61a7c3ff4dafe1d2823dad5c87b96080716ab6c59d5312b7fa33c8289426f3fcc4938d3ef049df54134b3
+DIST gifti-d3e873d8539d9b469daf7db04093da1d7e73d4f7.tar.gz 107745 BLAKE2B b8162fe08446d5c934762e8dce051e93c8c90fd574dca55757988ccc45be20bfdd07b7a401ef6c536afbe097e6bc05fd3b7f09c4404af4fad4e21fbada7109de SHA512 c458074c6976245cffc48c1e1e57811ec3c0cc5959345bdbc8d674eed6c8a8f93e9f9762bf3acce7142e004dc37930d14bed8cfb97c5b7e92b3f39598da924e2
+DIST nifti-da476fd27f46098f37f5c9c4c1baee01e559572c.tar.gz 451578 BLAKE2B 6bb92ae3ab48dba435b067f7ec0b6d417658ee1a46efe05070bf18fd6d46b8339eaffd09c2fea4971d2685f211496a700b36c255ffb164994636e535b64fe4f5 SHA512 df92345ed580e8bf0579f2ea3ed55a4c4c678a0fe3bfad1e62379e5bf16961272bb2d3e7fda89b96b503cda51c1bf2fb8eb74adba6aad9c73b6830d7d884d1f5
+DIST nifti-f24bec503f1a5d501c0413c1bb8aa3d6e04aebda.tar.gz 451555 BLAKE2B d83e8e265d996bb041fa7c712e4f67f6ab3c4e7e7b9713f5d5a0e045b11c2c5c34a193a0d6f69594d37ff1ac09bb295f9be6b04a7a29711cfad8d27167c15058 SHA512 8a4707edfd11112bdb0c359223bb39c6e1d9281234759ebf65bffe34b52a0530053b2e9368c36a77b788194113db5ac66ddf44204036983fffda3d81699e1d5b
diff --git a/sci-biology/afni/afni-20.1.16.ebuild b/sci-biology/afni/afni-20.1.16.ebuild
deleted file mode 100644
index e3e16f834..000000000
--- a/sci-biology/afni/afni-20.1.16.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="An open-source environment for processing and displaying functional MRI data"
-HOMEPAGE="http://afni.nimh.nih.gov/"
-SRC_URI="https://github.com/afni/afni/archive/AFNI_${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3+"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-RDEPEND="dev-libs/expat
- media-libs/glu
- media-libs/netpbm
- media-libs/qhull
- media-video/mpeg-tools
- sci-libs/gsl
- sys-devel/llvm:*
- media-libs/libjpeg-turbo:0
- x11-libs/libGLw
- x11-libs/libXft
- x11-libs/libXi
- x11-libs/libXpm
- x11-libs/motif[-static-libs]"
-
-# x11-libs/motif[static-libs] breaks the build.
-# See upstream discussion
-# http://afni.nimh.nih.gov/afni/community/board/read.php?1,85348,85348#msg-85348
-
-DEPEND="${RDEPEND}
- app-shells/tcsh"
-
-S="${WORKDIR}/${PN}-AFNI_${PV}/src"
-BUILD="linux_fedora_19_64"
-BIN_CONFLICTS=(qdelaunay whirlgif djpeg cjpeg qhull rbox count mpeg_encode)
-
-src_prepare() {
- eapply "${FILESDIR}/${P}-python.patch" || die
- find -type f -exec sed -i -e "s/-lXp //g" {} +
- cp other_builds/Makefile.${BUILD} Makefile || die "Could not copy Makefile"
- # Unbundle imcat
- sed -e "s/ imcat / /g" \
- -i Makefile.INCLUDE || die "Could not edit includes files."
- sed -e "s~CC = /usr/bin/gcc -O2 -m64~CC = $(tc-getCC) \$(CFLAGS)~" \
- -e "s~CCMIN = /usr/bin/gcc -m64~CCMIN = $(tc-getCC) \$(CFLAGS)~" \
- -e "s~LD = /usr/bin/gcc~LD = $(tc-getCC)~" \
- -e "s~AR = /usr/bin/ar~AR = $(tc-getAR)~" \
- -e "s~RANLIB = /usr/bin/ranlib~RANLIB = $(tc-getRANLIB)~" \
- -i Makefile || die "Could not edit Makefile"
- # they provide somewhat problematic makefiles :(
- sed -e "s~ifeq ($(CC),gcc)~ifeq (1,1)~"\
- -i SUMA/SUMA_Makefile || die "Could not edit SUMA/SUMA_Makefile"
- # upstream checks if $CC is EXACTLY gcc, else sets variables for Mac
- find "${S}" -iname "*Makefile*" | xargs sed -e "s~/usr/~${EPREFIX}/usr/~g;" -i
- default
-}
-
-src_compile() {
- emake -j1 all plugins suma_exec
-}
-
-src_install() {
- emake INSTALLDIR="${ED}/usr/bin" -j1 install install_plugins
- emake INSTALLDIR="${ED}/usr/$(get_libdir)" install_lib
- for CONFLICT in ${BIN_CONFLICTS[@]}; do
- rm "${ED}/usr/bin/${CONFLICT}"
- done
-}
diff --git a/sci-biology/afni/afni-20.3.03.ebuild b/sci-biology/afni/afni-20.3.03.ebuild
deleted file mode 100644
index 1d9043ebb..000000000
--- a/sci-biology/afni/afni-20.3.03.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="An open-source environment for processing and displaying functional MRI data"
-HOMEPAGE="http://afni.nimh.nih.gov/"
-SRC_URI="https://github.com/afni/afni/archive/AFNI_${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-3+"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-RDEPEND="dev-libs/expat
- media-libs/glu
- media-libs/netpbm
- media-libs/qhull
- media-video/mpeg-tools
- sci-libs/gsl
- sys-devel/llvm:*
- media-libs/libjpeg-turbo:0
- x11-libs/libGLw
- x11-libs/libXft
- x11-libs/libXi
- x11-libs/libXpm
- x11-libs/motif[-static-libs]"
-
-# x11-libs/motif[static-libs] breaks the build.
-# See upstream discussion
-# http://afni.nimh.nih.gov/afni/community/board/read.php?1,85348,85348#msg-85348
-
-DEPEND="${RDEPEND}
- app-shells/tcsh"
-
-S="${WORKDIR}/${PN}-AFNI_${PV}/src"
-BUILD="linux_fedora_19_64"
-BIN_CONFLICTS=(qdelaunay whirlgif djpeg cjpeg qhull rbox count mpeg_encode)
-
-src_prepare() {
- eapply "${FILESDIR}/${PN}-20.1.16-python.patch" || die
- find -type f -exec sed -i -e "s/-lXp //g" {} +
- cp other_builds/Makefile.${BUILD} Makefile || die "Could not copy Makefile"
- # Unbundle imcat
- sed -e "s/ imcat / /g" \
- -i Makefile.INCLUDE || die "Could not edit includes files."
- sed -e "s~CC = /usr/bin/gcc -O2 -m64~CC = $(tc-getCC) \$(CFLAGS)~" \
- -e "s~CCMIN = /usr/bin/gcc -m64~CCMIN = $(tc-getCC) \$(CFLAGS)~" \
- -e "s~LD = /usr/bin/gcc~LD = $(tc-getCC)~" \
- -e "s~AR = /usr/bin/ar~AR = $(tc-getAR)~" \
- -e "s~RANLIB = /usr/bin/ranlib~RANLIB = $(tc-getRANLIB)~" \
- -i Makefile || die "Could not edit Makefile"
- # they provide somewhat problematic makefiles :(
- sed -e "s~ifeq ($(CC),gcc)~ifeq (1,1)~"\
- -i SUMA/SUMA_Makefile || die "Could not edit SUMA/SUMA_Makefile"
- # upstream checks if $CC is EXACTLY gcc, else sets variables for Mac
- find "${S}" -iname "*Makefile*" | xargs sed -e "s~/usr/~${EPREFIX}/usr/~g;" -i
- default
-}
-
-src_compile() {
- emake -j1 all plugins suma_exec
-}
-
-src_install() {
- emake INSTALLDIR="${ED}/usr/bin" -j1 install install_plugins
- emake INSTALLDIR="${ED}/usr/$(get_libdir)" install_lib
- for CONFLICT in ${BIN_CONFLICTS[@]}; do
- rm "${ED}/usr/bin/${CONFLICT}"
- done
-}
diff --git a/sci-biology/afni/afni-22.0.21.ebuild b/sci-biology/afni/afni-22.0.21.ebuild
deleted file mode 100644
index 149deede8..000000000
--- a/sci-biology/afni/afni-22.0.21.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs
-
-DESCRIPTION="An open-source environment for processing and displaying functional MRI data"
-HOMEPAGE="http://afni.nimh.nih.gov/"
-SRC_URI="https://github.com/afni/afni/archive/AFNI_${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/${PN}-AFNI_${PV}/src"
-
-LICENSE="GPL-3+"
-SLOT="0"
-# SUMA error: https://ppb.chymera.eu/4223de.log
-KEYWORDS=""
-
-RDEPEND="
- dev-libs/libf2c
- dev-libs/expat
- media-libs/freeglut
- media-libs/glu
- media-libs/netpbm
- media-libs/qhull
- media-video/mpeg-tools
- sci-libs/gsl
- sys-devel/llvm:*
- media-libs/libjpeg-turbo:0
- x11-libs/libGLw
- x11-libs/libXft
- x11-libs/libXi
- x11-libs/libXpm
- x11-libs/motif
-"
-
-DEPEND="${RDEPEND}
- app-shells/tcsh
-"
-
-BUILD="linux_fedora_19_64"
-BIN_CONFLICTS=(qdelaunay whirlgif djpeg cjpeg qhull rbox count)
-
-src_prepare() {
- # more easily applied here than via PATCHES at phase end.
- eapply "${FILESDIR}/${PN}-20.1.16-python.patch" || die
- find -type f -exec sed -i -e "s/-lXp //g" {} + || die
- cp other_builds/Makefile.${BUILD} Makefile || die "Could not copy Makefile"
- # Unbundle imcat
- sed -e "s/ imcat / /g" \
- -i Makefile.INCLUDE || die "Could not edit includes files."
- sed -e "s~CC = /usr/bin/gcc -O2 -m64~CC = $(tc-getCC) \$(CFLAGS)~" \
- -e "s~CCMIN = /usr/bin/gcc -m64~CCMIN = $(tc-getCC) \$(CFLAGS)~" \
- -e "s~LD = /usr/bin/gcc~LD = $(tc-getCC)~" \
- -e "s~AR = /usr/bin/ar~AR = $(tc-getAR)~" \
- -e "s~RANLIB = /usr/bin/ranlib~RANLIB = $(tc-getRANLIB)~" \
- -i Makefile || die "Could not edit Makefile"
- # they provide somewhat problematic makefiles :(
- sed -e "s~ifeq (\$(CC),gcc)~ifeq (1,1)~"\
- -i SUMA/SUMA_Makefile || die "Could not edit SUMA/SUMA_Makefile"
- # upstream checks if $CC is EXACTLY gcc, else sets variables for Mac
- find "${S}" -iname "*Makefile*" | xargs sed -e "s~/usr/~${EPREFIX}/usr/~g;" -i || die
- default
-}
-
-src_compile() {
- emake -j1 all plugins suma_exec
-}
-
-src_install() {
- emake INSTALLDIR="${ED}/usr/bin" install install_plugins
- emake INSTALLDIR="${ED}/usr/$(get_libdir)" install_lib
- for CONFLICT in ${BIN_CONFLICTS[@]}; do
- rm "${ED}/usr/bin/${CONFLICT}" || die
- done
-}
diff --git a/sci-biology/afni/afni-24.0.08-r3.ebuild b/sci-biology/afni/afni-24.0.08-r3.ebuild
new file mode 100644
index 000000000..12d6c8f87
--- /dev/null
+++ b/sci-biology/afni/afni-24.0.08-r3.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+DISTUTILS_USE_PEP517=setuptools
+inherit cmake distutils-r1 toolchain-funcs
+
+GTS_HASH="962155a01f5a1b87bd64e3e3d880b4dbc2347ac7"
+NIFTI_HASH="da476fd27f46098f37f5c9c4c1baee01e559572c"
+GIFTI_HASH="d3e873d8539d9b469daf7db04093da1d7e73d4f7"
+
+DESCRIPTION="Analysis of Functional Neuroimages by NIMH"
+HOMEPAGE="https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/"
+SRC_URI="
+ https://github.com/afni/afni/archive/refs/tags/AFNI_${PV}.tar.gz -> ${P}.gh.tar.gz
+ https://github.com/NIFTI-Imaging/nifti_clib/archive/${NIFTI_HASH}.tar.gz -> nifti-${NIFTI_HASH}.tar.gz
+ https://github.com/NIFTI-Imaging/gifti_clib/archive/${GIFTI_HASH}.tar.gz -> gifti-${GIFTI_HASH}.tar.gz
+ "
+
+S="${WORKDIR}/afni-AFNI_${PV}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test whirlgif"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-build/ninja
+ dev-libs/expat
+ dev-libs/glib:2
+ dev-libs/libf2c
+ media-libs/freeglut
+ media-libs/glu
+ media-libs/netpbm
+ media-libs/qhull
+ media-video/mpeg-tools
+ sci-biology/afni-datasets
+ sci-libs/gsl
+ sci-libs/gts
+ sys-devel/llvm:*
+ sys-libs/libomp
+ 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
+
+ #tar xf "${DISTDIR}/${GTS_HASH}.tar.gz" || die
+src_prepare() {
+ tar xf "${DISTDIR}/nifti-${NIFTI_HASH}.tar.gz" || die
+ tar xf "${DISTDIR}/gifti-${GIFTI_HASH}.tar.gz" || die
+ cmake_src_prepare
+ default
+ }
+
+src_configure() {
+ if use !whirlgif; then
+ eapply "${FILESDIR}/${PN}-24.0.04-whirlgif.patch"
+ fi
+ # Fix AFNI version, no better way seemed to work
+ sed -i -e "s/GIT_REPO_VERSION \"99\.99\.99\"/GIT_REPO_VERSION ${PV}/g" cmake/get_git_repo_version.cmake
+ export CFLAGS="-pthread ${CFLAGS}"
+ local mycmakeargs=(
+ -DLIBDIR=/usr/$(get_libdir)
+ -DNIFTI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
+ -DGIFTI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
+ -DGIFTI_INSTALL_LIB_DIR=/usr/$(get_libdir)
+ -DAFNI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
+ -DCMAKE_INSTALL_LIBDIR=/usr/$(get_libdir)
+ -DCOMP_COREBINARIES=ON
+ -DUSE_SYSTEM_NIFTI=OFF
+ -DUSE_SYSTEM_GIFTI=OFF
+ -DUSE_SYSTEM_XMHTML=OFF
+ -DUSE_SYSTEM_GTS=ON
+ -DFETCHCONTENT_SOURCE_DIR_NIFTI_CLIB="${WORKDIR}/nifti_clib-${NIFTI_HASH}"
+ -DFETCHCONTENT_SOURCE_DIR_GIFTI_CLIB="${WORKDIR}/gifti_clib-${GIFTI_HASH}"
+ -DCOMP_GUI=ON
+ -DCOMP_PLUGINS=ON
+ -DUSE_OMP=ON
+ -DCOMP_PYTHON=OFF
+ -DUSE_SYSTEM_F2C=ON
+ )
+ tc-export CC
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ pushd src/python_scripts
+ distutils-r1_src_compile
+ popd
+}
+
+src_install() {
+ cmake_src_install
+ pushd src/python_scripts
+ distutils-r1_src_install
+ popd
+ cd "${D}"
+ rm usr/bin/mpeg_encode
+ doenvd "${FILESDIR}/97afni"
+}
+
+pkg_postinst() {
+ echo
+ einfo "Please run the following commands if you"
+ einfo "intend to use afni binaries from an existing shell:"
+ einfo "source /etc/profile"
+ echo
+}
diff --git a/sci-biology/afni/afni-24.1.15.ebuild b/sci-biology/afni/afni-24.1.15.ebuild
new file mode 100644
index 000000000..12d6c8f87
--- /dev/null
+++ b/sci-biology/afni/afni-24.1.15.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+DISTUTILS_USE_PEP517=setuptools
+inherit cmake distutils-r1 toolchain-funcs
+
+GTS_HASH="962155a01f5a1b87bd64e3e3d880b4dbc2347ac7"
+NIFTI_HASH="da476fd27f46098f37f5c9c4c1baee01e559572c"
+GIFTI_HASH="d3e873d8539d9b469daf7db04093da1d7e73d4f7"
+
+DESCRIPTION="Analysis of Functional Neuroimages by NIMH"
+HOMEPAGE="https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/"
+SRC_URI="
+ https://github.com/afni/afni/archive/refs/tags/AFNI_${PV}.tar.gz -> ${P}.gh.tar.gz
+ https://github.com/NIFTI-Imaging/nifti_clib/archive/${NIFTI_HASH}.tar.gz -> nifti-${NIFTI_HASH}.tar.gz
+ https://github.com/NIFTI-Imaging/gifti_clib/archive/${GIFTI_HASH}.tar.gz -> gifti-${GIFTI_HASH}.tar.gz
+ "
+
+S="${WORKDIR}/afni-AFNI_${PV}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test whirlgif"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-build/ninja
+ dev-libs/expat
+ dev-libs/glib:2
+ dev-libs/libf2c
+ media-libs/freeglut
+ media-libs/glu
+ media-libs/netpbm
+ media-libs/qhull
+ media-video/mpeg-tools
+ sci-biology/afni-datasets
+ sci-libs/gsl
+ sci-libs/gts
+ sys-devel/llvm:*
+ sys-libs/libomp
+ 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
+
+ #tar xf "${DISTDIR}/${GTS_HASH}.tar.gz" || die
+src_prepare() {
+ tar xf "${DISTDIR}/nifti-${NIFTI_HASH}.tar.gz" || die
+ tar xf "${DISTDIR}/gifti-${GIFTI_HASH}.tar.gz" || die
+ cmake_src_prepare
+ default
+ }
+
+src_configure() {
+ if use !whirlgif; then
+ eapply "${FILESDIR}/${PN}-24.0.04-whirlgif.patch"
+ fi
+ # Fix AFNI version, no better way seemed to work
+ sed -i -e "s/GIT_REPO_VERSION \"99\.99\.99\"/GIT_REPO_VERSION ${PV}/g" cmake/get_git_repo_version.cmake
+ export CFLAGS="-pthread ${CFLAGS}"
+ local mycmakeargs=(
+ -DLIBDIR=/usr/$(get_libdir)
+ -DNIFTI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
+ -DGIFTI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
+ -DGIFTI_INSTALL_LIB_DIR=/usr/$(get_libdir)
+ -DAFNI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
+ -DCMAKE_INSTALL_LIBDIR=/usr/$(get_libdir)
+ -DCOMP_COREBINARIES=ON
+ -DUSE_SYSTEM_NIFTI=OFF
+ -DUSE_SYSTEM_GIFTI=OFF
+ -DUSE_SYSTEM_XMHTML=OFF
+ -DUSE_SYSTEM_GTS=ON
+ -DFETCHCONTENT_SOURCE_DIR_NIFTI_CLIB="${WORKDIR}/nifti_clib-${NIFTI_HASH}"
+ -DFETCHCONTENT_SOURCE_DIR_GIFTI_CLIB="${WORKDIR}/gifti_clib-${GIFTI_HASH}"
+ -DCOMP_GUI=ON
+ -DCOMP_PLUGINS=ON
+ -DUSE_OMP=ON
+ -DCOMP_PYTHON=OFF
+ -DUSE_SYSTEM_F2C=ON
+ )
+ tc-export CC
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ pushd src/python_scripts
+ distutils-r1_src_compile
+ popd
+}
+
+src_install() {
+ cmake_src_install
+ pushd src/python_scripts
+ distutils-r1_src_install
+ popd
+ cd "${D}"
+ rm usr/bin/mpeg_encode
+ doenvd "${FILESDIR}/97afni"
+}
+
+pkg_postinst() {
+ echo
+ einfo "Please run the following commands if you"
+ einfo "intend to use afni binaries from an existing shell:"
+ einfo "source /etc/profile"
+ echo
+}
diff --git a/sci-biology/afni/afni-24.1.16.ebuild b/sci-biology/afni/afni-24.1.16.ebuild
new file mode 100644
index 000000000..0759d30a0
--- /dev/null
+++ b/sci-biology/afni/afni-24.1.16.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+DISTUTILS_USE_PEP517=setuptools
+inherit cmake distutils-r1 toolchain-funcs
+
+GTS_HASH="962155a01f5a1b87bd64e3e3d880b4dbc2347ac7"
+NIFTI_HASH="f24bec503f1a5d501c0413c1bb8aa3d6e04aebda"
+GIFTI_HASH="d3e873d8539d9b469daf7db04093da1d7e73d4f7"
+
+DESCRIPTION="Analysis of Functional Neuroimages by NIMH"
+HOMEPAGE="https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/"
+SRC_URI="
+ https://github.com/afni/afni/archive/refs/tags/AFNI_${PV}.tar.gz -> ${P}.gh.tar.gz
+ https://github.com/NIFTI-Imaging/nifti_clib/archive/${NIFTI_HASH}.tar.gz -> nifti-${NIFTI_HASH}.tar.gz
+ https://github.com/NIFTI-Imaging/gifti_clib/archive/${GIFTI_HASH}.tar.gz -> gifti-${GIFTI_HASH}.tar.gz
+ "
+
+S="${WORKDIR}/afni-AFNI_${PV}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test whirlgif"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-build/ninja
+ dev-libs/expat
+ dev-libs/glib:2
+ dev-libs/libf2c
+ media-libs/freeglut
+ media-libs/glu
+ media-libs/netpbm
+ media-libs/qhull
+ media-video/mpeg-tools
+ sci-biology/afni-datasets
+ sci-libs/gsl
+ sci-libs/gts
+ sys-devel/llvm:*
+ sys-libs/libomp
+ 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
+
+PATCHES=("${FILESDIR}/afni-24.1.16-niftiio.patch")
+
+ #tar xf "${DISTDIR}/${GTS_HASH}.tar.gz" || die
+src_prepare() {
+ # We need a name without the hash to reference in patches
+ mv "${WORKDIR}/nifti_clib-${NIFTI_HASH}" "${WORKDIR}/afni-AFNI_24.1.16/nifti_clib_from_github"
+ mv "${WORKDIR}/gifti_clib-${GIFTI_HASH}" "${WORKDIR}/afni-AFNI_24.1.16/gifti_clib_from_github"
+ cmake_src_prepare
+}
+
+src_configure() {
+ if use !whirlgif; then
+ eapply "${FILESDIR}/${PN}-24.0.04-whirlgif.patch"
+ fi
+ # Fix AFNI version, no better way seemed to work
+ sed -i -e "s/GIT_REPO_VERSION \"99\.99\.99\"/GIT_REPO_VERSION ${PV}/g" cmake/get_git_repo_version.cmake
+ export CFLAGS="-pthread ${CFLAGS}"
+ local mycmakeargs=(
+ -DLIBDIR=/usr/$(get_libdir)
+ -DNIFTI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
+ -DGIFTI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
+ -DGIFTI_INSTALL_LIB_DIR=/usr/$(get_libdir)
+ -DAFNI_INSTALL_LIBRARY_DIR=/usr/$(get_libdir)
+ -DCMAKE_INSTALL_LIBDIR=/usr/$(get_libdir)
+ -DCOMP_COREBINARIES=ON
+ -DUSE_SYSTEM_NIFTI=OFF
+ -DUSE_SYSTEM_GIFTI=OFF
+ -DUSE_SYSTEM_XMHTML=OFF
+ -DUSE_SYSTEM_GTS=ON
+ -DFETCHCONTENT_SOURCE_DIR_NIFTI_CLIB="${WORKDIR}/afni-AFNI_24.1.16/nifti_clib_from_github"
+ -DFETCHCONTENT_SOURCE_DIR_GIFTI_CLIB="${WORKDIR}/afni-AFNI_24.1.16/gifti_clib_from_github"
+ -DCOMP_GUI=ON
+ -DCOMP_PLUGINS=ON
+ -DUSE_OMP=ON
+ -DCOMP_PYTHON=OFF
+ -DUSE_SYSTEM_F2C=ON
+ )
+ tc-export CC
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ pushd src/python_scripts
+ distutils-r1_src_compile
+ popd
+}
+
+src_install() {
+ cmake_src_install
+ pushd src/python_scripts
+ distutils-r1_src_install
+ popd
+ cd "${D}"
+ rm usr/bin/mpeg_encode
+ doenvd "${FILESDIR}/97afni"
+}
+
+pkg_postinst() {
+ echo
+ einfo "Please run the following commands if you"
+ einfo "intend to use afni binaries from an existing shell:"
+ einfo "source /etc/profile"
+ echo
+}
diff --git a/sci-biology/afni/files/97afni b/sci-biology/afni/files/97afni
new file mode 100644
index 000000000..dbf463f47
--- /dev/null
+++ b/sci-biology/afni/files/97afni
@@ -0,0 +1 @@
+export AFNI_ATLAS_PATH=/usr/share/afni-datasets
diff --git a/sci-biology/afni/files/afni-20.1.16-python.patch b/sci-biology/afni/files/afni-20.1.16-python.patch
deleted file mode 100644
index 8c3e859f5..000000000
--- a/sci-biology/afni/files/afni-20.1.16-python.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/other_builds/Makefile.linux_fedora_19_64 2020-10-09 07:07:58.348874414 -0400
-+++ b/other_builds/Makefile.linux_fedora_19_64 2020-10-10 01:15:22.337755934 -0400
-@@ -11,8 +11,6 @@
-
- # ------------------------------
- # python from C
--IPYTHON = -DSELENIUM_READY -I/usr/include/python2.7
--LDPYTHON = -lpython2.7
-
- # ----------------------------------------------------------------------
- # X configuration
diff --git a/sci-biology/afni/files/afni-24.0.04-whirlgif.patch b/sci-biology/afni/files/afni-24.0.04-whirlgif.patch
new file mode 100644
index 000000000..a357799e6
--- /dev/null
+++ b/sci-biology/afni/files/afni-24.0.04-whirlgif.patch
@@ -0,0 +1,39 @@
+diff --git a/packaging/installation_components.txt b/packaging/installation_components.txt
+index 127193338..ba8825a7b 100644
+--- a/packaging/installation_components.txt
++++ b/packaging/installation_components.txt
+@@ -347,7 +347,6 @@ uniq_images, corebinaries
+ unu, corebinaries
+ waver, corebinaries
+ whereami, corebinaries
+-whirlgif, corebinaries
+ 3dMax, tcsh
+ 3dPAR2AFNI.pl, tcsh
+ @1dDiffMag, tcsh
+diff --git a/src/CMakeLists_binaries.txt b/src/CMakeLists_binaries.txt
+index d53368390..8c8e9e1fb 100644
+--- a/src/CMakeLists_binaries.txt
++++ b/src/CMakeLists_binaries.txt
+@@ -209,7 +209,6 @@ foreach(
+ uniq_images
+ unu
+ whereami
+- whirlgif
+ )
+
+ add_afni_executable(${target} ${target}.c)
+diff --git a/src/Makefile.INCLUDE b/src/Makefile.INCLUDE
+index f44103def..7ac08a87d 100644
+--- a/src/Makefile.INCLUDE
++++ b/src/Makefile.INCLUDE
+@@ -3495,11 +3495,6 @@ help_format:help_format.o
+ ibinom:ibinom.o
+ $(CC) -o ibinom ibinom.o $(LFLAGS) $(LLIBS)
+
+-## GIF animation
+-
+-whirlgif:whirlgif.h whirlgif.c
+- $(CC) -o whirlgif whirlgif.c $(INFLAGS) $(LFLAGS) $(LLIBS)
+-
+ extor.o:extor.c
+ $(CCFAST) -c extor.c $(INFLAGS)
diff --git a/sci-biology/afni/files/afni-24.1.16-niftiio.patch b/sci-biology/afni/files/afni-24.1.16-niftiio.patch
new file mode 100644
index 000000000..a4eb35435
--- /dev/null
+++ b/sci-biology/afni/files/afni-24.1.16-niftiio.patch
@@ -0,0 +1,27 @@
+From 05dbcd2659fa6177b221a2686300036e4ae435d6 Mon Sep 17 00:00:00 2001
+From: Yaroslav Halchenko <debian@onerussian.com>
+Date: Mon, 3 Jun 2024 19:28:21 -0400
+Subject: [PATCH] Announce niftiio as PRIVATE for linking to prevent
+ propagating linking against it
+
+I am just a messanger from the cmake-wise @leej3 at
+https://github.com/afni/afni/issues/639#issuecomment-2145703256
+
+Supposedly closes #639
+---
+ src/nifti/nifticdf/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/nifti/nifticdf/CMakeLists.txt b/src/nifti/nifticdf/CMakeLists.txt
+index 473be7e3be..01b18a14d8 100644
+--- a/nifti_clib_from_github/nifticdf/CMakeLists.txt
++++ b/nifti_clib_from_github/nifticdf/CMakeLists.txt
+@@ -8,7 +8,7 @@ set_target_properties(
+ "${CMAKE_CURRENT_LIST_DIR}/nifticdf.h"
+ )
+ target_compile_options(${NIFTI_CDFLIB_NAME} PRIVATE "-D__COMPILE_UNUSED_FUNCTIONS__")
+-target_link_libraries(${NIFTI_CDFLIB_NAME} PUBLIC ${NIFTI_PACKAGE_PREFIX}niftiio)
++target_link_libraries(${NIFTI_CDFLIB_NAME} PRIVATE ${NIFTI_PACKAGE_PREFIX}niftiio)
+ get_lib_version_vars("nifticdf_version.h" NIFTICDF_VERSION NIFTICDF_MAJOR_VERSION)
+ if(BUILD_SHARED_LIBS)
+ set_target_properties(${NIFTI_CDFLIB_NAME}
diff --git a/sci-biology/afni/metadata.xml b/sci-biology/afni/metadata.xml
index cbb8a4299..39ec69d08 100644
--- a/sci-biology/afni/metadata.xml
+++ b/sci-biology/afni/metadata.xml
@@ -13,6 +13,9 @@
Analysis of Functional NeuroImages (AFNI) is an open-source environment for processing and displaying
functional MRI data—a technique for mapping human brain activity.
</longdescription>
+ <use>
+ <flag name="whirlgif">Build optional whirlgif binary</flag>
+ </use>
<upstream>
<remote-id type="github">afni/afni</remote-id>
</upstream>