diff -urN graphics/libheif.orig/Makefile graphics/libheif/Makefile --- graphics/libheif.orig/Makefile 2021-01-28 12:53:20.000000000 +0300 +++ graphics/libheif/Makefile 2021-01-28 14:18:46.221959000 +0300 @@ -24,17 +24,25 @@ USE_GITHUB= yes GH_ACCOUNT= strukturag -OPTIONS_DEFINE= AOM LIBDE265 X265 -OPTIONS_DEFAULT= AOM LIBDE265 X265 +OPTIONS_DEFINE= AOM DAV1D LIBDE265 RAV1E X265 +OPTIONS_DEFAULT= AOM DAV1D LIBDE265 X265 OPTIONS_SUB= yes AOM_DESC= AV1 encoding/decoding via libaom AOM_CMAKE_BOOL= WITH_AOM AOM_LIB_DEPENDS= libaom.so:multimedia/aom +DAV1D_DESC= AV1 encoding/decoding via dav1d +DAV1D_CMAKE_BOOL= WITH_DAV1D +DAV1D_LIB_DEPENDS= libdav1d.so:multimedia/dav1d + LIBDE265_DESC= Use libde265 (support for HEVC decoding) LIBDE265_CMAKE_BOOL= WITH_LIBDE265 LIBDE265_LIB_DEPENDS= libde265.so:multimedia/libde265 + +RAV1E_DESC= AV1 encoding/decoding via librav1e +RAV1E_CMAKE_BOOL= WITH_RAV1E +RAV1E_LIB_DEPENDS= librav1e.so:multimedia/librav1e X265_DESC= Use x265 (support for HEVC encoding) X265_CMAKE_BOOL= WITH_X265 diff -urN graphics/libheif.orig/files/patch-CMakeLists.txt graphics/libheif/files/patch-CMakeLists.txt --- graphics/libheif.orig/files/patch-CMakeLists.txt 1970-01-01 03:00:00.000000000 +0300 +++ graphics/libheif/files/patch-CMakeLists.txt 2021-01-28 15:07:49.029377000 +0300 @@ -0,0 +1,19 @@ +--- CMakeLists.txt.orig ++++ CMakeLists.txt +@@ -64,8 +64,14 @@ + if (WITH_AOM) + find_package(LibAOM) + endif() +-find_package(Rav1e) +-find_package(Dav1d) ++option(WITH_RAV1E "Build rav1e encoder" ON) ++if (WITH_RAV1E) ++ find_package(Rav1e) ++endif () ++option(WITH_DAV1D "Build dav1e decoder" ON) ++if (WITH_DAV1D) ++ find_package(Dav1d) ++endif () + + if (LIBDE265_FOUND) + message("HEIF decoder, libde265: found") diff -urN graphics/libheif.orig/pkg-descr graphics/libheif/pkg-descr --- graphics/libheif.orig/pkg-descr 2020-06-05 12:26:00.000000000 +0300 +++ graphics/libheif/pkg-descr 2021-01-28 14:16:13.093161000 +0300 @@ -1,10 +1,11 @@ -libheif is an ISO/IEC 23008-12:2017 HEIF file format decoder and encoder. - -HEIF is a new image file format employing HEVC (h.265) image coding for the -best compression ratios currently possible. - -libheif makes use of libde265 for the actual image decoding and x265 for -encoding. Alternative codecs for, e.g., AVC and JPEG can be provided as -plugins. +libheif is an ISO/IEC 23008-12:2017 HEIF and AVIF (AV1 Image File Format) +file format decoder and encoder. + +HEIF and AVIF are new image file formats employing HEVC (h.265) or AV1 +image coding, respectively, for the best compression ratios currently +possible. + +libheif makes use of libde265 for HEIF image decoding and x265 for +encoding. For AVIF, libaom, dav1d, or rav1e are used as codecs. WWW: https://github.com/strukturag/libheif