OCaml 4.14.0 rebuild
[arch-packages.git] / flac / trunk / PKGBUILD
blob26e55d49417365511d2235d935891f6013c28726
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Eric BĂ©langer <eric@archlinux.org>
4 pkgbase=flac
5 pkgname=('flac' 'flac-doc')
6 pkgver=1.3.4
7 pkgrel=3
8 pkgdesc='Free Lossless Audio Codec'
9 url='https://xiph.org/flac/'
10 arch=('x86_64')
11 license=('BSD' 'GPL')
12 depends=('gcc-libs' 'libogg')
13 makedepends=('nasm' 'doxygen' 'cmake' 'ninja')
14 source=(https://downloads.xiph.org/releases/flac/flac-${pkgver}.tar.xz
15         https://github.com/xiph/flac/commit/b171e767e282909d3f4ef4b7d7fcb9b7d7987ff5.patch)
16 sha512sums=('4a626e8a1bd126e234c0e5061e3b46f3a27c2065fdfa228fd8cf00d3c7fa2c05fafb5cec36acce7bfce4914bfd7db0b2a27ee15decf2d8c4caad630f62d44ec9'
17             '9cfe6b3098f119f2db851d73cebaebc9423cacaefd6555857e7453d63e61e6f7241b4b8e9621e87622498cc6f56ee29cfd4df2a19334f1ffb29b9c27c3bfa312')
19 prepare() {
20   cd flac-${pkgver}
22   # https://bugs.archlinux.org/task/74895
23   patch -Np1 -i ../b171e767e282909d3f4ef4b7d7fcb9b7d7987ff5.patch
26 build() {
27   cmake -S flac-${pkgver} -B build -G Ninja \
28     -DCMAKE_BUILD_TYPE=None \
29     -DCMAKE_INSTALL_PREFIX=/usr \
30     -DCMAKE_INSTALL_MANDIR=/usr/share/man/man1 \
31     -DBUILD_SHARED_LIBS=ON \
32     -DWITH_STACK_PROTECTOR=OFF \
33     -DNDEBUG=ON
34   cmake --build build
37 check() {
38   FLAC__TEST_LEVEL=0 cmake --build build --target test
41 package_flac() {
42   provides=('libFLAC.so' 'libFLAC++.so')
44   DESTDIR="${pkgdir}" cmake --install build
46   install -Dm 644 flac-${pkgver}/src/*/*.m4 -t "${pkgdir}/usr/share/aclocal"
48   mkdir -p doc/usr/share
49   mv {"${pkgdir}",doc}/usr/share/doc
51   install -Dm 644 flac-${pkgver}/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}"
54 package_flac-doc() {
55   pkgdesc+=' documentation'
56   depends=()
58   mv doc/* "$pkgdir"
60   install -Dm 644 flac-${pkgver}/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}"
63 # vim:set sw=2 et: