summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2022-05-10 14:20:49 +0200
committerAlfredo Tupone <tupone@gentoo.org>2022-05-10 14:21:20 +0200
commitfec9f13ef384daa3f5bd6b93c8a7de468b853804 (patch)
treef29360721059af9b34d7ca43f84c98a1cc477ebf /dev-libs/FP16
parentnet-mail/dovecot: add 2.3.19 (diff)
downloadgentoo-fec9f13ef384daa3f5bd6b93c8a7de468b853804.tar.gz
gentoo-fec9f13ef384daa3f5bd6b93c8a7de468b853804.tar.bz2
gentoo-fec9f13ef384daa3f5bd6b93c8a7de468b853804.zip
dev-libs/FP16: 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/FP16')
-rw-r--r--dev-libs/FP16/FP16-2021.03.20.ebuild35
-rw-r--r--dev-libs/FP16/Manifest1
-rw-r--r--dev-libs/FP16/files/FP16-2021.03.20-gentoo.patch44
-rw-r--r--dev-libs/FP16/metadata.xml11
4 files changed, 91 insertions, 0 deletions
diff --git a/dev-libs/FP16/FP16-2021.03.20.ebuild b/dev-libs/FP16/FP16-2021.03.20.ebuild
new file mode 100644
index 000000000000..160c3c91f429
--- /dev/null
+++ b/dev-libs/FP16/FP16-2021.03.20.ebuild
@@ -0,0 +1,35 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit 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
+ -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+DEPEND="dev-libs/psimd"
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-cpp/gtest )"
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}"/${PN}-${CommitId}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DFP16_BUILD_BENCHMARKS=OFF
+ -DFP16_BUILD_TESTS=$(usex test ON OFF)
+ )
+ cmake_src_configure
+}
diff --git a/dev-libs/FP16/Manifest b/dev-libs/FP16/Manifest
new file mode 100644
index 000000000000..46545c95256a
--- /dev/null
+++ b/dev-libs/FP16/Manifest
@@ -0,0 +1 @@
+DIST FP16-2021.03.20.tar.gz 71228 BLAKE2B e598225032324ffe38db9002e8397e67a713b6323ac57408e7e39e146826b2bb1dab60cd75181a25b1b07958463e3913bbf0e53b23803e53d472fda66b8ba6d5 SHA512 3f094f242425ea37de274eb8539dc5f8ab0c13fd5325d14180ef12e9c04e6002a110d086c4c667f7c8054af337deab096d59482eb95cc8a632c3c412b48e89d1
diff --git a/dev-libs/FP16/files/FP16-2021.03.20-gentoo.patch b/dev-libs/FP16/files/FP16-2021.03.20-gentoo.patch
new file mode 100644
index 000000000000..5a2d5ed1e2a2
--- /dev/null
+++ b/dev-libs/FP16/files/FP16-2021.03.20-gentoo.patch
@@ -0,0 +1,44 @@
+--- a/CMakeLists.txt 2022-05-10 09:11:41.286417033 +0200
++++ b/CMakeLists.txt 2022-05-10 09:12:48.647398387 +0200
+@@ -29,22 +29,10 @@
+
+ # ---[ Download deps
+ IF(NOT DEFINED PSIMD_SOURCE_DIR)
+- MESSAGE(STATUS "Downloading PSimd to ${CMAKE_BINARY_DIR}/psimd-source (define PSIMD_SOURCE_DIR to avoid it)")
+- CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CMAKE_BINARY_DIR}/psimd-download/CMakeLists.txt")
+- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/psimd-download")
+- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
+- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/psimd-download")
+ SET(PSIMD_SOURCE_DIR "${CMAKE_BINARY_DIR}/psimd-source" CACHE STRING "PSimd source directory")
+ ENDIF()
+
+ IF(FP16_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR)
+- MESSAGE(STATUS "Downloading Google Test to ${CMAKE_BINARY_DIR}/googletest-source (define GOOGLETEST_SOURCE_DIR to avoid it)")
+- CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt")
+- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/googletest-download")
+- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
+- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/googletest-download")
+ SET(GOOGLETEST_SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-source" CACHE STRING "Google Test source directory")
+ ENDIF()
+
+@@ -86,18 +74,12 @@
+
+ # ---[ Configure psimd
+ IF(NOT TARGET psimd)
+- ADD_SUBDIRECTORY(
+- "${PSIMD_SOURCE_DIR}"
+- "${CMAKE_BINARY_DIR}/psimd")
+ ENDIF()
+
+ IF(FP16_BUILD_TESTS)
+ # ---[ Build google test
+ IF(NOT TARGET gtest)
+ SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+- ADD_SUBDIRECTORY(
+- "${GOOGLETEST_SOURCE_DIR}"
+- "${CMAKE_BINARY_DIR}/googletest")
+ ENDIF()
+
+ # ---[ Build FP16 unit tests
diff --git a/dev-libs/FP16/metadata.xml b/dev-libs/FP16/metadata.xml
new file mode 100644
index 000000000000..4c219d7162ec
--- /dev/null
+++ b/dev-libs/FP16/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">Maratyszcza/FP16</remote-id>
+ </upstream>
+</pkgmetadata>