jobextra/libheif/PKGBUILD

55 lines
1.9 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=libheif
pkgver=1.17.6
pkgrel=05
pkgdesc='An HEIF and AVIF file format decoder and encoder'
url='https://github.com/strukturag/libheif'
makedepends=(cmake dav1d ffmpeg gdk-pixbuf2 libjpeg libpng rav1e svt-av1)
depends=(aom gcc-libs glibc libde265 libwebp x265)
optdepends=('libjpeg: for heif-convert and heif-enc'
'libpng: for heif-convert and heif-enc'
'dav1d: dav1d encoder'
'ffmpeg: hardware decode'
'rav1e: rav1e encoder'
'svt-av1: svt-av1 encoder')
source=(https://github.com/strukturag/libheif/releases/download/v$pkgver/libheif-$pkgver.tar.gz
v1.17.6.patch::https://github.com/strukturag/libheif/commit/a911b26a902c5f89fee2dc20ac4dfaafcb8144ec.patch)
prepare() {
cd $pkgname-$pkgver
# patch -Np1 -i ../a911b26a902c5f89fee2dc20ac4dfaafcb8144ec.patch # fix build against svt-av1 2.0.0
patch -Np1 -i ../v1.17.6.patch # fix build against svt-av1 2.0.0
}
build() {
cmake -B build -S $pkgname-$pkgver \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_DAV1D=ON \
-DWITH_RAV1E=ON \
-DWITH_FFMPEG_DECODER=ON \
-DWITH_FFMPEG_DECODER_PLUGIN=ON \
-DWITH_SvtEnc=ON
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=(GPL3)
sha256sums=(8390baf4913eda0a183e132cec62b875fb2ef507ced5ddddc98dfd2f17780aee # libheif-1.17.6.tar.gz
53a7eeb0f0f1c9fb076a6f56c6753abf8e30cf625355c54e720cc028ae9c1ce9) # v1.17.6.patch
## 6741cc238f58a864207fc99dba8721cf3ac76fb25b9526aec14c4da7bd794011 libheif-1.17.6-05-x86_64.pkg.tar.lz