summaryrefslogtreecommitdiffstats
path: root/recipes-test/udt
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-test/udt')
-rw-r--r--recipes-test/udt/files/0001-Makefile-use-g-from-environment-if-available.patch44
-rw-r--r--recipes-test/udt/files/0002-Makefile-Add-support-for-building-on-powerpc64.patch46
-rw-r--r--recipes-test/udt/files/0003-Makefile-Add-support-for-building-on-ARM7.patch46
-rw-r--r--recipes-test/udt/udt_git.bb46
4 files changed, 182 insertions, 0 deletions
diff --git a/recipes-test/udt/files/0001-Makefile-use-g-from-environment-if-available.patch b/recipes-test/udt/files/0001-Makefile-use-g-from-environment-if-available.patch
new file mode 100644
index 0000000..c7c1b02
--- /dev/null
+++ b/recipes-test/udt/files/0001-Makefile-use-g-from-environment-if-available.patch
@@ -0,0 +1,44 @@
1From 7a8fce8a763f4ce5d750916cc0aae0c47e6d0a1b Mon Sep 17 00:00:00 2001
2From: Josep Puigdemont <josep.puigdemont@enea.com>
3Date: Thu, 8 May 2014 14:49:21 +0200
4Subject: [PATCH 1/2] Makefile: use g++ from environment if available
5
6Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
7
8Upstream-Status: Pending
9---
10 udt4/app/Makefile | 6 +++++-
11 udt4/src/Makefile | 6 +++++-
12 2 files changed, 10 insertions(+), 2 deletions(-)
13
14diff --git a/udt4/app/Makefile b/udt4/app/Makefile
15index 9d16c0f..0ee2562 100644
16--- a/udt4/app/Makefile
17+++ b/udt4/app/Makefile
18@@ -1,4 +1,8 @@
19-C++ = g++
20+ifndef CXX
21+ C++ = g++
22+else
23+ C++ = $(CXX)
24+endif
25
26 ifndef os
27 os = LINUX
28diff --git a/udt4/src/Makefile b/udt4/src/Makefile
29index bc1e049..1f64b8d 100644
30--- a/udt4/src/Makefile
31+++ b/udt4/src/Makefile
32@@ -1,4 +1,8 @@
33-C++ = g++
34+ifndef CXX
35+ C++ = g++
36+else
37+ C++ = $(CXX)
38+endif
39
40 ifndef os
41 os = LINUX
42--
431.9.0
44
diff --git a/recipes-test/udt/files/0002-Makefile-Add-support-for-building-on-powerpc64.patch b/recipes-test/udt/files/0002-Makefile-Add-support-for-building-on-powerpc64.patch
new file mode 100644
index 0000000..9192474
--- /dev/null
+++ b/recipes-test/udt/files/0002-Makefile-Add-support-for-building-on-powerpc64.patch
@@ -0,0 +1,46 @@
1From 9bf5e5746bb57d78162210f7f7cddb002c704f84 Mon Sep 17 00:00:00 2001
2From: Josep Puigdemont <josep.puigdemont@enea.com>
3Date: Thu, 8 May 2014 15:00:07 +0200
4Subject: [PATCH 2/2] Makefile: Add support for building on powerpc64
5
6Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
7
8Upstream-Status: Pending
9---
10 udt4/app/Makefile | 4 ++++
11 udt4/src/Makefile | 4 ++++
12 2 files changed, 8 insertions(+)
13
14diff --git a/udt4/app/Makefile b/udt4/app/Makefile
15index 0ee2562..b046b83 100644
16--- a/udt4/app/Makefile
17+++ b/udt4/app/Makefile
18@@ -22,6 +22,10 @@ ifeq ($(arch), POWERPC)
19 CCFLAGS += -mcpu=powerpc
20 endif
21
22+ifeq ($(arch), POWERPC64)
23+ CCFLAGS += -mcpu=powerpc64
24+endif
25+
26 ifeq ($(arch), IA64)
27 CCFLAGS += -DIA64
28 endif
29diff --git a/udt4/src/Makefile b/udt4/src/Makefile
30index 1f64b8d..0d94d48 100644
31--- a/udt4/src/Makefile
32+++ b/udt4/src/Makefile
33@@ -22,6 +22,10 @@ ifeq ($(arch), POWERPC)
34 CCFLAGS += -mcpu=powerpc
35 endif
36
37+ifeq ($(arch), POWERPC64)
38+ CCFLAGS += -mcpu=powerpc64
39+endif
40+
41 ifeq ($(arch), SPARC)
42 CCFLAGS += -DSPARC
43 endif
44--
451.9.0
46
diff --git a/recipes-test/udt/files/0003-Makefile-Add-support-for-building-on-ARM7.patch b/recipes-test/udt/files/0003-Makefile-Add-support-for-building-on-ARM7.patch
new file mode 100644
index 0000000..45381a4
--- /dev/null
+++ b/recipes-test/udt/files/0003-Makefile-Add-support-for-building-on-ARM7.patch
@@ -0,0 +1,46 @@
1From 96dafd845546d585616c8d5744c0123dd08b7443 Mon Sep 17 00:00:00 2001
2From: Josep Puigdemont <josep.puigdemont@enea.com>
3Date: Sat, 10 May 2014 17:12:28 +0200
4Subject: [PATCH 3/3] Makefile: Add support for building on ARM7
5
6Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
7Upstream-Status: Pending
8
9---
10 udt4/app/Makefile | 4 ++++
11 udt4/src/Makefile | 4 ++++
12 2 files changed, 8 insertions(+)
13
14diff --git a/udt4/app/Makefile b/udt4/app/Makefile
15index b046b83..5336e2d 100644
16--- a/udt4/app/Makefile
17+++ b/udt4/app/Makefile
18@@ -34,6 +34,10 @@ ifeq ($(arch), SPARC)
19 CCFLAGS += -DSPARC
20 endif
21
22+ifeq ($(arch), ARM7)
23+ CCFLAGS += -mcpu=arm7
24+endif
25+
26 LDFLAGS = -L../src -ludt -lstdc++ -lpthread -lm
27
28 ifeq ($(os), UNIX)
29diff --git a/udt4/src/Makefile b/udt4/src/Makefile
30index 0d94d48..4153bcd 100644
31--- a/udt4/src/Makefile
32+++ b/udt4/src/Makefile
33@@ -38,6 +38,10 @@ ifeq ($(arch), AMD64)
34 CCFLAGS += -DAMD64
35 endif
36
37+ifeq ($(arch), ARM7)
38+ CCFLAGS += -mcpu=arm7
39+endif
40+
41 OBJS = api.o buffer.o cache.o ccc.o channel.o common.o core.o epoll.o list.o md5.o packet.o queue.o window.o
42 DIR = $(shell pwd)
43
44--
451.9.0
46
diff --git a/recipes-test/udt/udt_git.bb b/recipes-test/udt/udt_git.bb
new file mode 100644
index 0000000..a2fa358
--- /dev/null
+++ b/recipes-test/udt/udt_git.bb
@@ -0,0 +1,46 @@
1SUMMARY = "UDP-based Data Transfer"
2DESCRIPTION = "UDT is a reliable UDP based application level data transport protocol for distributed data intensive applications over wide area high-speed networks."
3HOMEPAGE = "http://udt.sourceforge.net/"
4SECTION = "net/utils"
5LICENSE = "BSD"
6LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=567e8c8da655afbe9ad8ec73696cc31e"
7
8SRCREV = "6b4216d8a4c9b8e1e9413ad6cf473f71e7b80502"
9SRC_URI = "git://git.code.sf.net/p/udt/git \
10 file://0001-Makefile-use-g-from-environment-if-available.patch;striplevel=2 \
11 file://0002-Makefile-Add-support-for-building-on-powerpc64.patch;striplevel=2 \
12 file://0003-Makefile-Add-support-for-building-on-ARM7.patch;striplevel=2 \
13 "
14
15S = "${WORKDIR}/git/udt4"
16B = "${S}"
17
18FILES_${PN} = "${bindir}/sendfile ${bindir}/recvfile ${libdir}/libudt.so"
19FILES_${PN}-dbg = "${bindir}/.debug/* ${libdir}/.debug/*"
20FILES_${PN}-dev = ""
21
22# UDT has a non-standard way of representing architectures
23def get_udt_arch(bb, d):
24 target_arch = bb.data.getVar('TARGET_ARCH', d, 1)
25 arch_map = {
26 'i386': 'IA32',
27 'x86_64': 'AMD64',
28 'powerpc': 'POWERPC',
29 'powerpc64': 'POWERPC64',
30 'ia64': 'IA64',
31 'arm': 'ARM7',
32 }
33 # Let non-existant arches trigger a KeyError
34 return arch_map[target_arch]
35
36do_compile() {
37 make -C ${S} os=LINUX arch=${@get_udt_arch(bb, d)}
38}
39
40do_install() {
41 install -m 0755 -d ${D}/${bindir}
42 install -m 0755 ${S}/app/sendfile ${D}/${bindir}
43 install -m 0755 ${S}/app/recvfile ${D}/${bindir}
44 install -m 0755 -d ${D}/${libdir}
45 install -m 0755 ${S}/src/libudt.so ${D}/${libdir}
46}