I would like that gentoo has support for AV1 Image File Format (AVIF). It is a new image format which I use already because it is much better than traditional JPG. Netflix wrote about this format too: https://netflixtechblog.com/avif-for-next-generation-image-coding-b1d75675fe4 There is a libavif available to handle AVIF format: https://github.com/AOMediaCodec/libavif I use libavif in my open-source programs (like https://www.reddit.com/r/AV1/comments/f9wuw5/avif_support_for_qt_based_applications/ ) and I also use gentoo (since 2005). The git master of media-gfx/darktable already uses libavif, so adding package like media-libs/libavif will be needed sooner or later. Would it be acceptable to add libavif to gentoo? libavif itself is a portable C code but it has optional dependencies. It is necessary to choose at least one of them during build time. libavif can optionally use: media-libs/libaom (but it has to be enough fresh snapshot from git at least v1.0.0-errata1-avif) media-libs/dav1d media-video/rav1e or libgav1 (not in portage yet, https://chromium.googlesource.com/codecs/libgav1/ ) On my computer I typically configure libavif to use media-libs/libaom-9999 only (as libaom has both AV1 decoder and encoder, dav1d&libgav1 are only decoders, rav1e is only encoder). Other developers prefer to use combination of dav1d & rav1e. I observed that after upgrading media-libs/libaom-9999 I have to rebuild libavif so my programs continue to work correctly. I did not create any .ebuild yet
Created attachment 627480 [details] Initial version of ebuild I started to learn how to make ebuilds, attaching first version.
Created attachment 628038 [details] improved ebuild The new version of the ebuild provides following tools too: avifdec avifenc dav1d, libaom are optional use flags. At least one of them must be selected. libaom-1.0.0 is not good for AVIF. It should be one of the newer snapshots, at least 1.0.0-errata1-avif
Good start! CMAKE_ECLASS=cmake doesn't have an impact on anything. Remove it. src_install doesn't deviate from the default. So, you can exclude the function altogether. I'd move the libaom warning to either pkg_postinst() if it's a short emerge or pkg_pretend() if it's a long emerge. SRC_URI should make use of ${PV}. This will make it easy to version bump later.
Created attachment 628612 [details] This ebuild should work for future releases too Thank you for the feedback. I made few edits.
Created attachment 628614 [details] This ebuild should work for future releases too
Created attachment 629022 [details] Version bump
libavif can optionally use rav1e too (instead of libaom), but we need media-video/rav1e to install C API library first. See https://bugs.gentoo.org/701384
Created attachment 632704 [details] Ebuild using rav1e's C API media-video/rav1e now produce C API used by libavif, so this is new ebuild which is capable to optionally use the API.
Package was added to ::gentoo