diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
commit | 2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch) | |
tree | c8af0fd04194aed03cf067d44e53c7edd3e9ab84 /sci-mathematics/lean | |
parent | e9d044d4b9b71200a96adfa280848858c0f468c9 (diff) |
gentoo resync : 05.12.2021
Diffstat (limited to 'sci-mathematics/lean')
-rw-r--r-- | sci-mathematics/lean/Manifest | 5 | ||||
-rw-r--r-- | sci-mathematics/lean/files/lean-CMakeLists-fix_flags.patch | 23 | ||||
-rw-r--r-- | sci-mathematics/lean/lean-3.35.1-r2.ebuild | 75 | ||||
-rw-r--r-- | sci-mathematics/lean/lean-3.9999.ebuild | 75 | ||||
-rw-r--r-- | sci-mathematics/lean/metadata.xml | 20 |
5 files changed, 198 insertions, 0 deletions
diff --git a/sci-mathematics/lean/Manifest b/sci-mathematics/lean/Manifest new file mode 100644 index 000000000000..aef66b1db2f7 --- /dev/null +++ b/sci-mathematics/lean/Manifest @@ -0,0 +1,5 @@ +AUX lean-CMakeLists-fix_flags.patch 1285 BLAKE2B 0507e553c1acf2a53c5267932127117d5ae5ba9015a08c88748b3d82c041f8d904d15cd033dd7934ac55c474fa75a5d4a46f680cc887fee37c05c3f5f3832839 SHA512 11a5918847e45aac7bf79e48d8f881ef5cd3e6b09dbb0979f3f0b88fd36458be21ebeb530158da801399a0cdc8fe382444ff338cd793cd9f1bfced90c5d5a71b +DIST lean-3.35.1.tar.gz 1872461 BLAKE2B 44635b05a7e8ea89522dfb44b8f097ec530419ab79a5413648292ca34019ca744ae3e327cf3a7c627cb7a7a682cfcb2ffc5e6802f2c5ad67e0a7abc303624a3c SHA512 24238cd9e920042f5bf7ba0a121da860e7e9c804d169c888bfabbc5e79e55f556a8920fab0c1a7e72b13501798c5f3fcb068f1705a0cf230f2b89abe1b3045ab +EBUILD lean-3.35.1-r2.ebuild 1773 BLAKE2B 15392079ec1e4d9eec5dfd9ee13fee05eca98fb2d7fe204a05b793b06588848c339dbb3b01c8c84f30fc45acc2ce8bb74be5841b9aa216a3d5f2d42d3158b7a6 SHA512 89f983bdb770e0fdbbcbd4db2a1bc8de25df33050ed936748788695e4926588471e8963289ef5bd397748abc41aae656f5614f3317b05b70f54dcd43189464d1 +EBUILD lean-3.9999.ebuild 1773 BLAKE2B 15392079ec1e4d9eec5dfd9ee13fee05eca98fb2d7fe204a05b793b06588848c339dbb3b01c8c84f30fc45acc2ce8bb74be5841b9aa216a3d5f2d42d3158b7a6 SHA512 89f983bdb770e0fdbbcbd4db2a1bc8de25df33050ed936748788695e4926588471e8963289ef5bd397748abc41aae656f5614f3317b05b70f54dcd43189464d1 +MISC metadata.xml 656 BLAKE2B 2cb237ee8ec926a98c9c91cbb446daa36b167ecd7a3e9270982f0b4d3ba578a3c2beab79beb0dd9f63efc58ba0a9d01e9ca941922ed92b8ac919e19450880557 SHA512 6923cf3fb58c9b4ce183d95d0b2ea071ca3bbaf397dd04eb37862a92f39ab406d9cce42f61ef7054860cffc61c816b1591c1a97edc9a11630c74e2e88553408f diff --git a/sci-mathematics/lean/files/lean-CMakeLists-fix_flags.patch b/sci-mathematics/lean/files/lean-CMakeLists-fix_flags.patch new file mode 100644 index 000000000000..1fd788fd79be --- /dev/null +++ b/sci-mathematics/lean/files/lean-CMakeLists-fix_flags.patch @@ -0,0 +1,23 @@ +index f0efdf425..4cd461986 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -194,7 +194,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-DLEAN_DEBUG -DLEAN_TRACE") + set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG") + set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DLEAN_DEBUG") +-set(CMAKE_CXX_FLAGS_GPROF "-O2 -g -pg") ++set(CMAKE_CXX_FLAGS_GPROF "-g -pg") + + # OSX .dmg generation (this is working in progress) + set(CPACK_DMG_BACKGROUND_IMAGE "${LEAN_SOURCE_DIR}/../images/lean.png") +@@ -264,8 +264,8 @@ if (NOT MSVC) + set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++11 ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS_DEBUG "-g3 ${CMAKE_CXX_FLAGS_DEBUG}") + set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os ${CMAKE_CXX_FLAGS_MINSIZEREL}") +- set(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS_RELEASE}") +- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g3 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") ++ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") ++ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g3 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + elseif (MULTI_THREAD) + set(CMAKE_CXX_FLAGS_DEBUG "/MTd ${CMAKE_CXX_FLAGS_DEBUG}") + set(CMAKE_CXX_FLAGS_MINSIZEREL "/MT ${CMAKE_CXX_FLAGS_MINSIZEREL}") diff --git a/sci-mathematics/lean/lean-3.35.1-r2.ebuild b/sci-mathematics/lean/lean-3.35.1-r2.ebuild new file mode 100644 index 000000000000..a15591b790f5 --- /dev/null +++ b/sci-mathematics/lean/lean-3.35.1-r2.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MAJOR=$(ver_cut 1) +CMAKE_IN_SOURCE_BUILD="ON" + +inherit cmake optfeature readme.gentoo-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-community/lean.git" +else + SRC_URI="https://github.com/leanprover-community/lean/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi +S="${WORKDIR}/lean-${PV}/src" + +LICENSE="Apache-2.0" +SLOT="0/${MAJOR}" +IUSE="debug +json +threads" + +RDEPEND="dev-libs/gmp:=" +DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}/${PN}-CMakeLists-fix_flags.patch" ) + +src_configure() { + local CMAKE_BUILD_TYPE + if use debug; then + CMAKE_BUILD_TYPE="Debug" + else + CMAKE_BUILD_TYPE="Release" + fi + + local mycmakeargs=( + -DALPHA=ON + -DAUTO_THREAD_FINALIZATION=ON + -DJSON=$(usex json) + -DLEAN_EXTRA_CXX_FLAGS="${CXXFLAGS}" + -DMULTI_THREAD=$(usex threads) + -DUSE_GITHASH=OFF + ) + cmake_src_configure +} + +src_test() { + local myctestargs=( + # Disable problematic "style_check" cpplint test, + # this also removes the python test dependency + --exclude-regex style_check + ) + cmake_src_test +} + +src_install() { + cmake_src_install + + local DISABLE_AUTOFORMATTING="yes" + local DOC_CONTENTS="You probably want to use lean with mathlib, you can either: + - Do not install mathlib globally and use local versions + - Use leanproject from sci-mathematics/mathlib-tools + $ leanproject global-install + - Use leanpkg and compile mathlib (which will take some time) + $ leanpkg install https://github.com/leanprover-community/mathlib" + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sci-mathematics/lean/lean-3.9999.ebuild b/sci-mathematics/lean/lean-3.9999.ebuild new file mode 100644 index 000000000000..a15591b790f5 --- /dev/null +++ b/sci-mathematics/lean/lean-3.9999.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MAJOR=$(ver_cut 1) +CMAKE_IN_SOURCE_BUILD="ON" + +inherit cmake optfeature readme.gentoo-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-community/lean.git" +else + SRC_URI="https://github.com/leanprover-community/lean/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi +S="${WORKDIR}/lean-${PV}/src" + +LICENSE="Apache-2.0" +SLOT="0/${MAJOR}" +IUSE="debug +json +threads" + +RDEPEND="dev-libs/gmp:=" +DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}/${PN}-CMakeLists-fix_flags.patch" ) + +src_configure() { + local CMAKE_BUILD_TYPE + if use debug; then + CMAKE_BUILD_TYPE="Debug" + else + CMAKE_BUILD_TYPE="Release" + fi + + local mycmakeargs=( + -DALPHA=ON + -DAUTO_THREAD_FINALIZATION=ON + -DJSON=$(usex json) + -DLEAN_EXTRA_CXX_FLAGS="${CXXFLAGS}" + -DMULTI_THREAD=$(usex threads) + -DUSE_GITHASH=OFF + ) + cmake_src_configure +} + +src_test() { + local myctestargs=( + # Disable problematic "style_check" cpplint test, + # this also removes the python test dependency + --exclude-regex style_check + ) + cmake_src_test +} + +src_install() { + cmake_src_install + + local DISABLE_AUTOFORMATTING="yes" + local DOC_CONTENTS="You probably want to use lean with mathlib, you can either: + - Do not install mathlib globally and use local versions + - Use leanproject from sci-mathematics/mathlib-tools + $ leanproject global-install + - Use leanpkg and compile mathlib (which will take some time) + $ leanpkg install https://github.com/leanprover-community/mathlib" + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/sci-mathematics/lean/metadata.xml b/sci-mathematics/lean/metadata.xml new file mode 100644 index 000000000000..278e5b1a42a2 --- /dev/null +++ b/sci-mathematics/lean/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> + +<pkgmetadata> + <maintainer type="person"> + <email>xgqt@gentoo.org</email> + <name>Maciej Barć</name> + </maintainer> + <longdescription lang="en"> + The Lean theorem prover is a proof assistant developed principally + by Leonardo de Moura at Microsoft Research. + </longdescription> + <upstream> + <bugs-to>https://github.com/leanprover-community/lean/issues</bugs-to> + <remote-id type="github">leanprover-community/lean</remote-id> + </upstream> + <use> + <flag name="json"> Enable JSON support</flag> + </use> +</pkgmetadata> |