Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/catch/files/, dev-cpp/catch/
Date: Sat, 25 Aug 2018 21:24:51
Message-Id: 1535232263.9edabe5400b81e731dcadefaaf2e8ba6e5f36a9b.soap@gentoo
1 commit: 9edabe5400b81e731dcadefaaf2e8ba6e5f36a9b
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 25 21:24:23 2018 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 25 21:24:23 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9edabe54
7
8 dev-cpp/catch: Version bump to 2.3.0
9
10 Package-Manager: Portage-2.3.44, Repoman-2.3.10
11
12 dev-cpp/catch/Manifest | 1 +
13 dev-cpp/catch/catch-2.3.0.ebuild | 48 ++++++++++++++++++++++
14 .../catch/files/catch-2.3.0-python-automagic.patch | 25 +++++++++++
15 3 files changed, 74 insertions(+)
16
17 diff --git a/dev-cpp/catch/Manifest b/dev-cpp/catch/Manifest
18 index dcfd1f2c0ee..dc01d5f3e0e 100644
19 --- a/dev-cpp/catch/Manifest
20 +++ b/dev-cpp/catch/Manifest
21 @@ -1,2 +1,3 @@
22 DIST Catch-1.11.0.tar.gz 376132 BLAKE2B 23a1a6292dd91ec1c71923b4902b42b59ff6be5227b666f68ef0dc33756a58a63edd70a9b139dda0b1860c2b7a0cfec7ab9262e6447eff3184cfe28ea9b0aa77 SHA512 33085c2671f78c7562eace909564b2730eabcaf4490cd463402e66ab4ac2be1fe4fe360916c11aa589ba4a010622444126ee2ae747783b5869b5d7276361f132
23 DIST Catch2-2.2.2.tar.gz 497244 BLAKE2B d5073d56b9399bd7f50bafc7758e60e31ba4434e229f92ca92cd04257f4a54cec925ad3180cc964c4f69edbaa7fc14f8af8e828421e2bb2b4f6c59eaea5cc06d SHA512 ab91036c6c3ace087d0382ce99f26b2c30a4b75d52f285619ca282a618470fe388afe47495f3b2764268d600c6834c60ba464483d06f3a1c4316c099477c8e38
24 +DIST Catch2-2.3.0.tar.gz 506374 BLAKE2B f692eb0933ca578edf0f15cb83139d2fab03390b3980a686ea495101165d612c848b642ad1e7233bce5bb164c80958c9cbfbc229e72a1ae6947aa4dffdf27556 SHA512 e9a089b504c339e87bda0fb1a4040d9d19c932a4bc7dca41bdad6edfcf8c428f4152ff1e0c898dfdf6b20bd5d901c343bed00ad89351fa5182f3c106e0fb4b03
25
26 diff --git a/dev-cpp/catch/catch-2.3.0.ebuild b/dev-cpp/catch/catch-2.3.0.ebuild
27 new file mode 100644
28 index 00000000000..94a870ee7ce
29 --- /dev/null
30 +++ b/dev-cpp/catch/catch-2.3.0.ebuild
31 @@ -0,0 +1,48 @@
32 +# Copyright 1999-2018 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
38 +
39 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
40 +inherit cmake-utils python-any-r1
41 +
42 +if [[ ${PV} == *9999 ]]; then
43 + inherit git-r3
44 + EGIT_REPO_URI="https://github.com/catchorg/Catch2.git"
45 +else
46 + MY_P=${PN^}2-${PV}
47 + SRC_URI="https://github.com/catchorg/Catch2/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
48 + KEYWORDS="~amd64 ~x86"
49 +
50 + S=${WORKDIR}/${MY_P}
51 +fi
52 +
53 +DESCRIPTION="Modern C++ header-only framework for unit-tests"
54 +HOMEPAGE="https://github.com/catchorg/Catch2"
55 +
56 +LICENSE="Boost-1.0"
57 +SLOT="0"
58 +IUSE="test"
59 +RESTRICT="!test? ( test )"
60 +
61 +DEPEND="test? ( ${PYTHON_DEPS} )"
62 +
63 +PATCHES=(
64 + "${FILESDIR}"/${PN}-2.3.0-python-automagic.patch
65 +)
66 +
67 +pkg_setup() {
68 + use test && python-any-r1_pkg_setup
69 +}
70 +
71 +src_configure() {
72 + local mycmakeargs=(
73 + -DCATCH_ENABLE_WERROR=OFF
74 + -DBUILD_TESTING=$(usex test)
75 + -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}"
76 + -DPYTHON_EXECUTABLE="${PYTHON}"
77 + )
78 + cmake-utils_src_configure
79 +}
80
81 diff --git a/dev-cpp/catch/files/catch-2.3.0-python-automagic.patch b/dev-cpp/catch/files/catch-2.3.0-python-automagic.patch
82 new file mode 100644
83 index 00000000000..c7fa4c6d22f
84 --- /dev/null
85 +++ b/dev-cpp/catch/files/catch-2.3.0-python-automagic.patch
86 @@ -0,0 +1,25 @@
87 +--- a/CMakeLists.txt
88 ++++ b/CMakeLists.txt
89 +@@ -36,7 +36,11 @@
90 + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wmainCRTStartup")
91 + endif()
92 +
93 ++find_package(PythonInterp)
94 + if (BUILD_TESTING AND CATCH_BUILD_TESTING AND NOT_SUBPROJECT)
95 ++ if (NOT PYTHONINTERP_FOUND)
96 ++ message(FATAL_ERROR "Python not found, but required for tests")
97 ++ endif()
98 + add_subdirectory(projects)
99 + endif()
100 +
101 +--- a/projects/CMakeLists.txt
102 ++++ b/projects/CMakeLists.txt
103 +@@ -317,7 +317,7 @@
104 + set_tests_properties(NoTest PROPERTIES PASS_REGULAR_EXPRESSION "No test cases matched")
105 +
106 + # AppVeyor has a Python 2.7 in path, but doesn't have .py files as autorunnable
107 +-add_test(NAME ApprovalTests COMMAND python ${CATCH_DIR}/scripts/approvalTests.py $<TARGET_FILE:SelfTest>)
108 ++add_test(NAME ApprovalTests COMMAND ${PYTHON_EXECUTABLE} ${CATCH_DIR}/scripts/approvalTests.py $<TARGET_FILE:SelfTest>)
109 + set_tests_properties(ApprovalTests PROPERTIES FAIL_REGULAR_EXPRESSION "Results differed")
110 +
111 + if (CATCH_USE_VALGRIND)