aboutsummaryrefslogtreecommitdiffstats
path: root/main/libexecinfo/APKBUILD
blob: 2a3a15306b796501a8e929fda6fcbb2d7898000f (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
# Contributor: Philipp Andronov <filipp.andronov@gmail.com>
# Maintainer: Matt Smith <mcs@darkregion.net>

pkgname=libexecinfo
pkgver=1.1
pkgrel=0
pkgdesc="A quick-n-dirty BSD licensed clone of the GNU libc backtrace facility."
url="https://www.freshports.org/devel/libexecinfo"
arch="all"
license="BSD"
depends=
makedepends=
install=
subpackages="${pkgname}-dev"
source="http://distcache.freebsd.org/local-distfiles/itetcu/$pkgname-$pkgver.tar.bz2
	10-execinfo.patch
	20-define-gnu-source.patch
	30-linux-makefile.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	patch -p0 -i "$srcdir"/10-execinfo.patch
	patch -p0 -i "$srcdir"/20-define-gnu-source.patch
	patch -p0 -i "$srcdir"/30-linux-makefile.patch
}

build() {
	cd "$_builddir"
	export CFLAGS="${CFLAGS} -fno-omit-frame-pointer"
	make || return 1
}

package() {
	cd "$_builddir"

	install -D -m755 "$_builddir"/execinfo.h \
		"$pkgdir"/usr/include/execinfo.h || return 1
	install -D -m755 "$_builddir"/stacktraverse.h \
		"$pkgdir"/usr/include/stacktraverse.h || return 1
	install -D -m755 "$_builddir"/libexecinfo.a \
		"$pkgdir"/usr/lib/libexecinfo.a || return 1
	install -D -m755 "$_builddir"/libexecinfo.so.1 \
		"$pkgdir"/usr/lib/libexecinfo.so.1 || return 1
	ln -s /usr/lib/libexecinfo.so.1 \
		"$pkgdir"/usr/lib/libexecinfo.so || return 1
}

md5sums="8e9e81c554c1c5d735bc877448e92b91  libexecinfo-1.1.tar.bz2
594e9f7b86780f2f0c623443dec7ca04  10-execinfo.patch
8536668cd1813aa689f12d36c470c0a5  20-define-gnu-source.patch
7dfdae632685a5331ca8317395132066  30-linux-makefile.patch"
sha256sums="c9a21913e7fdac8ef6b33250b167aa1fc0a7b8a175145e26913a4c19d8a59b1f  libexecinfo-1.1.tar.bz2
eff078913cf0baeff6e0442ec5c77d1b25d97d13a6d66d25f5576fd25486d752  10-execinfo.patch
020c73643ac91df9e90532499404fdc10e3ca0d0e6979a8c1610ac340cabe8d6  20-define-gnu-source.patch
4e310e178c27ecad1ccb7ced06719428ab44bd30163eb7042c5eb2f285f892cb  30-linux-makefile.patch"
sha512sums="51fea7910ef6873061a25c22434ce4da724e9d8e37616a069ad0a58c0463755be4c6c7da88cd747484c2f3373909d7be4678b32a4bd91b6d9e0f74526094e92c  libexecinfo-1.1.tar.bz2
a38f75d305518d3432807735456b32b223e89e0d08860e2dfafb5ad3b507de92d4fa60e4bb11978e3dbf20d68be05da42237ced7db625304b49a5288b90be232  10-execinfo.patch
f335effbbb5425a4b1031fd8a4358f777825a5979f099d01357fab5715065e9f7439f118d155f124b1a15b1e91cd3a4e9a20793806d121f605775f148aea0102  20-define-gnu-source.patch
3596aef8c6d0593afd063c2295ede3473d33afa52eafa5258bb48fcd472a36f987196c7de647b2b408a5a02138de9f36253d93f7a9f061e2bb6082fc429acb76  30-linux-makefile.patch"