Gentoo Archives: gentoo-commits

From: Horea Christian <horea.christ@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/afni/files/, sci-biology/afni/
Date: Fri, 01 Apr 2022 07:48:58
Message-Id: 1648799323.da45c12e15c1bfde33d4c8e0919eccec25b426b8.chymera@gentoo
1 commit: da45c12e15c1bfde33d4c8e0919eccec25b426b8
2 Author: Horea Christian <chr <AT> chymera <DOT> eu>
3 AuthorDate: Fri Apr 1 07:48:43 2022 +0000
4 Commit: Horea Christian <horea.christ <AT> gmail <DOT> com>
5 CommitDate: Fri Apr 1 07:48:43 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=da45c12e
7
8 sci-biology/afni: reinstated working versions
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Horea Christian <chr <AT> chymera.eu>
12
13 .../{afni-22.0.03.ebuild => afni-20.1.16.ebuild} | 26 +++++++++++--------
14 .../{afni-22.0.03.ebuild => afni-20.3.03.ebuild} | 30 ++++++++++++++--------
15 sci-biology/afni/afni-22.0.03.ebuild | 3 ++-
16 sci-biology/afni/files/afni-20.1.16-python.patch | 11 ++++++++
17 sci-biology/afni/files/afni-20.3.03-python.patch | 11 ++++++++
18 5 files changed, 58 insertions(+), 23 deletions(-)
19
20 diff --git a/sci-biology/afni/afni-22.0.03.ebuild b/sci-biology/afni/afni-20.1.16.ebuild
21 similarity index 66%
22 copy from sci-biology/afni/afni-22.0.03.ebuild
23 copy to sci-biology/afni/afni-20.1.16.ebuild
24 index 920bf7189..98fdb2397 100644
25 --- a/sci-biology/afni/afni-22.0.03.ebuild
26 +++ b/sci-biology/afni/afni-20.1.16.ebuild
27 @@ -26,33 +26,37 @@ RDEPEND="dev-libs/expat
28 x11-libs/libXft
29 x11-libs/libXi
30 x11-libs/libXpm
31 - x11-libs/motif
32 -"
33 + x11-libs/motif[-static-libs]"
34 +
35 +# x11-libs/motif[static-libs] breaks the build.
36 +# See upstream discussion
37 +# http://afni.nimh.nih.gov/afni/community/board/read.php?1,85348,85348#msg-85348
38
39 DEPEND="${RDEPEND}
40 app-shells/tcsh"
41
42 S="${WORKDIR}/${PN}-AFNI_${PV}/src"
43 BUILD="linux_fedora_19_64"
44 -BIN_CONFLICTS=(qdelaunay whirlgif djpeg cjpeg qhull rbox count)
45 +BIN_CONFLICTS=(qdelaunay whirlgif djpeg cjpeg qhull rbox count mpeg_encode)
46
47 src_prepare() {
48 - find -type f -exec sed -i -e "s/-lXp //g" {} + || die
49 + eapply "${FILESDIR}/${P}-python.patch" || die
50 + find -type f -exec sed -i -e "s/-lXp //g" {} +
51 cp other_builds/Makefile.${BUILD} Makefile || die "Could not copy Makefile"
52 # Unbundle imcat
53 sed -e "s/ imcat / /g" \
54 -i Makefile.INCLUDE || die "Could not edit includes files."
55 - sed -e "s~CC = /usr/bin/gcc -O2 -m64~CC = $(tc-getCC) \$(CFLAGS)~" \
56 + sed -e "s~CC = /usr/bin/gcc -O2 -m64~CC = $(tc-getCC) \$(CFLAGS)~" \
57 -e "s~CCMIN = /usr/bin/gcc -m64~CCMIN = $(tc-getCC) \$(CFLAGS)~" \
58 - -e "s~LD = /usr/bin/gcc~LD = $(tc-getCC)~" \
59 - -e "s~AR = /usr/bin/ar~AR = $(tc-getAR)~" \
60 + -e "s~LD = /usr/bin/gcc~LD = $(tc-getCC)~" \
61 + -e "s~AR = /usr/bin/ar~AR = $(tc-getAR)~" \
62 -e "s~RANLIB = /usr/bin/ranlib~RANLIB = $(tc-getRANLIB)~" \
63 -i Makefile || die "Could not edit Makefile"
64 # they provide somewhat problematic makefiles :(
65 - sed -e "s~ifeq (\$(CC),gcc)~ifeq (1,1)~"\
66 + sed -e "s~ifeq ($(CC),gcc)~ifeq (1,1)~"\
67 -i SUMA/SUMA_Makefile || die "Could not edit SUMA/SUMA_Makefile"
68 # upstream checks if $CC is EXACTLY gcc, else sets variables for Mac
69 - find "${S}" -iname "*Makefile*" | xargs sed -e "s~/usr/~${EPREFIX}/usr/~g;" -i || die
70 + find "${S}" -iname "*Makefile*" | xargs sed -e "s~/usr/~${EROOT}/usr/~g;" -i
71 default
72 }
73
74 @@ -61,9 +65,9 @@ src_compile() {
75 }
76
77 src_install() {
78 - emake INSTALLDIR="${ED}/usr/bin" install install_plugins
79 + emake INSTALLDIR="${ED}/usr/bin" -j1 install install_plugins
80 emake INSTALLDIR="${ED}/usr/$(get_libdir)" install_lib
81 for CONFLICT in ${BIN_CONFLICTS[@]}; do
82 - rm "${ED}/usr/bin/${CONFLICT}" || die
83 + rm "${ED}/usr/bin/${CONFLICT}"
84 done
85 }
86
87 diff --git a/sci-biology/afni/afni-22.0.03.ebuild b/sci-biology/afni/afni-20.3.03.ebuild
88 similarity index 65%
89 copy from sci-biology/afni/afni-22.0.03.ebuild
90 copy to sci-biology/afni/afni-20.3.03.ebuild
91 index 920bf7189..fab7446bf 100644
92 --- a/sci-biology/afni/afni-22.0.03.ebuild
93 +++ b/sci-biology/afni/afni-20.3.03.ebuild
94 @@ -26,33 +26,41 @@ RDEPEND="dev-libs/expat
95 x11-libs/libXft
96 x11-libs/libXi
97 x11-libs/libXpm
98 - x11-libs/motif
99 -"
100 + x11-libs/motif[-static-libs]"
101 +
102 +# x11-libs/motif[static-libs] breaks the build.
103 +# See upstream discussion
104 +# http://afni.nimh.nih.gov/afni/community/board/read.php?1,85348,85348#msg-85348
105
106 DEPEND="${RDEPEND}
107 app-shells/tcsh"
108
109 S="${WORKDIR}/${PN}-AFNI_${PV}/src"
110 BUILD="linux_fedora_19_64"
111 -BIN_CONFLICTS=(qdelaunay whirlgif djpeg cjpeg qhull rbox count)
112 +BIN_CONFLICTS=(qdelaunay whirlgif djpeg cjpeg qhull rbox count mpeg_encode)
113 +
114 +#PATCHES=(
115 +# "${FILESDIR}/${P}-python.patch"
116 +#)
117
118 src_prepare() {
119 - find -type f -exec sed -i -e "s/-lXp //g" {} + || die
120 + eapply "${FILESDIR}/${P}-python.patch" || die
121 + find -type f -exec sed -i -e "s/-lXp //g" {} +
122 cp other_builds/Makefile.${BUILD} Makefile || die "Could not copy Makefile"
123 # Unbundle imcat
124 sed -e "s/ imcat / /g" \
125 -i Makefile.INCLUDE || die "Could not edit includes files."
126 - sed -e "s~CC = /usr/bin/gcc -O2 -m64~CC = $(tc-getCC) \$(CFLAGS)~" \
127 + sed -e "s~CC = /usr/bin/gcc -O2 -m64~CC = $(tc-getCC) \$(CFLAGS)~" \
128 -e "s~CCMIN = /usr/bin/gcc -m64~CCMIN = $(tc-getCC) \$(CFLAGS)~" \
129 - -e "s~LD = /usr/bin/gcc~LD = $(tc-getCC)~" \
130 - -e "s~AR = /usr/bin/ar~AR = $(tc-getAR)~" \
131 + -e "s~LD = /usr/bin/gcc~LD = $(tc-getCC)~" \
132 + -e "s~AR = /usr/bin/ar~AR = $(tc-getAR)~" \
133 -e "s~RANLIB = /usr/bin/ranlib~RANLIB = $(tc-getRANLIB)~" \
134 -i Makefile || die "Could not edit Makefile"
135 # they provide somewhat problematic makefiles :(
136 - sed -e "s~ifeq (\$(CC),gcc)~ifeq (1,1)~"\
137 + sed -e "s~ifeq ($(CC),gcc)~ifeq (1,1)~"\
138 -i SUMA/SUMA_Makefile || die "Could not edit SUMA/SUMA_Makefile"
139 # upstream checks if $CC is EXACTLY gcc, else sets variables for Mac
140 - find "${S}" -iname "*Makefile*" | xargs sed -e "s~/usr/~${EPREFIX}/usr/~g;" -i || die
141 + find "${S}" -iname "*Makefile*" | xargs sed -e "s~/usr/~${EROOT}/usr/~g;" -i
142 default
143 }
144
145 @@ -61,9 +69,9 @@ src_compile() {
146 }
147
148 src_install() {
149 - emake INSTALLDIR="${ED}/usr/bin" install install_plugins
150 + emake INSTALLDIR="${ED}/usr/bin" -j1 install install_plugins
151 emake INSTALLDIR="${ED}/usr/$(get_libdir)" install_lib
152 for CONFLICT in ${BIN_CONFLICTS[@]}; do
153 - rm "${ED}/usr/bin/${CONFLICT}" || die
154 + rm "${ED}/usr/bin/${CONFLICT}"
155 done
156 }
157
158 diff --git a/sci-biology/afni/afni-22.0.03.ebuild b/sci-biology/afni/afni-22.0.03.ebuild
159 index 920bf7189..9e831b018 100644
160 --- a/sci-biology/afni/afni-22.0.03.ebuild
161 +++ b/sci-biology/afni/afni-22.0.03.ebuild
162 @@ -11,7 +11,8 @@ SRC_URI="https://github.com/afni/afni/archive/AFNI_${PV}.tar.gz -> ${P}.tar.gz"
163
164 LICENSE="GPL-3+"
165 SLOT="0"
166 -KEYWORDS="~amd64 ~x86"
167 +# fully broken due to upstream cmake migration
168 +KEYWORDS=""
169 IUSE=""
170
171 RDEPEND="dev-libs/expat
172
173 diff --git a/sci-biology/afni/files/afni-20.1.16-python.patch b/sci-biology/afni/files/afni-20.1.16-python.patch
174 new file mode 100644
175 index 000000000..8c3e859f5
176 --- /dev/null
177 +++ b/sci-biology/afni/files/afni-20.1.16-python.patch
178 @@ -0,0 +1,11 @@
179 +--- a/other_builds/Makefile.linux_fedora_19_64 2020-10-09 07:07:58.348874414 -0400
180 ++++ b/other_builds/Makefile.linux_fedora_19_64 2020-10-10 01:15:22.337755934 -0400
181 +@@ -11,8 +11,6 @@
182 +
183 + # ------------------------------
184 + # python from C
185 +-IPYTHON = -DSELENIUM_READY -I/usr/include/python2.7
186 +-LDPYTHON = -lpython2.7
187 +
188 + # ----------------------------------------------------------------------
189 + # X configuration
190
191 diff --git a/sci-biology/afni/files/afni-20.3.03-python.patch b/sci-biology/afni/files/afni-20.3.03-python.patch
192 new file mode 100644
193 index 000000000..8c3e859f5
194 --- /dev/null
195 +++ b/sci-biology/afni/files/afni-20.3.03-python.patch
196 @@ -0,0 +1,11 @@
197 +--- a/other_builds/Makefile.linux_fedora_19_64 2020-10-09 07:07:58.348874414 -0400
198 ++++ b/other_builds/Makefile.linux_fedora_19_64 2020-10-10 01:15:22.337755934 -0400
199 +@@ -11,8 +11,6 @@
200 +
201 + # ------------------------------
202 + # python from C
203 +-IPYTHON = -DSELENIUM_READY -I/usr/include/python2.7
204 +-LDPYTHON = -lpython2.7
205 +
206 + # ----------------------------------------------------------------------
207 + # X configuration