1 |
commit: 8790988057a312f5e5cfa1d6f0acf4c681619321 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 9 17:03:02 2020 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 9 17:03:02 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87909880 |
7 |
|
8 |
sci-chemistry/vmd: Bump to 1.9.4_alpha43 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/735462 |
11 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
12 |
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org> |
13 |
|
14 |
sci-chemistry/vmd/Manifest | 1 + |
15 |
.../vmd/files/vmd-1.9.4-gentoo-paths.patch | 276 +++++++++++++++++++++ |
16 |
sci-chemistry/vmd/files/vmd-1.9.4-tmpdir.patch | 11 + |
17 |
sci-chemistry/vmd/vmd-1.9.4_alpha43.ebuild | 265 ++++++++++++++++++++ |
18 |
4 files changed, 553 insertions(+) |
19 |
|
20 |
diff --git a/sci-chemistry/vmd/Manifest b/sci-chemistry/vmd/Manifest |
21 |
index 977dcfa66a2..62f7ae61617 100644 |
22 |
--- a/sci-chemistry/vmd/Manifest |
23 |
+++ b/sci-chemistry/vmd/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST vmd-1.9.3-gentoo-patches.tar.xz 14804 BLAKE2B 64e5df40ed88c23c924d32636495f0383590f91dbb714e64c73551072bb50d72b4e5f188fb2da58d32e84b4bc96ff0297d7ff1bf02b0481198901c4e12e4ee59 SHA512 5d506d4df5ca4a3edb33d77aeeb440fcb4750a250c77103b99f385f356eb9d71d954173b981d3a50f7a714cfc872587e5040868904e50fa1f6fd69d7e4d9f1b1 |
26 |
DIST vmd-1.9.3.src.tar 129566720 BLAKE2B 848f3280d51765dcd18722dd233e0cdee3b7c0ac3dd48324260ebe1604ba781ca0a1fe4cae6652501d23d5d41712020e17dbb6bc21a1856eb3289a4aab6b774b SHA512 0502df1e8b60c570ca88b779b4153acfaa599a78df53fa96fca36301bab902864118332b5524ae7d170d3a9e429cf1e13d69e1197268b5e841afc0bb56a737ba |
27 |
+DIST vmd-1.9.4a43.src.tar 123955200 BLAKE2B a99ee2bce1024613ad951fc97f4cd4b6f6ad114aea67a0a6644f687c69eae488eb862fd5ea5bff31e12f01a95f6f60be04dad2a82879603b9b457443267bb18f SHA512 3e3d5d7b0d220f070d4978940ff5ab8af531e507a224cdd15e4871e263de64b4ba24e9d964cb680b31f376afbdc08f46cb4070e3cd4a474b9bfe0732c7b3cff0 |
28 |
|
29 |
diff --git a/sci-chemistry/vmd/files/vmd-1.9.4-gentoo-paths.patch b/sci-chemistry/vmd/files/vmd-1.9.4-gentoo-paths.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..ca74b868d8f |
32 |
--- /dev/null |
33 |
+++ b/sci-chemistry/vmd/files/vmd-1.9.4-gentoo-paths.patch |
34 |
@@ -0,0 +1,276 @@ |
35 |
+--- a/bin/vmd.sh.old 2020-09-09 18:02:09.135798193 +0200 |
36 |
++++ b/bin/vmd.sh 2020-09-09 18:37:22.355511675 +0200 |
37 |
+@@ -436,6 +436,7 @@ |
38 |
+ |
39 |
+ # set the path to a few external programs |
40 |
+ # Stride -- used to generate cartoon representations etc. |
41 |
++export STRIDE_BIN="gentoo-stride" |
42 |
+ if [ -z "$STRIDE_BIN" ] |
43 |
+ then |
44 |
+ if [ -x "$MASTERVMDDIR/stride_$ARCH" ] |
45 |
+@@ -446,6 +447,7 @@ |
46 |
+ fi |
47 |
+ |
48 |
+ # Surf -- used to generate molecular surfaces |
49 |
++export SURF_BIN="gentoo-surf" |
50 |
+ if [ -z "$SURF_BIN" ] |
51 |
+ then |
52 |
+ if [ -x "$MASTERVMDDIR/surf_$ARCH" ] |
53 |
+@@ -456,6 +458,7 @@ |
54 |
+ fi |
55 |
+ |
56 |
+ # Tachyon -- used to generate ray traced graphics |
57 |
++export TACHYON_BIN="gentoo-tachyon" |
58 |
+ if [ -z "$TACHYON_BIN" ] |
59 |
+ then |
60 |
+ if [ -x "$MASTERVMDDIR/tachyon_$ARCH" ] |
61 |
+--- a/configure.old 2020-09-09 18:05:55.778655084 +0200 |
62 |
++++ b/configure 2020-09-09 18:38:01.607083112 +0200 |
63 |
+@@ -13,11 +13,10 @@ |
64 |
+ $install_name = "vmd"; |
65 |
+ |
66 |
+ # Directory where VMD startup script is installed, should be in users' paths. |
67 |
+-$install_bin_dir="/usr/local/bin"; |
68 |
++$install_bin_dir="gentoo-bindir"; |
69 |
+ |
70 |
+ # Directory where VMD files and executables are installed |
71 |
+-$install_library_dir="/usr/local/lib/$install_name"; |
72 |
+- |
73 |
++$install_library_dir="gentoo-libdir/$install_name"; |
74 |
+ |
75 |
+ # optionally override hard-coded defaults above with environment variables |
76 |
+ if ($ENV{VMDINSTALLNAME}) { |
77 |
+@@ -143,29 +142,6 @@ |
78 |
+ # Configure script code begins here |
79 |
+ ############################################################################ |
80 |
+ |
81 |
+-## Test for existence of a properly compiled plugin tree |
82 |
+-if (!(-e "plugins")) { |
83 |
+- print "\n"; |
84 |
+- print "VMD plugin directory not found.\n"; |
85 |
+- print "Please compile the VMD plugins and do 'make distrib' to copy them\n"; |
86 |
+- print "into a 'plugins' directory linked or located in this directory.\n"; |
87 |
+- print "Be sure your PLUGINDIR environment variable is set before running\n"; |
88 |
+- print "'make distrib' in the plugin build area.\n"; |
89 |
+- print "\n"; |
90 |
+- die "Halting configuration until VMD plugins are built.\n"; |
91 |
+-} else { |
92 |
+- if (!(-e "plugins/include/vmdplugin.h")) { |
93 |
+- print "\n"; |
94 |
+- print "VMD plugin include files or directory not found.\n"; |
95 |
+- print "Please compile the VMD plugins and do 'make distrib' to copy them\n"; |
96 |
+- print "into a 'plugins' directory linked or located in this directory.\n"; |
97 |
+- print "Be sure your PLUGINDIR environment variable is set before running\n"; |
98 |
+- print "'make distrib' in the plugin build area.\n"; |
99 |
+- print "\n"; |
100 |
+- die "Halting configuration until VMD plugins are built.\n"; |
101 |
+- } |
102 |
+-} |
103 |
+- |
104 |
+ #################### Parse command line options ########### |
105 |
+ # list of allowed architectures |
106 |
+ @archlist=('AIX6_64', 'ANDROIDARMV7A', 'BLUEGENEQ', 'BLUEWATERS', 'CRAY_XC', 'CRAY_XK', 'FREEBSD', 'FREEBSDAMD64', 'LINUX', 'LINUXAMD64', 'LINUXARM64', 'LINUXCARMA', 'LINUXPPC64', 'MACOSX', 'MACOSXX86', 'MACOSXX86_64', 'OPENPOWER', 'SUMMIT', 'SUMMITDEV', 'SOLARIS2', 'SOLARIS2_64', 'SOLARISX86', 'SOLARISX86_64', 'WIN32', 'WIN64'); |
107 |
+@@ -493,7 +469,7 @@ |
108 |
+ |
109 |
+ $arch_cc = "cc"; |
110 |
+ $arch_ccpp = "CC"; |
111 |
+-$arch_nvcc = "/usr/local/cuda-10.2/bin/nvcc"; |
112 |
++$arch_nvcc = "gentoo-nvcc"; |
113 |
+ $arch_nvccflags = "-lineinfo --ptxas-options=-v " . |
114 |
+ "-gencode arch=compute_30,code=compute_30 " . |
115 |
+ "-gencode arch=compute_30,code=sm_35 " . |
116 |
+@@ -537,7 +513,7 @@ |
117 |
+ |
118 |
+ ################ Plugin options |
119 |
+ # |
120 |
+-$plugin_dir = "../plugins"; |
121 |
++$plugin_dir = "gentoo-plugindir"; |
122 |
+ $plugin_include = "-I$plugin_dir/include"; |
123 |
+ $plugin_library = ""; |
124 |
+ $plugin_libs = ""; |
125 |
+@@ -550,7 +526,7 @@ |
126 |
+ @plugin_extra = (); |
127 |
+ |
128 |
+ if ($config_staticplugin) { |
129 |
+- $molfile_dir = "$plugin_dir/$config_arch/molfile"; |
130 |
++ $molfile_dir = "$plugin_dir/compile/lib_LINUX/molfile"; |
131 |
+ $plugin_include .= " -I$molfile_dir"; |
132 |
+ $plugin_library .= " -L$molfile_dir"; |
133 |
+ $plugin_libs .= " -lmolfile_plugin"; |
134 |
+@@ -715,8 +691,8 @@ |
135 |
+ ################ FLTK GUI |
136 |
+ $fltk_defines = "-DVMDGUI -DVMDFLTK"; |
137 |
+ $fltk_dir = "$vmd_library_dir/fltk"; |
138 |
+-$fltk_include = "-I$fltk_dir/include"; |
139 |
+-$fltk_library = "-L$fltk_dir/$config_arch"; |
140 |
++$fltk_include = "-Igentoo-fltk-include"; |
141 |
++$fltk_library = "-Lgentoo-fltk-libs"; |
142 |
+ $fltk_libs = "-lfltk -lX11"; |
143 |
+ #@fltk_cc = ('forms_ui.c'); |
144 |
+ @fltk_cu = (); |
145 |
+@@ -777,8 +753,8 @@ |
146 |
+ if ($config_tk) { $tcl_include .= " -I$stock_tk_include_dir"; } |
147 |
+ $tcl_library = "-L$stock_tcl_library_dir"; |
148 |
+ if ($config_tk) { $tcl_library .= " -L$stock_tk_library_dir"; } |
149 |
+-$tcl_libs = "-ltcl8.5"; |
150 |
+-if ($config_tk) { $tcl_libs = "-ltk8.5 -lX11 " . $tcl_libs; } |
151 |
++$tcl_libs = "-ltcl"; |
152 |
++if ($config_tk) { $tcl_libs = "-ltk -lX11 " . $tcl_libs; } |
153 |
+ |
154 |
+ @tcl_cc = (); |
155 |
+ @tcl_cu = (); |
156 |
+@@ -1289,8 +1265,8 @@ |
157 |
+ # This may be commented out if not required. |
158 |
+ $libtachyon_defines = "-DVMDLIBTACHYON"; |
159 |
+ $libtachyon_dir = "$vmd_library_dir/tachyon"; |
160 |
+-$libtachyon_include = "-I$libtachyon_dir/include"; |
161 |
+-$libtachyon_library = "-L$libtachyon_dir/lib_$config_arch"; |
162 |
++$libtachyon_include = "-Igentoo-libtachyon-include"; |
163 |
++$libtachyon_library = "-Lgentoo-libtachyon-libs"; |
164 |
+ $libtachyon_libs = "-ltachyon"; |
165 |
+ @libtachyon_cc = (); |
166 |
+ @libtachyon_cu = (); |
167 |
+@@ -1541,8 +1517,8 @@ |
168 |
+ ####################### |
169 |
+ $netcdf_defines = ""; |
170 |
+ $netcdf_dir = "$vmd_library_dir/netcdf"; |
171 |
+-$netcdf_include = "-I$netcdf_dir/include"; |
172 |
+-$netcdf_library = "-L$netcdf_dir/lib_$config_arch"; |
173 |
++$netcdf_include = "-Igentoo-netcdf-include"; |
174 |
++$netcdf_library = "-Lgentoo-netcdf-libs"; |
175 |
+ $netcdf_libs = "-lnetcdf"; |
176 |
+ @netcdf_cc = (); |
177 |
+ @netcdf_cu = (); |
178 |
+@@ -1595,6 +1571,7 @@ |
179 |
+ #$stock_python_library_dir=$ENV{"PYTHON_LIBRARY_DIR"} || "/usr/local/lib"; |
180 |
+ $stock_python_include_dir=$ENV{"PYTHON_INCLUDE_DIR"} || "$vmd_library_dir/python/lib_$config_arch/include/python2.5"; |
181 |
+ $stock_python_library_dir=$ENV{"PYTHON_LIBRARY_DIR"} || "$vmd_library_dir/python/lib_$config_arch/lib/python2.5/config"; |
182 |
++$stock_python_library=$ENV{"PYTHON_LIBRARY"} || "$vmd_library_dir/python/lib_$config_arch/lib/python2.5/config"; |
183 |
+ |
184 |
+ #$stock_numpy_include_dir=$ENV{"NUMPY_INCLUDE_DIR"} || "/usr/local/include"; |
185 |
+ #$stock_numpy_library_dir=$ENV{"NUMPY_LIBRARY_DIR"} || "/usr/local/lib"; |
186 |
+@@ -1604,7 +1581,7 @@ |
187 |
+ $python_defines = "-DVMDPYTHON"; |
188 |
+ $python_include = "-I$stock_python_include_dir -I$stock_numpy_include_dir -I$stock_numpy_library_dir"; |
189 |
+ $python_library = "-L$stock_python_library_dir"; |
190 |
+-$python_libs = "-lpython2.5 -lpthread"; |
191 |
++$python_libs = "$stock_python_library -lpthread"; |
192 |
+ @python_h = ('PythonTextInterp.h', |
193 |
+ 'VMDTkinterMenu.h', |
194 |
+ 'py_commands.h', |
195 |
+@@ -2350,8 +2327,8 @@ |
196 |
+ |
197 |
+ # XFree 4.0 Direct Rendering Interface and GLX |
198 |
+ $opengl_dep_dir = "/usr/X11R6"; |
199 |
+- $opengl_dep_include = "-I$opengl_dep_dir/include"; |
200 |
+- $opengl_dep_library = "-L$opengl_dep_dir/lib"; |
201 |
++ $opengl_dep_include = "-Igentoo-opengl-include"; |
202 |
++ $opengl_dep_library = "-Lgentoo-opengl-libs"; |
203 |
+ $opengl_dep_libs = "-lGL"; |
204 |
+ # $opengl_dep_libs = "-L/usr/X11R6/lib -lGL -lXext -lX11"; |
205 |
+ |
206 |
+@@ -2381,15 +2358,15 @@ |
207 |
+ $arch_lopts .= "-i-static "; |
208 |
+ } else { |
209 |
+ # compling with GCC |
210 |
+- $arch_cc = "gcc"; |
211 |
+- $arch_ccpp = "g++"; |
212 |
++ $arch_cc = "gentoo-gcc"; |
213 |
++ $arch_ccpp = "gentoo-g++"; |
214 |
+ $arch_depend_flag = "-MM"; |
215 |
+- $arch_shld = "g++ -shared"; |
216 |
++ $arch_shld = "gentoo-g++ -shared"; |
217 |
+ $arch_shlibname = "so"; |
218 |
+ $arch_shcppopts = "-fPIC"; |
219 |
+- $arch_shldopts = ""; |
220 |
+- $arch_opt_flag = "-m32 -fno-for-scope -Wno-deprecated -Wall -Wno-unknown-pragmas -O3"; |
221 |
+- $arch_copts = "-m32 -Wall -Wno-unknown-pragmas -O3"; |
222 |
++ $arch_shldopts = "gentoo-ldflags"; |
223 |
++ $arch_opt_flag = "gentoo-cflags"; |
224 |
++ $arch_copts = "gentoo-cflags"; |
225 |
+ |
226 |
+ if ($config_static) { |
227 |
+ $arch_lopts = "-static"; |
228 |
+@@ -2407,14 +2384,13 @@ |
229 |
+ |
230 |
+ $arch_cppopts = ""; |
231 |
+ if ($config_cuda) { |
232 |
+- $arch_nvcc = "/usr/local/cuda-4.0/bin/nvcc"; |
233 |
+ $arch_nvccflags = "--ptxas-options=-v " . |
234 |
+ "-gencode arch=compute_13,code=sm_13 " . |
235 |
+ "-gencode arch=compute_20,code=sm_20 " . |
236 |
+ "-gencode arch=compute_20,code=compute_20 " . |
237 |
+ "--ftz=true "; |
238 |
+- $arch_nvccflags .= " --machine 32 -O3 -Xcompiler \"-m32\" $cuda_include"; |
239 |
+- $cuda_library = "-L/usr/local/cuda-4.0/lib"; |
240 |
++ $arch_nvccflags .= "gentoo-nvflags $cuda_include"; |
241 |
++ $cuda_library = "-Lgentoo-cuda-lib"; |
242 |
+ $cuda_libs = "-Wl,-rpath -Wl,\$\$ORIGIN/ -lcudart"; |
243 |
+ } |
244 |
+ # this is to make tcl happy |
245 |
+@@ -2513,7 +2489,7 @@ |
246 |
+ |
247 |
+ if ($config_cuda) { |
248 |
+ $arch_nvccflags .= " --machine 64 -O3 $cuda_include"; |
249 |
+- $cuda_library = "-L/usr/local/cuda-10.2/lib64"; |
250 |
++ $cuda_library = "-Lgentoo-cuda-lib"; |
251 |
+ } |
252 |
+ |
253 |
+ $arch_lex = "flex"; # has problems with vendor lex |
254 |
+@@ -3502,11 +3478,11 @@ |
255 |
+ DEFINES = $DEFINES |
256 |
+ |
257 |
+ # compiler and compiler directives |
258 |
+-CC = $arch_cc |
259 |
+-CFLAGS = $arch_copts -DARCH_$config_arch \$(DEFINES) \$(INCDIRS) $rpm_optflags |
260 |
++CC = gentoo-gcc |
261 |
++CFLAGS = gentoo-cflags -DARCH_$config_arch \$(DEFINES) \$(INCDIRS) $rpm_optflags |
262 |
+ |
263 |
+-CCPP = $arch_ccpp |
264 |
+-CPPFLAGS = $arch_opt_flag $arch_cppopts -DARCH_$config_arch \$(DEFINES) \$(INCDIRS) $rpm_optflags |
265 |
++CCPP = gentoo-g++ |
266 |
++CPPFLAGS = gentoo-cxxflags $arch_cppopts -DARCH_$config_arch \$(DEFINES) \$(INCDIRS) $rpm_optflags |
267 |
+ |
268 |
+ NVCC = $arch_nvcc |
269 |
+ NVCCFLAGS = $arch_nvccflags -DARCH_$config_arch \$(DEFINES) \$(INCDIRS) |
270 |
+@@ -3555,7 +3531,7 @@ |
271 |
+ $config_progname: y.tab.h \$(VMD_OBJS) \$(VMD_PTX) |
272 |
+ \$(ECHO) "Linking " \$\@ "..."; \\ |
273 |
+ \$(CD) $vmd_arch_dir ; \\ |
274 |
+- \$(CCPP) \$(CPPFLAGS) -I$vmd_src_dir -o \$\@ \$(VMD_OBJS) \$(LOADLIBES) ; |
275 |
++ \$(CCPP) \$(LDFLAGS) \$(CPPFLAGS) -I$vmd_src_dir -o \$\@ \$(VMD_OBJS) \$(LOADLIBES) ; |
276 |
+ \$(COMPILERC) \$(RCFLAGS) |
277 |
+ |
278 |
+ install: |
279 |
+@@ -3596,8 +3572,7 @@ |
280 |
+ -\$(COPY) ../data/.vmdrc ../data/.vmdsensors ../data/vmd_completion.dat "$install_library_dir" |
281 |
+ \$(CD) $vmd_bin_dir ; \\ |
282 |
+ if [ -f run_vmd_tmp ]; then \$(DELETE) run_vmd_tmp; fi ; \\ |
283 |
+- if [ ! -x "/bin/csh" ]; then \\ |
284 |
+- \$(ECHO) "Info: /bin/csh shell not found, installing Bourne shell startup script instead" ; \\ |
285 |
++ if [ -x "/bin/bash" ]; then \\ |
286 |
+ \$(ECHO) '#!/bin/sh' >> run_vmd_tmp ; \\ |
287 |
+ \$(ECHO) 'defaultvmddir="$install_library_dir"' >> run_vmd_tmp ; \\ |
288 |
+ \$(ECHO) 'vmdbasename=vmd' >> run_vmd_tmp ; \\ |
289 |
+--- a/src/Makefile.old 2020-09-09 18:22:46.234818925 +0200 |
290 |
++++ b/src/Makefile 2020-09-09 18:37:22.356511690 +0200 |
291 |
+@@ -647,7 +647,7 @@ |
292 |
+ vmd_LINUXAMD64: y.tab.h $(VMD_OBJS) $(VMD_PTX) |
293 |
+ $(ECHO) "Linking " $@ "..."; \ |
294 |
+ $(CD) ../LINUXAMD64 ; \ |
295 |
+- $(CCPP) $(CPPFLAGS) -I../src -o $@ $(VMD_OBJS) $(LOADLIBES) ; |
296 |
++ $(CCPP) $(LDFLAGS) $(CPPFLAGS) -I../src -o $@ $(VMD_OBJS) $(LOADLIBES) ; |
297 |
+ $(COMPILERC) $(RCFLAGS) |
298 |
+ |
299 |
+ install: |
300 |
+@@ -660,10 +660,6 @@ |
301 |
+ if [ ! -d "/usr/local/lib/vmd"/doc ]; then \ |
302 |
+ $(MAKEDIR) "/usr/local/lib/vmd"/doc; \ |
303 |
+ fi |
304 |
+- -$(COPY) ../Announcement "/usr/local/lib/vmd" |
305 |
+- -$(COPY) ../README "/usr/local/lib/vmd" |
306 |
+- -$(COPY) ../LICENSE "/usr/local/lib/vmd" |
307 |
+- -$(COPY) ../doc/ug.pdf "/usr/local/lib/vmd"/doc |
308 |
+ if [ -f /usr/local/lib/vmd/vmd_LINUXAMD64 ]; then \ |
309 |
+ $(MOVE) "/usr/local/lib/vmd/vmd_LINUXAMD64" "/usr/local/lib/vmd/OLD_vmd_LINUXAMD64" ; $(DELETE) "/usr/local/lib/vmd/OLD_vmd_LINUXAMD64" ; fi |
310 |
+ -$(COPY) ../LINUXAMD64/vmd_LINUXAMD64 "/usr/local/lib/vmd" |
311 |
|
312 |
diff --git a/sci-chemistry/vmd/files/vmd-1.9.4-tmpdir.patch b/sci-chemistry/vmd/files/vmd-1.9.4-tmpdir.patch |
313 |
new file mode 100644 |
314 |
index 00000000000..295811db058 |
315 |
--- /dev/null |
316 |
+++ b/sci-chemistry/vmd/files/vmd-1.9.4-tmpdir.patch |
317 |
@@ -0,0 +1,11 @@ |
318 |
+--- a/scripts/vmd/chemical2vmd.old 2020-09-09 18:40:56.795215443 +0200 |
319 |
++++ b/scripts/vmd/chemical2vmd 2020-09-09 18:41:09.648348701 +0200 |
320 |
+@@ -61,7 +61,7 @@ |
321 |
+ |
322 |
+ |
323 |
+ # Make a temp. file to store the load command |
324 |
+-$ENV{'TMPDIR'} = '/usr/tmp' if !$ENV{'TMPDIR'}; |
325 |
++$ENV{'TMPDIR'} = '/tmp' if !$ENV{'TMPDIR'}; |
326 |
+ sub tmpfile { |
327 |
+ local ($tempfile) = $ENV{'TMPDIR'} . '/chemical2vmd.' . $$; |
328 |
+ local ($i); |
329 |
|
330 |
diff --git a/sci-chemistry/vmd/vmd-1.9.4_alpha43.ebuild b/sci-chemistry/vmd/vmd-1.9.4_alpha43.ebuild |
331 |
new file mode 100644 |
332 |
index 00000000000..29d0417b34e |
333 |
--- /dev/null |
334 |
+++ b/sci-chemistry/vmd/vmd-1.9.4_alpha43.ebuild |
335 |
@@ -0,0 +1,265 @@ |
336 |
+# Copyright 1999-2020 Gentoo Authors |
337 |
+# Distributed under the terms of the GNU General Public License v2 |
338 |
+ |
339 |
+EAPI=7 |
340 |
+PYTHON_COMPAT=( python3_{6..9} ) |
341 |
+ |
342 |
+inherit cuda desktop flag-o-matic prefix python-single-r1 toolchain-funcs xdg |
343 |
+ |
344 |
+DESCRIPTION="Visual Molecular Dynamics" |
345 |
+HOMEPAGE="http://www.ks.uiuc.edu/Research/vmd/" |
346 |
+ |
347 |
+MY_PV="${PV/_alpha/a}" |
348 |
+MY_P="${PN}-${MY_PV}" |
349 |
+SRC_URI=" |
350 |
+ ${MY_P}.src.tar |
351 |
+ https://dev.gentoo.org/~jlec/distfiles/${PN}-1.9.3-gentoo-patches.tar.xz |
352 |
+" |
353 |
+ |
354 |
+SLOT="0" |
355 |
+LICENSE="vmd" |
356 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
357 |
+ |
358 |
+IUSE="cuda gromacs msms povray sqlite tachyon xinerama" |
359 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
360 |
+ |
361 |
+RESTRICT="fetch" |
362 |
+ |
363 |
+CDEPEND=" |
364 |
+ >=dev-lang/tk-8.6.1:0= |
365 |
+ dev-lang/perl |
366 |
+ dev-libs/expat |
367 |
+ $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_MULTI_USEDEP}]') |
368 |
+ sci-libs/netcdf:0= |
369 |
+ virtual/opengl |
370 |
+ >=x11-libs/fltk-1.1.10-r2:1 |
371 |
+ x11-libs/libXft |
372 |
+ x11-libs/libXi |
373 |
+ ${PYTHON_DEPS} |
374 |
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-4.2.9-r1:= ) |
375 |
+ gromacs? ( >=sci-chemistry/gromacs-5.0.4-r1:0=[tng] ) |
376 |
+ sqlite? ( dev-db/sqlite:3= ) |
377 |
+ tachyon? ( >=media-gfx/tachyon-0.99_beta6 ) |
378 |
+ xinerama? ( x11-libs/libXinerama ) |
379 |
+" |
380 |
+DEPEND="${CDEPEND}" |
381 |
+BDEPEND=" |
382 |
+ virtual/pkgconfig |
383 |
+ dev-lang/swig |
384 |
+" |
385 |
+RDEPEND="${CDEPEND} |
386 |
+ sci-biology/stride |
387 |
+ sci-chemistry/chemical-mime-data |
388 |
+ sci-chemistry/surf |
389 |
+ x11-terms/xterm |
390 |
+ msms? ( sci-chemistry/msms-bin ) |
391 |
+ povray? ( media-gfx/povray ) |
392 |
+" |
393 |
+ |
394 |
+S="${WORKDIR}/${MY_P}" |
395 |
+ |
396 |
+VMD_DOWNLOAD="http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD" |
397 |
+# Binary only plugin!! |
398 |
+QA_PREBUILT="usr/lib*/vmd/plugins/LINUX/tcl/intersurf/bin/intersurf.so" |
399 |
+QA_FLAGS_IGNORED_amd64=" usr/lib64/vmd/plugins/LINUX/tcl/volutil/volutil" |
400 |
+QA_FLAGS_IGNORED_x86=" usr/lib/vmd/plugins/LINUX/tcl/volutil/volutil" |
401 |
+ |
402 |
+pkg_nofetch() { |
403 |
+ elog "Please download ${P}.src.tar from" |
404 |
+ elog "${VMD_DOWNLOAD}" |
405 |
+ elog "after agreeing to the license and get" |
406 |
+ elog "https://dev.gentoo.org/~jlec/distfiles/${P}-gentoo-patches.tar.xz" |
407 |
+ elog "Place both into your DISTDIR directory" |
408 |
+ elog |
409 |
+ elog "Due to an upstream bug (https://bugs.gentoo.org/640440) sources" |
410 |
+ elog "file may get downloaded as a compressed tarball or not. In that case" |
411 |
+ elog "you will need to ensure you uncompress the file and rename it" |
412 |
+ elog "as ${P}.src.tar" |
413 |
+} |
414 |
+ |
415 |
+src_prepare() { |
416 |
+ xdg_src_prepare |
417 |
+ |
418 |
+ use cuda && cuda_sanitize |
419 |
+ |
420 |
+ cd "${WORKDIR}"/plugins || die |
421 |
+ |
422 |
+ sed '/^.SILENT/d' -i $(find -name Makefile) |
423 |
+ |
424 |
+ sed \ |
425 |
+ -e "s:CC = gcc:CC = $(tc-getCC):" \ |
426 |
+ -e "s:CXX = g++:CXX = $(tc-getCXX):" \ |
427 |
+ -e "s:COPTO =.*\":COPTO = -fPIC -o \":" \ |
428 |
+ -e "s:LOPTO = .*\":LOPTO = ${LDFLAGS} -fPIC -o \":" \ |
429 |
+ -e "s:CCFLAGS =.*\":CCFLAGS = ${CFLAGS}\":" \ |
430 |
+ -e "s:CXXFLAGS =.*\":CXXFLAGS = ${CXXFLAGS}\":" \ |
431 |
+ -e "s:SHLD = gcc:SHLD = $(tc-getCC) -shared:" \ |
432 |
+ -e "s:SHXXLD = g++:SHXXLD = $(tc-getCXX) -shared:" \ |
433 |
+ -e "s:-ltcl8.5:-ltcl:" \ |
434 |
+ -i Make-arch || die "Failed to set up plugins Makefile" |
435 |
+ |
436 |
+ sed \ |
437 |
+ -e '/^AR /s:=:?=:g' \ |
438 |
+ -e '/^RANLIB /s:=:?=:g' \ |
439 |
+ -i ../plugins/*/Makefile || die |
440 |
+ |
441 |
+ tc-export AR RANLIB |
442 |
+ |
443 |
+ sed \ |
444 |
+ -e "s:\$(CXXFLAGS)::g" \ |
445 |
+ -i hesstrans/Makefile || die |
446 |
+ |
447 |
+ # prepare vmd itself |
448 |
+ cd "${S}" || die |
449 |
+ |
450 |
+ eapply "${FILESDIR}"/${PN}-1.9.4-gentoo-paths.patch |
451 |
+ eapply "${FILESDIR}"/${PN}-1.9.4-tmpdir.patch |
452 |
+ |
453 |
+ # PREFIX |
454 |
+ sed \ |
455 |
+ -e "s:/usr/include/:${EPREFIX}/usr/include:g" \ |
456 |
+ -i configure || die |
457 |
+ |
458 |
+ sed \ |
459 |
+ -e "s:gentoo-bindir:${ED}/usr/bin:g" \ |
460 |
+ -e "s:gentoo-libdir:${ED}/usr/$(get_libdir):g" \ |
461 |
+ -e "s:gentoo-opengl-include:${EPREFIX}/usr/include/GL:g" \ |
462 |
+ -e "s:gentoo-opengl-libs:${EPREFIX}/usr/$(get_libdir):g" \ |
463 |
+ -e "s:gentoo-gcc:$(tc-getCC):g" \ |
464 |
+ -e "s:gentoo-g++:$(tc-getCXX):g" \ |
465 |
+ -e "s:gentoo-nvcc:${EPREFIX}/opt/cuda/bin/nvcc:g" \ |
466 |
+ -e "s:gentoo-cflags:${CFLAGS}:g" \ |
467 |
+ -e "s:gentoo-cxxflags:${CXXFLAGS}:g" \ |
468 |
+ -e "s:gentoo-nvflags::g" \ |
469 |
+ -e "s:gentoo-ldflags:${LDFLAGS}:g" \ |
470 |
+ -e "s:gentoo-plugindir:${WORKDIR}/plugins:g" \ |
471 |
+ -e "s:gentoo-fltk-include:$(fltk-config --includedir):g" \ |
472 |
+ -e "s:gentoo-fltk-libs:$(dirname $(fltk-config --libs)) -Wl,-rpath,$(dirname $(fltk-config --libs)):g" \ |
473 |
+ -e "s:gentoo-libtachyon-include:${EPREFIX}/usr/include/tachyon:g" \ |
474 |
+ -e "s:gentoo-libtachyon-libs:${EPREFIX}/usr/$(get_libdir):g" \ |
475 |
+ -e "s:gentoo-netcdf-include:${EPREFIX}/usr/include:g" \ |
476 |
+ -e "s:gentoo-netcdf-libs:${EPREFIX}/usr/$(get_libdir):g" \ |
477 |
+ -i configure || die |
478 |
+ |
479 |
+ if use cuda; then |
480 |
+ sed \ |
481 |
+ -e "s:gentoo-cuda-lib:${EPREFIX}/opt/cuda/$(get_libdir):g" \ |
482 |
+ -e "/NVCCFLAGS/s:=:= ${NVCCFLAGS}:g" \ |
483 |
+ -i configure src/Makefile || die |
484 |
+ sed \ |
485 |
+ -e '/compute_/d' \ |
486 |
+ -i configure || die |
487 |
+ sed \ |
488 |
+ -e 's:-gencode .*code=sm_..::' \ |
489 |
+ -i src/Makefile || die |
490 |
+ fi |
491 |
+ |
492 |
+ sed \ |
493 |
+ -e "s:LINUXPPC:LINUX:g" \ |
494 |
+ -e "s:LINUXALPHA:LINUX:g" \ |
495 |
+ -e "s:LINUXAMD64:LINUX:g" \ |
496 |
+ -e "s:gentoo-stride:${EPREFIX}/usr/bin/stride:g" \ |
497 |
+ -e "s:gentoo-surf:${EPREFIX}/usr/bin/surf:g" \ |
498 |
+ -e "s:gentoo-tachyon:${EPREFIX}/usr/bin/tachyon:g" \ |
499 |
+ -i "${S}"/bin/vmd.sh || die "failed setting up vmd wrapper script" |
500 |
+ |
501 |
+ EMAKEOPTS=( |
502 |
+ TCLINC="-I${EPREFIX}/usr/include" |
503 |
+ TCLLIB="-L${EPREFIX}/usr/$(get_libdir)" |
504 |
+ TCLLDFLAGS="-shared" |
505 |
+ NETCDFLIB="$($(tc-getPKG_CONFIG) --libs-only-L netcdf)${EPREFIX}/usr/$(get_libdir)/libnetcdf.so" |
506 |
+ NETCDFINC="$($(tc-getPKG_CONFIG) --cflags-only-I netcdf)${EPREFIX}/usr/include" |
507 |
+ NETCDFLDFLAGS="$($(tc-getPKG_CONFIG) --libs netcdf)" |
508 |
+ NETCDFDYNAMIC=1 |
509 |
+ EXPATINC="-I${EPREFIX}/usr/include" |
510 |
+ EXPATLIB="$($(tc-getPKG_CONFIG) --libs expat)" |
511 |
+ EXPATLDFLAGS="-shared" |
512 |
+ EXPATDYNAMIC=1 |
513 |
+ ) |
514 |
+ if use gromacs; then |
515 |
+ EMAKEOPTS+=( |
516 |
+ TNGLIB="$($(tc-getPKG_CONFIG) --libs libgromacs)" |
517 |
+ TNGINC="-I${EPREFIX}/usr/include" |
518 |
+ TNGLDFLAGS="-shared" |
519 |
+ TNGDYNAMIC=1 |
520 |
+ ) |
521 |
+ fi |
522 |
+ if use sqlite; then |
523 |
+ EMAKEOPTS+=( |
524 |
+ SQLITELIB="$($(tc-getPKG_CONFIG) --libs sqlite3)" |
525 |
+ SQLITEINC="-I${EPREFIX}/usr/include" |
526 |
+ SQLITELDFLAGS="-shared" |
527 |
+ SQLITEDYNAMIC=1 |
528 |
+ ) |
529 |
+ fi |
530 |
+} |
531 |
+ |
532 |
+src_configure() { |
533 |
+ local myconf="OPENGL OPENGLPBUFFER COLVARS FLTK TK TCL PTHREADS PYTHON IMD NETCDF NUMPY NOSILENT XINPUT" |
534 |
+ rm -f configure.options && echo $myconf >> configure.options |
535 |
+ |
536 |
+ use cuda && myconf+=" CUDA" |
537 |
+# use mpi && myconf+=" MPI" |
538 |
+ use tachyon && myconf+=" LIBTACHYON" |
539 |
+ use xinerama && myconf+=" XINERAMA" |
540 |
+ |
541 |
+ export \ |
542 |
+ PYTHON_INCLUDE_DIR="$(python_get_includedir)" \ |
543 |
+ PYTHON_LIBRARY_DIR="$(python_get_library_path)" \ |
544 |
+ PYTHON_LIBRARY="$(python_get_LIBS)" \ |
545 |
+ NUMPY_INCLUDE_DIR="$(python_get_sitedir)/numpy/core/include" \ |
546 |
+ NUMPY_LIBRARY_DIR="$(python_get_sitedir)/numpy/core/include" |
547 |
+ |
548 |
+ perl ./configure LINUX \ |
549 |
+ ${myconf} || die |
550 |
+} |
551 |
+ |
552 |
+src_compile() { |
553 |
+ # build plugins |
554 |
+ cd "${WORKDIR}"/plugins || die |
555 |
+ |
556 |
+ emake \ |
557 |
+ ${EMAKEOPTS[@]} \ |
558 |
+ LINUX |
559 |
+ |
560 |
+ # build vmd |
561 |
+ cd "${S}"/src || die |
562 |
+ emake |
563 |
+} |
564 |
+ |
565 |
+src_install() { |
566 |
+ # install plugins |
567 |
+ cd "${WORKDIR}"/plugins || die |
568 |
+ emake \ |
569 |
+ PLUGINDIR="${ED}/usr/$(get_libdir)/${PN}/plugins" \ |
570 |
+ distrib |
571 |
+ |
572 |
+ # install vmd |
573 |
+ cd "${S}"/src || die |
574 |
+ emake install |
575 |
+ |
576 |
+ # install docs |
577 |
+ cd "${S}" || die |
578 |
+ dodoc Announcement README doc/ig.pdf doc/ug.pdf |
579 |
+ |
580 |
+ # remove some of the things we don't want and need in |
581 |
+ # /usr/lib |
582 |
+ cd "${ED}"/usr/$(get_libdir)/vmd || die |
583 |
+ rm -fr doc README Announcement LICENSE || \ |
584 |
+ die "failed to clean up /usr/lib/vmd directory" |
585 |
+ |
586 |
+ # adjust path in vmd wrapper |
587 |
+ sed \ |
588 |
+ -e "s:${ED}::" -i "${ED}"/usr/bin/${PN} \ |
589 |
+ -e "/^defaultvmddir/s:^.*$:defaultvmddir=\"${EPREFIX}/usr/$(get_libdir)/${PN}\":g" \ |
590 |
+ || die "failed to set up vmd wrapper script" |
591 |
+ |
592 |
+ # install icon and generate desktop entry |
593 |
+ insinto /usr/share/pixmaps |
594 |
+ doins "${WORKDIR}"/vmd.png |
595 |
+ eprefixify "${WORKDIR}"/vmd.desktop |
596 |
+ sed -i '/^Path/d' "${WORKDIR}"/vmd.desktop || die |
597 |
+ # Open PDB files with VMD |
598 |
+ echo "MimeType=chemical/x-pdb;" >> "${WORKDIR}"/vmd.desktop || die |
599 |
+ domenu "${WORKDIR}"/vmd.desktop |
600 |
+} |