blob: 11fde064e65bae646227ad814304b96ff7fa43a8 (
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
41
42
43
44
45
46
|
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
CommitId=7d2a4e9931a82adc3814275b6219a03e24e36b4c
DESCRIPTION="Quantized Neural Networks PACKage"
HOMEPAGE="https://github.com/pytorch/QNNPACK/"
SRC_URI="https://github.com/pytorch/${PN}/archive/${CommitId}.tar.gz
-> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="static-libs test"
RDEPEND="
dev-libs/cpuinfo
dev-libs/pthreadpool
"
DEPEND="${RDEPEND}
dev-libs/FP16
dev-libs/FXdiv
"
BDEPEND="test? ( dev-cpp/gtest )"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( static-libs )"
S="${WORKDIR}"/${PN}-${CommitId}
PATCHES=(
"${FILESDIR}"/${P}-gentoo.patch
)
src_configure() {
local mycmakeargs=(
-DQNNPACK_BUILD_BENCHMARKS=OFF
-DQNNPACK_BUILD_TESTS=$(usex test ON OFF)
-DQNNPACK_LIBRARY_TYPE=$(usex static-libs static shared)
)
cmake_src_configure
}
|