Run core tests in Safari. Partially addresses https://github.com/pyodide/pyodide/issues/989

It runs, but there are several test failures, I'll open separate issues about those.
package:
  name: opencv-python
  version: 4.6.0.66
  top-level:
    - cv2
about:
  home: https://github.com/skvark/opencv-python
  PyPI: https://pypi.org/project/opencv-python
  summary: Wrapper package for OpenCV python bindings.
  license: MIT
source:
  url: https://files.pythonhosted.org/packages/7a/1c/e57fe138615c29b8d1442009057dd420c58d4773cb16112e914c9e7b47d8/opencv-python-4.6.0.66.tar.gz
  sha256: c5bfae41ad4031e66bb10ec4a0a2ffd3e514d092652781e8b1ac98d1b59f1158
  extras:
    - [cmake/OpenCVFindLibsGrfmt.cmake, opencv/cmake/OpenCVFindLibsGrfmt.cmake]
    - [
        cmake/detect_ffmpeg.cmake,
        opencv/modules/videoio/cmake/detect_ffmpeg.cmake,
      ]
  patches:
    - patches/0001-Enable-file-system.patch

requirements:
  run:
    - numpy
  host:
    - ffmpeg
    - libwebp
    - libtiff
build:
  # RELOCATABLE flag is required because if affects how emscripten build ports.
  cxxflags: |
    -s RELOCATABLE=1
    -s USE_ZLIB=1
    -s USE_LIBJPEG=1
    -s USE_LIBPNG=1
  ldflags: |
    -ljpeg
    -lz
    -lpng

  # Note on CMAKE_ARGS:
  #   CMake args are adopted from OpenCV.js (https://github.com/opencv/opencv/blob/4.x/platforms/js/build_js.py)
  #   But we support more of modules than OpenCV.js.
  #
  # Note on CMAKE_TOOLCHAIN_FILE:
  #   We don't want to use toolchain file provided by Emscripten,
  #   because our build script hijack gcc, c++, ... and replace it with emcc, em++, ..., instead of calling them directly.
  #
  # List of OpenCV modules can be found at: https://docs.opencv.org/4.x/
  # Build configs can be found at: https://docs.opencv.org/4.x/db/d05/tutorial_config_reference.html

  script: |
    # export VERBOSE=1

    export NUMPY_INCLUDE_DIR="$HOSTINSTALLDIR/lib/python$PYMAJOR.$PYMINOR/site-packages/numpy/core/include/"
    export EMSCRIPTEN="$PYODIDE_ROOT/emsdk/emsdk/upstream/emscripten/"
    export FFMPEG_ROOT="$WASM_LIBRARY_DIR"

    source $PYODIDE_ROOT/packages/opencv-python/cmake/build_args.sh

package:
  name: opencv-python
  version: 4.6.0.66
  top-level:
    - cv2
about:
  home: https://github.com/skvark/opencv-python
  PyPI: https://pypi.org/project/opencv-python
  summary: Wrapper package for OpenCV python bindings.
  license: MIT
source:
  url: https://files.pythonhosted.org/packages/7a/1c/e57fe138615c29b8d1442009057dd420c58d4773cb16112e914c9e7b47d8/opencv-python-4.6.0.66.tar.gz
  sha256: c5bfae41ad4031e66bb10ec4a0a2ffd3e514d092652781e8b1ac98d1b59f1158
  extras:
    - [cmake/OpenCVFindLibsGrfmt.cmake, opencv/cmake/OpenCVFindLibsGrfmt.cmake]
    - [
        cmake/detect_ffmpeg.cmake,
        opencv/modules/videoio/cmake/detect_ffmpeg.cmake,
      ]
  patches:
    - patches/0001-Enable-file-system.patch

requirements:
  run:
    - numpy
  host:
    - ffmpeg
    - libwebp
    - libtiff
build:
  # RELOCATABLE flag is required because if affects how emscripten build ports.
  cxxflags: |
    -s RELOCATABLE=1
    -s USE_ZLIB=1
    -s USE_LIBJPEG=1
    -s USE_LIBPNG=1
  ldflags: |
    -ljpeg
    -lz
    -lpng

  # Note on CMAKE_ARGS:
  #   CMake args are adopted from OpenCV.js (https://github.com/opencv/opencv/blob/4.x/platforms/js/build_js.py)
  #   But we support more of modules than OpenCV.js.
  #
  # Note on CMAKE_TOOLCHAIN_FILE:
  #   We don't want to use toolchain file provided by Emscripten,
  #   because our build script hijack gcc, c++, ... and replace it with emcc, em++, ..., instead of calling them directly.
  #
  # List of OpenCV modules can be found at: https://docs.opencv.org/4.x/
  # Build configs can be found at: https://docs.opencv.org/4.x/db/d05/tutorial_config_reference.html

  script: |
    # export VERBOSE=1

    export NUMPY_INCLUDE_DIR="$HOSTINSTALLDIR/lib/python$PYMAJOR.$PYMINOR/site-packages/numpy/core/include/"
    export EMSCRIPTEN="$PYODIDE_ROOT/emsdk/emsdk/upstream/emscripten/"
    export FFMPEG_ROOT="$WASM_LIBRARY_DIR"

    source $PYODIDE_ROOT/packages/opencv-python/cmake/build_args.sh
