summaryrefslogtreecommitdiffstats
path: root/main/ltrace
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-02-18 10:04:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-02-18 10:04:18 +0000
commitbb06f5bd41cb32fbd8a443aedb7362960096c5ae (patch)
treeafb86aae80b845a43bc6941cb1537eedd1ece81e /main/ltrace
parenta84f9884edb4913099921c8b42fdd40b14487654 (diff)
downloadaports-bb06f5bd41cb32fbd8a443aedb7362960096c5ae.tar.bz2
aports-bb06f5bd41cb32fbd8a443aedb7362960096c5ae.tar.xz
main/ltrace: msul build fixes
Diffstat (limited to 'main/ltrace')
-rw-r--r--main/ltrace/APKBUILD15
-rw-r--r--main/ltrace/musl.patch153
2 files changed, 162 insertions, 6 deletions
diff --git a/main/ltrace/APKBUILD b/main/ltrace/APKBUILD
index 7108d1a4b..2c1d6b98f 100644
--- a/main/ltrace/APKBUILD
+++ b/main/ltrace/APKBUILD
@@ -1,16 +1,16 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ltrace
pkgver=0.7.3
-pkgrel=0
+pkgrel=1
pkgdesc="Tracks runtime library calls in dynamically linked programs"
url="http://ltrace.alioth.debian.org/"
arch="all"
license="GPL"
depends=
-options="!configsub"
makedepends="libelf-dev autoconf automake"
subpackages="$pkgname-doc"
-source="https://alioth.debian.org/frs/download.php/file/3947/$pkgname-$pkgver.tar.bz2"
+source="https://alioth.debian.org/frs/download.php/file/3947/$pkgname-$pkgver.tar.bz2
+ musl.patch"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
@@ -39,6 +39,9 @@ package() {
cd "$_builddir"
make install INSTALL=install DESTDIR="$pkgdir" || return 1
}
-md5sums="b3dd199af8f18637f7d4ef97fdfb9d14 ltrace-0.7.3.tar.bz2"
-sha256sums="0e6f8c077471b544c06def7192d983861ad2f8688dd5504beae62f0c5f5b9503 ltrace-0.7.3.tar.bz2"
-sha512sums="a842b16dcb81da869afa0bddc755fdff0d57b35672505bf2c7164fd983b1938d28b126714128930994cc1230ced69d779456d0cfc16f4008c9b6d19f0852285d ltrace-0.7.3.tar.bz2"
+md5sums="b3dd199af8f18637f7d4ef97fdfb9d14 ltrace-0.7.3.tar.bz2
+cb921b7749a7452f9561325dec5a7662 musl.patch"
+sha256sums="0e6f8c077471b544c06def7192d983861ad2f8688dd5504beae62f0c5f5b9503 ltrace-0.7.3.tar.bz2
+4a074b796ab9b020b42c4704549a07e6d57f15606b2942a5261859c5a4f7aaf8 musl.patch"
+sha512sums="a842b16dcb81da869afa0bddc755fdff0d57b35672505bf2c7164fd983b1938d28b126714128930994cc1230ced69d779456d0cfc16f4008c9b6d19f0852285d ltrace-0.7.3.tar.bz2
+c53e05471c52e161a7f7389994c6467e8f3671c5d8478546bc1897f067c62aeab848d728295f339a241a3fc186e180d47bcc2872a6335877c3813b1b62834698 musl.patch"
diff --git a/main/ltrace/musl.patch b/main/ltrace/musl.patch
new file mode 100644
index 000000000..2dc909c95
--- /dev/null
+++ b/main/ltrace/musl.patch
@@ -0,0 +1,153 @@
+--- ./configure.ac.orig
++++ ./configure.ac
+@@ -34,6 +34,7 @@
+ case "${host_os}" in
+ linux-gnu*) HOST_OS="linux-gnu" ;;
+ linux-uclibc*) HOST_OS="linux-gnu" ;;
++ linux-musl*) HOST_OS="linux-gnu" ;;
+ *) AC_MSG_ERROR([unkown host-os ${host_os}]) ;;
+ esac
+ AC_SUBST(HOST_OS)
+@@ -234,6 +235,7 @@
+ sys/param.h \
+ sys/time.h \
+ unistd.h \
++ error.h \
+ ])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+diff --git a/expr.c b/expr.c
+index 32860fd..374c549 100644
+--- a/expr.c
++++ b/expr.c
+@@ -19,9 +19,12 @@
+ */
+
+ #include <string.h>
++#include <stdio.h>
+ #include <assert.h>
+ #include <errno.h>
++#ifdef HAVE_ERROR_H
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+
+ #include "expr.h"
+@@ -330,8 +333,11 @@ expr_self(void)
+ static struct expr_node *node = NULL;
+ if (node == NULL) {
+ node = malloc(sizeof(*node));
+- if (node == NULL)
+- error(1, errno, "malloc expr_self");
++ if (node == NULL) {
++ fprintf(stderr, "%s: malloc expr_self\n",
++ strerror(errno));
++ exit(1);
++ }
+ expr_init_self(node);
+ }
+ return node;
+diff --git a/glob.c b/glob.c
+index 075c867..06fec47 100644
+--- a/glob.c
++++ b/glob.c
+@@ -180,7 +180,7 @@ glob_to_regex(const char *glob, char **retp)
+ goto fail;
+ }
+ *retp = buf;
+- return REG_NOERROR;
++ return 0;
+ }
+
+ int
+@@ -188,7 +188,7 @@ globcomp(regex_t *preg, const char *glob, int cflags)
+ {
+ char *regex = NULL;
+ int status = glob_to_regex(glob, &regex);
+- if (status != REG_NOERROR)
++ if (status != 0)
+ return status;
+ assert(regex != NULL);
+ status = regcomp(preg, regex, cflags);
+diff --git a/options.c b/options.c
+index 1e19dc7..1dc5e1e 100644
+--- a/options.c
++++ b/options.c
+@@ -204,7 +204,7 @@ compile_libname(const char *expr, const char *a_lib, int lib_re_p,
+
+ regex_t lib_re;
+ int status = (lib_re_p ? regcomp : globcomp)(&lib_re, lib, 0);
+- if (status != REG_NOERROR) {
++ if (status != 0) {
+ char buf[100];
+ regerror(status, &lib_re, buf, sizeof buf);
+ fprintf(stderr, "Rule near '%s' will be ignored: %s.\n",
+diff --git a/read_config_file.c b/read_config_file.c
+index e247436..73528fe 100644
+--- a/read_config_file.c
++++ b/read_config_file.c
+@@ -27,7 +27,9 @@
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <errno.h>
++#ifdef HAVE_ERROR_H
+ #include <error.h>
++#endif
+ #include <assert.h>
+
+ #include "common.h"
+@@ -1258,8 +1260,12 @@ void
+ init_global_config(void)
+ {
+ struct arg_type_info *info = malloc(2 * sizeof(*info));
+- if (info == NULL)
+- error(1, errno, "malloc in init_global_config");
++ if (info == NULL) {
++ report_error(filename, line_no,
++ "%s: malloc in init_global_config",
++ strerror(errno));
++ exit(1);
++ }
+
+ memset(info, 0, 2 * sizeof(*info));
+ info[0].type = ARGTYPE_POINTER;
+diff --git a/zero.c b/zero.c
+index bc119ee..e685f59 100644
+--- a/zero.c
++++ b/zero.c
+@@ -18,8 +18,11 @@
+ * 02110-1301 USA
+ */
+
++#ifdef HAVE_ERROR_H
+ #include <error.h>
++#endif
+ #include <errno.h>
++#include <string.h>
+
+ #include "zero.h"
+ #include "common.h"
+@@ -96,8 +99,11 @@ expr_node_zero(void)
+ static struct expr_node *node = NULL;
+ if (node == NULL) {
+ node = malloc(sizeof(*node));
+- if (node == NULL)
+- error(1, errno, "malloc expr_node_zero");
++ if (node == NULL) {
++ report_global_error("%s: malloc expr_node_zero",
++ strerror(errno));
++ exit(1);
++ }
+ expr_init_cb1(node, &zero1_callback,
+ expr_self(), 0, (void *)-1);
+ }
+--- ./proc.h.orig
++++ ./proc.h
+@@ -26,6 +26,7 @@
+ #include "config.h"
+
+ #include <sys/time.h>
++#include <unistd.h>
+
+ #if defined(HAVE_LIBUNWIND)
+ # include <libunwind.h>