summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 69ebc786ad9c52ebebe275aa2e7e12a089ddfa2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Abhiram Shibu <abhiramshibu1998@gmail.com>
# Contributor: Antonio Rojas <arojas@archlinux.org> 
# Contributor: Adam Fontenot <fontenot@ucla.edu>
pkgname=libheif-highmem
pkgver=1.19.5
pkgrel=1
pkgdesc='An HEIF and AVIF file format decoder and encoder with 1GB memory support'
arch=(x86_64)
url='https://github.com/strukturag/libheif'
license=(GPL3)
provides=('libheif' 'libheif.so')
replaces=('libheif')
conflicts=('libheif')
makedepends=(cmake
             dav1d
             ffmpeg
             gdk-pixbuf2
             git
             libjpeg-turbo
             libpng
             rav1e
             svt-av1)

depends=(aom
         gcc-libs
         glibc
         libde265
         libwebp
         x265)
optdepends=('libjpeg-turbo: 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=(git+https://github.com/strukturag/libheif#tag=v$pkgver)
sha256sums=('321c30e21eb2c28748df227b852916656b6bb9786e7c4cb4cfc6df29dfa73c0d')

build() {
  # Patch the memory limit
  mv "${srcdir}/libheif" "${srcdir}/${pkgname}"
  sed -i 's/.max_memory_block_size = 512 \* 1024 \* 1024,  \/\/ 512 MB/.max_memory_block_size = 1024 * 1024 * 1024,  \/\/ 1024 MB/' ${srcdir}/${pkgname}/libheif/security_limits.cc      
  cmake -B build -S $pkgname \
    -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
}