Overlayed 2.0 from meta-oe/master, as thud comes with 1.8 that is not 
sufficient.

Signed-off-by: Denys Dmytriyenko <[email protected]>
---
 ...build-Allow-CC-and-prefix-to-be-overriden.patch | 37 ++++++++++++++++++++++
 .../linuxptp/no-incdefs-using-host-headers.patch   | 29 +++++++++++++++++
 .../recipes-connectivity/linuxptp/linuxptp_2.0.bb  | 22 +++++++++++++
 3 files changed, 88 insertions(+)
 create mode 100644 
meta-arago-distro/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
 create mode 100644 
meta-arago-distro/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch
 create mode 100644 
meta-arago-distro/recipes-connectivity/linuxptp/linuxptp_2.0.bb

diff --git 
a/meta-arago-distro/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
 
b/meta-arago-distro/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
new file mode 100644
index 0000000..b1d96ae
--- /dev/null
+++ 
b/meta-arago-distro/recipes-connectivity/linuxptp/linuxptp/build-Allow-CC-and-prefix-to-be-overriden.patch
@@ -0,0 +1,37 @@
+From af485c638c61fa883212ea424e676fbf90bee594 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <[email protected]>
+Date: Tue, 1 Jul 2014 17:37:31 -0300
+Subject: [PATCH] build: Allow CC and prefix to be overriden
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <[email protected]>
+---
+ makefile |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/makefile b/makefile
+index 22e7d0d..809cc8f 100644
+--- a/makefile
++++ b/makefile
+@@ -18,7 +18,7 @@
+ KBUILD_OUTPUT =
+ 
+ DEBUG =
+-CC    = $(CROSS_COMPILE)gcc
++CC    ?= $(CROSS_COMPILE)gcc
+ VER     = -DVER=$(version)
+ CFLAGS        = -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)
+ LDLIBS        = -lm -lrt $(EXTRA_LDFLAGS)
+@@ -35,7 +35,7 @@ incdefs := $(shell $(srcdir)/incdefs.sh)
+ version := $(shell $(srcdir)/version.sh $(srcdir))
+ VPATH = $(srcdir)
+ 
+-prefix        = /usr/local
++prefix        ?= /usr/local
+ sbindir       = $(prefix)/sbin
+ mandir        = $(prefix)/man
+ man8dir       = $(mandir)/man8
+-- 
+1.7.10.4
+
diff --git 
a/meta-arago-distro/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch
 
b/meta-arago-distro/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch
new file mode 100644
index 0000000..02dbb23
--- /dev/null
+++ 
b/meta-arago-distro/recipes-connectivity/linuxptp/linuxptp/no-incdefs-using-host-headers.patch
@@ -0,0 +1,29 @@
+From 8a4cad5e2f2cbb6a34bdc6e877fe499502b8c4c8 Mon Sep 17 00:00:00 2001
+From: Marcel Ziswiler <[email protected]>
+Date: Fri, 23 Dec 2016 18:12:29 +0100
+Subject: [PATCH] linuxptp: no incdefs using host headers
+
+Avoid using host headers via incdefs.sh shell script.
+
+Signed-off-by: Marcel Ziswiler <[email protected]>
+---
+
+ makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/makefile b/makefile
+index 8cdbd15..85174b8 100644
+--- a/makefile
++++ b/makefile
+@@ -33,7 +33,7 @@ OBJECTS      = $(OBJ) hwstamp_ctl.o phc2sys.o phc_ctl.o 
pmc.o pmc_common.o \
+ SRC   = $(OBJECTS:.o=.c)
+ DEPEND        = $(OBJECTS:.o=.d)
+ srcdir        := $(dir $(lastword $(MAKEFILE_LIST)))
+-incdefs := $(shell $(srcdir)/incdefs.sh)
++#incdefs := $(shell $(srcdir)/incdefs.sh)
+ version := $(shell $(srcdir)/version.sh $(srcdir))
+ VPATH = $(srcdir)
+ 
+-- 
+2.9.3
+
diff --git a/meta-arago-distro/recipes-connectivity/linuxptp/linuxptp_2.0.bb 
b/meta-arago-distro/recipes-connectivity/linuxptp/linuxptp_2.0.bb
new file mode 100644
index 0000000..eb262d3
--- /dev/null
+++ b/meta-arago-distro/recipes-connectivity/linuxptp/linuxptp_2.0.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 
for Linux"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = 
"http://sourceforge.net/projects/linuxptp/files/v${PV}/linuxptp-${PV}.tgz \
+           file://build-Allow-CC-and-prefix-to-be-overriden.patch \
+           file://no-incdefs-using-host-headers.patch \
+           "
+
+SRC_URI[md5sum] = "d8bb7374943bb747db7786ac26f17f11"
+SRC_URI[sha256sum] = 
"0a24d9401e87d4af023d201e234d91127d82c350daad93432106284aa9459c7d"
+
+EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} \
+    EXTRA_CFLAGS='-D_GNU_SOURCE -DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN 
-DHAVE_ONESTEP_SYNC ${CFLAGS}'"
+
+do_install () {
+    install -d ${D}/${bindir}
+    install -p ${S}/ptp4l  ${D}/${bindir}
+    install -p ${S}/pmc  ${D}/${bindir}
+    install -p ${S}/phc2sys  ${D}/${bindir}
+    install -p ${S}/hwstamp_ctl  ${D}/${bindir}
+}
-- 
2.7.4

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to