dev-libs/FP16: add PeachPy depend

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
Alfredo Tupone
2022-05-16 15:13:49 +02:00
parent 64880ae8d7
commit 78812ee4fe

View File

@@ -2,9 +2,11 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
PYTHON_COMPAT=( python3_{8,9,10,11} )
inherit python-r1 cmake
CommitId=0a92994d729ff76a58f692d3028ca1b64b145d91
DESCRIPTION="conversion to/from half-precision floating point formats"
HOMEPAGE="https://github.com/Maratyszcza/FP16/"
SRC_URI="https://github.com/Maratyszcza/${PN}/archive/${CommitId}.tar.gz
@@ -14,9 +16,10 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="dev-libs/psimd"
RDEPEND="${DEPEND}"
RDEPEND="${DEPEND} ${PYTHON_DEPS}"
BDEPEND="test? ( dev-cpp/gtest )"
RESTRICT="!test? ( test )"
@@ -26,6 +29,12 @@ PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
)
src_prepare() {
cmake_src_prepare
mkdir -p module/fp16 || die
cp include/fp16/*py module/fp16 || die
}
src_configure() {
local mycmakeargs=(
-DFP16_BUILD_BENCHMARKS=OFF
@@ -33,3 +42,13 @@ src_configure() {
)
cmake_src_configure
}
python_install() {
python_domodule module/fp16
}
src_install() {
cmake_src_install
rm "${D}"/usr/include/fp16/*.py || die
python_foreach_impl python_install
}