From ff87ae38eff94aee059e68fdb11f95811c5074a3 Mon Sep 17 00:00:00 2001
From: Michał Górny <mgorny@gentoo.org>
Date: Wed, 16 Dec 2020 14:43:01 +0100
Subject: dev-util/cvise: Bump to 2.0.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 dev-util/cvise/Manifest                        |  1 +
 dev-util/cvise/cvise-2.0.0.ebuild              | 69 ++++++++++++++++++++++++++
 dev-util/cvise/files/cvise-2.0.0-shebang.patch | 34 +++++++++++++
 3 files changed, 104 insertions(+)
 create mode 100644 dev-util/cvise/cvise-2.0.0.ebuild
 create mode 100644 dev-util/cvise/files/cvise-2.0.0-shebang.patch

(limited to 'dev-util/cvise')

diff --git a/dev-util/cvise/Manifest b/dev-util/cvise/Manifest
index e1778a01a2aa..ef6fbd3d3c61 100644
--- a/dev-util/cvise/Manifest
+++ b/dev-util/cvise/Manifest
@@ -2,3 +2,4 @@ DIST cvise-1.6.0.tar.gz 243050 BLAKE2B 64c305426dbeaf2e3f3a92a902209b35fcc76b5f5
 DIST cvise-1.7.0.tar.gz 248515 BLAKE2B b1a2ca8abc7a09c240a7ae39400e3e60ca641dd0dff4edb34f43d755619ec47bb7a0d25fd6b4461bf80a3be14a63c6e56d0e3e758827ca7c2ef90370aba5d539 SHA512 2e0115355c0ca3cdf593ad4a8d0079ea0ea193234ff4fcae8bdc7c0244cc7b8672025682821279b826fda97f80dc71455390d709836acb671c19772f13156de5
 DIST cvise-1.8.0.tar.gz 248744 BLAKE2B 5196a2bb68c0f9ca1a8219ee0dccae80aa7adac64df5bc4c7601a8ef81048875bfa3d8fb2e8c407cfa8f238739733ad4fbdf08bb14a72ec208d562bd7e69ba84 SHA512 eaef3506f0fcd54953271494ebdbd043c028cd98c4a976bc2d978112c28d27d5d307527db52c2a3f8f153b52430ba9c61ad072dcae5a6e0b9bfb8be844a50bab
 DIST cvise-1.9.0.tar.gz 249042 BLAKE2B 357d429afc43691e616dba31621d1de89fb1f85fcbc177847b3367aac993ccd2c3bec20226e910a319d5d6194b32d0be9704e4fa7b8fce49f23788d10a378012 SHA512 518c48b7b9d9af9b856bfc46d4fb8064bca3730735bdabf2b3aa981a3f743fa6988594b7cbe39da71ac01fbadb4a45e5212d7c79b510fa36d86055978829495b
+DIST cvise-2.0.0.tar.gz 249307 BLAKE2B ba1a70da71706969a35b1223ad0c0fa1a1d4caf7f70eef184adc4dbc69586be6a33bdf11d7c1b606ea4b20d4cd2bf68170aabc1764364c235fe5f67182419080 SHA512 e49ca9919ced9db67b16af4b8a7cd3c18c7d96dea5724c9ee6d60736c8f34074d68ade151be702794c93b24943d167278e1c1a6e6f67a9a1422f695f3a177e46
diff --git a/dev-util/cvise/cvise-2.0.0.ebuild b/dev-util/cvise/cvise-2.0.0.ebuild
new file mode 100644
index 000000000000..9ef3d7393dea
--- /dev/null
+++ b/dev-util/cvise/cvise-2.0.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+: ${CMAKE_MAKEFILE_GENERATOR=ninja}
+PYTHON_COMPAT=( python3_{6..9} )
+inherit cmake llvm python-single-r1
+
+DESCRIPTION="Super-parallel Python port of the C-Reduce"
+HOMEPAGE="https://github.com/marxin/cvise/"
+SRC_URI="
+	https://github.com/marxin/cvise/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+LLVM_MAX_SLOT=12
+DEPEND="
+	|| (
+		sys-devel/clang:12
+		sys-devel/clang:11
+		sys-devel/clang:10
+	)
+	<=sys-devel/clang-$(( LLVM_MAX_SLOT + 1 )):="
+RDEPEND="${DEPEND}
+	${PYTHON_DEPS}
+	$(python_gen_cond_dep '
+		dev-python/pebble[${PYTHON_USEDEP}]
+		dev-python/psutil[${PYTHON_USEDEP}]
+	')
+	dev-util/unifdef
+	sys-devel/flex"
+BDEPEND="
+	${PYTHON_DEPS}
+	sys-devel/flex
+	test? (
+		$(python_gen_cond_dep '
+			dev-python/pebble[${PYTHON_USEDEP}]
+			dev-python/pytest[${PYTHON_USEDEP}]
+		')
+	)"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-shebang.patch
+)
+
+llvm_check_deps() {
+	has_version "sys-devel/clang:${LLVM_SLOT}"
+}
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	llvm_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-n auto::' -e 's:--flake8::' setup.cfg || die
+	cmake_src_prepare
+}
+
+src_test() {
+	cd "${BUILD_DIR}" || die
+	pytest -vv || die
+}
diff --git a/dev-util/cvise/files/cvise-2.0.0-shebang.patch b/dev-util/cvise/files/cvise-2.0.0-shebang.patch
new file mode 100644
index 000000000000..26bfe9678ebb
--- /dev/null
+++ b/dev-util/cvise/files/cvise-2.0.0-shebang.patch
@@ -0,0 +1,34 @@
+From 492d2d759d35bec39aca137906046b76151b56d1 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska@suse.cz>
+Date: Sun, 15 Nov 2020 12:12:04 +0100
+Subject: [PATCH] Add Leap 15 and fix shebang.
+
+---
+ build_and_test.sh                    |  2 +-
+ cvise.py                             |  2 +-
+ 4 files changed, 22 insertions(+), 2 deletions(-)
+ create mode 100644 Docker/Dockerfile-opensuselp15-llvm9
+
+diff --git a/build_and_test.sh b/build_and_test.sh
+index 95c1539..b726dd4 100755
+--- a/build_and_test.sh
++++ b/build_and_test.sh
+@@ -1,4 +1,4 @@
+-#!/usr/bin/bash
++#!/bin/bash
+ 
+ BUILD_TYPE=$1
+ 
+diff --git a/cvise.py b/cvise.py
+index 15efaf6..7f318f2 100755
+--- a/cvise.py
++++ b/cvise.py
+@@ -260,7 +260,7 @@ def get_available_pass_groups():
+     script = None
+     if args.commands:
+         with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.sh') as script:
+-            script.write('#!/usr/bin/bash\n\n')
++            script.write('#!/bin/bash\n\n')
+             script.write(args.commands + '\n')
+         os.chmod(script.name, 0o744)
+         logging.info('Using temporary interestingness test: %s' % script.name)
-- 
cgit v1.2.3-65-gdbad