blob: 3fe1e546449754c00c3578aea2d1cb971b62c1d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
CommitId=98b0a46bce017382a6351a19577ec43a715b6835
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
-> ${P}.tar.gz"
S="${WORKDIR}"/${PN}-${CommitId}
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="test"
BDEPEND="test? ( dev-cpp/gtest )"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${P}-setfill.patch
)
src_prepare() {
sed -i -e "s|CXX_STANDARD 11|CXX_STANDARD 14|" CMakeLists.txt || die
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DFP16_BUILD_BENCHMARKS=OFF
-DFP16_BUILD_TESTS=$(usex test ON OFF)
)
cmake_src_configure
}
|