mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 20:13:01 -04:00
dev-cpp/scnlib: new package, add 2.0.0
Signed-off-by: Steffen Winter <steffen.winter@proton.me>
This commit is contained in:
1
dev-cpp/scnlib/Manifest
Normal file
1
dev-cpp/scnlib/Manifest
Normal file
@@ -0,0 +1 @@
|
|||||||
|
DIST scnlib-2.0.0.tar.gz 517424 BLAKE2B 152b2b8510c3ab523349e00b5a139c2ea0e6cc234221eb5a472d746ba2b2d176ec9e6515601578b590c9b2d9cb97a136dcf361f73a56c672b3dfd00350a39f60 SHA512 5bca5a43dce9be019775a0cac64945c4b4cdadbecfa8d8e0889b6ed888c3a37ae757aa5d8d60d40418d0058641a40ab6dce35a1de84e9a9a2a6f5b4d12bceed4
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake
|
||||||
|
index ae2832b..c250eff 100644
|
||||||
|
--- a/cmake/dependencies.cmake
|
||||||
|
+++ b/cmake/dependencies.cmake
|
||||||
|
@@ -4,41 +4,10 @@ set(SCN_OPTIONAL_DEPENDENCIES "")
|
||||||
|
|
||||||
|
if (SCN_TESTS)
|
||||||
|
# GTest
|
||||||
|
-
|
||||||
|
- FetchContent_Declare(
|
||||||
|
- googletest
|
||||||
|
- GIT_REPOSITORY https://github.com/google/googletest.git
|
||||||
|
- GIT_TAG main
|
||||||
|
- GIT_SHALLOW TRUE
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
- # gtest CMake does some flag overriding we don't want, and it's also quite heavy
|
||||||
|
- # Do it manually
|
||||||
|
-
|
||||||
|
- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
|
-
|
||||||
|
- FetchContent_GetProperties(googletest)
|
||||||
|
- if (NOT googletest)
|
||||||
|
- FetchContent_Populate(googletest)
|
||||||
|
- endif ()
|
||||||
|
-
|
||||||
|
- find_package(Threads)
|
||||||
|
-
|
||||||
|
- add_library(scn_gtest
|
||||||
|
- "${googletest_SOURCE_DIR}/googletest/src/gtest-all.cc"
|
||||||
|
- "${googletest_SOURCE_DIR}/googlemock/src/gmock-all.cc"
|
||||||
|
- )
|
||||||
|
- target_include_directories(scn_gtest SYSTEM
|
||||||
|
- PUBLIC
|
||||||
|
- "${googletest_SOURCE_DIR}/googletest/include"
|
||||||
|
- "${googletest_SOURCE_DIR}/googlemock/include"
|
||||||
|
- PRIVATE
|
||||||
|
- "${googletest_SOURCE_DIR}/googletest"
|
||||||
|
- "${googletest_SOURCE_DIR}/googlemock"
|
||||||
|
- )
|
||||||
|
- target_link_libraries(scn_gtest PRIVATE Threads::Threads)
|
||||||
|
- target_compile_features(scn_gtest PUBLIC cxx_std_17)
|
||||||
|
- target_compile_options(scn_gtest PRIVATE $<$<CXX_COMPILER_ID:GNU>: -Wno-psabi>)
|
||||||
|
+ find_package(GTest REQUIRED)
|
||||||
|
+ add_library(scn_gtest INTERFACE)
|
||||||
|
+ target_link_libraries(scn_gtest INTERFACE GTest::GTest)
|
||||||
|
+ target_compile_features(scn_gtest INTERFACE cxx_std_17)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (SCN_BENCHMARKS)
|
||||||
|
@@ -158,8 +127,3 @@ if (SCN_REGEX_BACKEND STREQUAL "re2")
|
||||||
|
set(SCN_REGEX_BACKEND_TARGET re2::re2)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
-# make available
|
||||||
|
-
|
||||||
|
-FetchContent_MakeAvailable(
|
||||||
|
- ${SCN_OPTIONAL_DEPENDENCIES}
|
||||||
|
-)
|
||||||
11
dev-cpp/scnlib/metadata.xml
Normal file
11
dev-cpp/scnlib/metadata.xml
Normal file
@@ -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>stffn.mobil@freenet.de</email>
|
||||||
|
<name>Steffen Winter</name>
|
||||||
|
</maintainer>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">eliaskosunen/scnlib</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>
|
||||||
42
dev-cpp/scnlib/scnlib-2.0.0.ebuild
Normal file
42
dev-cpp/scnlib/scnlib-2.0.0.ebuild
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Copyright 2024 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit cmake
|
||||||
|
|
||||||
|
DESCRIPTION="scanf for modern C++ "
|
||||||
|
HOMEPAGE="https://scnlib.dev/"
|
||||||
|
SRC_URI="https://github.com/eliaskosunen/scnlib/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
|
||||||
|
LICENSE="Apache-2.0"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
IUSE="test"
|
||||||
|
|
||||||
|
BDEPEND="
|
||||||
|
dev-cpp/fast_float
|
||||||
|
>=dev-cpp/simdutf-4.0.0:=
|
||||||
|
test? ( dev-cpp/gtest )
|
||||||
|
"
|
||||||
|
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
use test && eapply "${FILESDIR}/${P}-no-external-test-deps.patch"
|
||||||
|
cmake_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local mycmakeargs=(
|
||||||
|
-DSCN_BENCHMARKS=OFF
|
||||||
|
-DSCN_BENCHMARKS_BINARYSIZE=OFF
|
||||||
|
-DSCN_BENCHMARKS_BUILDTIME=OFF
|
||||||
|
-DSCN_DOCS=OFF
|
||||||
|
-DSCN_EXAMPLES=$(usex test ON OFF)
|
||||||
|
-DSCN_TESTS=$(usex test ON OFF)
|
||||||
|
-DSCN_USE_EXTERNAL_FAST_FLOAT=ON
|
||||||
|
-DSCN_USE_EXTERNAL_SIMDUTF=ON
|
||||||
|
)
|
||||||
|
cmake_src_configure
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user