commit: 2ebcc7f39c3ec50ee080478c0651a13b753b0e90
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 26 10:06:36 2023 +0000
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Thu Oct 26 13:11:35 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ebcc7f3
sci-mathematics/lean: bump to 4.2.0_rc4
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
sci-mathematics/lean/Manifest | 1 +
sci-mathematics/lean/lean-4.2.0_rc4.ebuild | 78 ++++++++++++++++++++++++++++++
2 files changed, 79 insertions(+)
diff --git a/sci-mathematics/lean/Manifest b/sci-mathematics/lean/Manifest
index e1665cbf90b6..68f2783a3dfd 100644
--- a/sci-mathematics/lean/Manifest
+++ b/sci-mathematics/lean/Manifest
@@ -1 +1,2 @@
DIST lean-3.51.1.tar.gz 1918894 BLAKE2B
9a240fe73193794a57001582c0623052cfc1c08ef3b155cac2d9dfc029202cb79b85e844fdf068e454498a35522ec3e18330da8c644bba3c6f708cbde04816f7
SHA512
dccdf6c3fbcd98115e62b9944645af6a2ce21412d63baa9565871807862e8d83cc6f29d1fb687f19b802240a5f9c019443caa00412ecfabe621744dff900e3ee
+DIST lean-4.2.0_rc4.tar.gz 16386559 BLAKE2B
4eb0bb47cd09ec7ccb04870a08b13c8b9c73a296b42e9c92c9f9885dfe416e75352db7c41725446dd27a0a9a68f3979fa91dadb93aba1af1321df94312d7fa99
SHA512
4d08bf182eb3822f12ec69af9aa0527581fe7f3ff4a10836b866622146b3572ced3635fdf0179a8764d233de427094f47219d619d205971794b41f1c1fc4b06d
diff --git a/sci-mathematics/lean/lean-4.2.0_rc4.ebuild
b/sci-mathematics/lean/lean-4.2.0_rc4.ebuild
new file mode 100644
index 000000000000..30fd5379373b
--- /dev/null
+++ b/sci-mathematics/lean/lean-4.2.0_rc4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MAJOR="$(ver_cut 1)"
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake flag-o-matic python-any-r1
+
+DESCRIPTION="The Lean Theorem Prover"
+HOMEPAGE="https://leanprover-community.github.io/"
+
+if [[ "${PV}" == *9999* ]] ; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/leanprover/${PN}${MAJOR}.git"
+else
+
SRC_URI="https://github.com/leanprover/${PN}${MAJOR}/archive/refs/tags/v${PV/_/-}.tar.gz
+ -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}${MAJOR}-${PV/_/-}"
+
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0/${MAJOR}"
+IUSE="debug source"
+
+RDEPEND="
+ dev-libs/gmp:=
+"
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ filter-lto
+
+ sed -e "s|-O[23]|${CFLAGS}|g" -i src/CMakeLists.txt || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local CMAKE_BUILD_TYPE
+
+ if use debug ; then
+ CMAKE_BUILD_TYPE="Debug"
+ else
+ CMAKE_BUILD_TYPE="Release"
+ fi
+
+ local -a mycmakeargs=(
+ -DLEAN_EXTRA_CXX_FLAGS="${CXXFLAGS}"
+ -DLEAN_EXTRA_LINKER_FLAGS="${LDFLAGS}"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ rm "${ED}/usr/LICENSE"* || die
+
+ if ! use source ; then
+ rm -r "${ED}/usr/src" || die
+ fi
+}