dev-util/rr: ass IUSE=multilib, bug #636786
authorSergei Trofimovich <slyfox@gentoo.org>
Thu, 9 May 2019 22:25:54 +0000 (23:25 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Thu, 9 May 2019 22:26:17 +0000 (23:26 +0100)
rr has a support to replay both 32-bit and 64-bit binaries
on amd64. For that it probes toolchain with -m32 support.

On non-multilib profiles -m32 does not work as we don't
have 32-bit glibc anf libgcc.

Guard the autodetection behing USE=multilib.

Reported-by: Alexander Sergeyev
Reported-by: Quentin Minster
Closes: https://bugs.gentoo.org/636786
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
dev-util/rr/rr-5.2.0-r1.ebuild [new file with mode: 0644]

diff --git a/dev-util/rr/rr-5.2.0-r1.ebuild b/dev-util/rr/rr-5.2.0-r1.ebuild
new file mode 100644 (file)
index 0000000..dd2d726
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_BUILD_TYPE=Release
+
+inherit cmake-utils linux-info python-single-r1
+
+DESCRIPTION="Record and Replay Framework"
+HOMEPAGE="https://rr-project.org/"
+SRC_URI="https://github.com/mozilla/${PN}/archive/${PV}.tar.gz -> mozilla-${P}.tar.gz"
+
+LICENSE="MIT BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="multilib test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="
+       sys-libs/zlib
+       dev-libs/capnproto
+       ${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+       sys-devel/gdb[xml]"
+# Add all the deps needed only at build/test time.
+DEPEND+="
+       test? (
+               dev-python/pexpect[${PYTHON_USEDEP}]
+               sys-devel/gdb[xml]
+       )"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-ucontext_t.patch
+       "${FILESDIR}"/${P}-c++14.patch
+)
+
+pkg_setup() {
+       if use kernel_linux; then
+               CONFIG_CHECK="SECCOMP"
+               linux-info_pkg_setup
+       fi
+       python-single-r1_pkg_setup
+}
+
+src_prepare() {
+       cmake-utils_src_prepare
+
+       sed -i 's:-Werror::' CMakeLists.txt || die #609192
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTS=$(usex test)
+               -Ddisable32bit=$(usex !multilib) #636786
+       )
+
+       cmake-utils_src_configure
+}