1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Eric BĂ©langer <eric@archlinux.org>
5 pkgname=('flac' 'flac-doc')
8 pkgdesc='Free Lossless Audio Codec'
9 url='https://xiph.org/flac/'
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')
22 # https://bugs.archlinux.org/task/74895
23 patch -Np1 -i ../b171e767e282909d3f4ef4b7d7fcb9b7d7987ff5.patch
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 \
38 FLAC__TEST_LEVEL=0 cmake --build build --target test
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}"
55 pkgdesc+=' documentation'
60 install -Dm 644 flac-${pkgver}/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}"