summaryrefslogtreecommitdiff
path: root/recipes/uclibc++/uclibc++_0.1.9.bb
blob: be1ac1435c04950bfbb975a5f276a45c6998b090 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
DESCRIPTION = "A C++ standard library targeted towards the embedded \
systems/software market."
HOMEPAGE = "http://cxx.uclibc.org/"
LICENSE = "LGPL"
PRIORITY = "optional"
SECTION = "libs"

PR = "r2"

SRC_URI = "http://cxx.uclibc.org/src/uClibc++-${PV}.tbz2 \
	   file://nobash.patch \
	   file://defconfig"
S = "${WORKDIR}/uClibc++"

# uClibc++ runtime prefix directory (UCLIBCXX_RUNTIME_PREFIX) [/usr/$(TARGET_ARCH)-linux-uclibc] (NEW)
# uClibc++ header file subdirectory (UCLIBCXX_RUNTIME_INCLUDE_SUBDIR) [/include] (NEW)
# uClibc++ library subdirectory (UCLIBCXX_RUNTIME_LIB_SUBDIR) [/lib] (NEW)
# uClibc++ application file subdirectory (UCLIBCXX_RUNTIME_BIN_SUBDIR) [/bin] (NEW)

do_unpack_real () {
	bzcat uClibc++-${PV}.tbz2 | tar -xvf -
}
do_unpack_real[dirs] = "${WORKDIR}"
addtask unpack_real before do_patch after do_unpack

EXTRA_OEMAKE = "'OPTIMIZATION=' 'XWARNINGS=' 'XARCH_CFLAGS=${CFLAGS}' \
		'CPU_FLAGS=' 'STRIPTOOL=true' 'LD=${LD}'"
configmangle = 's,^UCLIBCXX_RUNTIME_PREFIX=.*,UCLIBCXX_RUNTIME_PREFIX="${exec_prefix}",; \
		s,^UCLIBCXX_RUNTIME_INCLUDE_SUBDIR=.*,UCLIBCXX_RUNTIME_INCLUDE_SUBDIR="/include/c++-uc",; \
		s,^UCLIBCXX_RUNTIME_LIB_SUBDIR=.*,UCLIBCXX_RUNTIME_LIB_SUBDIR="/lib",; \
		s,^UCLIBCXX_RUNTIME_BIN_SUBDIR=.*,UCLIBCXX_RUNTIME_BIN_SUBDIR="/bin",;'
PARALLEL_MAKE = ""

do_configure () {
	cp ${WORKDIR}/defconfig ${S}/.config

	perl -i -p -e 's,^CROSS=.*,TARGET_ARCH=${TARGET_ARCH}\nCROSS=${TARGET_PREFIX},g' ${S}/Rules.mak
	perl -i -p -e '${configmangle}' ${S}/.config

	oe_runmake oldconfig
}

do_install () {
	oe_runmake 'DESTDIR=${D}' install
	chmod +x ${D}${libdir}/libuClibc++.so.*
}

PACKAGES = "g++-uc libuclibc++ libuclibc++-dev"
FILES_g++-uc = "${bindir}/g++-uc"
FILES_libuclibc++ = "${libdir}/*.so.*"
FILES_libuclibc++-dev = "${FILES_uclibc++-dev}"

SRC_URI[md5sum] = "ebf58e04d72eab5c131c2c9118737024"
SRC_URI[sha256sum] = "82342a5d6088421e79699dd7af614ebecf6dd335eabce07690902a379f5ea8de"