updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / papi / PKGBUILD
blob6ec7c60495ce5ab0fe8934dbd58f2ece8c302026
1 # Contributor: Jed Brown <jed@59A2.org>
3 pkgname=papi
4 pkgver=4.2.0
5 pkgrel=1
6 pkgdesc="Performance Application Programming Interface"
7 arch=(x86_64 i686)
8 url="http://icl.cs.utk.edu/papi/"
9 license=('BSD')
10 depends=(glibc linux-api-headers)
11 makedepends=()
12 provides=()
13 conflicts=()
14 replaces=()
15 source=(http://icl.cs.utk.edu/projects/papi/downloads/${pkgname}-${pkgver}.tar.gz)
16 md5sums=('ca5f85fd2474c11bc847a6c784ca2668')
18 build() {
19   cd ${srcdir}/${pkgname}-${pkgver}/src
20   # Internal library has noisy code, but they set -Werror anyway.
21   patch -p1 <<EOF
22 --- a/libpfm-3.y/config.mk   2010-07-21 13:56:22.152052317 +0200
23 +++ b/libpfm-3.y/config.mk   2010-07-21 13:56:38.568721079 +0200
24 @@ -168,7 +168,7 @@
25  LN?=ln -sf
26  PFMINCDIR=\$(TOPDIR)/include
27  PFMLIBDIR=\$(TOPDIR)/lib
28 -DBG?=-g -Wall -Werror
29 +DBG?=-g -Wall
30  # gcc/mips64 bug
31  ifeq (\$(CONFIG_PFMLIB_ARCH_SICORTEX),y)
32  OPTIM?=-O
33 EOF
34   patch -p1 <<EOF
35 --- i/libpfm4/config.mk
36 +++ w/libpfm4/config.mk
37 @@ -172,7 +172,7 @@ INSTALL=install
38  LN?=ln -sf
39  PFMINCDIR=\$(TOPDIR)/include
40  PFMLIBDIR=\$(TOPDIR)/lib
41 -DBG?=-g -Wall -Werror
42 +DBG?=-g -Wall
43  CFLAGS+=\$(OPTIM) \$(DBG) -I\$(SYSINCDIR) -I\$(PFMINCDIR)
44  MKDEP=makedepend
45  PFMLIB=\$(PFMLIBDIR)/libpfm.a
46 EOF
48   unset MAKEFLAGS # Makefiles are broken for parallel make
49   ./configure --prefix=/usr --with-perf-events \
50     LDFLAGS="${LDFLAGS} -Wl,--no-as-needed" # Configure has a problem detecting dlopen()
51   make
52   make DESTDIR=$pkgdir install
53   install -D $srcdir/$pkgname-$pkgver/LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE