upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / hm / trunk / PKGBUILD
blobb3abbd0182721263ca820a13e54e9f1f02701194
1 # Maintainer: Daniel Bermond <dbermond@archlinux.org>
3 pkgname=hm
4 pkgver=17.0
5 pkgrel=1
6 pkgdesc='HEVC Test Model - the reference software for HEVC'
7 arch=('x86_64')
8 url='https://hevc.hhi.fraunhofer.de/'
9 license=('BSD')
10 depends=('gcc-libs')
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')
17 prepare() {
18     patch -d "HM-HM-${pkgver}" -Np1 -i "${srcdir}/010-hm-disable-werror.patch"
19     cp -a "HM-HM-${pkgver}"{,-highbit}
22 build() {
23     # fix kvazaar tests
24     export CXXFLAGS+=' -Wp,-U_GLIBCXX_ASSERTIONS'
25     
26     local -a _common_opts=(
27         '-DCMAKE_BUILD_TYPE:STRING=Release'
28         '-DCMAKE_INSTALL_PREFIX:PATH=/usr'
29         '-Wno-dev')
30     
31     cmake -B build -S "HM-HM-${pkgver}" "$_common_opts" -DHIGH_BITDEPTH:BOOL='OFF'
32     make -C build
33     
34     cmake -B build-highbit -S "HM-HM-${pkgver}-highbit" "$_common_opts" -DHIGH_BITDEPTH:BOOL='ON'
35     make -C build-highbit
38 package() {
39     local _file
40     while read -r -d '' _file
41     do
42         install -D -m755 "$_file" -t "${pkgdir}/usr/bin"
43     done < <(find "HM-HM-${pkgver}/bin" -maxdepth 1 -type f -executable -print0)
44     
45     while read -r -d '' _file
46     do
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||")
51     
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"