-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Showing
6 changed files
with
274 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,25 @@ | ||
mkdir build_cli | ||
if errorlevel 1 exit 1 | ||
cd build_cli | ||
if errorlevel 1 exit 1 | ||
|
||
if %vc% LEQ 9 set MSVC_VER=1500 | ||
if %vc% GTR 9 set MSVC_VER=1900 | ||
|
||
if %vc% LEQ 9 set MSVC_TS_VER=90 | ||
if %vc% GTR 9 set MSVC_TS_VER=140 | ||
|
||
cmake -G "Ninja" ^ | ||
"%CMAKE_ARGS%" ^ | ||
-DMSVC_VERSION="%MSVC_VER%" ^ | ||
-DMSVC_TOOLSET_VERSION="%MSVC_TS_VER%" ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^ | ||
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ | ||
-DBUILD_SHARED_LIBS=ON ^ | ||
"%SRC_DIR%" | ||
|
||
if errorlevel 1 exit /b 1 | ||
|
||
cmake --build . -j %CPU_COUNT% --verbose --config Release | ||
if errorlevel 1 exit /b 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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir build | ||
cd build | ||
|
||
if [[ "$target_platform" == linux-* ]]; then | ||
export CXX_FLAGS="$CXX_FLAGS -lGL -lGLU" | ||
fi | ||
|
||
cmake $CMAKE_ARGS -GNinja \ | ||
-DCMAKE_BUILD_TYPE:STRING=Release \ | ||
-DCMAKE_INSTALL_PREFIX:STRING=$PREFIX \ | ||
-DCMAKE_CXX_FLAGS="$CXX_FLAGS" \ | ||
../src | ||
|
||
cmake --build . | ||
|
||
ctest --extra-verbose --output-on-failure . | ||
|
||
cmake --install . |
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,166 @@ | ||
# Note: there are many handy hints in comments in this example -- remove them when you've finalized your recipe | ||
# If your package is python based, we recommend using Grayskull to generate it instead: | ||
# https://github.com/conda-incubator/grayskull | ||
|
||
# Jinja variables help maintain the recipe as you'll update the version only here. | ||
# Using the name variable with the URL in line 16 is convenient | ||
# when copying and pasting from another recipe, but not really needed. | ||
{% set name = "connectome-workbench" %} | ||
{% set version = "2.0.0" %} | ||
|
||
package: | ||
name: {{ name }}-split | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://github.com/Washington-University/workbench/archive/v{{ version }}.tar.gz | ||
sha256: 2d5a2603a1acb4fabc2b66fab3a8257f05ccd1705cf7f39681be5ff86169dfcf | ||
patches: | ||
- patches/0001-Import-cstdint-into-libCZI.h.patch | ||
- patches/0001-Fix-unsafe-narrowing.patch | ||
|
||
build: | ||
number: 0 | ||
skip: true # [osx or win] | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('cxx') }} | ||
- {{ stdlib('c') }} | ||
- cmake >=3.0 | ||
- ninja | ||
- qwt | ||
# OpenMP | ||
- llvm-openmp # [osx] | ||
- libgomp # [linux] | ||
# libGL | ||
- {{ cdt('mesa-libgl-devel') }} # [linux] | ||
- {{ cdt('mesa-dri-drivers') }} # [linux] | ||
- {{ cdt('libxdamage') }} # [linux] | ||
- {{ cdt('libxxf86vm') }} # [linux] | ||
- {{ cdt('libxext') }} # [linux] | ||
host: | ||
- qt | ||
- openssl | ||
- libzlib | ||
- zlib | ||
- freetype | ||
- libglu # [linux] | ||
- glew # [windows] | ||
|
||
test: | ||
commands: | ||
- wb_view -help | ||
- wb_command -version | ||
- wb_shortcuts -help | ||
|
||
outputs: | ||
- name: {{ name }}-gui | ||
# build/host requirements should exactly match the root requirements | ||
requirements: | ||
build: | ||
- {{ compiler('cxx') }} | ||
- {{ stdlib('c') }} | ||
- cmake >=3.0 | ||
- ninja | ||
- qwt | ||
# OpenMP | ||
- llvm-openmp # [osx] | ||
- libgomp # [linux] | ||
# libGL | ||
- {{ cdt('mesa-libgl-devel') }} # [linux] | ||
- {{ cdt('mesa-dri-drivers') }} # [linux] | ||
- {{ cdt('libxdamage') }} # [linux] | ||
- {{ cdt('libxxf86vm') }} # [linux] | ||
- {{ cdt('libxext') }} # [linux] | ||
host: | ||
- qt | ||
- openssl | ||
- libzlib | ||
- zlib | ||
- freetype | ||
- libglu # [linux] | ||
- glew # [windows] | ||
run: | ||
- qt-main | ||
- libgl # [linux] | ||
- libglu # [linux] | ||
files: | ||
include: | ||
- bin/wb_view | ||
test: | ||
commands: | ||
- wb_view -help | ||
- name: {{ name }}-cli | ||
# build/host requirements should exactly match the root requirements | ||
requirements: | ||
build: | ||
- {{ compiler('cxx') }} | ||
- {{ stdlib('c') }} | ||
- cmake >=3.0 | ||
- ninja | ||
- qwt | ||
# OpenMP | ||
- llvm-openmp # [osx] | ||
- libgomp # [linux] | ||
# libGL | ||
- {{ cdt('mesa-libgl-devel') }} # [linux] | ||
- {{ cdt('mesa-dri-drivers') }} # [linux] | ||
- {{ cdt('libxdamage') }} # [linux] | ||
- {{ cdt('libxxf86vm') }} # [linux] | ||
- {{ cdt('libxext') }} # [linux] | ||
host: | ||
- qt | ||
- openssl | ||
- libzlib | ||
- zlib | ||
- freetype | ||
- libglu # [linux] | ||
- glew # [windows] | ||
run: | ||
- qt-main | ||
- libgl # [linux] | ||
- libglu # [linux] | ||
files: | ||
include: | ||
- bin/wb_command | ||
- bin/wb_shortcuts | ||
- share/bash-completion/completions/* | ||
test: | ||
commands: | ||
- wb_command -version | ||
- wb_shortcuts -help | ||
- name: {{ name }} | ||
requirements: | ||
run: | ||
- {{ pin_subpackage('connectome-workbench-cli', exact=True) }} | ||
- {{ pin_subpackage('connectome-workbench-gui', exact=True) }} | ||
test: | ||
commands: | ||
- wb_view -help | ||
- wb_command -version | ||
- wb_shortcuts -help | ||
|
||
about: | ||
home: https://www.humanconnectome.org/software/connectome-workbench | ||
summary: 'Neuroimaging utility for the Human Connectome Project' | ||
description: | | ||
Connectome Workbench is an open source, freely available visualization and discovery | ||
tool used to map neuroimaging data, especially data generated by the Human | ||
Connectome Project. | ||
license: GPL-2.0-only | ||
# Please also note that some projects have multiple license files which all need to be added using a valid yaml list. | ||
# See https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#license-file | ||
license_file: | ||
- LICENSE | ||
- src/CZIlib/LICENSE | ||
- src/QxtCore/LICENSE_qxt | ||
- src/kloewe/cpuinfo/LICENSE | ||
- src/kloewe/dot/LICENSE | ||
# The doc_url and dev_url are optional. | ||
doc_url: https://humanconnectome.org/software/workbench-command | ||
dev_url: https://github.com/Washington-University/workbench | ||
|
||
extra: | ||
recipe-maintainers: | ||
- effigies |
34 changes: 34 additions & 0 deletions
34
recipes/connectome-workbench/patches/0001-Fix-unsafe-narrowing.patch
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,34 @@ | ||
From cc3d4d74235978b136f637620032595cb388933b Mon Sep 17 00:00:00 2001 | ||
From: Chris Markiewicz <[email protected]> | ||
Date: Mon, 14 Oct 2024 13:49:05 -0400 | ||
Subject: [PATCH] Fix unsafe narrowing | ||
|
||
--- | ||
src/Algorithms/AlgorithmCiftiSeparate.cxx | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/Algorithms/AlgorithmCiftiSeparate.cxx b/src/Algorithms/AlgorithmCiftiSeparate.cxx | ||
index 9a64a262e..f49c04e73 100644 | ||
--- a/src/Algorithms/AlgorithmCiftiSeparate.cxx | ||
+++ b/src/Algorithms/AlgorithmCiftiSeparate.cxx | ||
@@ -654,7 +654,7 @@ void AlgorithmCiftiSeparate::getCroppedVolSpace(const CiftiFile* ciftiIn, const | ||
int64_t numVoxels = (int64_t)myMap.size(); | ||
if (numVoxels > 0) | ||
{//make a voxel bounding box to minimize memory usage | ||
- int extrema[6] = { myMap[0].m_ijk[0], | ||
+ int64_t extrema[6] = { myMap[0].m_ijk[0], | ||
myMap[0].m_ijk[0], | ||
myMap[0].m_ijk[1], | ||
myMap[0].m_ijk[1], | ||
@@ -699,7 +699,7 @@ void AlgorithmCiftiSeparate::getCroppedVolSpaceAll(const CiftiFile* ciftiIn, con | ||
int64_t numVoxels = (int64_t)myMap.size(); | ||
if (numVoxels > 0) | ||
{//make a voxel bounding box to minimize memory usage | ||
- int extrema[6] = { myMap[0].m_ijk[0], | ||
+ int64_t extrema[6] = { myMap[0].m_ijk[0], | ||
myMap[0].m_ijk[0], | ||
myMap[0].m_ijk[1], | ||
myMap[0].m_ijk[1], | ||
-- | ||
2.45.2 | ||
|
24 changes: 24 additions & 0 deletions
24
recipes/connectome-workbench/patches/0001-Import-cstdint-into-libCZI.h.patch
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,24 @@ | ||
From 28d007d44f4683ce430e8b29d184977ff488007c Mon Sep 17 00:00:00 2001 | ||
From: Chris Markiewicz <[email protected]> | ||
Date: Sun, 13 Oct 2024 11:29:03 -0400 | ||
Subject: [PATCH] Import cstdint into libCZI.h | ||
|
||
--- | ||
src/CZIlib/CZI/libCZI.h | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/src/CZIlib/CZI/libCZI.h b/src/CZIlib/CZI/libCZI.h | ||
index 7799f1aec..6a5c3e047 100644 | ||
--- a/src/CZIlib/CZI/libCZI.h | ||
+++ b/src/CZIlib/CZI/libCZI.h | ||
@@ -22,6 +22,7 @@ | ||
|
||
#pragma once | ||
|
||
+#include <cstdint> | ||
#include "ImportExport.h" | ||
|
||
#include "priv_guiddef.h" | ||
-- | ||
2.45.2 | ||
|
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,5 @@ | ||
mesa-libGL | ||
mesa-dri-drivers | ||
libXdamage | ||
libXxf86vm | ||
libXext |