added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,53 @@
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=${TMPDIR}/hosttools/sed
export AR=${TMPDIR}/hosttools/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=${TMPDIR}/hosttools/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}
}
#| chkacc1.c:8:10: fatal error: localconfig.h: No such file or directory
#| 8 | #include "localconfig.h"
#| | ^~~~~~~~~~~~~~~
PARALLEL_MAKE = ""

View File

@@ -0,0 +1,32 @@
SUMMARY = "System-level performance monitoring and performance management"
HOMEPAGE = "http://www.pcp.io"
SECTION = "Applications/System"
LICENSE = "GPL-2.0-or-later & LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=37ab75b580d5aad4ada04260efa3702f \
"
COMPATIBLE_HOST:libc-musl = "null"
SRC_URI = "https://performancecopilot.jfrog.io/artifactory/pcp-source-release/${BP}.src.tar.gz \
file://0001-configure-Limit-the-header-search-to-sysroot.patch \
file://config.linux \
"
SRC_URI[sha256sum] = "6ef33b7aa14c09860ba7cd8873e76d38ccd24eab0c94a50e235f813e77fe3610"
inherit setuptools3-base pkgconfig autotools-brokensep
# Specify any options you want to pass to the configure script using EXTRA_OECONF:
CACHED_CONFIGUREVARS = "PACKAGE_DISTRIBUTION=arch"
EXTRA_OECONF:append = " --with-dstat-symlink=yes --with-infiniband=no \
--with-pmdapodman=no --with-python=no --with-python3=yes --with-perl=no \
--with-pmdabcc=no --with-pmdajson=no --with-perfevent=no \
--with-pmdabcc=yes \
--with-rundir=${localstatedir}/run \
--with-sysconfigdir=${sysconfdir} \
--with-logdir=${localstatedir}/log \
--with-docdir=${docdir} \
"
PACKAGECONFIG[qt5] = "--with-qt=yes --with-qt3d=yes,--with-qt=no --with-qt3d=no,qtbase qt3d"
PACKAGECONFIG ?= ""

View File

@@ -0,0 +1,45 @@
From db9e6a4b7a48dee62fccb662347dd638a2d286d5 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@fujitsu.com>
Date: Thu, 2 Dec 2021 14:29:06 +0900
Subject: [PATCH] Remove unsuitble part for cross-compile.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
---
configure.ac | 6 ------
src/libpcp/src/GNUmakefile | 1 -
2 files changed, 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5b25382..5d24714 100644
--- a/configure.ac
+++ b/configure.ac
@@ -623,12 +623,6 @@ fi
which=$WHICH
AC_SUBST(which)
-if test -z "$AR"; then
- AC_PATH_PROGS(AR, [gcc-ar ar], /usr/bin/ar)
-fi
-if test ! -x "$AR"; then
- AC_MSG_ERROR([cannot find a valid 'ar' command.])
-fi
ar=$AR
AC_SUBST(ar)
diff --git a/src/libpcp/src/GNUmakefile b/src/libpcp/src/GNUmakefile
index 3c4ccd6..d1eba19 100644
--- a/src/libpcp/src/GNUmakefile
+++ b/src/libpcp/src/GNUmakefile
@@ -176,7 +176,6 @@ exports: exports.in mk.exports
# cases
#
check.done: $(OBJECTS)
- ./check-statics
touch check.done
ifneq ($(LIBTARGET),)
--
2.25.1

View File

