summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/recipes-devtools/tcf-agent
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/meta/recipes-devtools/tcf-agent')
-rw-r--r--external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch17
-rw-r--r--external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch28
-rwxr-xr-xexternal/poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init65
-rw-r--r--external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service12
-rw-r--r--external/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb58
5 files changed, 180 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
new file mode 100644
index 00000000..abd33bab
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch
@@ -0,0 +1,17 @@
+Actually pass the arguments to RANLIB.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Index: agent/Makefile.inc
+===================================================================
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -92,6 +92,7 @@ ifeq ($(OPSYS),GNU/Linux)
+ OPTS += -DUSE_uuid_generate=0
+ endif
+ OPTS += -DENABLE_arch_$(shell uname -m)
++ RANLIB += $@
+ endif
+
+ ifneq ($(OPSYS),Windows)
diff --git a/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch
new file mode 100644
index 00000000..c03c55d2
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+From d92af0483c20365fd0af740d0baef8870b4aa374 Mon Sep 17 00:00:00 2001
+From: Abdur Rehman <abdur_rehman@mentor.com>
+Date: Wed, 26 Aug 2015 19:18:11 +0500
+Subject: [PATCH] tcf-agent: obey LDFLAGS
+
+Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
+---
+ Makefile.inc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.inc b/Makefile.inc
+index 959028f..3148942 100644
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -96,7 +96,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
+--
+1.7.9.5
+
diff --git a/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
new file mode 100755
index 00000000..f9020855
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
@@ -0,0 +1,65 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: tcf-agent
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Target Communication Framework agent
+### END INIT INFO
+
+DAEMON_PATH=/usr/sbin/tcf-agent
+DAEMON_NAME=`basename $DAEMON_PATH`
+
+. /etc/init.d/functions
+
+test -x $DAEMON_PATH || exit 0
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+export PATH
+
+RETVAL=0
+
+case "$1" in
+ start)
+ echo -n "Starting $DAEMON_NAME: "
+ $DAEMON_PATH -d -L- -l0
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] ; then
+ echo "OK"
+ touch /var/lock/subsys/$DAEMON_NAME
+ else
+ echo "FAIL"
+ fi
+ ;;
+
+ stop)
+ echo -n "Stopping $DAEMON_NAME: "
+ start-stop-daemon -K -q -x $DAEMON_PATH -s USR2
+ rm -f /var/lock/subsys/$DAEMON_NAME
+ if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then
+ echo "FAIL"
+ else
+ echo "OK"
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+
+ status)
+ status $DAEMON_NAME
+ RETVAL=$?
+ ;;
+
+ condrestart)
+ [ -f /var/lock/subsys/$DAEMON_NAME ] && $0 restart
+ ;;
+
+ *)
+ echo "usage: $0 { start | stop | status | restart | condrestart | status }"
+ ;;
+esac
+
+exit $RETVAL
diff --git a/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
new file mode 100644
index 00000000..a486ac7b
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Target Communication Framework agent
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/tcf-agent -d -L- -l0
+KillSignal=USR2
+SuccessExitStatus=USR2
+
+[Install]
+WantedBy=multi-user.target
diff --git a/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
new file mode 100644
index 00000000..d901c18c
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -0,0 +1,58 @@
+SUMMARY = "Target Communication Framework for the Eclipse IDE"
+HOMEPAGE = "http://wiki.eclipse.org/TCF"
+BUGTRACKER = "https://bugs.eclipse.org/bugs/"
+
+LICENSE = "EPL-1.0 | EDL-1.0"
+LIC_FILES_CHKSUM = "file://edl-v10.html;md5=522a390a83dc186513f0500543ad3679"
+
+SRCREV = "a022ef2f1acfd9209a1bf792dda14ae4b0d1b60f"
+PV = "1.7.0+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent \
+ file://fix_ranlib.patch \
+ file://ldflags.patch \
+ file://tcf-agent.init \
+ file://tcf-agent.service \
+ "
+
+DEPENDS = "util-linux openssl"
+RDEPENDS_${PN} = "bash"
+
+S = "${WORKDIR}/git/agent"
+
+inherit update-rc.d systemd
+
+SYSTEMD_SERVICE_${PN} = "tcf-agent.service"
+
+INITSCRIPT_NAME = "tcf-agent"
+INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
+
+# mangling needed for make
+MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686, | sed s,aarch64.*,a64,`"
+MAKE_OS = "`echo ${TARGET_OS} | sed s,^linux.*,GNU/Linux,`"
+
+EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'"
+
+LCL_STOP_SERVICES = "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \
+ -DSERVICE_Memory=0 -DSERVICE_Registers=0 -DSERVICE_MemoryMap=0 \
+ -DSERVICE_StackTrace=0 -DSERVICE_Expressions=0"
+
+
+# These features don't compile for several cases.
+#
+CFLAGS_append_mips = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_mips64 = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_libc-musl = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_powerpc64 = " ${LCL_STOP_SERVICES}"
+CFLAGS_append_riscv64 = " ${LCL_STOP_SERVICES}"
+
+do_install() {
+ oe_runmake install INSTALLROOT=${D}
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/tcf-agent.init ${D}${sysconfdir}/init.d/tcf-agent
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/tcf-agent.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tcf-agent.service
+}
+