summaryrefslogtreecommitdiffstats
path: root/recipes-containers/criu/criu_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/criu/criu_git.bb')
-rw-r--r--recipes-containers/criu/criu_git.bb44
1 files changed, 33 insertions, 11 deletions
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
index 7cadda24..c4539e34 100644
--- a/recipes-containers/criu/criu_git.bb
+++ b/recipes-containers/criu/criu_git.bb
@@ -19,11 +19,12 @@ PV = "3.19.0+git"
19SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=master;protocol=https \ 19SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=master;protocol=https \
20 file://0001-criu-Skip-documentation-install.patch \ 20 file://0001-criu-Skip-documentation-install.patch \
21 file://0002-criu-Change-libraries-install-directory.patch \ 21 file://0002-criu-Change-libraries-install-directory.patch \
22 file://0003-crit-pycriu-build-and-install-wheels.patch \
22 " 23 "
23 24
24COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" 25COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
25 26
26DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native libbsd libnet python3-pip-native" 27DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native libbsd libnet"
27RDEPENDS:${PN} = "bash cgroup-lite" 28RDEPENDS:${PN} = "bash cgroup-lite"
28 29
29S = "${WORKDIR}/git" 30S = "${WORKDIR}/git"
@@ -40,7 +41,7 @@ EXTRA_OEMAKE:aarch64 += "ARCH=aarch64 WERROR=0"
40EXTRA_OEMAKE:append = " SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no" 41EXTRA_OEMAKE:append = " SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no"
41EXTRA_OEMAKE:append = " LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}" 42EXTRA_OEMAKE:append = " LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}"
42 43
43CFLAGS += "-D__USE_GNU -D_GNU_SOURCE " 44CFLAGS += "-D__USE_GNU -D_GNU_SOURCE "
44 45
45CFLAGS += " -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3" 46CFLAGS += " -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3"
46CFLAGS:arm += "-D__WORDSIZE" 47CFLAGS:arm += "-D__WORDSIZE"
@@ -53,7 +54,8 @@ export BUILD_SYS
53export HOST_SYS 54export HOST_SYS
54export HOSTCFLAGS = "${BUILD_CFLAGS}" 55export HOSTCFLAGS = "${BUILD_CFLAGS}"
55 56
56inherit setuptools3 57inherit python_setuptools_build_meta
58#inherit setuptools3
57inherit pkgconfig 59inherit pkgconfig
58 60
59B = "${S}" 61B = "${S}"
@@ -71,27 +73,47 @@ do_compile:prepend() {
71 ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/images/google/protobuf/descriptor.proto 73 ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/images/google/protobuf/descriptor.proto
72} 74}
73 75
76#PEP517_SOURCE_PATH ="${S}/lib"
77
78#do_compile[network] = "1"
79
74do_compile () { 80do_compile () {
75 oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python3 81 #python_pep517_do_compile
82 #export PEP517_SOURCE_PATH="${S}/crit"
83 #python_pep517_do_compile
84 #oe_runmake
85 #oe_runmake #PIP_BREAK_SYSTEM_PACKAGES=1
86 export PEP517_WHEEL_PATH="${PEP517_WHEEL_PATH}"
87 oe_runmake FULL_PYTHON=${PYTHON} PYTHON=nativepython3
76} 88}
77 89
90#do_install[network] = "1"
91
78do_install () { 92do_install () {
79 export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages" 93 export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
80 oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" PLUGINDIR="${localstatedir}/lib" FULL_PYTHON=${PYTHON} PYTHON=python3 install 94 export PEP517_WHEEL_PATH="${PEP517_WHEEL_PATH}"
95 #oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" PLUGINDIR="${localstatedir}/lib" PIP_BREAK_SYSTEM_PACKAGES=1 install
96 oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" PLUGINDIR="${localstatedir}/lib" FULL_PYTHON=${PYTHON} PYTHON=nativepython3 install
81 97
82 # python3's distutils has a feature of rewriting the interpeter on setup installed 98 # python3's distutils has a feature of rewriting the interpeter on setup installed
83 # scripts. 'crit' is one of those scripts. The "executable" or "e" option to the 99 # scripts. 'crit' is one of those scripts. The "executable" or "e" option to the
84 # setup call should fix it, but it is being ignored. So to avoid getting our native 100 # setup call should fix it, but it is being ignored. So to avoid getting our native
85 # intepreter replaced in the script, we'll do an explicit update ourselves. 101 # intepreter replaced in the script, we'll do an explicit update ourselves.
86 sed -i 's%^\#\!.*%\#\!/usr/bin/env python3%' ${D}/usr/bin/crit ${D}${libdir}/python3*/site-packages/crit-*-py3*.egg/EGG-INFO/scripts/crit 102 #
87 103 # we're building wheels now, so EGG-INFO need not apply
88 rm -rf ${D}/__pycache__ 104 #sed -i 's%^\#\!.*%\#\!/usr/bin/env python3%' ${D}/usr/bin/crit ${D}${libdir}/python3*/site-packages/crit-*-py3*.egg/EGG-INFO/scripts/crit
105
106 # all the __pycache__ contains references to TMPDIR and these will be built the first time
107 # it runs on the target anyway
108 for pycachedir in $(find ${D} -name __pycache__); do
109 rm -rf $pycachedir
110 done
89} 111}
90 112
91FILES:${PN} += "${systemd_unitdir}/ \ 113FILES:${PN} += "${systemd_unitdir}/ \
92 ${libdir}/python3*/site-packages/ \ 114 #${libdir}/python3*/site-packages/ \
93 ${libdir}/pycriu/ \ 115 #${libdir}/pycriu/ \
94 ${libdir}/crit-0.0.1-py3*.egg-info \ 116 #${libdir}/crit-0.0.1-py3*.egg-info \
95 " 117 "
96 118
97FILES:${PN}-staticdev += " \ 119FILES:${PN}-staticdev += " \