diff options
author | Yixun Lan <dlan@gentoo.org> | 2016-03-21 14:14:36 +0800 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2016-03-21 14:14:36 +0800 |
commit | 7598248bcc81e500a1266b6990ad19d932d7c08f (patch) | |
tree | dece2ad27ae6d325f5536eb3bb737223091dc551 /sys-process/criu/criu-2.0-r1.ebuild | |
parent | sys-process/criu: fix LIBDIR path, using $(get_libdir) (diff) | |
download | gentoo-7598248bcc81e500a1266b6990ad19d932d7c08f.tar.gz gentoo-7598248bcc81e500a1266b6990ad19d932d7c08f.tar.bz2 gentoo-7598248bcc81e500a1266b6990ad19d932d7c08f.zip |
sys-process/criu: revision bump since libdir path changed
Package-Manager: portage-2.2.27
Diffstat (limited to 'sys-process/criu/criu-2.0-r1.ebuild')
-rw-r--r-- | sys-process/criu/criu-2.0-r1.ebuild | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/sys-process/criu/criu-2.0-r1.ebuild b/sys-process/criu/criu-2.0-r1.ebuild new file mode 100644 index 000000000000..51da20c002ab --- /dev/null +++ b/sys-process/criu/criu-2.0-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils toolchain-funcs linux-info flag-o-matic python-r1 python-utils-r1 + +DESCRIPTION="utility to checkpoint/restore a process tree" +HOMEPAGE="http://criu.org/" +SRC_URI="http://download.openvz.org/criu/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64" +IUSE="python setproctitle" + +RDEPEND="dev-libs/protobuf-c + dev-libs/libnl:3 + python? ( ${PYTHON_DEPS} ) + setproctitle? ( dev-libs/libbsd )" +DEPEND="${RDEPEND} + app-text/asciidoc + app-text/xmlto" +RDEPEND="${RDEPEND} + python? ( + dev-libs/protobuf[python,${PYTHON_USEDEP}] + dev-python/ipaddr[${PYTHON_USEDEP}] + )" + +CONFIG_CHECK="~CHECKPOINT_RESTORE ~NAMESPACES ~PID_NS ~FHANDLE ~EVENTFD ~EPOLL ~INOTIFY_USER + ~IA32_EMULATION ~UNIX_DIAG ~INET_DIAG ~INET_UDP_DIAG ~PACKET_DIAG ~NETLINK_DIAG" + +RESTRICT="test" + +src_prepare() { + epatch "${FILESDIR}"/${PV}/${P}-flags.patch + epatch "${FILESDIR}"/${PV}/${P}-makefile.patch + epatch "${FILESDIR}"/${PV}/${P}-automagic-libbsd.patch + epatch "${FILESDIR}"/${PV}/${P}-sysroot.patch +} + +criu_arch() { + # criu infers the arch from $(uname -m). We never want this to happen. + case ${ARCH} in + amd64) echo "x86";; + arm64) echo "aarch64";; + *) echo "${ARCH}";; + esac +} + +src_compile() { + RAW_LDFLAGS="$(raw-ldflags)" emake \ + CC="$(tc-getCC)" \ + LD="$(tc-getLD)" \ + OBJCOPY="$(tc-getOBJCOPY)" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + ARCH="$(criu_arch)" \ + V=1 WERROR=0 DEBUG=0 \ + SETPROCTITLE=$(usex setproctitle) \ + PYCRIU=$(usex python) \ + all docs +} + +src_test() { + # root privileges are required to dump all necessary info + if [[ ${EUID} -eq 0 ]] ; then + emake -j1 CC="$(tc-getCC)" ARCH="$(criu_arch)" V=1 WERROR=0 test + fi +} + +install_crit() { + "${PYTHON:-python}" ../scripts/crit-setup.py install --root="${D}" --prefix="${EPREFIX}/usr/" +} + +src_install() { + emake \ + ARCH="$(criu_arch)" \ + PREFIX="${EPREFIX}"/usr \ + LOGROTATEDIR="${EPREFIX}"/etc/logrotate.d \ + DESTDIR="${D}" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + install + + dodoc CREDITS README.md + + if use python ; then + cd lib + python_foreach_impl install_crit + fi +} |