mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-25 07:08:13 -07:00
Now builds & passes tests with gcc-16 & clang-22. Bug: https://bugs.gentoo.org/792444 Closes: https://bugs.gentoo.org/946812 Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1199 Signed-off-by: Sam James <sam@gentoo.org>
61 lines
1.4 KiB
Bash
61 lines
1.4 KiB
Bash
# Copyright 1999-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit cmake
|
|
|
|
DESCRIPTION="Header-only C++11 serialization library"
|
|
HOMEPAGE="https://uscilab.github.io/cereal/"
|
|
SRC_URI="https://github.com/USCiLab/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
LICENSE="BSD"
|
|
SLOT="0"
|
|
KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86"
|
|
IUSE="doc test"
|
|
RESTRICT="!test? ( test )"
|
|
|
|
BDEPEND="doc? ( app-text/doxygen )
|
|
test? ( dev-cpp/doctest )
|
|
"
|
|
DEPEND="dev-libs/rapidjson"
|
|
RDEPEND="${DEPEND}"
|
|
|
|
PATCHES=( "${FILESDIR}"/1.3.2-clang-tuple.patch )
|
|
|
|
src_prepare() {
|
|
if ! use doc ; then
|
|
cmake_comment_add_subdirectory doc
|
|
fi
|
|
|
|
# remove bundled rapidjson (bug 792444)
|
|
# rapidxml cannot be unbundled easily, see the bug for details.
|
|
rm -r include/cereal/external/rapidjson || die 'could not remove bundled rapidjson'
|
|
sed -e '/rapidjson/s|cereal/external/||' \
|
|
-e 's/CEREAL_RAPIDJSON_NAMESPACE/rapidjson/g' \
|
|
-i include/cereal/archives/json.hpp || die
|
|
|
|
# remove bundled doctest
|
|
rm unittests/doctest.h || die 'could not remove bundled doctest'
|
|
sed -e 's/\"doctest\.h\"/<doctest\/doctest.h>/g' \
|
|
-i unittests/common.hpp || die
|
|
|
|
cmake_src_prepare
|
|
}
|
|
|
|
src_configure() {
|
|
local mycmakeargs=(
|
|
-DBUILD_TESTS=$(usex test)
|
|
|
|
# Avoid Boost dependency
|
|
-DSKIP_PERFORMANCE_COMPARISON=ON
|
|
|
|
-DWITH_WERROR=OFF
|
|
)
|
|
|
|
# TODO: Enable if multilib?
|
|
use test && mycmakeargs+=( -DSKIP_PORTABILITY_TEST=ON )
|
|
|
|
cmake_src_configure
|
|
}
|