x11-terms/ghostty: add missing depend dev-libs/oniguruma
[gentoo-zh.git] / dev-util / mamba / mamba-1.5.10.ebuild
blobb3b3754ceca3edb8a885decbd384649bdaa900c6
1 # Copyright 2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 #DISTUTILS_USE_PEP517=no
7 DISTUTILS_EXT=1
8 DISTUTILS_OPTIONAL=1
9 DISTUTILS_SINGLE_IMPL=1
10 PYTHON_COMPAT=( python3_{10..12} )
12 inherit distutils-r1 cmake multilib
14 DESCRIPTION="The Fast Cross-Platform Package Manager"
15 HOMEPAGE="https://github.com/mamba-org/mamba"
16 SRC_URI="https://github.com/mamba-org/mamba/archive/refs/tags/${P}.tar.gz"
17 S="${WORKDIR}/${PN}-${P}"
19 LICENSE="BSD"
20 SLOT="0/2"
21 KEYWORDS="~amd64"
22 IUSE="python micromamba"
23 # PROPERTIES="test_network"
24 RESTRICT="test"
25 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
27 DEPEND="app-arch/libarchive:=
28 app-arch/zstd:=
29 dev-cpp/cli11
30 dev-cpp/nlohmann_json
31 dev-cpp/reproc:=
32 dev-cpp/tl-expected
33 dev-cpp/yaml-cpp:=
34 dev-libs/libfmt:=
35 dev-libs/spdlog
36 net-misc/curl
37 sys-libs/libsolv:=[conda]
38 python? ( ${PYTHON_DEPS} )
40 # conflict to micromamba from benzene-overlay
41 RDEPEND="${DEPEND}
42 !dev-util/micromamba-bin
43 !dev-util/micromamba
45 BDEPEND="python? (
46 ${PYTHON_DEPS}
47 ${DISTUTILS_DEPS}
48 $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
51 # test? (
52 # app-shells/dash
53 # app-shells/tcsh
54 # app-shells/zsh
55 # $(python_gen_cond_dep '
56 # dev-python/pytest-lazy-fixture[${PYTHON_USEDEP}]
57 # dev-python/pytest-xprocess[${PYTHON_USEDEP}]
58 # ')
59 # )
61 # distutils_enable_tests pytest
63 # EPYTEST_IGNORE=(
64 # No module named 'conda_package_handling'
65 # Depends on dev-python/zstandard[${PYTHON_USEDEP}]
66 # micromamba/tests/test_package.py
67 # )
69 src_prepare() {
70 cmake_src_prepare
71 use python && { sed -i \
72 "s|\${CMAKE_CURRENT_SOURCE_DIR}|\${CMAKE_INSTALL_PREFIX}\/$(python_get_sitedir | sed -e 's|/usr/||')|" \
73 libmambapy/CMakeLists.txt || die ; pushd libmambapy || die ; distutils-r1_src_prepare ;
77 src_configure() {
78 cat > "${T}"/zstdConfig.cmake <<-EOF || die
79 add_library(zstd::libzstd_shared SHARED IMPORTED)
80 set_target_properties(zstd::libzstd_shared PROPERTIES
81 IMPORTED_LOCATION "${EPREFIX}/usr/$(get_libdir)/libzstd$(get_libname)")
82 EOF
83 local mycmakeargs=(
84 -DCMAKE_BUILD_TYPE=Release
85 -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
86 -DCMAKE_POSITION_INDEPENDENT_CODE=ON
87 -DBUILD_LIBMAMBA=ON
88 -DBUILD_LIBMAMBAPY=$(usex python)
89 -DBUILD_LIBMAMBA_TESTS=NO
90 -DBUILD_MAMBA_PACKAGE=OFF
91 -DBUILD_MICROMAMBA=$(usex micromamba)
92 -DBUILD_SHARED=ON
93 -DBUILD_STATIC=OFF
94 -Dzstd_DIR="${T}"
96 cmake_src_configure
99 src_compile() {
100 cmake_src_compile
101 use python && { pushd libmambapy || die ; distutils-r1_src_compile ; }
104 src_install() {
105 cmake_src_install
106 use python && { pushd libmambapy || die ; distutils-r1_src_install ; }