Gentoo Archives: gentoo-commits

From: "Maciej Barć" <xgqt@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/lean/
Date: Sun, 30 Jan 2022 19:21:36
Message-Id: 1643570488.f45b887a09c256445f76e9764e27501424636a83.xgqt@gentoo
1 commit: f45b887a09c256445f76e9764e27501424636a83
2 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 30 19:21:08 2022 +0000
4 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 30 19:21:28 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f45b887a
7
8 sci-mathematics/lean: bump to 3.38.0
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
12
13 sci-mathematics/lean/Manifest | 1 +
14 sci-mathematics/lean/lean-3.38.0.ebuild | 75 +++++++++++++++++++++++++++++++++
15 2 files changed, 76 insertions(+)
16
17 diff --git a/sci-mathematics/lean/Manifest b/sci-mathematics/lean/Manifest
18 index f0d02b545bdd..225830067d1e 100644
19 --- a/sci-mathematics/lean/Manifest
20 +++ b/sci-mathematics/lean/Manifest
21 @@ -1,2 +1,3 @@
22 DIST lean-3.35.1.tar.gz 1872461 BLAKE2B 44635b05a7e8ea89522dfb44b8f097ec530419ab79a5413648292ca34019ca744ae3e327cf3a7c627cb7a7a682cfcb2ffc5e6802f2c5ad67e0a7abc303624a3c SHA512 24238cd9e920042f5bf7ba0a121da860e7e9c804d169c888bfabbc5e79e55f556a8920fab0c1a7e72b13501798c5f3fcb068f1705a0cf230f2b89abe1b3045ab
23 DIST lean-3.37.0.tar.gz 1875569 BLAKE2B 26d2513da35f0fa7efa6a9bb7706884b95666079e1c0d4349f2745a5908417c0b3d01027901425bf6bc4affdb314a79235c52bac9395bd9e54d53930e6b0dbe0 SHA512 c28139cfff7b40785ab51a9591964adc473f28d7a9877d891a132737c165ce6649924e6c75905442632452b9447c095aae830df347492bae058215d3392a7c09
24 +DIST lean-3.38.0.tar.gz 1877265 BLAKE2B 30d4364ee9d788ed128b63c42b5f7d55b91721ca74a6bc847e33f0d7be800cd2d3d90b4964e398f9116375afe6447a3f10f25ab716445aa9b7a5458d534bbf09 SHA512 441889f561a1fd369d2a4bc305e936834bb6c11ef85cfb4b69a5649226b405340fa787eb2ff73e44d2da6bb25a7819af70cf465abdf323777601c9f619c58508
25
26 diff --git a/sci-mathematics/lean/lean-3.38.0.ebuild b/sci-mathematics/lean/lean-3.38.0.ebuild
27 new file mode 100644
28 index 000000000000..e47a48054580
29 --- /dev/null
30 +++ b/sci-mathematics/lean/lean-3.38.0.ebuild
31 @@ -0,0 +1,75 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +MAJOR=$(ver_cut 1)
38 +CMAKE_IN_SOURCE_BUILD="ON"
39 +
40 +inherit cmake optfeature readme.gentoo-r1
41 +
42 +DESCRIPTION="The Lean Theorem Prover"
43 +HOMEPAGE="https://leanprover-community.github.io/"
44 +
45 +if [[ "${PV}" == *9999* ]]; then
46 + inherit git-r3
47 + EGIT_REPO_URI="https://github.com/leanprover-community/lean.git"
48 +else
49 + SRC_URI="https://github.com/leanprover-community/lean/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
50 + KEYWORDS="~amd64 ~x86"
51 +fi
52 +S="${WORKDIR}/lean-${PV}/src"
53 +
54 +LICENSE="Apache-2.0"
55 +SLOT="0/${MAJOR}"
56 +IUSE="debug +json +threads"
57 +
58 +RDEPEND="dev-libs/gmp:="
59 +DEPEND="${RDEPEND}"
60 +
61 +PATCHES=( "${FILESDIR}/${PN}-CMakeLists-fix_flags.patch" )
62 +
63 +src_configure() {
64 + local CMAKE_BUILD_TYPE
65 + if use debug; then
66 + CMAKE_BUILD_TYPE="Debug"
67 + else
68 + CMAKE_BUILD_TYPE="Release"
69 + fi
70 +
71 + local mycmakeargs=(
72 + -DALPHA=ON
73 + -DAUTO_THREAD_FINALIZATION=ON
74 + -DJSON=$(usex json)
75 + -DLEAN_EXTRA_CXX_FLAGS="${CXXFLAGS}"
76 + -DMULTI_THREAD=$(usex threads)
77 + -DUSE_GITHASH=OFF
78 + )
79 + cmake_src_configure
80 +}
81 +
82 +src_test() {
83 + local myctestargs=(
84 + # Disable problematic "style_check" cpplint test,
85 + # this also removes the python test dependency
86 + --exclude-regex style_check
87 + )
88 + cmake_src_test
89 +}
90 +
91 +src_install() {
92 + cmake_src_install
93 +
94 + local DISABLE_AUTOFORMATTING="yes"
95 + local DOC_CONTENTS="You probably want to use lean with mathlib, you can either:
96 + - Do not install mathlib globally and use local versions
97 + - Use leanproject from sci-mathematics/mathlib-tools
98 + $ leanproject global-install
99 + - Use leanpkg and compile mathlib (which will take some time)
100 + $ leanpkg install https://github.com/leanprover-community/mathlib"
101 + readme.gentoo_create_doc
102 +}
103 +
104 +pkg_postinst() {
105 + readme.gentoo_print_elog
106 +}