-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51df3ab
commit 663add1
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
echo "Building Minimac4 version ${PKG_VERSION}" | ||
|
||
# Set CXXFLAGS to include the correct path to lzma.h and LDFLAGS to include the path to liblzma | ||
export CXXFLAGS="-I${PREFIX}/include -I${PREFIX}/lib" | ||
export LDFLAGS="-L${PREFIX}/lib -llzma" | ||
CMAKE_MAKE_PROGRAM="$(which make)" | ||
CMAKE_C_COMPILER="${CC}" | ||
CMAKE_CXX_COMPILER="${CXX}" | ||
|
||
export CMAKE_MAKE_PROGRAM | ||
export CMAKE_C_COMPILER | ||
export CMAKE_CXX_COMPILER | ||
|
||
# Set up dependencies and directories | ||
if [ ! -f ./requirements.txt ]; then | ||
echo "Error: requirements.txt not found" | ||
exit 1 | ||
fi | ||
cget ignore xz || exit 1 | ||
cget install -f ./requirements.txt || exit 1 | ||
|
||
cmake --version | ||
mkdir -p build || exit 1 | ||
cd build || exit 1 | ||
|
||
cmake \ | ||
-DBUILD_TESTS=1 \ | ||
-DCMAKE_TOOLCHAIN_FILE=../cget/cget/cget.cmake \ | ||
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ | ||
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \ | ||
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} \ | ||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} \ | ||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=${PREFIX} \ | ||
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ | ||
-DCPACK_GENERATOR="STGZ" \ | ||
-DCPACK_PACKAGE_CONTACT="[email protected]" \ | ||
.. | ||
|
||
make || exit 1 | ||
make install || exit 1 | ||
make CTEST_OUTPUT_ON_FAILURE=1 test || exit 1 | ||
echo "Minimac4 installation completed successfully" | ||
|
||
cd .. || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{% set version = "4.1.6" %} | ||
|
||
package: | ||
name: minimac4 | ||
version: {{ version }} | ||
|
||
build: | ||
number: 0 | ||
run_exports: | ||
- {{ pin_subpackage('minimac4', max_pin='x.x.x') }} | ||
|
||
source: | ||
url: https://github.com/statgen/Minimac4/archive/refs/tags/v{{ version }}.tar.gz | ||
sha256: 0bce8d6edbf5d5d944b19c4e36403d0bc1d18f2d6003d88e01086488c3eb9333 | ||
|
||
requirements: | ||
build: | ||
- make | ||
- cmake >=3.24 | ||
- {{ compiler('c') }} | ||
- {{ compiler('cxx') }} | ||
- cget | ||
host: | ||
- bcftools >=1.20 | ||
- zlib | ||
- savvy ==2.1.0 | ||
- xz | ||
run: | ||
- cget | ||
|
||
test: | ||
commands: | ||
- minimac4 --help | ||
- minimac4 --version | ||
|
||
about: | ||
home: https://github.com/statgen/Minimac4 | ||
license: GPL-3.0-or-later | ||
license_file: LICENSE | ||
summary: "Computationally efficient genotype imputation" | ||
description: "Minimac4 is a lower memory and more computationally efficient implementation of the genotype imputation algorithms in minimac/mininac2/minimac3." |