Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build strelka on osx
Browse files Browse the repository at this point in the history
mencian committed Nov 19, 2024
1 parent 093e4cc commit 35593f1
Showing 3 changed files with 85 additions and 23 deletions.
24 changes: 24 additions & 0 deletions recipes/strelka/boost.cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/src/cmake/boost.cmake b/src/cmake/boost.cmake
index 9b65798..9420db7 100644
--- a/src/cmake/boost.cmake
+++ b/src/cmake/boost.cmake
@@ -44,7 +44,9 @@ macro (initBoostParams)
# for test, so we need two lists now:
set (THIS_BOOST_BUILD_COMPONENTS date_time filesystem program_options
serialization system timer chrono test)
- set (Boost_USE_STATIC_LIBS ON)
+ set( Boost_USE_STATIC_LIBS OFF )
+ set( Boost_USE_MULTITHREADED TRUE )
+ set( Boost_DEBUG ON )
if (NOT WIN32)
# bjam on windows ignores this setting so skip for win32:
set (Boost_USE_MULTITHREADED OFF)
@@ -108,6 +110,8 @@ endif ()
find_package(Boost ${THIS_BOOST_VERSION})
if (Boost_FOUND)
find_package(Boost ${THIS_BOOST_VERSION} COMPONENTS ${THIS_BOOST_COMPONENTS} QUIET)
+ include_directories(${Boost_INCLUDE_DIRS})
+ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
endif ()

# CMAKE_PARALLEL is only used if boost is found, but moving the setting here (outside of the if below) supresses a cmake warning:
36 changes: 27 additions & 9 deletions recipes/strelka/build.sh
Original file line number Diff line number Diff line change
@@ -5,12 +5,30 @@ outdir=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM
mkdir -p $outdir
mkdir -p $PREFIX/bin

cp -r bin lib libexec share $outdir
sed -i.bak \
-e "s~scriptDir=.*~scriptDir='$outdir/bin'~" \
-e "s~workflowDir=.*~workflowDir='$outdir/lib/python'~" \
$outdir/bin/configure*.py
sed -i.bak \
-e "s~scriptDir=.*~scriptDir='$outdir/bin'~" \
$outdir/bin/run*.bash
ln -s $outdir/bin/config*.py $outdir/bin/run*.bash $PREFIX/bin
export INCLUDES="-I${PREFIX}/include"
export LIBPATH="-L${PREFIX}/lib"
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib"
export CXXFLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include"

if [[ `uname` == "Darwin" ]]; then
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER"
else
export CONFIG_ARGS=""
fi

cmake -S . -B build -DCMAKE_INSTALL_PREFIX="${outdir}" \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DCMAKE_C_COMPILER="${CC}" \
-DBOOST_ROOT="${PREFIX}" "${CONFIG_ARGS}"

cmake --build build --target install -j "${CPU_COUNT}" -v

#cp -r bin lib libexec share $outdir
#sed -i.bak \
# -e "s~scriptDir=.*~scriptDir='$outdir/bin'~" \
# -e "s~workflowDir=.*~workflowDir='$outdir/lib/python'~" \
# $outdir/bin/configure*.py
#sed -i.bak \
# -e "s~scriptDir=.*~scriptDir='$outdir/bin'~" \
# $outdir/bin/run*.bash
ln -sf $outdir/bin/config*.py $outdir/bin/run*.bash $PREFIX/bin
48 changes: 34 additions & 14 deletions recipes/strelka/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,55 @@
{% set name = "strelka" %}
{% set version = "2.9.10" %}
{% set sha256 = "bde30e34e06548c876ff63658efd3d7e6a2e7b465909243ab7e2ed599f83312b" %}
{% set sha256 = "45e78efec6e5272697f1d0a95851c7ae0d623dc8f93846e11fe37f15da9f1e30" %}

package:
name: strelka
version: '{{ version }}'
name: {{ name }}
version: {{ version }}

source:
url: https://github.com/Illumina/strelka/releases/download/v{{ version }}/strelka-{{ version }}.centos6_x86_64.tar.bz2
sha256: '{{ sha256 }}'
url: https://github.com/Illumina/strelka/releases/download/v{{ version }}/{{ name }}-{{ version }}.release_src.tar.bz2
sha256: {{ sha256 }}
patches:
- boost.cmake.patch

build:
number: 1
skip: true # [osx]
number: 2
run_exports:
- {{ pin_subpackage('strelka', max_pin="x") }}

requirements:
build:
- {{ compiler('cxx') }}
- cmake
- make
host:
- doxygen
- boost-cpp
- zlib
run:
- python 2.7.*
- python <3
- boost-cpp

test:
commands:
- configureStrelkaGermlineWorkflow.py -h
- configureStrelkaSomaticWorkflow.py -h

about:
home: https://github.com/Illumina/strelka
license: GPL-3.0
license_family: GPL
summary: Strelka calls somatic and germline small variants from mapped sequencing reads
home: "https://github.com/Illumina/strelka"
license: "GPL-3.0-or-later"
license_family: GPL3
license_file: "LICENSE.txt"
summary: "Strelka calls somatic and germline small variants from mapped sequencing reads."
dev_url: "https://github.com/Illumina/strelka"
doc_url: "https://github.com/Illumina/strelka/blob/v2.9.x/docs/userGuide/README.md"

extra:
identifiers:
- biotools:strelka
skip-lints:
- should_be_noarch_generic
- usegalaxy-eu:strelka_germline
- usegalaxy-eu:strelka_somatic
- doi:10.1038/s41592-018-0051-x
additional-platforms:
- linux-aarch64
- osx-arm64

0 comments on commit 35593f1

Please sign in to comment.