diff options
author | Maciej Barć <xgqt@gentoo.org> | 2022-07-12 23:24:01 +0200 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2022-07-12 23:39:59 +0200 |
commit | 4a1e661d62d55e3060649681417416b3596f98b7 (patch) | |
tree | 872060bddd0f178ee49cb36984e2b59f68bba427 /sci-mathematics | |
parent | python-utils-r1.eclass: bump minimum 3.11 dep to 3.11.0_beta4 (diff) | |
download | gentoo-4a1e661d62d55e3060649681417416b3596f98b7.tar.gz gentoo-4a1e661d62d55e3060649681417416b3596f98b7.tar.bz2 gentoo-4a1e661d62d55e3060649681417416b3596f98b7.zip |
sci-mathematics/cadabra: bump to 2.3.9.3
Closes: https://bugs.gentoo.org/857606
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/cadabra/Manifest | 1 | ||||
-rw-r--r-- | sci-mathematics/cadabra/cadabra-2.3.9.3.ebuild | 99 |
2 files changed, 100 insertions, 0 deletions
diff --git a/sci-mathematics/cadabra/Manifest b/sci-mathematics/cadabra/Manifest index c133327bd4a3..ff288c39db14 100644 --- a/sci-mathematics/cadabra/Manifest +++ b/sci-mathematics/cadabra/Manifest @@ -1 +1,2 @@ DIST cadabra-2.3.8.tar.gz 24647809 BLAKE2B 70858dab32c31b75b32b9eceaa60166accb0167cd8873c0058e6ef8ccfd3e3643da20b96fce3dde8be0e3fc5fdd42e1e6dac8e394643786163095a72239701d5 SHA512 06ebb148d911094dbdcc76747404cf7eb8f31e3bc458a81a37d4ed3bee3df97fedb9f11ed2251c133914aa6482db5b01d8848ef356ea1a0c83f59e686eebcfa5 +DIST cadabra-2.3.9.3.tar.gz 24685603 BLAKE2B eb76f65898be499eb5abbbaf8ac478a056ffe5801bcf7124be60d1b034f4e88e9999d76354f03e7a2de9b7f7561a32e82699c882be135fb5966614da37526933 SHA512 9a5cdc6a7d824350ef3929c9f21647588891c1376103a57d231c2f5160971e3373b0efb9e050c574ebd51921a3f7d9f230f533a88a44e0dd8e645bf2395a95fe diff --git a/sci-mathematics/cadabra/cadabra-2.3.9.3.ebuild b/sci-mathematics/cadabra/cadabra-2.3.9.3.ebuild new file mode 100644 index 000000000000..a39fec81b21a --- /dev/null +++ b/sci-mathematics/cadabra/cadabra-2.3.9.3.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MAJOR=$(ver_cut 1) +CADABRA=${PN}${MAJOR} + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit xdg-utils python-single-r1 cmake + +DESCRIPTION="Field-theory motivated approach to computer algebra" +HOMEPAGE="https://cadabra.science/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/kpeeters/${CADABRA}.git" +else + SRC_URI="https://github.com/kpeeters/${CADABRA}/archive/${PV}.tar.gz + -> ${P}.tar.gz" + S="${WORKDIR}"/${CADABRA}-${PV} + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3" +SLOT="0/${MAJOR}" +IUSE="gtk +jupyter test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="test" # For this version some tests fail. + +RDEPEND=" + ${PYTHON_DEPS} + app-text/dvipng + dev-cpp/glibmm:2 + dev-db/sqlite:3= + dev-libs/boost:= + dev-libs/gmp:=[cxx] + dev-libs/jsoncpp:= + dev-libs/libsigc++:2 + dev-texlive/texlive-basic + $(python_gen_cond_dep ' + dev-python/gmpy:2[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + dev-python/sympy[${PYTHON_USEDEP}] + jupyter? ( dev-python/jupyter[${PYTHON_USEDEP}] ) + ') + gtk? ( dev-cpp/gtkmm:3.0 ) +" +DEPEND="${RDEPEND}" +BDEPEND="$(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')" + +PATCHES=( "${FILESDIR}"/${CADABRA}-CMake.patch ) + +DOCS=( CODE_OF_CONDUCT.md CONTRIBUTING.md JUPYTER.rst README.rst ) + +# Because we do not want to pull in "_XDG_DEPEND" dependencies with USE="-gtk" +xdg_update() { + if use gtk ; then + xdg_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update + fi +} + +src_prepare() { + # Clean postinst script which calls libtool and icon-cache update + echo '#!/bin/sh' > "${S}"/config/postinst.in || die + + # Fix "PYTHON_EXECUTABLE" in Jupyter kernel + sed -i "s|@PYTHON_EXECUTABLE@|${EPYTHON}|" \ + "${S}"/jupyterkernel/kernelspec/kernel.json.in || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_SYSTEM_JSONCPP=ON + -DPACKAGING_MODE=ON + -DUSE_PYTHON_3=ON + -DBUILD_AS_CPP_LIBRARY=OFF + -DENABLE_JUPYTER=OFF # special Xeus Jupyter kernel (uses xtl) + -DENABLE_MATHEMATICA=OFF + -DINSTALL_TARGETS_ONLY=OFF + -DBUILD_TESTS=$(usex test) + -DENABLE_FRONTEND=$(usex gtk) + -DENABLE_PY_JUPYTER=$(usex jupyter) + ) + cmake_src_configure +} + +pkg_postinst() { + xdg_update +} + +pkg_postrm() { + xdg_update +} |