summaryrefslogtreecommitdiffstats
path: root/package/ltrace/ltrace.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/ltrace/ltrace.mk')
-rw-r--r--package/ltrace/ltrace.mk37
1 files changed, 25 insertions, 12 deletions
diff --git a/package/ltrace/ltrace.mk b/package/ltrace/ltrace.mk
index a211ce2db..48d1a6939 100644
--- a/package/ltrace/ltrace.mk
+++ b/package/ltrace/ltrace.mk
@@ -3,14 +3,15 @@
# ltrace
#
#############################################################
-LTRACE_SOURCE=ltrace_0.3.36.orig.tar.gz
-LTRACE_SOURCE2=ltrace_0.3.36-2.diff.gz
+LTRACE_VERSION=0.4
+LTRACE_SOURCE=ltrace_$(LTRACE_VERSION).orig.tar.gz
+#LTRACE_PATCH=ltrace_$(LTRACE_VERSION)-1.diff.gz
LTRACE_SITE=http://ftp.debian.org/debian/pool/main/l/ltrace
-LTRACE_DIR=$(BUILD_DIR)/ltrace-0.3.36
+LTRACE_DIR=$(BUILD_DIR)/ltrace-$(LTRACE_VERSION)
LTRACE_BINARY=ltrace
LTRACE_TARGET_BINARY=usr/bin/ltrace
-LTRACE_ARCH:=$(ARCH)
+LTRACE_ARCH:=$(KERNEL_ARCH)
ifeq ("$(strip $(ARCH))","armeb")
LTRACE_ARCH:=arm
endif
@@ -18,15 +19,26 @@ endif
$(DL_DIR)/$(LTRACE_SOURCE):
$(WGET) -P $(DL_DIR) $(LTRACE_SITE)/$(LTRACE_SOURCE)
-$(DL_DIR)/$(LTRACE_SOURCE2):
- $(WGET) -P $(DL_DIR) $(LTRACE_SITE)/$(LTRACE_SOURCE2)
+ifneq ($(LTRACE_PATCH),)
+LTRACE_SOURCE2:=$(DL_DIR)/$(LTRACE_PATCH)
+$(LTRACE_SOURCE2):
+ $(WGET) -P $(DL_DIR) $(LTRACE_SITE)/$(LTRACE_PATCH)
-$(LTRACE_DIR)/.source: $(DL_DIR)/$(LTRACE_SOURCE) $(DL_DIR)/$(LTRACE_SOURCE2)
+else
+LTRACE_SOURCE2:=
+endif
+
+$(LTRACE_DIR)/.patched: $(DL_DIR)/$(LTRACE_SOURCE) $(LTRACE_SOURCE2)
$(ZCAT) $(DL_DIR)/$(LTRACE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- $(ZCAT) $(DL_DIR)/$(LTRACE_SOURCE2) | patch -p1 -d $(LTRACE_DIR)
- touch $(LTRACE_DIR)/.source
+ifneq ($(LTRACE_PATCH),)
+ $(ZCAT) $(LTRACE_SOURCE2) | patch -p1 -d $(LTRACE_DIR)
+endif
+ toolchain/patch-kernel.sh $(LTRACE_DIR) package/ltrace ltrace\*.patch
+ $(CONFIG_UPDATE) $(@D)
+ chmod +x $(LTRACE_DIR)/configure
+ touch $@
-$(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.source
+$(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.patched
(cd $(LTRACE_DIR); \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
@@ -37,8 +49,9 @@ $(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.source
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--sysconfdir=/etc \
+ $(DISABLE_LARGEFILE) \
);
- touch $(LTRACE_DIR)/.configured;
+ touch $@
$(LTRACE_DIR)/$(LTRACE_BINARY): $(LTRACE_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(LTRACE_ARCH) \
@@ -51,7 +64,7 @@ $(TARGET_DIR)/$(LTRACE_TARGET_BINARY): $(LTRACE_DIR)/$(LTRACE_BINARY)
ltrace: uclibc libelf $(TARGET_DIR)/$(LTRACE_TARGET_BINARY)
-ltrace-source: $(DL_DIR)/$(LTRACE_SOURCE)
+ltrace-source: $(DL_DIR)/$(LTRACE_SOURCE) $(LTRACE_SOURCE2)
ltrace-clean:
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LTRACE_DIR) uninstall