commit:     da45c12e15c1bfde33d4c8e0919eccec25b426b8
Author:     Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Fri Apr  1 07:48:43 2022 +0000
Commit:     Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Fri Apr  1 07:48:43 2022 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=da45c12e

sci-biology/afni: reinstated working versions

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Horea Christian <chr <AT> chymera.eu>

 .../{afni-22.0.03.ebuild => afni-20.1.16.ebuild}   | 26 +++++++++++--------
 .../{afni-22.0.03.ebuild => afni-20.3.03.ebuild}   | 30 ++++++++++++++--------
 sci-biology/afni/afni-22.0.03.ebuild               |  3 ++-
 sci-biology/afni/files/afni-20.1.16-python.patch   | 11 ++++++++
 sci-biology/afni/files/afni-20.3.03-python.patch   | 11 ++++++++
 5 files changed, 58 insertions(+), 23 deletions(-)

diff --git a/sci-biology/afni/afni-22.0.03.ebuild 
b/sci-biology/afni/afni-20.1.16.ebuild
similarity index 66%
copy from sci-biology/afni/afni-22.0.03.ebuild
copy to sci-biology/afni/afni-20.1.16.ebuild
index 920bf7189..98fdb2397 100644
--- a/sci-biology/afni/afni-22.0.03.ebuild
+++ b/sci-biology/afni/afni-20.1.16.ebuild
@@ -26,33 +26,37 @@ RDEPEND="dev-libs/expat
        x11-libs/libXft
        x11-libs/libXi
        x11-libs/libXpm
-       x11-libs/motif
-"
+       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)
+BIN_CONFLICTS=(qdelaunay whirlgif djpeg cjpeg qhull rbox count mpeg_encode)
 
 src_prepare() {
-       find -type f -exec sed -i -e "s/-lXp //g" {} + || die
+       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)~" \
+       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~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)~"\
+       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
+       find "${S}" -iname "*Makefile*" | xargs sed -e 
"s~/usr/~${EROOT}/usr/~g;" -i
        default
 }
 
@@ -61,9 +65,9 @@ src_compile() {
 }
 
 src_install() {
-       emake INSTALLDIR="${ED}/usr/bin" install install_plugins
+       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}" || die
+               rm "${ED}/usr/bin/${CONFLICT}"
        done
 }

diff --git a/sci-biology/afni/afni-22.0.03.ebuild 
b/sci-biology/afni/afni-20.3.03.ebuild
similarity index 65%
copy from sci-biology/afni/afni-22.0.03.ebuild
copy to sci-biology/afni/afni-20.3.03.ebuild
index 920bf7189..fab7446bf 100644
--- a/sci-biology/afni/afni-22.0.03.ebuild
+++ b/sci-biology/afni/afni-20.3.03.ebuild
@@ -26,33 +26,41 @@ RDEPEND="dev-libs/expat
        x11-libs/libXft
        x11-libs/libXi
        x11-libs/libXpm
-       x11-libs/motif
-"
+       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)
+BIN_CONFLICTS=(qdelaunay whirlgif djpeg cjpeg qhull rbox count mpeg_encode)
+
+#PATCHES=(
+#   "${FILESDIR}/${P}-python.patch"
+#)
 
 src_prepare() {
-       find -type f -exec sed -i -e "s/-lXp //g" {} + || die
+       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)~" \
+       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~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)~"\
+       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
+       find "${S}" -iname "*Makefile*" | xargs sed -e 
"s~/usr/~${EROOT}/usr/~g;" -i
        default
 }
 
@@ -61,9 +69,9 @@ src_compile() {
 }
 
 src_install() {
-       emake INSTALLDIR="${ED}/usr/bin" install install_plugins
+       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}" || die
+               rm "${ED}/usr/bin/${CONFLICT}"
        done
 }

diff --git a/sci-biology/afni/afni-22.0.03.ebuild 
b/sci-biology/afni/afni-22.0.03.ebuild
index 920bf7189..9e831b018 100644
--- a/sci-biology/afni/afni-22.0.03.ebuild
+++ b/sci-biology/afni/afni-22.0.03.ebuild
@@ -11,7 +11,8 @@ 
SRC_URI="https://github.com/afni/afni/archive/AFNI_${PV}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="GPL-3+"
 SLOT="0"
-KEYWORDS="~amd64 ~x86"
+# fully broken due to upstream cmake migration
+KEYWORDS=""
 IUSE=""
 
 RDEPEND="dev-libs/expat

diff --git a/sci-biology/afni/files/afni-20.1.16-python.patch 
b/sci-biology/afni/files/afni-20.1.16-python.patch
new file mode 100644
index 000000000..8c3e859f5
--- /dev/null
+++ b/sci-biology/afni/files/afni-20.1.16-python.patch
@@ -0,0 +1,11 @@
+--- 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-20.3.03-python.patch 
b/sci-biology/afni/files/afni-20.3.03-python.patch
new file mode 100644
index 000000000..8c3e859f5
--- /dev/null
+++ b/sci-biology/afni/files/afni-20.3.03-python.patch
@@ -0,0 +1,11 @@
+--- 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

Reply via email to