From 74d51c8c3e18a8b6738aff0c6f7ff706fd70eaa6 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 13:57:02 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- ...efile-use-g-from-environment-if-available.patch | 44 +++++++++++++++++++++ ...ile-Add-support-for-building-on-powerpc64.patch | 46 ++++++++++++++++++++++ ...Makefile-Add-support-for-building-on-ARM7.patch | 46 ++++++++++++++++++++++ recipes-test/udt/udt_git.bb | 46 ++++++++++++++++++++++ 4 files changed, 182 insertions(+) create mode 100644 recipes-test/udt/files/0001-Makefile-use-g-from-environment-if-available.patch create mode 100644 recipes-test/udt/files/0002-Makefile-Add-support-for-building-on-powerpc64.patch create mode 100644 recipes-test/udt/files/0003-Makefile-Add-support-for-building-on-ARM7.patch create mode 100644 recipes-test/udt/udt_git.bb (limited to 'recipes-test/udt') 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 @@ +From 7a8fce8a763f4ce5d750916cc0aae0c47e6d0a1b Mon Sep 17 00:00:00 2001 +From: Josep Puigdemont +Date: Thu, 8 May 2014 14:49:21 +0200 +Subject: [PATCH 1/2] Makefile: use g++ from environment if available + +Signed-off-by: Josep Puigdemont + +Upstream-Status: Pending +--- + udt4/app/Makefile | 6 +++++- + udt4/src/Makefile | 6 +++++- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/udt4/app/Makefile b/udt4/app/Makefile +index 9d16c0f..0ee2562 100644 +--- a/udt4/app/Makefile ++++ b/udt4/app/Makefile +@@ -1,4 +1,8 @@ +-C++ = g++ ++ifndef CXX ++ C++ = g++ ++else ++ C++ = $(CXX) ++endif + + ifndef os + os = LINUX +diff --git a/udt4/src/Makefile b/udt4/src/Makefile +index bc1e049..1f64b8d 100644 +--- a/udt4/src/Makefile ++++ b/udt4/src/Makefile +@@ -1,4 +1,8 @@ +-C++ = g++ ++ifndef CXX ++ C++ = g++ ++else ++ C++ = $(CXX) ++endif + + ifndef os + os = LINUX +-- +1.9.0 + 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 @@ +From 9bf5e5746bb57d78162210f7f7cddb002c704f84 Mon Sep 17 00:00:00 2001 +From: Josep Puigdemont +Date: Thu, 8 May 2014 15:00:07 +0200 +Subject: [PATCH 2/2] Makefile: Add support for building on powerpc64 + +Signed-off-by: Josep Puigdemont + +Upstream-Status: Pending +--- + udt4/app/Makefile | 4 ++++ + udt4/src/Makefile | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/udt4/app/Makefile b/udt4/app/Makefile +index 0ee2562..b046b83 100644 +--- a/udt4/app/Makefile ++++ b/udt4/app/Makefile +@@ -22,6 +22,10 @@ ifeq ($(arch), POWERPC) + CCFLAGS += -mcpu=powerpc + endif + ++ifeq ($(arch), POWERPC64) ++ CCFLAGS += -mcpu=powerpc64 ++endif ++ + ifeq ($(arch), IA64) + CCFLAGS += -DIA64 + endif +diff --git a/udt4/src/Makefile b/udt4/src/Makefile +index 1f64b8d..0d94d48 100644 +--- a/udt4/src/Makefile ++++ b/udt4/src/Makefile +@@ -22,6 +22,10 @@ ifeq ($(arch), POWERPC) + CCFLAGS += -mcpu=powerpc + endif + ++ifeq ($(arch), POWERPC64) ++ CCFLAGS += -mcpu=powerpc64 ++endif ++ + ifeq ($(arch), SPARC) + CCFLAGS += -DSPARC + endif +-- +1.9.0 + 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 @@ +From 96dafd845546d585616c8d5744c0123dd08b7443 Mon Sep 17 00:00:00 2001 +From: Josep Puigdemont +Date: Sat, 10 May 2014 17:12:28 +0200 +Subject: [PATCH 3/3] Makefile: Add support for building on ARM7 + +Signed-off-by: Josep Puigdemont +Upstream-Status: Pending + +--- + udt4/app/Makefile | 4 ++++ + udt4/src/Makefile | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/udt4/app/Makefile b/udt4/app/Makefile +index b046b83..5336e2d 100644 +--- a/udt4/app/Makefile ++++ b/udt4/app/Makefile +@@ -34,6 +34,10 @@ ifeq ($(arch), SPARC) + CCFLAGS += -DSPARC + endif + ++ifeq ($(arch), ARM7) ++ CCFLAGS += -mcpu=arm7 ++endif ++ + LDFLAGS = -L../src -ludt -lstdc++ -lpthread -lm + + ifeq ($(os), UNIX) +diff --git a/udt4/src/Makefile b/udt4/src/Makefile +index 0d94d48..4153bcd 100644 +--- a/udt4/src/Makefile ++++ b/udt4/src/Makefile +@@ -38,6 +38,10 @@ ifeq ($(arch), AMD64) + CCFLAGS += -DAMD64 + endif + ++ifeq ($(arch), ARM7) ++ CCFLAGS += -mcpu=arm7 ++endif ++ + 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 + DIR = $(shell pwd) + +-- +1.9.0 + 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 @@ +SUMMARY = "UDP-based Data Transfer" +DESCRIPTION = "UDT is a reliable UDP based application level data transport protocol for distributed data intensive applications over wide area high-speed networks." +HOMEPAGE = "http://udt.sourceforge.net/" +SECTION = "net/utils" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=567e8c8da655afbe9ad8ec73696cc31e" + +SRCREV = "6b4216d8a4c9b8e1e9413ad6cf473f71e7b80502" +SRC_URI = "git://git.code.sf.net/p/udt/git \ + file://0001-Makefile-use-g-from-environment-if-available.patch;striplevel=2 \ + file://0002-Makefile-Add-support-for-building-on-powerpc64.patch;striplevel=2 \ + file://0003-Makefile-Add-support-for-building-on-ARM7.patch;striplevel=2 \ + " + +S = "${WORKDIR}/git/udt4" +B = "${S}" + +FILES_${PN} = "${bindir}/sendfile ${bindir}/recvfile ${libdir}/libudt.so" +FILES_${PN}-dbg = "${bindir}/.debug/* ${libdir}/.debug/*" +FILES_${PN}-dev = "" + +# UDT has a non-standard way of representing architectures +def get_udt_arch(bb, d): + target_arch = bb.data.getVar('TARGET_ARCH', d, 1) + arch_map = { + 'i386': 'IA32', + 'x86_64': 'AMD64', + 'powerpc': 'POWERPC', + 'powerpc64': 'POWERPC64', + 'ia64': 'IA64', + 'arm': 'ARM7', + } + # Let non-existant arches trigger a KeyError + return arch_map[target_arch] + +do_compile() { + make -C ${S} os=LINUX arch=${@get_udt_arch(bb, d)} +} + +do_install() { + install -m 0755 -d ${D}/${bindir} + install -m 0755 ${S}/app/sendfile ${D}/${bindir} + install -m 0755 ${S}/app/recvfile ${D}/${bindir} + install -m 0755 -d ${D}/${libdir} + install -m 0755 ${S}/src/libudt.so ${D}/${libdir} +} -- cgit v1.2.3-54-g00ecf