summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2022-05-16 15:13:49 +0200
committerAlfredo Tupone <tupone@gentoo.org>2022-05-16 15:13:49 +0200
commit78812ee4feafba07e463e940b72255c508d1dfd8 (patch)
treedd2be06854168c5e34f008c3f7e9522d0bdc847f /dev-libs/FP16
parentdev-python/PeachPy: add to tree (diff)
downloadgentoo-78812ee4feafba07e463e940b72255c508d1dfd8.tar.gz
gentoo-78812ee4feafba07e463e940b72255c508d1dfd8.tar.bz2
gentoo-78812ee4feafba07e463e940b72255c508d1dfd8.zip
dev-libs/FP16: add PeachPy depend
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-libs/FP16')
-rw-r--r--dev-libs/FP16/FP16-2021.03.20-r1.ebuild (renamed from dev-libs/FP16/FP16-2021.03.20.ebuild)23
1 files changed, 21 insertions, 2 deletions
diff --git a/dev-libs/FP16/FP16-2021.03.20.ebuild b/dev-libs/FP16/FP16-2021.03.20-r1.ebuild
index 160c3c91f429..4fb39fced810 100644
--- a/dev-libs/FP16/FP16-2021.03.20.ebuild
+++ b/dev-libs/FP16/FP16-2021.03.20-r1.ebuild
@@ -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
+}