From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E3CA759CA4 for ; Tue, 15 Mar 2016 15:13:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5D481E085C; Tue, 15 Mar 2016 15:13:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 86EBFE085C for ; Tue, 15 Mar 2016 15:13:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 75428340D56 for ; Tue, 15 Mar 2016 15:13:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AB97584F for ; Tue, 15 Mar 2016 15:13:07 +0000 (UTC) From: "Alexis Ballier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexis Ballier" Message-ID: <1458054775.5fcb6dedbe1b7a139ff1951f9964baaebb2ba3ef.aballier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/files/2.0/, sys-process/criu/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-process/criu/criu-2.0.ebuild sys-process/criu/files/2.0/criu-2.0-makefile.patch X-VCS-Directories: sys-process/criu/ sys-process/criu/files/2.0/ X-VCS-Committer: aballier X-VCS-Committer-Name: Alexis Ballier X-VCS-Revision: 5fcb6dedbe1b7a139ff1951f9964baaebb2ba3ef X-VCS-Branch: master Date: Tue, 15 Mar 2016 15:13:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 207cde37-ec9e-4893-a2ad-f2e4b0091215 X-Archives-Hash: 2b1850eb50ec3cdfa7d0309c8b7eaa4e commit: 5fcb6dedbe1b7a139ff1951f9964baaebb2ba3ef Author: Alexis Ballier gentoo org> AuthorDate: Tue Mar 15 15:01:08 2016 +0000 Commit: Alexis Ballier gentoo org> CommitDate: Tue Mar 15 15:12:55 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fcb6ded sys-process/criu: Add python useflag and fix build with LDFLAGS not matching default. Adapt makefile patch to use RAW_LDFLAGS for ld which we feed from ebuild. Patch makefile to allow disabling python and make it optional with proper deps, bug #576716. Package-Manager: portage-2.2.28 Signed-off-by: Alexis Ballier gentoo.org> sys-process/criu/criu-2.0.ebuild | 24 +++++++-- sys-process/criu/files/2.0/criu-2.0-makefile.patch | 58 +++++++++++++++++----- 2 files changed, 67 insertions(+), 15 deletions(-) diff --git a/sys-process/criu/criu-2.0.ebuild b/sys-process/criu/criu-2.0.ebuild index 90689a6..2d4b80a 100644 --- a/sys-process/criu/criu-2.0.ebuild +++ b/sys-process/criu/criu-2.0.ebuild @@ -4,7 +4,9 @@ EAPI=5 -inherit eutils toolchain-funcs linux-info flag-o-matic +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/" @@ -13,13 +15,19 @@ SRC_URI="http://download.openvz.org/criu/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~arm ~arm64" -IUSE="setproctitle" +IUSE="python setproctitle" RDEPEND="dev-libs/protobuf-c + 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" @@ -42,13 +50,14 @@ criu_arch() { } src_compile() { - emake \ + RAW_LDFLAGS="$(raw-ldflags)" emake \ CC="$(tc-getCC)" \ LD="$(tc-getLD)" \ OBJCOPY="$(tc-getOBJCOPY)" \ ARCH="$(criu_arch)" \ V=1 WERROR=0 DEBUG=0 \ SETPROCTITLE=$(usex setproctitle) \ + PYCRIU=$(usex python) \ all docs } @@ -59,6 +68,10 @@ src_test() { fi } +install_crit() { + "${PYTHON:-python}" ../scripts/crit-setup.py install --root=${D} --prefix="${EPREFIX}/usr/" +} + src_install() { emake \ ARCH="$(criu_arch)" \ @@ -68,4 +81,9 @@ src_install() { install dodoc CREDITS README.md + + if use python ; then + cd lib + python_foreach_impl install_crit + fi } diff --git a/sys-process/criu/files/2.0/criu-2.0-makefile.patch b/sys-process/criu/files/2.0/criu-2.0-makefile.patch index 4c7d67f..b9c9cb4 100644 --- a/sys-process/criu/files/2.0/criu-2.0-makefile.patch +++ b/sys-process/criu/files/2.0/criu-2.0-makefile.patch @@ -1,7 +1,7 @@ -diff --git a/Makefile.install b/Makefile.install -index 6fcf25e..0d12ff9 100644 ---- a/Makefile.install -+++ b/Makefile.install +Index: criu-2.0/Makefile.install +=================================================================== +--- criu-2.0.orig/Makefile.install ++++ criu-2.0/Makefile.install @@ -5,13 +5,12 @@ PREFIX ?= /usr/local SBINDIR ?= $(PREFIX)/sbin MANDIR ?= $(PREFIX)/share/man @@ -18,17 +18,51 @@ index 6fcf25e..0d12ff9 100644 ifneq "$(DEB_HOST_MULTIARCH)" "" LIBDIR ?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH) else -diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk -index 10a5d44..6b20569 100644 ---- a/scripts/nmk/scripts/build.mk -+++ b/scripts/nmk/scripts/build.mk -@@ -43,7 +43,9 @@ builtin-name := $(strip $(builtin-name)) +Index: criu-2.0/scripts/nmk/scripts/build.mk +=================================================================== +--- criu-2.0.orig/scripts/nmk/scripts/build.mk ++++ criu-2.0/scripts/nmk/scripts/build.mk +@@ -43,7 +43,7 @@ builtin-name := $(strip $(builtin-name)) # # Link flags. -+ld_filter_flags = -Wl,-O1 -Wl,--as-needed - ld_flags := $(strip $(LDFLAGS) $(ldflags-y)) -+ld_flags := $(filter-out $(ld_filter_flags),$(ld_flags)) +-ld_flags := $(strip $(LDFLAGS) $(ldflags-y)) ++ld_flags := $(strip $(RAW_LDFLAGS) $(ldflags-y)) # # Prepare targets. +Index: criu-2.0/lib/Makefile +=================================================================== +--- criu-2.0.orig/lib/Makefile ++++ criu-2.0/lib/Makefile +@@ -20,10 +20,12 @@ PHONY += lib-c + + # + # Python bindings. ++ifeq ($(PYCRIU),yes) + lib-py: + $(call msg-gen, $@) + $(Q) $(MAKE) -C py all + PHONY += lib-py ++endif + + clean: + $(call msg-clean, lib-c) +@@ -37,7 +39,7 @@ all: $(PHONY) + @true + PHONY += all + +-install: lib-c lib-py ../crit/crit c/criu.pc.in ++install: lib-c ../crit/crit c/criu.pc.in + $(E) " INSTALL " $(CRIU_SO) + $(Q) mkdir -p $(DESTDIR)$(LIBDIR) + $(Q) install -m 755 c/$(CRIU_SO) $(DESTDIR)$(LIBDIR)/$(CRIU_SO).$(CRIU_SO_VERSION_MAJOR).$(CRIU_SO_VERSION_MINOR) +@@ -49,8 +51,6 @@ install: lib-c lib-py ../crit/crit c/cri + $(Q) mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig + $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc + $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig +- $(E) " INSTALL " crit +- $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) + .PHONY: install + + .PHONY: $(PHONY) clean