mirror of https://github.com/pyodide/pyodide.git
31 lines
954 B
YAML
31 lines
954 B
YAML
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}
|