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"
21 IUSE="python micromamba"
22 # PROPERTIES="test_network"
24 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
26 DEPEND="app-arch/libarchive:=
36 sys-libs/libsolv:=[conda]
37 python? ( ${PYTHON_DEPS} )
39 # conflict to micromamba from benzene-overlay
41 !dev-util/micromamba-bin
47 $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
54 # $(python_gen_cond_dep '
55 # dev-python/pytest-lazy-fixture[${PYTHON_USEDEP}]
56 # dev-python/pytest-xprocess[${PYTHON_USEDEP}]
60 S="${WORKDIR}/${PN}-${P}"
62 # distutils_enable_tests pytest
65 # No module named 'conda_package_handling'
66 # Depends on dev-python/zstandard[${PYTHON_USEDEP}]
67 # micromamba/tests/test_package.py
72 use python && { sed -i \
73 "s|\${CMAKE_CURRENT_SOURCE_DIR}|\${CMAKE_INSTALL_PREFIX}\/$(python_get_sitedir | sed -e 's|/usr/||')|" \
74 libmambapy/CMakeLists.txt || die ; pushd libmambapy || die ; distutils-r1_src_prepare ;
79 cat > "${T}"/zstdConfig.cmake <<-EOF || die
80 add_library(zstd::libzstd_shared SHARED IMPORTED)
81 set_target_properties(zstd::libzstd_shared PROPERTIES
82 IMPORTED_LOCATION "${EPREFIX}/usr/$(get_libdir)/libzstd$(get_libname)")
85 -DCMAKE_BUILD_TYPE=Release
86 -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
87 -DCMAKE_POSITION_INDEPENDENT_CODE=ON
89 -DBUILD_LIBMAMBAPY=$(usex python)
90 -DBUILD_LIBMAMBA_TESTS=NO
91 -DBUILD_MAMBA_PACKAGE=OFF
92 -DBUILD_MICROMAMBA=$(usex micromamba)
102 use python && { pushd libmambapy || die ; distutils-r1_src_compile ; }
107 use python && { pushd libmambapy || die ; distutils-r1_src_install ; }