diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-04-23 23:59:27 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-04-23 23:59:27 +0100 |
commit | e3f21c8aff8a76afe3423721c437a088e9232840 (patch) | |
tree | fde2c1906a9787adec106c5d6b708cd60de02c60 /sci-mathematics/cadabra | |
parent | 1f00990debeffd0052c194989d0a02baac23eb96 (diff) |
gentoo auto-resync : 23:04:2024 - 23:59:26
Diffstat (limited to 'sci-mathematics/cadabra')
-rw-r--r-- | sci-mathematics/cadabra/Manifest | 3 | ||||
-rw-r--r-- | sci-mathematics/cadabra/cadabra-2.4.5.7.ebuild | 112 | ||||
-rw-r--r-- | sci-mathematics/cadabra/files/cadabra2-2.4.5.7-cmake.patch | 50 |
3 files changed, 165 insertions, 0 deletions
diff --git a/sci-mathematics/cadabra/Manifest b/sci-mathematics/cadabra/Manifest index 35a70f65285d..0092b9e28549 100644 --- a/sci-mathematics/cadabra/Manifest +++ b/sci-mathematics/cadabra/Manifest @@ -1,6 +1,9 @@ +AUX cadabra2-2.4.5.7-cmake.patch 2449 BLAKE2B 712fe729b001c1fe4df3a8426c479413ef9f308ee2414e20701c8c2fb7b83412abc21a8f9bec8dc374f740c5d5c42844a9ba74a2c95a6a59344e696f6a2b2b9a SHA512 2d7d8fe5d70f70ce15555887a09c205997293d63b3f2947994012650e3aa369150923718397ddcda93ee8fc82ce8b18ba990bcb5fc8c20c3347f7a212ecc68ef AUX cadabra2-CMake.patch 3184 BLAKE2B afa702834d5eb82a8056307b419fc20bbc2d45b0474994328b70fee383dff415ea37ef2e70c83e9cb7776e06f9295cf5cb9afddddaf857227f7a72f362b61726 SHA512 ddd6b451f81e465d4fef9401340808922bcb1074895173d83d699614e0c967024863848fabdd207f7124ff6396e8c2c75d2ed1425ba73d7bb6d5ac6fe56a87f1 DIST cadabra-2.4.5.4.tar.gz 26825874 BLAKE2B 90562e4ddb08a99a38f32d5cf3fe237b2ca5ece80e4bf70caa8db23a2b6af246b289eb41e7d366c5a242e6e06a680ab0917deb43f29efcf7d6703338c7e97d00 SHA512 907e291880aac84a4f5695f77dd34512c13dba320b38fee59c765b070235c9ef777f6e188c675c8247f56144624edb84459d8b500e4c074731633a2b9cf9ee74 DIST cadabra-2.4.5.6.tar.gz 26827151 BLAKE2B ee08687c55a29582787ce66d2596ec182eca7f9d8eafde7c68477f316baf41f8e798fcdf3d307e0d9d3b68f5c66cd0805686bdd8a41f1d33ef09c11009808e91 SHA512 e0e9af7d492077137e6edba334b74b36905bfec633096a714158881c3bdd424d174b4a1f9053cd570f6652f53aa445a22220f44b396cf3c0fb69860d6d4aecc7 +DIST cadabra-2.4.5.7.tar.gz 26833908 BLAKE2B 3f44ba9035f8181e475232da7bf81c8baf6b19b37651c438ebb656867e54fc213cd4f547a512a1be270a0449ea4b390bd777a4e38ad174e151723c2e2a90c4ae SHA512 860e166ba965fdd6e8afa4265d62ae388f33b8468912e63f7575a819419b9ee90a93e058e7aa4a9c44c80afef9fcce96c7b9d3fd1d35b3059a82548e54804328 EBUILD cadabra-2.4.5.4.ebuild 2349 BLAKE2B 7150b06e2425b70d36670f6849e0626b054b79f263463db8b78375731cc65b9ee6e840c3a8956a9adb13b03d0c73003107858806a067802d81b40cb0c617f7f9 SHA512 28e5f53aca9bd310c0becdf391599f020dd740c7a619c6426aa55f54c19224cdbf4ec230b6b890769708a174a53560040a6b5821faaca6a910d773966be336b7 EBUILD cadabra-2.4.5.6.ebuild 2351 BLAKE2B f031cc63d771d26e9fb13ab0793bb5200d2a4e510cd222b702d404d5ef5eb58c791c1c64224cf51e9bb31666c57a0a93bb93ec178f646b545d4ff002efa14c5d SHA512 b36360335712eb5d944ea9a2ecef60b29db1d10ac2f08946291b9d12ecab12d3958db15c1e1682810a129ede6fcd98f4e7a222840826e6d12489a9df89f7c74a +EBUILD cadabra-2.4.5.7.ebuild 2359 BLAKE2B 7535f52d0deae630be85c6676e08c2f51d501fc9947d572f34b37a0c26d12a993942871937c8c074c1ef10d99158a115bfd76e334292573313fc239e127de93b SHA512 d012ab8451da78ea1a75bbdd33208ed5845b57ee747b32c8111aa2e5a5639116e7a145eefafa2e6e749279ed038a3eac47cbbbdce0a5c5e178c94edff52c1812 MISC metadata.xml 1342 BLAKE2B 2f34aae73fc01d4b8fd4326505b7b0785663c62593641d1d0a01f64adc12cbc8676271612ce91258927ac22957a8d5aba53dd2627130582c744bc32c28e0e207 SHA512 41dffbcfae16f8f0702df5a1837b225100761d48817a2d70fa03aca6246b9d3184d60989cf265282286b02a77a126ac82695c2d74c6de91da45e8f64fcb91811 diff --git a/sci-mathematics/cadabra/cadabra-2.4.5.7.ebuild b/sci-mathematics/cadabra/cadabra-2.4.5.7.ebuild new file mode 100644 index 000000000000..5d08d2e820db --- /dev/null +++ b/sci-mathematics/cadabra/cadabra-2.4.5.7.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2024 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_{10..12} ) + +inherit xdg-utils python-single-r1 cmake + +DESCRIPTION="Field-theory motivated approach to computer algebra" +HOMEPAGE="https://cadabra.science/ + https://github.com/kpeeters/cadabra2/" + +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="gui +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}] ) + ') + gui? ( + dev-cpp/gtkmm:3.0 + ) +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]') +" + +PATCHES=( "${FILESDIR}/${CADABRA}-2.4.5.7-cmake.patch" ) + +DOCS=( CODE_OF_CONDUCT.md CONTRIBUTING.md JUPYTER.rst README.rst ) + +xdg_update() { + if use gui ; 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 -a 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 gui)" + -DENABLE_PY_JUPYTER="$(usex jupyter)" + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + python_optimize +} + +pkg_postinst() { + xdg_update +} + +pkg_postrm() { + xdg_update +} diff --git a/sci-mathematics/cadabra/files/cadabra2-2.4.5.7-cmake.patch b/sci-mathematics/cadabra/files/cadabra2-2.4.5.7-cmake.patch new file mode 100644 index 000000000000..ef2a929a921d --- /dev/null +++ b/sci-mathematics/cadabra/files/cadabra2-2.4.5.7-cmake.patch @@ -0,0 +1,50 @@ +index 0f2ba31..7e6ace8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -166,7 +166,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + message(FATAL_ERROR "GCC version must be at least 4.9 for regex support! See http://askubuntu.com/questions/428198/getting-installing-gcc-g-4-9-on-ubuntu and then set the environment variables CXX to g++-4.9 and CC to gcc-4.9. You may have to erase the build directory before re-running cmake.") + endif() + endif() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -fvisibility=hidden -Wno-unused-but-set-variable") + endif() + + # Clang +@@ -175,7 +174,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5) + message(FATAL_ERROR "Clang version must be at least 3.5 to avoid known bugs.") + endif() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -fvisibility=hidden -Wall -Wextra -Wunused") + endif() + + # Visual Studio +index d21069e..69f4f52 100644 +--- a/c++lib/CMakeLists.txt ++++ b/c++lib/CMakeLists.txt +@@ -48,14 +48,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) + add_definitions("-Wall -g -Wno-unused-but-set-variable") + endif() + +-if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") +-endif() +- +-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") +-endif() +- + if(MSVC) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + set(MSVC_FLAGS +index b7869a9..91567ec 100644 +--- a/frontend/gtkmm/CMakeLists.txt ++++ b/frontend/gtkmm/CMakeLists.txt +@@ -160,9 +160,6 @@ if (NOT INSTALL_TARGETS_ONLY) + install(FILES ${CADABRA_IMAGES_DIR}/256x256/cadabra2-gtk.png DESTINATION ${ICON_PREFIX}/share/icons/hicolor/256x256/apps) + install(FILES ${CADABRA_IMAGES_DIR}/cadabra2-gtk.svg DESTINATION ${ICON_PREFIX}/share/icons/hicolor/scalable/apps) + install(FILES ${CADABRA_ROOT_DIR}/config/cadabra2-gtk.desktop DESTINATION ${ICON_PREFIX}/share/applications) +- install(CODE "execute_process(COMMAND touch ${ICON_PREFIX_WITH_DESTDIR}/share/icons/hicolor/icon-theme.cache)") +- install(CODE "execute_process(COMMAND gtk-update-icon-cache-3.0 {ICON_PREFIX_WITH_DESTDIR}/share/icons/hicolor)") +- install(CODE "execute_process(COMMAND chmod go+r ${ICON_PREFIX_WITH_DESTDIR}/share/icons/hicolor/icon-theme.cache)") + + # Install shared libraries on Windows. + # https://stackoverflow.com/questions/32662215/how-do-you-install-gtk-3-0-on-windows |