diff options
author | Matt Smith <mcs@darkregion.net> | 2011-01-07 12:05:52 -0600 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-01-09 11:50:05 +0000 |
commit | 2b3d0c1781a7f013366eb9e35bb0b9334cba8569 (patch) | |
tree | 5d456c378e1cd49f63b7b6771c87af1f5143a171 /testing | |
parent | 5b653e04193961148e414018dfafd46f08c141fe (diff) | |
download | aports-2b3d0c1781a7f013366eb9e35bb0b9334cba8569.tar.bz2 aports-2b3d0c1781a7f013366eb9e35bb0b9334cba8569.tar.xz |
new aport: testing/libexecinfo
A quick-n-dirty BSD licensed clone of the GNU libc backtrace facility.
http://www.freshports.org/devel/libexecinfo
Diffstat (limited to 'testing')
-rw-r--r-- | testing/libexecinfo/20-define-gnu-source.patch | 24 | ||||
-rw-r--r-- | testing/libexecinfo/30-linux-makefile.patch | 44 | ||||
-rw-r--r-- | testing/libexecinfo/APKBUILD | 52 |
3 files changed, 120 insertions, 0 deletions
diff --git a/testing/libexecinfo/20-define-gnu-source.patch b/testing/libexecinfo/20-define-gnu-source.patch new file mode 100644 index 0000000000..0ba1fc1f7e --- /dev/null +++ b/testing/libexecinfo/20-define-gnu-source.patch @@ -0,0 +1,24 @@ +--- execinfo.c.orig ++++ execinfo.c +@@ -26,6 +26,7 @@ + * $Id: execinfo.c,v 1.3 2004/07/19 05:21:09 sobomax Exp $ + */ + ++#define _GNU_SOURCE + #include <sys/types.h> + #include <sys/uio.h> + #include <dlfcn.h> +--- stacktraverse.c.orig ++++ stacktraverse.c +@@ -1,3 +1,4 @@ ++#define _GNU_SOURCE + #include <stddef.h> + + #include "stacktraverse.h" +--- test.c.orig ++++ test.c +@@ -1,3 +1,4 @@ ++#define _GNU_SOURCE + #include <stdio.h> + #include <stdlib.h> + diff --git a/testing/libexecinfo/30-linux-makefile.patch b/testing/libexecinfo/30-linux-makefile.patch new file mode 100644 index 0000000000..3bc8927954 --- /dev/null +++ b/testing/libexecinfo/30-linux-makefile.patch @@ -0,0 +1,44 @@ +--- Makefile.orig ++++ Makefile +@@ -23,24 +23,25 @@ + # SUCH DAMAGE. + # + # $Id: Makefile,v 1.3 2004/07/19 05:19:55 sobomax Exp $ ++# ++# Linux Makefile by Matt Smith <mcs@darkregion.net>, 2011/01/04 + +-LIB= execinfo ++CC=cc ++AR=ar ++EXECINFO_CFLAGS=$(CFLAGS) -O2 -pipe -fno-strict-aliasing -std=gnu99 -fstack-protector -c ++EXECINFO_LDFLAGS=$(LDFLAGS) + +-SRCS= stacktraverse.c stacktraverse.h execinfo.c execinfo.h ++all: static dynamic + +-INCS= execinfo.h ++static: ++ $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c ++ $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c ++ $(AR) rcs libexecinfo.a stacktraverse.o execinfo.o + +-SHLIB_MAJOR= 1 +-SHLIB_MINOR= 0 ++dynamic: ++ $(CC) -fpic -DPIC $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c -o stacktraverse.So ++ $(CC) -fpic -DPIC $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c -o execinfo.So ++ $(CC) -shared -Wl,-soname,libexecinfo.so.1 -o libexecinfo.so.1 stacktraverse.So execinfo.So + +-NOPROFILE= yes +- +-DPADD= ${LIBM} +-LDADD= -lm +- +-#WARNS?= 4 +- +-#stacktraverse.c: gen.py +-# ./gen.py > stacktraverse.c +- +-.include <bsd.lib.mk> ++clean: ++ rm -rf *.o *.So *.a *.so diff --git a/testing/libexecinfo/APKBUILD b/testing/libexecinfo/APKBUILD new file mode 100644 index 0000000000..4d63709da7 --- /dev/null +++ b/testing/libexecinfo/APKBUILD @@ -0,0 +1,52 @@ +# Contributor: Matt Smith <mcs@darkregion.net> +# 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="http://www.freshports.org/devel/libexecinfo" +arch="all" +license="BSD" +depends= +makedepends= +install= +subpackages= +source="ftp://ftp.freebsd.org/pub/FreeBSD/ports/local-distfiles/itetcu/$pkgname-$pkgver.tar.bz2 + saveas-http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/devel/libexecinfo/files/patch-execinfo.c?rev=1.4;content-type=text%2Fplain/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" + 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 +986c4a9f64ed8110c38375b0ce59f4bc 10-execinfo.patch +8536668cd1813aa689f12d36c470c0a5 20-define-gnu-source.patch +7dfdae632685a5331ca8317395132066 30-linux-makefile.patch" |