comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/mummer-3.23/conda_build.sh @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 69:33d812a61356
1 if [ -z ${CONDA_BUILD+x} ]; then
2 source /opt/conda/conda-bld/mummer_1734020773944/work/build_env_setup.sh
3 fi
4 #!/bin/bash
5
6 set -xe
7
8 BINARY=mummer
9 BINARY_HOME=$PREFIX/bin
10 MUMMER_HOME=$PREFIX/opt/mummer-$PKG_VERSION
11
12 mkdir -p $BINARY_HOME
13 mkdir -p $MUMMER_HOME
14
15 # cd to location of Makefile and source
16 cp -R $SRC_DIR/* $MUMMER_HOME
17
18 cd $MUMMER_HOME
19
20 # One of the Makefiles references a shell script not in the path
21 export PATH="$PATH:."
22 make CC=$CC CXX=$CXX CPPFLAGS="-O3 -DSIXTYFOURBITS"
23
24 binaries="\
25 combineMUMs \
26 delta-filter \
27 dnadiff \
28 exact-tandems \
29 mapview \
30 mgaps \
31 mummer \
32 mummerplot \
33 nucmer \
34 promer \
35 repeat-match \
36 run-mummer1 \
37 run-mummer3 \
38 show-aligns \
39 show-coords \
40 show-diff \
41 show-snps \
42 show-tiling \
43 "
44
45 # patch defined(%hash) out
46 # https://github.com/bioconda/bioconda-recipes/issues/1254
47
48 perl -i -pe 's/defined \(%/\(%/' mummerplot
49
50 #Fix escaping symbol @ included in the path to the library (mainly for conda virtual env with galaxy)
51 for i in exact-tandems dnadiff mapview mummerplot nucmer promer run-mummer1 run-mummer3; do
52 perl -i -pe 's/(envs\/\_\_.*)(\K\@)/\\@/' $i
53 done
54
55 # fix hashbang lines to use conda's perl
56 for i in dnadiff mapview mummerplot nucmer promer; do
57 sed -i.bak '1 s|^#!/.*/perl -w$|#!/usr/bin/env perl|g' $MUMMER_HOME/$i
58 rm -rf $MUMMER_HOME/$i.bak
59 done
60
61 for i in $binaries; do
62 # ensure executable and setup symlink for binary
63 chmod +x $MUMMER_HOME/$i
64 ln -s "$MUMMER_HOME/$i" "$BINARY_HOME/$i"
65 done
66
67 # clean up
68 find $MUMMER_HOME -name *.o -exec rm -f {} \;