Rasmus Villemoes 7880b21891
pcp: use HOSTTOOLS_DIR variable instead of TMPDIR/hosttools
This is a bit cleaner, and means a few less places that would need
updating in case the TMPDIR bitbake variable gets renamed at some
point in the future:

https://lore.kernel.org/openembedded-core/6aba349f497903351a0cd8d06708e94119bd5d05.camel@pbarker.dev/

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-03-24 09:13:50 -07:00

51 lines
1.3 KiB
BlitzBasic

require pcp.inc
inherit python3native native
#autotools-brokensep
DEPENDS = "python3-native python3-setuptools-native flex-native bison-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}
}