criu: upgrade 1.4 -> 1.6

Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Jianchuan Wang 2015-09-07 13:29:57 +08:00 committed by Bruce Ashfield
parent 2522803277
commit 34a127f3c5
2 changed files with 71 additions and 7 deletions

View File

@ -13,16 +13,17 @@ EXCLUDE_FROM_WORLD = "1"
LIC_FILES_CHKSUM = "file://COPYING;md5=5cc804625b8b491b6b4312f0c9cb5efa" LIC_FILES_CHKSUM = "file://COPYING;md5=5cc804625b8b491b6b4312f0c9cb5efa"
SRCREV = "bda033e1e91ac5b86afd0a9fdb9fcdd581da6185" SRCREV = "4c5b23e52c1dc4e3fbbc7472b92e7b1ce9d22f02"
PR = "r0" PR = "r0"
PV = "1.4+git${SRCPV}" PV = "1.6+git${SRCPV}"
SRC_URI = "git://git.criu.org/crtools.git;protocol=git \ SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
file://0001-criu-Fix-toolchain-hardcode.patch \ file://0001-criu-Fix-toolchain-hardcode.patch \
file://0002-criu-Skip-documentation-install.patch \ file://0002-criu-Skip-documentation-install.patch \
file://0001-criu-Change-libraries-install-directory.patch \
" "
COMPATIBLE_HOST = "(x86_64|arm).*-linux" COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
DEPENDS += "protobuf-c-native protobuf-c" DEPENDS += "protobuf-c-native protobuf-c"
@ -35,8 +36,9 @@ S = "${WORKDIR}/git"
# #
EXTRA_OEMAKE_arm += "ARCH=${CRIU_BUILD_ARCH} WERROR=0" EXTRA_OEMAKE_arm += "ARCH=${CRIU_BUILD_ARCH} WERROR=0"
EXTRA_OEMAKE_x86-64 += "ARCH=${TARGET_ARCH} WERROR=0" EXTRA_OEMAKE_x86-64 += "ARCH=${TARGET_ARCH} WERROR=0"
EXTRA_OEMAKE_aarch64 += "ARCH=${TARGET_ARCH} WERROR=0"
EXTRA_OEMAKE_append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir}" EXTRA_OEMAKE_append += "SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no"
EXTRA_OEMAKE_append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}" EXTRA_OEMAKE_append += "LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}"
CFLAGS += "-D__USE_GNU -D_GNU_SOURCE" CFLAGS += "-D__USE_GNU -D_GNU_SOURCE"
@ -44,12 +46,26 @@ CFLAGS += "-D__USE_GNU -D_GNU_SOURCE"
# overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'" # overide LDFLAGS to allow criu to build without: "x86_64-poky-linux-ld: unrecognized option '-Wl,-O1'"
export LDFLAGS="" export LDFLAGS=""
export BUILD_SYS
export HOST_SYS
inherit setuptools
do_compile_prepend() {
rm -rf ${S}/protobuf/google/protobuf/descriptor.proto
ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/protobuf/google/protobuf/descriptor.proto
}
do_compile () { do_compile () {
oe_runmake oe_runmake
} }
do_install () { do_install () {
oe_runmake DESTDIR="${D}" install oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
} }
FILES_${PN} += "${systemd_unitdir}/" FILES_${PN} += "${systemd_unitdir}/ \
${libdir}/python2.7/site-packages/ \
${libdir}/pycriu/ \
${libdir}/crit-0.0.1-py2.7.egg-info \
"

View File

@ -0,0 +1,48 @@
From cb9933dc34af0b4d52c4584332600114ac65c402 Mon Sep 17 00:00:00 2001
From: Jianchuan Wang <jianchuan.wang@windriver.com>
Date: Tue, 4 Aug 2015 17:45:51 +0800
Subject: [PATCH] criu: Change libraries install directory
Install the libraries into /usr/lib(/usr/lib64)
Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
---
Makefile | 2 +-
Makefile.inc | 9 ---------
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index 7f5c890..6dbc436 100644
--- a/Makefile
+++ b/Makefile
@@ -351,7 +351,7 @@ install-man:
install-crit: crit
$(E) " INSTALL crit"
- $(Q) python scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX)
+ $(Q) python scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --install-lib=$(LIBDIR)
.PHONY: install install-man install-crit install-criu
diff --git a/Makefile.inc b/Makefile.inc
index 5496f41..ba70aea 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -17,14 +17,5 @@ MANDIR := $(PREFIX)/share/man
SYSTEMDUNITDIR := $(PREFIX)/lib/systemd/system/
LOGROTATEDIR := $(PREFIX)/etc/logrotate.d/
LIBDIR := $(PREFIX)/lib
-# For recent Debian/Ubuntu with multiarch support
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture \
- -qDEB_HOST_MULTIARCH 2>/dev/null)
-ifneq "$(DEB_HOST_MULTIARCH)" ""
-LIBDIR := $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
-# For most other systems
-else ifeq "$(shell uname -m)" "x86_64"
-LIBDIR := $(PREFIX)/lib64
-endif
INCLUDEDIR := $(PREFIX)/include/criu
--
1.9.1