Skip to content

Instantly share code, notes, and snippets.

@rubiojr
Last active August 13, 2024 14:15
Show Gist options
  • Save rubiojr/8999a2e2f398390b8c624a14933cebe4 to your computer and use it in GitHub Desktop.
Save rubiojr/8999a2e2f398390b8c624a14933cebe4 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
sudo dnf builddep libheif
git clone https://github.com/strukturag/libheif
mkdir libheif/build
cd libheif/build
cmake --preset=release ..
make
cd -
export PKG_CONFIG_PATH=$PWD/libheif/build
cat << 'EOF' > libheif/build/libheif.pc
prefix=.
exec_prefix=${prefix}
libdir=${exec_prefix}/libheif
includedir=${prefix}/../libheif/api
Name: libheif
Description: HEIF image codec.
URL: https://github.com/strukturag/libheif
Version: 1.18.2
Requires:
Requires.private: libsharpyuv zlib libbrotlidec
Libs: -L${libdir} -lheif
Libs.private: -lstdc++
Cflags: -I${includedir} -I${prefix}
EOF
CGO_ENABLED=1 go build
LD_LIBRARY_PATH=libheif/build/libheif ./timelinize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment