blob: d1faa7e4102fd0a6663a5b1001c0ec64c839dd58 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Maintainer: John Schoenick <john@pointysoftware.net>
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
pkgname=lib32-heaptrack-git
pkgver=812.f6a3479
pkgrel=1
pkgdesc="A heap memory profiler - 32-bit libraries"
arch=('x86_64')
url="http://milianw.de/tag/heaptrack"
license=('APACHE')
# dependencies with GUI enabled
depends=('kdiagram' 'threadweaver' 'kitemmodels' 'kio' 'heaptrack-git' 'lib32-boost-libs')
makedepends=('git' 'extra-cmake-modules' 'sparsehash')
# minimal dependencies
#depends=('libunwind' 'boost-libs')
#makedepends=('git' 'cmake' 'boost')
provides=('lib32-heaptrack')
conflicts=('lib32-heaptrack')
source=('git+https://github.com/KDE/heaptrack.git')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/heaptrack"
echo $(git rev-list --count master).$(git rev-parse --short master)
}
prepare() {
mkdir -p "$srcdir/build"
}
build() {
cd "$srcdir/build"
# Using the dependency on the main package for gui, just build libs and helpers to run against
# 32bit
export CXXFLAGS="$CXXFLAGS -lboost_iostreams -lboost_system -DBOOST_NO_CXX11_HDR_SYSTEM_ERROR"
export CC="gcc -m32"
export CXX="g++ -m32"
cmake ../heaptrack \
-DHEAPTRACK_BUILD_GUI=OFF \
-DLIB_SUFFIX=32 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
make
}
package() {
cd "$srcdir/build"
make DESTDIR="$pkgdir" install
# Provided by full 64bit package that we depend on
rm -rf "$pkgdir"/usr/include
# No way to set an executable suffix through cmake, so rename here. The script does properly use
# the LIB_SUFFIX we provided above and will load the 32bit libraries.
for output in "$pkgdir"/usr/bin/*; do
[[ -f $output ]] || continue
msg2 "Renaming $(basename "$output") -> $(basename "${output}32")"
mv "$output" "${output}32"
done
}
# vim:set ts=2 sw=2 et:
|