diff --git a/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent/0001-Makefile.inc-fix-ranlib.patch b/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent/0001-Makefile.inc-fix-ranlib.patch new file mode 100644 index 000000000..bfacb21eb --- /dev/null +++ b/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent/0001-Makefile.inc-fix-ranlib.patch @@ -0,0 +1,25 @@ +From: Javier Viguera +Date: Thu, 16 Nov 2017 17:57:07 +0100 +Subject: [PATCH 1/3] Makefile.inc: fix ranlib + +Upstream-Status: Inappropriate [poky-specific fix] + +Signed-off-by: Javier Viguera +--- + agent/Makefile.inc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/agent/Makefile.inc b/agent/Makefile.inc +index 8304cfecc14a..cdf8536dbf9b 100644 +--- a/agent/Makefile.inc ++++ b/agent/Makefile.inc +@@ -88,6 +88,9 @@ ifeq ($(OPSYS),GNU/Linux) + else + OPTS += -DUSE_uuid_generate=0 + endif ++ ifneq ($(RANLIB),) ++ RANLIB += $@ ++ endif + OPTS += -DENABLE_arch_$(shell uname -m) + endif + diff --git a/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent/0002-tcf-agent-obey-LDFLAGS.patch b/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent/0002-tcf-agent-obey-LDFLAGS.patch new file mode 100644 index 000000000..b130bfa8e --- /dev/null +++ b/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent/0002-tcf-agent-obey-LDFLAGS.patch @@ -0,0 +1,22 @@ +From: Abdur Rehman +Date: Wed, 26 Aug 2015 19:18:11 +0500 +Subject: [PATCH 2/3] tcf-agent: obey LDFLAGS + +Signed-off-by: Abdur Rehman +--- + agent/Makefile.inc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agent/Makefile.inc b/agent/Makefile.inc +index cdf8536dbf9b..70f4710dcacd 100644 +--- a/agent/Makefile.inc ++++ b/agent/Makefile.inc +@@ -114,7 +114,7 @@ NO_LINK_F ?= -c + # Linker definition and flags + + LINK ?= $(CC) +-LINK_FLAGS ?= $(CFLAGS) ++LINK_FLAGS ?= $(LDFLAGS) $(CFLAGS) + LINK_OUT_F ?= $(OUT_OBJ_F) + + # Archiver definition and flags diff --git a/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent/0003-canonicalize_file_name-is-specific-to-glibc.patch b/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent/0003-canonicalize_file_name-is-specific-to-glibc.patch new file mode 100644 index 000000000..1b94cdfd5 --- /dev/null +++ b/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent/0003-canonicalize_file_name-is-specific-to-glibc.patch @@ -0,0 +1,40 @@ +From: Khem Raj +Date: Thu, 7 Jan 2016 22:37:48 +0000 +Subject: [PATCH 3/3] canonicalize_file_name is specific to glibc + +When on Linux and not using glibc then we need to define +canonicalize_file_name() API, therefore add a check for finding out if +its not glibc + +Signed-off-by: Khem Raj +--- + agent/tcf/framework/mdep.c | 2 +- + agent/tcf/framework/mdep.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/agent/tcf/framework/mdep.c b/agent/tcf/framework/mdep.c +index cf5771e5f016..ccdea09b8817 100644 +--- a/agent/tcf/framework/mdep.c ++++ b/agent/tcf/framework/mdep.c +@@ -1086,7 +1086,7 @@ char * canonicalize_file_name(const char * path) { + return strdup(res); + } + +-#elif defined(__UCLIBC__) ++#elif defined(__UCLIBC__) || !defined(__GLIBC__) + + char * canonicalize_file_name(const char * path) { + return realpath(path, NULL); +diff --git a/agent/tcf/framework/mdep.h b/agent/tcf/framework/mdep.h +index fec94d787224..52c41256cd92 100644 +--- a/agent/tcf/framework/mdep.h ++++ b/agent/tcf/framework/mdep.h +@@ -288,7 +288,7 @@ extern int loc_clock_gettime(int, struct timespec *); + + #define O_BINARY 0 + +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__sun__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__sun__) || !defined(__GLIBC__) + # define O_LARGEFILE 0 + extern char ** environ; + extern char * canonicalize_file_name(const char * path); diff --git a/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent_git.bbappend b/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent_git.bbappend index e948a4fc4..822d2337a 100644 --- a/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent_git.bbappend +++ b/meta-digi-dey/recipes-devtools/tcf-agent/tcf-agent_git.bbappend @@ -1,5 +1,19 @@ # Copyright (C) 2017 Digi International Inc. +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRCREV = "5ec928ddf62b0ad936efacf2b2d8fb87cca112ac" +PV = "1.5+git${SRCPV}" + +SRC_URI = " \ + git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent;branch=1.5_oxygen_bugfix \ + file://0001-Makefile.inc-fix-ranlib.patch;striplevel=2 \ + file://0002-tcf-agent-obey-LDFLAGS.patch;striplevel=2 \ + file://0003-canonicalize_file_name-is-specific-to-glibc.patch;striplevel=2 \ + file://tcf-agent.init \ + file://tcf-agent.service \ +" + # tcf-agent falls back to '/bin/sh' if 'bash' is not available, so don't # depend on bash at runtime. RDEPENDS_${PN}_remove = "bash"