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