blob: 738734154e081579ea779b6148a201d67c1ad0d3 (
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
47
48
49
|
# Copyright 2020-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Lightweight C++ command line option parser"
HOMEPAGE="https://github.com/jarro2783/cxxopts"
SRC_URI="https://github.com/jarro2783/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
IUSE="icu test"
RESTRICT="
!test? ( test )
"
DOCS=(
README.md
CHANGELOG.md
)
PATCHES=(
"${FILESDIR}"/${P}-gcc15.patch
)
src_prepare() {
sed -r -e 's:-Werror[[:space:]]*::' -i cmake/cxxopts.cmake || die
cmake_src_prepare
}
src_configure() {
# bug #938824, bug #940222
sed -i -e '/set.*CMAKE_CXX_STANDARD/s:11:17:' \
test/{add-subdirectory,find-package}-test/CMakeLists.txt || die
local mycmakeargs=(
# bug #938824, bug #940222
-DCXXOPTS_CXX_STANDARD=17
-DCXXOPTS_BUILD_EXAMPLES:BOOL=OFF
-DCXXOPTS_BUILD_TESTS:BOOL=$(usex test)
-DCXXOPTS_ENABLE_INSTALL:BOOL=ON
-DCXXOPTS_USE_UNICODE_HELP:BOOL=$(usex icu)
)
cmake_src_configure
}
|