Skip to content

Commit

Permalink
Changes for arm
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias-Fischer committed Oct 24, 2020
1 parent 0d506c3 commit 340b5b8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions conda-forge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
provider:
win: azure
conda_forge_output_validation: true
provider: {linux_aarch64: default, linux_ppc64le: default}

12 changes: 11 additions & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

set +x
SHORT_OS_STR=$(uname -s)
MACHINE_STR=$(uname -m)

# CMake FindPNG seems to look in libpng not libpng16
# https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/FindPNG.cmake#L55
ln -s $PREFIX/include/libpng16 $PREFIX/include/libpng

QT="5"
V4L="1"
JASPER="1"

if [ "${SHORT_OS_STR:0:5}" == "Linux" ]; then
OPENMP="-DWITH_OPENMP=1"
# Looks like there's a bug in Opencv 3.2.0 for building with FFMPEG
Expand All @@ -34,6 +37,13 @@ if [ "${SHORT_OS_STR}" == "Darwin" ]; then
CPU_DISPATCH_FLAGS="-DCPU_DISPATCH=SSE4_1;SSE4_2;AVX;FP16"
fi

if [ "${MACHINE_STR}" == "aarch64" ] || [ "${MACHINE_STR:0:3}" == "arm" ] || [ "${MACHINE_STR:0:3}" == "ppc" ]; then
echo Building aarch or ppc
OPENMP="-DWITH_OPENMP=1"
QT="0"
JASPER="0"
fi

CMAKE_TOOLCHAIN_CMD_FLAGS=""
if [ "$c_compiler" = clang ]; then
CMAKE_TOOLCHAIN_CMD_FLAGS="${CMAKE_TOOLCHAIN_CMD_FLAGS} -DCMAKE_AR=${AR}"
Expand Down Expand Up @@ -118,7 +128,7 @@ cmake -LAH -G "Ninja" \
-DBUILD_PNG=0 \
-DBUILD_OPENEXR=1 \
-DBUILD_JASPER=0 \
-DWITH_JASPER=1 \
-DWITH_JASPER=$JASPER \
-DWITH_OPENJPEG=0 \
-DBUILD_JPEG=0 \
-DWITH_V4L=$V4L \
Expand Down
8 changes: 4 additions & 4 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ source:
sha256: 78884f64b564a3b06dc6ee731ed33b60c6d8cd864cea07f21d94ba0f90c7b310 # [unix]

build:
number: 0
number: 1
string: py{{ PY_VER_MAJOR }}{{ PY_VER_MINOR }}_{{ PKG_BUILDNUM }}
run_exports:
# https://abi-laboratory.pro/index.php?view=timeline&l=opencv
Expand Down Expand Up @@ -70,15 +70,15 @@ requirements:
- hdf5 # [unix]
- eigen 3.3.*
# Jasper pin https://github.com/conda-forge/conda-forge-pinning-feedstock/pull/659
- jasper # [not win]
- jasper # [not win and not aarch64 and not ppc64le]
- zlib
- jpeg
- libtiff
- libwebp
- harfbuzz # [unix]
- libpng
- ffmpeg # [not win]
- qt 5.12.1 # [not osx]
- qt 5.12.1 # [not osx and not aarch64 and not ppc64le]
- liblapacke
- freetype
- glib # [unix]
Expand All @@ -87,7 +87,7 @@ requirements:
- harfbuzz # [unix]
# Don't depend on python in the run section
# py-opencv will depend on python
- qt 5.12 # [not osx]
- qt 5.12 # [not osx and not aarch64 and not ppc64le]
# https://github.com/conda-forge/opencv-feedstock/issues/174
# Seems like the OSX ABI has changed between 2.9 and 2.10???
# That or a dependency wasn't merged in
Expand Down

0 comments on commit 340b5b8

Please sign in to comment.