increase dvbapp PR.
[vuplus_openembedded] / recipes / erlang / erlang_R13B01.bb
1 include erlang.inc
2 DEPENDS += "erlang-native openssl"
3
4 PR = "r2"
5
6 SRC_URI += "\
7             file://erts-emulator-Makefile.in.patch;patch=1 \
8             file://erts-etc-unix-Install.src.patch;patch=1 \
9             file://lib-erl_interface-src-Makefile.in.patch;patch=1 \
10             file://Makefile.in.patch;patch=1 \
11             "
12
13 TARGET_CC_ARCH += "${LDFLAGS}"
14
15 EXTRA_OEMAKE = "BUILD_CC='${BUILD_CC}'"
16
17 EXTRA_OECONF = "--with-ssl=${STAGING_DIR_HOST}${layout_exec_prefix}"
18
19 EXTRA_OECONF_append_arm = " --disable-smp-support --disable-hipe"
20 EXTRA_OECONF_append_armeb = " --disable-smp-support --disable-hipe"
21 EXTRA_OECONF_append_mipsel = " --disable-smp-support --disable-hipe"
22 EXTRA_OECONF_append_sh3 = " --disable-smp-support --disable-hipe"
23 EXTRA_OECONF_append_sh4 = " --disable-smp-support --disable-hipe"
24
25 NATIVE_BIN = "${TMPDIR}/work/erlang-native-${PV}-${PR}/otp_src_${UPSTREAM_VERSION}/bin"
26
27 do_configure() {
28
29     cd ${S}/erts; autoreconf; cd -
30
31     . ${CONFIG_SITE}
32
33     ac_cv_prog_javac_ver_1_2=no \
34     ac_cv_prog_javac_ver_1_5=no \
35         SHLIB_LD='${CC}' \
36     oe_runconf
37
38     sed -i -e 's|$(ERL_TOP)/bin/dialyzer|${NATIVE_BIN}/dialyzer --output_plt $@ -pa $(ERL_TOP)/lib/kernel/ebin -pa $(ERL_TOP)/lib/stdlib/ebin|' lib/dialyzer/src/Makefile
39 }
40
41 do_compile() {
42     TARGET=${TARGET_SYS} \
43     PATH=${NATIVE_BIN}:$PATH \
44     oe_runmake noboot
45 }
46
47 do_install() {
48     TARGET=${TARGET_SYS} \
49     PATH=${NATIVE_BIN}:$PATH \
50     oe_runmake 'INSTALL_PREFIX=${D}' install
51     for f in erl start
52         do sed -i -e 's:ROOTDIR=.*:ROOTDIR=/usr/lib/erlang:' \
53                 ${D}/usr/lib/erlang/erts-*/bin/$f ${D}/usr/lib/erlang/bin/$f
54     done
55 }
56
57 def get_erlang_libs_R13B01(d):
58     import os, bb
59     install_root = bb.data.getVar('D', d, 1)
60     libdir = bb.data.getVar('libdir', d, 1)[1:]
61     libs = ["${bindir}/dialyzer", "${libdir}/erlang/bin/dialyzer"]
62     erlang_lib = os.path.join(install_root, libdir, "erlang/lib")
63     for fname in os.listdir(erlang_lib):
64         if not "-" in fname: continue
65         if fname.startswith("compiler-"): continue
66         if fname.startswith("kernel-"): continue
67         if fname.startswith("sasl-"): continue
68         if fname.startswith("stdlib-"): continue
69         if fname.startswith("tools-"): continue
70         libs.append(os.path.join("${libdir}", "erlang/lib", fname))
71     libs.sort()
72     return libs
73
74 FILES_${PN}-libs-dbg += " ${libdir}/erlang/*/.debug ${libdir}/erlang/*/*/.debug ${libdir}/erlang/*/*/*/.debug ${libdir}/erlang/*/*/*/*/.debug ${libdir}/erlang/*/*/*/*/*/.debug "
75 FILES_${PN}-libs += " ${@' '.join(get_erlang_libs_R13B01(d))}"
76 PACKAGES =+ "${PN}-libs-dbg ${PN}-libs"