Update Emscripten binary wheels to include Emscripten platform tags. More work split off from #2591.

### Checklists

- [x] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry


package:
  name: opencv-python
  version: 4.5.5.64
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/3c/61/ee4496192ed27f657532fdf0d814b05b9787e7fc5122ed3ca57282bae69c/opencv-python-4.5.5.64.tar.gz
  sha256: f65de0446a330c3b773cd04ba10345d8ce1b15dcac3f49770204e37602d0b3f7
  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
    - ffmpeg
    - libwebp
build:
  cxxflags: |
    -fPIC
    -s USE_ZLIB=1
    -s USE_LIBJPEG=1
    -s USE_LIBPNG=1
    -s SIDE_MODULE=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: |
    pip install scikit-build
    # TODO: remove this line after version update (https://github.com/opencv/opencv-python/issues/648)
    sed -i "s/cmake_install_dir=cmake_install_reldir/_cmake_install_dir=cmake_install_reldir/" setup.py

    # 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

test:
  imports:
    - cv2

package:
  name: opencv-python
  version: 4.5.5.64
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/3c/61/ee4496192ed27f657532fdf0d814b05b9787e7fc5122ed3ca57282bae69c/opencv-python-4.5.5.64.tar.gz
  sha256: f65de0446a330c3b773cd04ba10345d8ce1b15dcac3f49770204e37602d0b3f7
  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
    - ffmpeg
    - libwebp
build:
  cxxflags: |
    -fPIC
    -s USE_ZLIB=1
    -s USE_LIBJPEG=1
    -s USE_LIBPNG=1
    -s SIDE_MODULE=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: |
    pip install scikit-build
    # TODO: remove this line after version update (https://github.com/opencv/opencv-python/issues/648)
    sed -i "s/cmake_install_dir=cmake_install_reldir/_cmake_install_dir=cmake_install_reldir/" setup.py

    # 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

test:
  imports:
    - cv2
