2 DEPENDS += "erlang-native openssl"
4 SRC_URI += "file://erts-configure.in.patch;patch=1 \
5 file://erts-emulator-Makefile.in.patch;patch=1 \
6 file://erts-etc-unix-Install.src.patch;patch=1 \
7 file://lib-crypto-c_src-Makefile.in.patch;patch=1 \
8 file://lib-erl_interface-src-Makefile.in.patch;patch=1 \
9 file://Makefile.in.patch;patch=1 \
12 EXTRA_OEMAKE = "BUILD_CC='${BUILD_CC}'"
14 EXTRA_OECONF = "--with-ssl=${STAGING_DIR_HOST}${layout_exec_prefix}"
16 EXTRA_OECONF_append_arm = " --disable-smp-support --disable-hipe"
17 EXTRA_OECONF_append_armeb = " --disable-smp-support --disable-hipe"
18 EXTRA_OECONF_append_mipsel = " --disable-smp-support --disable-hipe"
19 EXTRA_OECONF_append_sh3 = " --disable-smp-support --disable-hipe"
20 EXTRA_OECONF_append_sh4 = " --disable-smp-support --disable-hipe"
22 NATIVE_BIN = "${TMPDIR}/work/erlang-native-${PV}-${PR}/otp_src_${UPSTREAM_VERSION}/bin"
26 cd ${S}/erts; autoreconf; cd -
30 ac_cv_prog_javac_ver_1_2=no \
34 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
38 TARGET=${TARGET_SYS} \
39 PATH=${NATIVE_BIN}:$PATH \
44 TARGET=${TARGET_SYS} \
45 PATH=${NATIVE_BIN}:$PATH \
46 oe_runmake 'INSTALL_PREFIX=${D}' install
48 do sed -i -e 's:ROOTDIR=.*:ROOTDIR=/usr/lib/erlang:' \
49 ${D}/usr/lib/erlang/erts-*/bin/$f ${D}/usr/lib/erlang/bin/$f
53 def get_erlang_libs(d):
55 install_root = bb.data.getVar('D', d, 1)
56 libdir = bb.data.getVar('libdir', d, 1)[1:]
57 libs = ["${bindir}/dialyzer", "${libdir}/erlang/bin/dialyzer"]
58 erlang_lib = os.path.join(install_root, libdir, "erlang/lib")
59 for fname in os.listdir(erlang_lib):
60 if not "-" in fname: continue
61 if fname.startswith("compiler-"): continue
62 if fname.startswith("kernel-"): continue
63 if fname.startswith("sasl-"): continue
64 if fname.startswith("stdlib-"): continue
65 if fname.startswith("tools-"): continue
66 libs.append(os.path.join("${libdir}", "erlang/lib", fname))
70 FILES_${PN}-dbg += " ${libdir}/erlang/bin/.debug ${libdir}/erlang/*/bin/.debug ${libdir}/erlang/lib/*/bin/.debug"
71 FILES_${PN}-libs += " ${@' '.join(get_erlang_libs(d))}"
72 PACKAGES =+ "${PN}-libs"