blob: 3b1b40919b8561d1e909ae4a45a7c04109d8feeb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
_pkgname=libklvanc
pkgname=${_pkgname}-llvm
pkgver=1.6.0
pkgrel=1
pkgdesc='Library for parsing/generation of Vertical Ancillary Data (VANC) — built with Clang and LLVM lld'
arch=('x86_64')
url='https://github.com/stoth68000/libklvanc/'
license=('LGPL')
depends=('glibc')
makedepends=('clang' 'lld' 'llvm')
provides=('libklvanc')
conflicts=('libklvanc')
source=("https://github.com/stoth68000/libklvanc/archive/vid.obe.${pkgver}/${_pkgname}-${pkgver}.tar.gz")
sha256sums=('5076ca48455a4ef4ead2cd880ba189b21937a9ad8fd458adfc133d7bb1c948c3')
prepare() {
cd "${_pkgname}-vid.obe.${pkgver}"
./autogen.sh --build
}
build() {
cd "${_pkgname}-vid.obe.${pkgver}"
export CC=clang
export CXX=clang++
export AR=/usr/bin/llvm-ar
export RANLIB=/usr/bin/llvm-ranlib
export LD=/usr/bin/ld.lld
export NM=/usr/bin/llvm-nm
export OBJCOPY=/usr/bin/llvm-objcopy
export OBJDUMP=/usr/bin/llvm-objdump
export READELF=/usr/bin/llvm-readelf
export STRIP=/usr/bin/llvm-strip
export LDFLAGS="${LDFLAGS:-} -fuse-ld=lld"
export CFLAGS="${CFLAGS:-} -O3 -march=native"
export CXXFLAGS="${CXXFLAGS:-} -O3 -march=native"
./configure --prefix='/usr'
make
}
package() {
make -C "${_pkgname}-vid.obe.${pkgver}" DESTDIR="$pkgdir" install
# the -debug package is preventing binary executables from being stripped
llvm-strip "$STRIP_BINARIES" "${pkgdir}/usr/bin"/*
}
|