@@ -0,0 +1,88 @@
From 1eb68f65fd73443d862ca5f36f3b6041e2b0f13a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 10 Mar 2022 18:53:13 -0800
Subject: [PATCH] configure: Limit the header search to sysroot
Hardcoded paths in configure.ac means it starts to poke at host system
include paths, which is least we want in a cross build, therefore prefix
these paths with STAGING_SYSROOT
Upstream-Status: Inappropriate [OE Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5d24714..4e2d8ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -913,7 +913,7 @@ AC_DEFUN([PCP_CHECK_PYTHON_HEADER],
[ PY_MAJOR="$1"
PY_MINOR="$2"
PY_VERSION="python$PY_MAJOR.$PY_MINOR"
- PY_INCLUDE_DIRS="-I/usr/include/${PY_VERSION}m -I/usr/include/${PY_VERSION}"
+ PY_INCLUDE_DIRS="-I${STAGING_INCDIR}/${PY_VERSION}m -I${STAGING_INCDIR}/${PY_VERSION}"
saved_CFLAGS="$CFLAGS"
saved_CPPFLAGS="$CPPFLAGS"
CFLAGS="$CFLAGS $PY_INCLUDE_DIRS"
@@ -1524,7 +1524,7 @@ AC_SUBST(qmake)
enable_qt3d=false
AS_IF([test "x$do_qt3d" != "xno"], [
- if test -f /usr/include/Coin3/Inventor/Qt/SoQt.h -o -f /usr/include/Inventor/Qt/SoQt.h
+ if test -f ${STAGING_INCDIR}/Coin3/Inventor/Qt/SoQt.h -o -f ${STAGING_INCDIR}/Inventor/Qt/SoQt.h
then
enable_qt3d=$enable_qt
elif test x"$do_qt3d" = x"yes"
@@ -3810,13 +3810,13 @@ then
saved_CFLAGS="$CFLAGS"
saved_CPPFLAGS="$CPPFLAGS"
- NSS_INC_DIRS="-I/usr/include/nss -I/usr/include/nss3"
- NSPR_INC_DIRS="-I/usr/include/nspr -I/usr/include/nspr4"
+ NSS_INC_DIRS="-I${STAGING_INCDIR}/nss -I${STAGING_INCDIR}/nss3"
+ NSPR_INC_DIRS="-I${STAGING_INCDIR}/nspr -I${STAGING_INCDIR}/nspr4"
CFLAGS="$CFLAGS $NSS_INC_DIRS $NSPR_INC_DIRS"
CPPFLAGS="$CPPFLAGS $NSS_INC_DIRS $NSPR_INC_DIRS"
- AC_CHECK_HEADERS([nss/nss.h], [NSSCFLAGS=-I/usr/include/nss], [
- AC_CHECK_HEADERS([nss3/nss.h], [NSSCFLAGS=-I/usr/include/nss3], [
+ AC_CHECK_HEADERS([nss/nss.h], [NSSCFLAGS=-I${STAGING_INCDIR}/nss], [
+ AC_CHECK_HEADERS([nss3/nss.h], [NSSCFLAGS=-I${STAGING_INCDIR}/nss3], [
enable_secure=false
if test "$do_secure" = "yes"
then
@@ -3826,8 +3826,8 @@ then
])
AC_SUBST(NSSCFLAGS)
- AC_CHECK_HEADERS([nspr/nspr.h], [NSPRCFLAGS=-I/usr/include/nspr], [
- AC_CHECK_HEADERS([nspr4/nspr.h], [NSPRCFLAGS=-I/usr/include/nspr4], [
+ AC_CHECK_HEADERS([nspr/nspr.h], [NSPRCFLAGS=-I${STAGING_INCDIR}/nspr], [
+ AC_CHECK_HEADERS([nspr4/nspr.h], [NSPRCFLAGS=-I${STAGING_INCDIR}/nspr4], [
enable_secure=false
if test "$do_secure" = "yes"
then
@@ -3837,7 +3837,7 @@ then
])
AC_SUBST(NSPRCFLAGS)
- AC_CHECK_HEADERS([sasl/sasl.h], [SASLCFLAGS=-I/usr/include/sasl], [
+ AC_CHECK_HEADERS([sasl/sasl.h], [SASLCFLAGS=-I${STAGING_INCDIR}/sasl], [
enable_secure=false
if test "$do_secure" = "yes"
then
@@ -3938,7 +3938,7 @@ AC_SUBST(enable_decompression)
AC_SUBST(enable_lzma)
dnl check for array sessions
-if test -f /usr/include/sn/arsess.h
+if test -f ${STAGING_INCDIR}/sn/arsess.h
then
pcp_mpi_dirs=libpcp_mpi\ libpcp_mpiread
else
--
2.35.1

View File

@@ -0,0 +1,13 @@
sizeof_int=4
sizeof_long=4
sizeof_pointer=8
sizeof_suseconds_t=8
sizeof_time_t=8
bit_field_scheme=2100
enable_python3='yes'
enable_python3='true'
have_python_OrderedDict="true"
have_python=python3
printf_p_prefix=0x
printf_fmt_int64=I64d
strtoint64=strtoll

View File

@@ -0,0 +1,11 @@
--- a/qa/src/GNUlocaldefs
+++ b/qa/src/GNUlocaldefs
@@ -728,7 +728,7 @@ scale.o: localconfig.h
779246.o: libpcp.h
aggrstore.o: libpcp.h
badmmv.o: libpcp.h
-chkacc1.o: libpcp.h
+chkacc1.o: libpcp.h localconfig.h
chkacc2.o: libpcp.h
chkacc3.o: libpcp.h
chkacc4.o: libpcp.h

View File

@@ -0,0 +1,29 @@
Do not pass cr option
These options are already coming from builddefs
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/src/include/builddefs.in
+++ b/src/include/builddefs.in
@@ -167,7 +167,7 @@ OBJECTS = $(ASFILES:.s=.o) \
#NB: don't override $(MAKE); gnumake sets it well, propagating -j etc.
#MAKE = @make@
-AR = @ar@
+AR = @ar@ cqs
CC = @cc@
CXX = @cxx@
LD = @ld@
--- a/src/include/buildrules
+++ b/src/include/buildrules
@@ -93,7 +93,7 @@ $(STATICLIBTARGET) : $(SUBDIRS) $(OBJECT
ifeq ($(TARGET_OS), darwin)
libtool -static -o $(STATICLIBTARGET) $?
else
- $(AR) cr $(STATICLIBTARGET) $?
+ $(AR) $(STATICLIBTARGET) $?
endif
endif

View File

@@ -0,0 +1,228 @@
require pcp.inc
#inherit perlnative
# NOTE: the following prog dependencies are unknown, ignoring: gtar gzip pkgmk xmlto lzma qshape md5sum pod2man publican git makedepend qmake-qt4 xconfirm true gmake xz dblatex hdiutil rpm bzip2 which mkinstallp dtrace seinfo qmake-qt5 gawk dlltool rpmbuild dpkg makepkg qmake echo
# NOTE: unable to map the following pkg-config dependencies: libmicrohttpd libsystemd-journal
# (this is based on recipes that have previously been built and packaged)
# NOTE: the following library dependencies are unknown, ignoring: nspr gen ibumad regex sasl2 pfm nss papi ibmad
# (this is based on recipes that have previously been built and packaged)
DEPENDS += "perl-native bison-native flex-native python3-native python3-setuptools python3 \
pcp-native cairo zlib ncurses readline libx11 avahi openssl"
SRC_URI += "file://0001-Remove-unsuitble-part-for-cross-compile.patch \
file://pass-options-to-AR.patch \
file://fix_parallel_make.patch \
"
export PCP_DIR="${RECIPE_SYSROOT_NATIVE}"
#export PCP_RUN_DIR="${RECIPE_SYSROOT_NATIVE}"
EXTRA_OEMAKE = "CC="${CC}" LD="${LD}""
inherit useradd systemd features_check
# Needs libx11
REQUIRED_DISTRO_FEATURES = "x11"
SYSTEMD_AUTO_ENABLE:${PN} = "enable"
SYSTEMD_SERVICE:${PN} = "pmcd.service pmcd.service pmie_check.service pmie_farm_check.service \
pmlogger_daily.service pmlogger_farm_check.service pmfind.service \
pmie_daily.service pmlogger.service pmlogger_daily_report.service \
pmproxy.service pmie.service pmie_farm.service pmlogger_check.service \
pmlogger_farm.service"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --home ${localstatedir}/lib/pcp --no-create-home \
--user-group pcp"
USERADD_PACKAGES += "${PN}-testsuite"
USERADD_PARAM:${PN}-testsuite = "--system --home ${localstatedir}/lib/pcp/testsuite --no-create-home \
--user-group pcpqa"
RDEPENDS:${PN} += "perl"
RDEPENDS:${PN}-testsuite += "${PN} bash perl"
RDEPENDS:python3-${PN} += "${PN} python3"
do_configure:prepend () {
cp ${WORKDIR}/config.linux ${B}
rm -rf ${S}/include/pcp/configsz.h
rm -rf ${S}/include/pcp/platformsz.h
export SED=${TMPDIR}/hosttools/sed
export PYTHON=python3
}
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
sed -i -e "s,HAVE_PYTHON_ORDEREDDICT = false,HAVE_PYTHON_ORDEREDDICT = true,g" \
${S}/src/include/builddefs
sed -i -e "s,TOPDIR)/python3-pcp.list,TOPDIR)/python3-pcp.list --install-lib=${PYTHON_SITEPACKAGES_DIR},g" ${S}/src/python/GNUmakefile
export PYTHON=python3
#export PYTHON3=${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}
}
do_compile() {
oe_runmake default_pcp
}
do_install () {
export NO_CHOWN=true
oe_runmake install DIST_ROOT=${D}\
install_pcp
rm -rf ${D}${localstatedir}/log
rm -rf ${D}${localstatedir}/lib/pcp/pmcd
rm -rf ${D}${localstatedir}/lib/pcp/tmp
rm -rf ${D}${localstatedir}/run
mv ${D}${docdir}/C* ${D}${docdir}/pcp-doc/
mv ${D}${docdir}/I* ${D}${docdir}/pcp-doc/
mv ${D}${docdir}/R* ${D}${docdir}/pcp-doc/
mv ${D}${docdir}/V* ${D}${docdir}/pcp-doc/
sed -i "s#PCP_AWK_PROG=.*#PCP_AWK_PROG=awk#" ${D}/${sysconfdir}/pcp.conf
sed -i "s#PCP_SORT_PROG=.*#PCP_SORT_PROG=sort#" ${D}/${sysconfdir}/pcp.conf
sed -i "s#PCP_ECHO_PROG=.*#PCP_ECHO_PROG=echo#" ${D}/${sysconfdir}/pcp.conf
sed -i "s#PCP_WHICH_PROG=.*#PCP_WHICH_PROG=which#" ${D}/${sysconfdir}/pcp.conf
}
PACKAGES += " ${PN}-export-zabbix-agent ${PN}-testsuite \
libpcp-gui2 libpcp-gui2-dev \
libpcp-import1 \
libpcp-mmv1 libpcp-mmv1-dev \
libpcp-pmda3 libpcp-pmda3-dev \
libpcp-trace2 libpcp-trace2-dev \
libpcp-web1 libpcp-web1-dev \
libpcp3 libpcp3-dev python3-${PN}\
"
FILES:libpcp-gui2 = "${libdir}/libpcp_gui.so.2 \
"
FILES:libpcp-gui2-dev = " \
${libdir}/libpcp_gui.so \
${libdir}/libpcp_gui.a \
${includedir}/pmafm.h \
${includedir}/pmtime.h \
"
FILES:libpcp-mmv1 = " \
${libdir}/libpcp_mmv.so.1 \
"
FILES:libpcp-mmv1-dev = " \
${libdir}/libpcp_mmv.a \
${libdir}/libpcp_mmv.so \
${libdir}/libpcp_mmv.so \
${includedir}/mmv_stats.h \
${includedir}/mmv_dev.h \
${datadir}/man/man3/mmv_* \
${datadir}/man/man5/mmv.5.gz \
"
FILES:libpcp-import1 = " \
${libdir}/libpcp_import.so.1 \
"
FILES:libpcp-pmda3 = " \
${libdir}/libpcp_pmda.so.3 \
"
FILES:libpcp-pmda3-dev = " \
${includedir}/pmda.h \
${includedir}/pmdaroot.h \
${libdir}/libpcp_pmda.a \
${libdir}/libpcp_pmda.so \
${libdir}/pkgconfig/libpcp_pmda.pc \
${datadir}/man/man3/PMDA.3.gz \
${datadir}/man/man3/pmda* \
"
FILES:libpcp-trace2 = " \
${libdir}/libpcp_trace.so.2 \
"
FILES:libpcp-trace2-dev = " \
${includedir}/trace.h \
${includedir}/trace_dev.h \
${libdir}/libpcp_trace.a \
${libdir}/libpcp_trace.so \
${datadir}/man/man3/pmtrace* \
"
FILES:libpcp-web1 = " \
${libdir}/libpcp_web.so.1 \
"
FILES:libpcp-web1-dev = " \
${includedir}/pmhttp.h \
${includedir}/pmjson.h \
${libdir}/libpcp_web.a \
${libdir}/libpcp_web.so \
${datadir}/man/man3/pmhttp* \
${datadir}/man/man3/pmjson* \
"
FILES:libpcp3 = " \
${libdir}/libpcp.so.3 \
"
FILES:${PN} = " \
${sysconfdir}/pcp \
${sysconfdir}/cron.d \
${sysconfdir}/init.d \
${libexecdir} \
${bindir} \
${datadir}/bash-completion \
${datadir}/pcp-gui \
${datadir}/zsh \
${systemd_system_unitdir}/ \
${libdir}/pcp/ \
${datadir}/pcp \
${libdir}/*.sh \
${datadir}/man \
${libdir}/rc-proc.sh.minimal \
${sysconfdir}/p* \
${sysconfdir}/s* \
${localstatedir}/lib/pcp/config \
${localstatedir}/lib/pcp/pmdas/ \
${localstatedir}/lib/pcp/pmns \
${libdir}/libpcp_fault.so.3 \
"
FILES:${PN}-export-zabbix-agent += " \
${libdir}/zabbix \
${sysconfdir}/zabbix \
${mandir}/man3/zbxpcp.3.gz \
${libdir}/zabbix \
"
FILES:${PN}-testsuite = "${localstatedir}/lib/pcp/testsuite/"
FILES:python3-${PN} = "${PYTHON_SITEPACKAGES_DIR}"
FILES:${PN}-dev += " \
${includedir}/pcp \
${libdir}/libpcp.a \
${libdir}/libpcp.so \
${localstatedir}/lib/pcp/pmdas/*/*.so \
${libexecdir}/pcp/bin/install-sh \
${libdir}/pkgconfig/libpcp.pc \
${libdir}/zabbix/modules/*.so \
${datadir}/man/man3/LOGIMPORT.3.gz \
${datadir}/man/man3/P* \
${datadir}/man/man3/Q* \
${datadir}/man/man3/__pm* \
${datadir}/man/man3/pmA* \
${datadir}/man/man3/pmC* \
${datadir}/man/man3/pmD* \
${datadir}/man/man3/pmE* \
${datadir}/man/man3/pmF* \
${datadir}/man/man3/pmG* \
${datadir}/man/man3/pmH* \
${datadir}/man/man3/pmI* \
${datadir}/man/man3/pmL* \
${datadir}/man/man3/pmM* \
${datadir}/man/man3/pmN* \
${datadir}/man/man3/pmO* \
${datadir}/man/man3/pmP* \
${datadir}/man/man3/pmR* \
${datadir}/man/man3/pmS* \
${datadir}/man/man3/pmT* \
${datadir}/man/man3/pmU* \
${datadir}/man/man3/pmW* \
${datadir}/man/man3/pmf* \
${datadir}/man/man3/pmg* \
${datadir}/man/man3/pmi* \
${datadir}/man/man3/pms* \
${datadir}/man/man3/pmt* \
"
#| chkacc1.c:8:10: fatal error: localconfig.h: No such file or directory
#| 8 | #include "localconfig.h"
#| | ^~~~~~~~~~~~~~~
PARALLEL_MAKE = ""