dev-cpp/highway: add versioned ebuild, EAPI 8

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-10-24 04:55:49 +02:00
parent 72561b9a1a
commit 98811d8232
4 changed files with 68 additions and 7 deletions

1
dev-cpp/highway/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST highway-0.14.2.tar.gz 1545892 BLAKE2B c19d040ea7bf6d5ee0ff87213f36bfe77759cc4cec514b972379490dbac5e8d55f99490b998f73133ca0ba3b34a98f2684b85206ae32d655aa574aeaabeaeb27 SHA512 fc1a35463c95c45b646c53f91a9996112726de1d588dcd4d25a7d366840f704ad9a4c0bb6e0a001e929409f04aad6922cbffcf93774a0c360aff875956c7cc8d

View File

@@ -0,0 +1,21 @@
--- a/CMakeLists.txt 2021-10-24 04:46:57.475685128 +0200
+++ b/CMakeLists.txt 2021-10-24 04:45:56.218467838 +0200
@@ -182,15 +182,16 @@
endif() # !MSVC
-add_library(hwy STATIC ${HWY_SOURCES})
+add_library(hwy SHARED ${HWY_SOURCES})
target_compile_options(hwy PRIVATE ${HWY_FLAGS})
set_property(TARGET hwy PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(hwy PUBLIC ${CMAKE_CURRENT_LIST_DIR})
-add_library(hwy_contrib STATIC ${HWY_CONTRIB_SOURCES})
+add_library(hwy_contrib SHARED ${HWY_CONTRIB_SOURCES})
target_compile_options(hwy_contrib PRIVATE ${HWY_FLAGS})
set_property(TARGET hwy_contrib PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(hwy_contrib PUBLIC ${CMAKE_CURRENT_LIST_DIR})
+target_link_libraries(hwy_contrib hwy)
# -------------------------------------------------------- hwy_list_targets
# Generate a tool to print the compiled-in targets as defined by the current

View File

@@ -0,0 +1,37 @@
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Performance-portable, length-agnostic SIMD with runtime dispatch"
HOMEPAGE="https://github.com/google/highway"
if [[ "${PV}" == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/google/highway.git"
else
SRC_URI="https://github.com/google/highway/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
DEPEND="test? ( dev-cpp/gtest )"
PATCHES=( "${FILESDIR}/${PN}-shared-libraries.patch" )
RESTRICT="!test? ( test )"
src_configure() {
local mycmakeargs=(
-DBUILD_TESTING=$(usex test)
-DHWY_WARNINGS_ARE_ERRORS=OFF
)
use test && mycmakeargs+=( "-DHWY_SYSTEM_GTEST=ON" )
cmake_src_configure
}

View File

@@ -1,7 +1,7 @@
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
EAPI=8
inherit cmake
@@ -18,18 +18,20 @@ fi
LICENSE="Apache-2.0"
SLOT="0"
IUSE=""
IUSE="test"
DEPEND=""
DEPEND="test? ( dev-cpp/gtest )"
BDEPEND=""
RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}/${PN}-shared-libraries.patch" )
RESTRICT="!test? ( test )"
src_configure() {
local mycmakeargs=(
-DBUILD_TESTING=OFF
-DBUILD_TESTING=$(usex test)
-DHWY_WARNINGS_ARE_ERRORS=OFF
)
use test && mycmakeargs+=( "-DHWY_SYSTEM_GTEST=ON" )
cmake_src_configure
}