mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 07:57:27 +00:00
155fd062e2
pcp-native compiles the pcp sources src/pmns/lex.l which does
'#include <readline/readline.h>'. The native recipe only depended on
python3/setuptools/flex/bison, so with the header search correctly
limited to the sysroot
0001-configure-Limit-the-header-search-to-sysroot.patch
the build fails on hosts without readline development headers installed:
lex.l:25:10: fatal error: readline/readline.h: No such file or directory
Depend on readline-native (and ncurses-native, which readline links
against) so the headers and libraries come from the native sysroot
rather than the build host, mirroring the target recipe DEPENDS. This
makes the native build reproducible and host independent.
Verified by building pcp-native from scratch
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
51 lines
1.3 KiB
BlitzBasic
51 lines
1.3 KiB
BlitzBasic
require pcp.inc
|
|
inherit python3native native
|
|
#autotools-brokensep
|
|
DEPENDS = "python3-native python3-setuptools-native flex-native bison-native readline-native ncurses-native"
|
|
|
|
export PCP_DIR = "${D}"
|
|
export PCP_TMP_DIR = "${D}/tmp"
|
|
export PCP_BIN_DIR = "${D}/usr/bin"
|
|
|
|
B = "${S}"
|
|
|
|
do_configure:prepend() {
|
|
export SED=${HOSTTOOLS_DIR}/sed
|
|
export AR=${HOSTTOOLS_DIR}/ar
|
|
# export PYTHON=python3
|
|
|
|
rm -rf ${S}/include/pcp/configsz.h
|
|
rm -rf ${S}/include/pcp/platformsz.h
|
|
|
|
}
|
|
do_compile:prepend() {
|
|
sed -i -e "s,#undef HAVE_64BIT_LONG,,g" \
|
|
-e "s,#undef HAVE_64BIT_PTR,,g" \
|
|
-e "s,#undef PM_SIZEOF_SUSECONDS_T,,g" \
|
|
-e "s,#undef PM_SIZEOF_TIME_T,,g" \
|
|
${S}/src/include/pcp/config.h.in
|
|
|
|
export AR=${HOSTTOOLS_DIR}/ar
|
|
# export PYTHON=python3
|
|
}
|
|
|
|
do_compile() {
|
|
oe_runmake default_pcp
|
|
}
|
|
|
|
do_install () {
|
|
oe_runmake install \
|
|
PCP_ETC_DIR=${D}/${sysconfdir} \
|
|
PCP_SYSCONF_DIR=${D}/${sysconfdir} \
|
|
PCP_VAR_DIR=${D}/${localstatedir} \
|
|
PCP_SHARE_DIR=${D}/${datadir} \
|
|
PCP_BIN_DIR=${D}/${bindir} \
|
|
PCP_BINADM_DIR=${D}/${libexecdir}/pcp/bin \
|
|
PCP_LIBADM_DIR=${D}/${libdir} \
|
|
PCP_LIB_DIR=${D}/${libdir} \
|
|
PCP_MAN_DIR=${D}/${mandir} \
|
|
PCP_DOC_DIR=${D}/${docdir} \
|
|
PCP_SYSTEMDUNIT_DIR=${D}${systemd_system_unitdir}
|
|
}
|
|
|