BLD Add DISTDIR variable. ### Description

Adds `DISTDIR` env variable that points to the directory where libraries should be copied to when building shared libraries with recipe.

### Checklists

- [x] Add new / update outdated documentation

package:
  name: libheif
  version: 1.12.0

source:
  url: https://github.com/strukturag/libheif/releases/download/v1.12.0/libheif-1.12.0.tar.gz
  sha256: e1ac2abb354fdc8ccdca71363ebad7503ad731c84022cf460837f0839e171718

requirements:
  host:
    - libde265

build:
  type: shared_library
  script: |
    # Build options are adapted from https://github.com/strukturag/libheif/blob/v1.12.0/build-emscripten.sh
    # heif_emscripten.h is for building js APIs, but we don't want them.
    sed -i 's@#include "heif_emscripten.h"@@' libheif/heif.cc
    emcmake cmake \
      -DCMAKE_CXX_FLAGS="-fPIC" \
      -DCMAKE_INSTALL_PREFIX=${WASM_LIBRARY_DIR} \
      -DWITH_EXAMPLES=OFF \
      -DBUILD_SHARED_LIBS=ON \
      -DLIBDE265_INCLUDE_DIR=${WASM_LIBRARY_DIR}/include \
      -DLIBDE265_LIBRARY=${WASM_LIBRARY_DIR}/lib/libde265.a \
      ./

    emmake make -j ${PYODIDE_JOBS:-3}
    emmake make install
    mkdir -p dist
    cp ${WASM_LIBRARY_DIR}/lib/libheif.so dist/

package:
  name: libheif
  version: 1.12.0

source:
  url: https://github.com/strukturag/libheif/releases/download/v1.12.0/libheif-1.12.0.tar.gz
  sha256: e1ac2abb354fdc8ccdca71363ebad7503ad731c84022cf460837f0839e171718

requirements:
  host:
    - libde265

build:
  type: shared_library
  script: |
    # Build options are adapted from https://github.com/strukturag/libheif/blob/v1.12.0/build-emscripten.sh
    # heif_emscripten.h is for building js APIs, but we don't want them.
    sed -i 's@#include "heif_emscripten.h"@@' libheif/heif.cc
    emcmake cmake \
      -DCMAKE_CXX_FLAGS="-fPIC" \
      -DCMAKE_INSTALL_PREFIX=${WASM_LIBRARY_DIR} \
      -DWITH_EXAMPLES=OFF \
      -DBUILD_SHARED_LIBS=ON \
      -DLIBDE265_INCLUDE_DIR=${WASM_LIBRARY_DIR}/include \
      -DLIBDE265_LIBRARY=${WASM_LIBRARY_DIR}/lib/libde265.a \
      ./

    emmake make -j ${PYODIDE_JOBS:-3}
    emmake make install
    cp ${WASM_LIBRARY_DIR}/lib/libheif.so ${DISTDIR}
