1 # Maintainer: Daniel Bermond <dbermond@archlinux.org>
6 pkgdesc='HEVC Test Model - the reference software for HEVC'
8 url='https://hevc.hhi.fraunhofer.de/'
11 makedepends=('cmake' 'lsb-release' 'openmp')
12 source=("https://vcgit.hhi.fraunhofer.de/jct-vc/HM/-/archive/HM-${pkgver}/HM-HM-${pkgver}.tar.bz2"
13 '010-hm-disable-werror.patch')
14 sha256sums=('3cff991240cc51af7855231d4ca6437ecf4453708c005c7eacf5a0d8e19aa506'
15 '26ed4fb40812ecfce04b1301dc159fb2a575ece22a3532fe991f72e0f4e9488a')
18 patch -d "HM-HM-${pkgver}" -Np1 -i "${srcdir}/010-hm-disable-werror.patch"
19 cp -a "HM-HM-${pkgver}"{,-highbit}
24 export CXXFLAGS+=' -Wp,-U_GLIBCXX_ASSERTIONS'
26 local -a _common_opts=(
27 '-DCMAKE_BUILD_TYPE:STRING=Release'
28 '-DCMAKE_INSTALL_PREFIX:PATH=/usr'
31 cmake -B build -S "HM-HM-${pkgver}" "$_common_opts" -DHIGH_BITDEPTH:BOOL='OFF'
34 cmake -B build-highbit -S "HM-HM-${pkgver}-highbit" "$_common_opts" -DHIGH_BITDEPTH:BOOL='ON'
40 while read -r -d '' _file
42 install -D -m755 "$_file" -t "${pkgdir}/usr/bin"
43 done < <(find "HM-HM-${pkgver}/bin" -maxdepth 1 -type f -executable -print0)
45 while read -r -d '' _file
47 install -D -m755 "HM-HM-${pkgver}-highbit/bin/${_file}" \
48 "${pkgdir}/usr/bin/${_file/Static/HighBitDepthStatic}"
49 done < <(find "HM-HM-${pkgver}-highbit/bin" -maxdepth 1 -type f -executable -print0 |
50 sed -z "s|HM\-HM\-${pkgver}\-highbit/bin||")
52 mv "${pkgdir}/usr/bin"/{parcatStatic,hm-parcatStatic}
53 mv "${pkgdir}/usr/bin"/{parcatHighBitDepthStatic,hm-parcatHighBitDepthStatic}
54 install -D -m644 "HM-HM-${pkgver}/doc"/*.pdf -t "${pkgdir}/usr/share/doc/${pkgname}"
55 install -D -m644 "HM-HM-${pkgver}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"