# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=libheif pkgver=1.16.2 pkgrel=0 pkgdesc="ISO/IEC 23008-12:2017 HEIF file format decoder and encoder" url="https://www.libde265.org/" arch="all" license="LGPL-3.0-or-later" depends_dev=" libde265-dev x265-dev " makedepends=" $depends_dev aom-dev cmake libjpeg-turbo-dev libpng-dev gdk-pixbuf-dev samurai " options="!check" # no tests provided subpackages=" $pkgname-dev heif-thumbnailer $pkgname-tools $pkgname-doc $pkgname-pixbuf-loader " source="https://github.com/strukturag/libheif/releases/download/v$pkgver/libheif-$pkgver.tar.gz" # secfixes: # 1.5.0-r0: # - CVE-2019-11471 build() { # This is en/decoder, so performance matters more than size. export CPPFLAGS="${CFLAGS/-Os/-O2}" export CXXFLAGS="${CFLAGS/-Os/-O2} -flto=auto" cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_SKIP_INSTALL_RPATH=ON cmake --build build } package() { DESTDIR="$pkgdir" cmake --install build } thumbnailer() { pkgdesc="$pkgdesc (thumbnailer)" amove usr/bin/heif-thumbnailer } tools() { pkgdesc="$pkgdesc (tools)" depends="heif-thumbnailer=$pkgver-r$pkgrel" amove usr/bin } loader() { pkgdesc="$pkgdesc (pixbuf loader)" depends="heif-thumbnailer=$pkgver-r$pkgrel" install_if="$pkgname=$pkgver-r$pkgrel gdk-pixbuf-loaders" amove \ usr/lib/gdk-pixbuf-*/*/loaders \ usr/share/thumbnailers } sha512sums=" a9c377d66bd85f8a3809d9b8c7b26b8d06eef511b14b86ade9db1cd934f0cef8339eeb8290d605fad3e0f5a1e4f104439356c62f893559f8ada957ea21625313 libheif-1.16.2.tar.gz "