OCaml 5.0.0 rebuild: Fix Pervasives deprecation
[arch-packages.git] / flac / trunk / PKGBUILD
blob76d493804c17c452c2d03e380a6e8a4ab77a0687
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.4.2
7 pkgrel=1
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' 'cmake' 'ninja' 'doxygen' 'git' 'pandoc')
14 _commit=b32e5cbf9818ca23dd22aaa75522042c16ea7d17  # tags/1.4.2
15 source=("git+https://github.com/xiph/flac?signed#commit=$_commit")
16 b2sums=('SKIP')
17 validpgpkeys=('5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23') # https://github.com/web-flow.gpg
19 pkgver() {
20   cd flac
21   git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
24 prepare() {
25   cd flac
27   # Fix GStreamer
28   # https://bugs.archlinux.org/task/76120
29   git cherry-pick -n 3d55a9dc6c14317b4766db96bb52e2fd95e920a9
31   # Shorten tests
32   sed -i 's/FLAC__TEST_LEVEL=1/FLAC__TEST_LEVEL=0/' test/CMakeLists.txt
35 build() {
36   cmake -S flac -B build -G Ninja \
37     -DCMAKE_BUILD_TYPE=None \
38     -DCMAKE_INSTALL_PREFIX=/usr \
39     -DBUILD_SHARED_LIBS=ON \
40     -DINSTALL_MANPAGES=ON \
41     -DWITH_STACK_PROTECTOR=OFF \
42     -DNDEBUG=ON
43   cmake --build build
45   # Build docs and place them where install expects them
46   cmake --build build --target FLAC-doxygen
47   mv build/doc/doxytmp/html flac/doc/api
50 check() {
51   cd build
52   ctest --output-on-failure --stop-on-failure -j1
55 package_flac() {
56   provides=('libFLAC.so' 'libFLAC++.so')
58   DESTDIR="${pkgdir}" cmake --install build
60   install -Dm 644 flac/src/*/*.m4 -t "${pkgdir}/usr/share/aclocal"
62   mkdir -p doc/usr/share
63   mv {"${pkgdir}",doc}/usr/share/doc
65   install -Dm 644 flac/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}"
68 package_flac-doc() {
69   pkgdesc+=' documentation'
70   depends=()
72   mv doc/* "$pkgdir"
74   install -Dm 644 flac/COPYING.Xiph -t "${pkgdir}/usr/share/licenses/${pkgname}"
77 # vim:set sw=2 sts=-1 et: