diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-11-30 23:09:52 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-11-30 23:09:52 +0000 |
commit | 19649f88a8fb3ce7dc2db1e6b18a048efb4898b1 (patch) | |
tree | 2547760a98afd574f54c3c12f2e68363a1c1abff /sci-mathematics/lean/lean-4.2.0.ebuild | |
parent | b34c45ec12e8676abfa39cddcf3448ac2bee1574 (diff) |
gentoo auto-resync : 30:11:2023 - 23:09:52
Diffstat (limited to 'sci-mathematics/lean/lean-4.2.0.ebuild')
-rw-r--r-- | sci-mathematics/lean/lean-4.2.0.ebuild | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/sci-mathematics/lean/lean-4.2.0.ebuild b/sci-mathematics/lean/lean-4.2.0.ebuild new file mode 100644 index 000000000000..30fd5379373b --- /dev/null +++ b/sci-mathematics/lean/lean-4.2.0.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 +} |