export CONDA_BUILD="1"
export PYTHONNOUSERSITE="1"
export CONDA_DEFAULT_ENV="/opt/anaconda1anaconda2anaconda3"
export ARCH="64"
export PREFIX="/opt/anaconda1anaconda2anaconda3"
export BUILD_PREFIX="/opt/anaconda1anaconda2anaconda3"
export SYS_PREFIX="/Users/distiller/project/miniconda"
export SYS_PYTHON="/Users/distiller/project/miniconda/bin/python"
export SUBDIR="osx-64"
export SRC_DIR="/Users/distiller/project/miniconda/conda-bld/mummer_1546614311804/work"
export ROOT="/Users/distiller/project/miniconda"
export CONDA_PY="35"
export PY3K="1"
export PY_VER="3.5"
export STDLIB_DIR="/opt/anaconda1anaconda2anaconda3/lib/python3.5"
export SP_DIR="/opt/anaconda1anaconda2anaconda3/lib/python3.5/site-packages"
export NPY_VER="1.9"
export CONDA_NPY="19"
export NPY_DISTUTILS_APPEND_FLAGS="1"
export PERL_VER="5.26"
export CONDA_PERL="5.26"
export LUA_VER="5"
export CONDA_LUA="5"
export R_VER="3.5.1"
export CONDA_R="3.5.1"
export PKG_NAME="mummer"
export PKG_VERSION="3.23"
export PKG_BUILDNUM="8"
export PKG_BUILD_STRING="placeholder"
export PKG_HASH="1234567"
export RECIPE_DIR="/Users/distiller/project/recipes/mummer"
export CPU_COUNT="4"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export SHLIB_EXT=".dylib"
export PATH="/opt/anaconda1anaconda2anaconda3:/opt/anaconda1anaconda2anaconda3/bin:/Users/distiller/project/miniconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export HOME="UNKNOWN"
export PKG_CONFIG_PATH="/opt/anaconda1anaconda2anaconda3/lib/pkgconfig"
export CMAKE_GENERATOR="Unix Makefiles"
export OSX_ARCH="x86_64"
export MACOSX_DEPLOYMENT_TARGET="10.9"
export BUILD="x86_64-apple-darwin13.4.0"
export r_base="3.5.1"
export cpu_optimization_target="nocona"
export cran_mirror="https://cran.r-project.org"
export target_platform="osx-64"
export c_compiler="toolchain_c"
export cxx_compiler="toolchain_cxx"
export fortran_compiler="toolchain_fort"
export blas_impl="openblas"
export go_compiler="go"
export macos_min_version="10.9"
export macos_machine="x86_64-apple-darwin13.4.0"
export mpi="mpich"
export VERBOSE_AT="V=1"
export VERBOSE_CM="VERBOSE=1"
export channel_sources="conda-forge,defaults"
export channel_targets="conda-forge main"
export arpack="3.5"
export boost="1.67.0"
export boost_cpp="1.67.0"
export bzip2="1"
export cairo="1.14"
export curl="7.59"
export dbus="1"
export expat="2.2"
export ffmpeg="4.0"
export flann="1.9.1"
export fontconfig="2.13"
export freetype="2.9.1"
export gf2x="1.2"
export gsl="2.2"
export gstreamer="1.14.0"
export gst_plugins_base="1.14.0"
export gdal="2.2"
export geos="3.6.2"
export giflib="5.1"
export glew="2.0.0"
export glib="2.56"
export glpk="4.65"
export gmp="6"
export graphviz="2.38.0"
export harfbuzz="1"
export hdf4="4.2"
export hdf5="1.10.3"
export icu="58"
export isl="0.19"
export jasper="1.900.1"
export jpeg="9"
export json_c="0.12"
export jsoncpp="1.8.1"
export kealib="1.4.9"
export krb5="1.16"
export libblitz="0.10"
export libdap4="3.19"
export libevent="2.0.22"
export libffi="3.2"
export libgdal="2.2"
export libiconv="1.15"
export libkml="1.3"
export libmatio="1.5"
export libnetcdf="4.6"
export libpcap="1.8"
export libpng="1.6.34"
export libprotobuf="3.5"
export librdkafka="0.9.4"
export libsecret="0.18"
export libssh2="1.8"
export libsvm="3.21"
export libtiff="4.0.9"
export libunwind="1.2"
export libwebp="0.5"
export libxml2="2.9"
export libuuid="2.32.1"
export lz4_c="1.8.1"
export lzo="2"
export metis="5.1"
export mkl="2018"
export mpfr="4"
export ncurses="6.1"
export netcdf_cxx4="4.3"
export netcdf_fortran="4.4"
export nettle="3.3"
export ntl="10.3.0"
export occt="7.3"
export openblas="0.2.20"
export openjpeg="2.3"
export openssl="1.0.2"
export openturns="1.11"
export pango="1.40"
export pixman="0.34"
export poppler="0.67"
export proj4="4.9.3"
export readline="7.0"
export snappy="1.1.7"
export sox="14.4.2"
export sqlite="3"
export sundials="2.7"
export tk="8.6"
export vlfeat="0.9.20"
export vtk="8.1.1"
export x264="1!152.*"
export xerces_c="3.2.0"
export xz="5.2"
export zeromq="4.2.5"
export zlib="1.2"
export zstd="1.3.3"
export htslib="1.9"
export bamtools="2.4.1"
export libdeflate="1.0"
export ignore_build_only_deps="python"
export pin_run_as_build="OrderedDict([('python', OrderedDict([('min_pin', 'x.x'), ('max_pin', 'x.x')])), ('r-base', {'max_pin': 'x.x.x'}), ('arpack', {'max_pin': 'x.x'}), ('boost', {'max_pin': 'x.x.x'}), ('boost-cpp', {'max_pin': 'x.x.x'}), ('bzip2', {'max_pin': 'x'}), ('cairo', {'max_pin': 'x.x'}), ('curl', {'max_pin': 'x'}), ('dbus', {'max_pin': 'x'}), ('expat', {'max_pin': 'x.x'}), ('ffmpeg', {'max_pin': 'x.x'}), ('flann', {'max_pin': 'x.x.x'}), ('fontconfig', {'max_pin': 'x'}), ('freetype', {'max_pin': 'x'}), ('gsl', {'max_pin': 'x.x'}), ('gstreamer', {'max_pin': 'x.x'}), ('gst-plugins-base', {'max_pin': 'x.x'}), ('gdal', {'max_pin': 'x.x'}), ('geos', {'max_pin': 'x.x.x'}), ('giflib', {'max_pin': 'x.x'}), ('glew', {'max_pin': 'x.x'}), ('glib', {'max_pin': 'x.x'}), ('glpk', {'max_pin': 'x.x'}), ('gmp', {'max_pin': 'x'}), ('graphviz', {'max_pin': 'x'}), ('harfbuzz', {'max_pin': 'x'}), ('hdf4', {'max_pin': 'x.x'}), ('hdf5', {'max_pin': 'x.x.x'}), ('icu', {'max_pin': 'x'}), ('isl', {'max_pin': 'x.x'}), ('jasper', {'max_pin': 'x'}), ('jpeg', {'max_pin': 'x'}), ('json-c', {'max_pin': 'x.x'}), ('jsoncpp', {'max_pin': 'x.x.x'}), ('kealib', {'max_pin': 'x.x'}), ('krb5', {'max_pin': 'x.x'}), ('libblitz', {'max_pin': 'x.x'}), ('libdap4', {'max_pin': 'x.x'}), ('libevent', {'max_pin': 'x.x.x'}), ('libffi', {'max_pin': 'x.x'}), ('libgdal', {'max_pin': 'x.x'}), ('libiconv', {'max_pin': 'x.x'}), ('libkml', {'max_pin': 'x.x'}), ('libmatio', {'max_pin': 'x.x'}), ('libnetcdf', {'max_pin': 'x.x'}), ('libpcap', {'max_pin': 'x.x'}), ('libpng', {'max_pin': 'x.x'}), ('libprotobuf', {'max_pin': 'x.x'}), ('librdkafka', {'max_pin': 'x.x.x'}), ('libssh2', {'max_pin': 'x.x'}), ('libsvm', {'max_pin': 'x.x'}), ('libunwind', {'max_pin': 'x.x'}), ('libtiff', {'max_pin': 'x'}), ('libwebp', {'max_pin': 'x.x'}), ('libxml2', {'max_pin': 'x.x'}), ('libuuid', {'max_pin': 'x'}), ('lz4-c', {'max_pin': 'x.x.x'}), ('lzo', {'max_pin': 'x'}), ('metis', {'max_pin': 'x.x'}), ('mkl', {'max_pin': 'x'}), ('mpfr', {'max_pin': 'x'}), ('ncurses', {'max_pin': 'x.x'}), ('netcdf-cxx4', {'max_pin': 'x.x'}), ('netcdf-fortran', {'max_pin': 'x.x'}), ('nettle', {'max_pin': 'x.x'}), ('occt', {'max_pin': 'x.x'}), ('openblas', {'max_pin': 'x.x.x'}), ('openturns', {'max_pin': 'x.x'}), ('openjpeg', {'max_pin': 'x.x'}), ('openssl', {'max_pin': 'x.x.x'}), ('pango', {'max_pin': 'x.x'}), ('perl', {'max_pin': 'x.x.x'}), ('pixman', {'max_pin': 'x.x'}), ('poppler', {'max_pin': 'x.x'}), ('proj4', {'max_pin': 'x.x.x'}), ('pyqt', {'max_pin': 'x.x'}), ('qt', {'max_pin': 'x.x'}), ('readline', {'max_pin': 'x'}), ('snappy', {'max_pin': 'x.x.x'}), ('sox', {'max_pin': 'x.x.x'}), ('sqlite', {'max_pin': 'x'}), ('sundials', {'max_pin': 'x.x'}), ('tk', {'max_pin': 'x.x'}), ('vc', {'max_pin': 'x'}), ('vlfeat', {'max_pin': 'x.x.x'}), ('vtk', {'max_pin': 'x.x.x'}), ('xerces-c', {'max_pin': 'x.x.x'}), ('xz', {'max_pin': 'x.x'}), ('zeromq', {'max_pin': 'x.x'}), ('zlib', {'max_pin': 'x.x'}), ('zstd', {'max_pin': 'x.x.x'}), ('htslib', {'max_pin': 'x.x'}), ('bamtools', {'max_pin': 'x.x.x'}), ('libdeflate', {'max_pin': 'x.x'})])"
export pyqt="5.6"
export qt="5.6"
export zip_keys="[['pyqt', 'qt'], ['python']]"
export CONDA_BUILD_STATE="BUILD"
export PIP_IGNORE_INSTALLED="True"
export PIP_CACHE_DIR="/Users/distiller/project/miniconda/conda-bld/mummer_1546614311804/pip_cache"
source "/Users/distiller/project/miniconda/bin/activate" "/opt/anaconda1anaconda2anaconda3"
#!/bin/bash

