summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2022-05-10 14:27:21 +0200
committerAlfredo Tupone <tupone@gentoo.org>2022-05-10 14:27:52 +0200
commit4222dcb425541239449cbfafce127e84e7de686f (patch)
treefe274ecc02a4b309767eb1db307043ec0878a35a /dev-libs/cpuinfo
parentmail-filter/opendmarc: fix non-POSIX output redirects in init script (diff)
downloadgentoo-4222dcb425541239449cbfafce127e84e7de686f.tar.gz
gentoo-4222dcb425541239449cbfafce127e84e7de686f.tar.bz2
gentoo-4222dcb425541239449cbfafce127e84e7de686f.zip
dev-libs/cpuinfo: add to tree
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-libs/cpuinfo')
-rw-r--r--dev-libs/cpuinfo/Manifest1
-rw-r--r--dev-libs/cpuinfo/cpuinfo-2022.03.26.ebuild36
-rw-r--r--dev-libs/cpuinfo/files/cpuinfo-2022.03.26-gentoo.patch25
-rw-r--r--dev-libs/cpuinfo/metadata.xml11
4 files changed, 73 insertions, 0 deletions
diff --git a/dev-libs/cpuinfo/Manifest b/dev-libs/cpuinfo/Manifest
new file mode 100644
index 000000000000..b8493dd5dc07
--- /dev/null
+++ b/dev-libs/cpuinfo/Manifest
@@ -0,0 +1 @@
+DIST cpuinfo-2022.03.26.tar.gz 3503965 BLAKE2B 03607ea04de156907d230dc9f009d72bf6d36ae7391c190c68dbc3f9a4c395e8ec72f935f6ae032d6b1341432278df3aee6f9fe7f7cad1b82784ecec5084d373 SHA512 dbbe4f3e1d5ae74ffc8ba2cba0ab745a23f4993788f4947825ef5125dd1cbed3e13e0c98e020e6fcfa9879f54f06d7cba4de73ec29f77649b6a27b4ab82c8f1c
diff --git a/dev-libs/cpuinfo/cpuinfo-2022.03.26.ebuild b/dev-libs/cpuinfo/cpuinfo-2022.03.26.ebuild
new file mode 100644
index 000000000000..28a98cb4ef7f
--- /dev/null
+++ b/dev-libs/cpuinfo/cpuinfo-2022.03.26.ebuild
@@ -0,0 +1,36 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit cmake
+
+CommitId=b40bae27785787b6dd70788986fd96434cf90ae2
+
+DESCRIPTION="CPU INFOrmation library"
+HOMEPAGE="https://github.com/pytorch/cpuinfo/"
+SRC_URI="https://github.com/pytorch/${PN}/archive/${CommitId}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-cpp/gtest )"
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}"/${PN}-${CommitId}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCPUINFO_BUILD_BENCHMARKS=OFF
+ -DCPUINFO_BUILD_UNIT_TESTS=$(usex test ON OFF)
+ )
+ cmake_src_configure
+}
diff --git a/dev-libs/cpuinfo/files/cpuinfo-2022.03.26-gentoo.patch b/dev-libs/cpuinfo/files/cpuinfo-2022.03.26-gentoo.patch
new file mode 100644
index 000000000000..b7163d9e06e0
--- /dev/null
+++ b/dev-libs/cpuinfo/files/cpuinfo-2022.03.26-gentoo.patch
@@ -0,0 +1,25 @@
+--- a/CMakeLists.txt 2022-05-09 22:00:05.453640876 +0200
++++ b/CMakeLists.txt 2022-05-09 22:01:11.621691380 +0200
+@@ -94,12 +94,6 @@
+
+ IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS)
+ IF(CPUINFO_SUPPORTED_PLATFORM AND NOT DEFINED GOOGLETEST_SOURCE_DIR)
+- MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)")
+- CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt")
+- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+- WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
+- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
+- WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
+ SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory")
+ ENDIF()
+ ENDIF()
+@@ -309,9 +303,6 @@
+ IF(MSVC AND NOT CPUINFO_RUNTIME_TYPE STREQUAL "static")
+ SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+ ENDIF()
+- ADD_SUBDIRECTORY(
+- "${GOOGLETEST_SOURCE_DIR}"
+- "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest")
+ ENDIF()
+ ENDIF()
+ ENDIF()
diff --git a/dev-libs/cpuinfo/metadata.xml b/dev-libs/cpuinfo/metadata.xml
new file mode 100644
index 000000000000..eec896ddc47d
--- /dev/null
+++ b/dev-libs/cpuinfo/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">pytorch/cpuinfo</remote-id>
+ </upstream>
+</pkgmetadata>