1 # Copyright 2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 #DISTUTILS_USE_PEP517=no
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}"
22 IUSE
="python micromamba"
23 # PROPERTIES="test_network"
25 REQUIRED_USE
="python? ( ${PYTHON_REQUIRED_USE} )"
27 DEPEND
="app-arch/libarchive:=
37 sys-libs/libsolv:=[conda]
38 python? ( ${PYTHON_DEPS} )
40 # conflict to micromamba from benzene-overlay
42 !dev-util/micromamba-bin
48 $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
55 # $(python_gen_cond_dep '
56 # dev-python/pytest-lazy-fixture[${PYTHON_USEDEP}]
57 # dev-python/pytest-xprocess[${PYTHON_USEDEP}]
61 # distutils_enable_tests pytest
64 # No module named 'conda_package_handling'
65 # Depends on dev-python/zstandard[${PYTHON_USEDEP}]
66 # micromamba/tests/test_package.py
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
;
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)")
84 -DCMAKE_BUILD_TYPE=Release
85 -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
86 -DCMAKE_POSITION_INDEPENDENT_CODE=ON
88 -DBUILD_LIBMAMBAPY=$
(usex python
)
89 -DBUILD_LIBMAMBA_TESTS=NO
90 -DBUILD_MAMBA_PACKAGE=OFF
91 -DBUILD_MICROMAMBA=$
(usex micromamba
)
101 use python
&& { pushd libmambapy || die
; distutils-r1_src_compile
; }
106 use python
&& { pushd libmambapy || die
; distutils-r1_src_install
; }