summaryrefslogtreecommitdiff
path: root/sci-mathematics/cadabra
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-27 03:56:50 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-27 03:56:50 +0100
commit6e8f2ebdce568f2c6c7870edbb9db5324a0e300f (patch)
tree92c92750f9317885d396064e90145eb463b3b8eb /sci-mathematics/cadabra
parent97e5ac8a082d0d11fc18e8b8994a78e8d155899e (diff)
gentoo auto-resync : 27:10:2022 - 03:56:50
Diffstat (limited to 'sci-mathematics/cadabra')
-rw-r--r--sci-mathematics/cadabra/Manifest2
-rw-r--r--sci-mathematics/cadabra/cadabra-2.4.2.ebuild104
2 files changed, 106 insertions, 0 deletions
diff --git a/sci-mathematics/cadabra/Manifest b/sci-mathematics/cadabra/Manifest
index 28e8b3f0e589..1bc9616d95e5 100644
--- a/sci-mathematics/cadabra/Manifest
+++ b/sci-mathematics/cadabra/Manifest
@@ -1,6 +1,8 @@
AUX cadabra2-CMake.patch 3184 BLAKE2B afa702834d5eb82a8056307b419fc20bbc2d45b0474994328b70fee383dff415ea37ef2e70c83e9cb7776e06f9295cf5cb9afddddaf857227f7a72f362b61726 SHA512 ddd6b451f81e465d4fef9401340808922bcb1074895173d83d699614e0c967024863848fabdd207f7124ff6396e8c2c75d2ed1425ba73d7bb6d5ac6fe56a87f1
DIST cadabra-2.3.9.3.tar.gz 24685603 BLAKE2B eb76f65898be499eb5abbbaf8ac478a056ffe5801bcf7124be60d1b034f4e88e9999d76354f03e7a2de9b7f7561a32e82699c882be135fb5966614da37526933 SHA512 9a5cdc6a7d824350ef3929c9f21647588891c1376103a57d231c2f5160971e3373b0efb9e050c574ebd51921a3f7d9f230f533a88a44e0dd8e645bf2395a95fe
DIST cadabra-2.4.0.2.tar.gz 24688084 BLAKE2B 4bc1e00ab87bbdc43dae261e1948b41a6372f90ad394e5208b65b993210ff42e84ed098ad4fcf6d056fc42947b75f970f18a92b67859fd69c8ea3cc18ffb2e9a SHA512 2545f7ba3238944902b413bfbed91d87594d87afe99d1fb61061115b354a6fa29ffb7b71017d790e54080da33aa905d0f9afe0546fb1397144fe7b135e906274
+DIST cadabra-2.4.2.tar.gz 25145250 BLAKE2B d6824f4819922cd1c37af6a393123ac7398d0adb5c551e278ca983cc7ec51c9fb1f5319ddbef74165cfe8743a8138f4cf2d011065ca90e300c103ad53daabef2 SHA512 a5b2ee3eee6911440eeb85dd720cc72eca21a889a409bb0a360ac674f926dc82b3d30f5fca4d46528216c6a3ad7c164a576435e0647ce2eddf187ba840dd59db
EBUILD cadabra-2.3.9.3.ebuild 2339 BLAKE2B 9f37b9ff707ff93a4ffe6560a8e82eda1b0e776f235983b2d9f968a42361f575f5a9f50a20f9a17fc113c1763002abec4fdec091d54491066f0d5cd4ec4e9379 SHA512 dd5577c563207ccb7d903cd1b64b51518c1e665772d1f8f6ab15e2ddf22b51013936d349a07284d775c861c542b99b5caaf7ef0b3ab0b1bf4c1269996fa1ce80
EBUILD cadabra-2.4.0.2.ebuild 2366 BLAKE2B c9422fb15e1f2893e314203e638adba06322fefe27cc64b836eb019b61d3a8b6b0d6507c0bb727690beecc5108bde9278e14f3508c4b461203600f6510ab2d38 SHA512 0269554029c028cb97d6bcbd9d8cb65e45d178fe57b7d69ac0ec0b7ac91b472e6c782c7d661a0196e156f7c61c7015053c02fe5578f309090491931915c62f2d
+EBUILD cadabra-2.4.2.ebuild 2366 BLAKE2B c9422fb15e1f2893e314203e638adba06322fefe27cc64b836eb019b61d3a8b6b0d6507c0bb727690beecc5108bde9278e14f3508c4b461203600f6510ab2d38 SHA512 0269554029c028cb97d6bcbd9d8cb65e45d178fe57b7d69ac0ec0b7ac91b472e6c782c7d661a0196e156f7c61c7015053c02fe5578f309090491931915c62f2d
MISC metadata.xml 1342 BLAKE2B 2f34aae73fc01d4b8fd4326505b7b0785663c62593641d1d0a01f64adc12cbc8676271612ce91258927ac22957a8d5aba53dd2627130582c744bc32c28e0e207 SHA512 41dffbcfae16f8f0702df5a1837b225100761d48817a2d70fa03aca6246b9d3184d60989cf265282286b02a77a126ac82695c2d74c6de91da45e8f64fcb91811
diff --git a/sci-mathematics/cadabra/cadabra-2.4.2.ebuild b/sci-mathematics/cadabra/cadabra-2.4.2.ebuild
new file mode 100644
index 000000000000..c3b86c9b872e
--- /dev/null
+++ b/sci-mathematics/cadabra/cadabra-2.4.2.ebuild
@@ -0,0 +1,104 @@
+# 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? ( test )"
+
+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
+}
+
+src_install() {
+ cmake_src_install
+ python_optimize
+}
+
+pkg_postinst() {
+ xdg_update
+}
+
+pkg_postrm() {
+ xdg_update
+}