BINARY=mummer
BINARY_HOME=$PREFIX/bin
MUMMER_HOME=$PREFIX/opt/mummer-$PKG_VERSION

mkdir -p $BINARY_HOME
mkdir -p $MUMMER_HOME

# cd to location of Makefile and source
cp -R $SRC_DIR/* $MUMMER_HOME

cd $MUMMER_HOME

make

binaries="\
combineMUMs \
delta-filter \
dnadiff \
exact-tandems \
mapview \
mgaps \
mummer \
mummerplot \
nucmer \
promer \
repeat-match \
run-mummer1 \
run-mummer3 \
show-aligns \
show-coords \
show-diff \
show-snps \
show-tiling \
"

# patch defined(%hash) out
# https://github.com/bioconda/bioconda-recipes/issues/1254

perl -i -pe 's/defined \(%/\(%/' mummerplot

#Fix escaping symbol @ included in the path to the library (mainly for conda virtual env with galaxy)
for i in exact-tandems dnadiff mapview mummerplot nucmer promer run-mummer1 run-mummer3; do
  perl -i -pe 's/(envs\/\_\_.*)(\K\@)/\\@/' $i
done

for i in $binaries; do 
  chmod +x $MUMMER_HOME/$i
  ln -s "$MUMMER_HOME/$i" "$BINARY_HOME/$i"
done
