diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2020-11-23 23:00:48 -0800 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2020-11-23 23:06:23 -0800 |
commit | 2424d84ad2adf6adbdd3b02ebcddfee4d6e1931e (patch) | |
tree | 86eec6f14758aa1c656f8bef1d101361003560ad /dev-cpp | |
parent | dev-cpp/range-v3: v0.11.0, enable tests (diff) | |
download | gentoo-2424d84ad2adf6adbdd3b02ebcddfee4d6e1931e.tar.gz gentoo-2424d84ad2adf6adbdd3b02ebcddfee4d6e1931e.tar.bz2 gentoo-2424d84ad2adf6adbdd3b02ebcddfee4d6e1931e.zip |
dev-cpp/range-v3: minor QA
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-cpp')
-rw-r--r-- | dev-cpp/range-v3/files/0.11.0-no-werror.patch | 39 | ||||
-rw-r--r-- | dev-cpp/range-v3/range-v3-0.11.0.ebuild | 19 |
2 files changed, 52 insertions, 6 deletions
diff --git a/dev-cpp/range-v3/files/0.11.0-no-werror.patch b/dev-cpp/range-v3/files/0.11.0-no-werror.patch new file mode 100644 index 000000000000..1894fcc93b6c --- /dev/null +++ b/dev-cpp/range-v3/files/0.11.0-no-werror.patch @@ -0,0 +1,39 @@ +From 66e847d4e14be3a369b7e26a03a172b20e62c003 Mon Sep 17 00:00:00 2001 +From: eksi <eksi@eksi.eksi> +Date: Wed, 4 Nov 2020 20:37:01 +0300 +Subject: [PATCH] Add an option to disable -Werror. Fixes #1528 + +--- + cmake/ranges_flags.cmake | 4 +++- + cmake/ranges_options.cmake | 3 +++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/cmake/ranges_flags.cmake b/cmake/ranges_flags.cmake +index 76d893043..9b09ddcb8 100644 +--- a/cmake/ranges_flags.cmake ++++ b/cmake/ranges_flags.cmake +@@ -88,7 +88,9 @@ else() + # Enable "normal" warnings and make them errors: + ranges_append_flag(RANGES_HAS_WALL -Wall) + ranges_append_flag(RANGES_HAS_WEXTRA -Wextra) +- ranges_append_flag(RANGES_HAS_WERROR -Werror) ++ if (RANGES_ENABLE_WERROR) ++ ranges_append_flag(RANGES_HAS_WERROR -Werror) ++ endif() + endif() + + if (RANGES_ENV_LINUX AND RANGES_CXX_COMPILER_CLANG) +diff --git a/cmake/ranges_options.cmake b/cmake/ranges_options.cmake +index 4ec39c7f0..8455af306 100644 +--- a/cmake/ranges_options.cmake ++++ b/cmake/ranges_options.cmake +@@ -16,6 +16,9 @@ option(RANGES_MODULES "Enables use of Clang modules (experimental)." OFF) + option(RANGES_NATIVE "Enables -march/-mtune=native." ON) + option(RANGES_VERBOSE_BUILD "Enables debug output from CMake." OFF) + option(RANGES_LLVM_POLLY "Enables LLVM Polly." OFF) ++option(RANGES_ENABLE_WERROR ++ "Enables -Werror. Only effective if compiler is not clang-cl or MSVC. ON by default" ++ ON) + option(RANGES_PREFER_REAL_CONCEPTS + "Use real concepts instead of emulation if the compiler supports it" + ON) diff --git a/dev-cpp/range-v3/range-v3-0.11.0.ebuild b/dev-cpp/range-v3/range-v3-0.11.0.ebuild index 036a95353633..a4019f9f11f0 100644 --- a/dev-cpp/range-v3/range-v3-0.11.0.ebuild +++ b/dev-cpp/range-v3/range-v3-0.11.0.ebuild @@ -15,21 +15,28 @@ KEYWORDS="~amd64 ~ppc64" IUSE="test" RESTRICT="!test? ( test )" +PATCHES=( "${FILESDIR}/0.11.0-no-werror.patch" ) + src_prepare() { - sed -i -e '/Werror/d' -e '/Wextra/d' -e '/Wall/d' cmake/ranges_flags.cmake || die - sed -i -e "s@lib/cmake@"$(get_libdir)"/cmake@g" CMakeLists.txt || die + # header-only libraries go to arch-independent dirs + sed -i -e 's@lib/cmake@share/cmake@g' CMakeLists.txt || die rm include/module.modulemap || die # https://bugs.gentoo.org/755740 cmake_src_prepare } src_configure() { mycmakeargs=( - -DRANGE_V3_EXAMPLES=OFF - -DRANGE_V3_HEADER_CHECKS=OFF - -DRANGE_V3_PERF=OFF - -DRANGE_V3_TESTS=$(usex test) -DRANGES_BUILD_CALENDAR_EXAMPLE=OFF -DRANGES_NATIVE=OFF + -DRANGES_DEBUG_INFO=OFF + -DRANGES_NATIVE=OFF + -DRANGES_ENABLE_WERROR=OFF + -DRANGES_VERBOSE_BUILD=ON + -DRANGE_V3_EXAMPLES=OFF + -DRANGE_V3_PERF=OFF + -DRANGE_V3_DOCS=OFF + -DRANGE_V3_HEADER_CHECKS="$(usex test ON OFF)" + -DRANGE_V3_TESTS=$(usex test ON OFF) #TODO: clang support + -DRANGES_MODULES=yes ) cmake_src_configure |