1 # Copyright 2011-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 if [[ "${PV}" == "9999" ]]; then
11 EGIT_REPO_URI="https://github.com/google/glog"
14 DESCRIPTION="Google Logging library"
15 HOMEPAGE="https://github.com/google/glog"
16 if [[ "${PV}" == "9999" ]]; then
19 SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
24 KEYWORDS="amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
25 IUSE="gflags +libunwind llvm-libunwind test"
26 RESTRICT="!test? ( test )"
28 RDEPEND="gflags? ( dev-cpp/gflags:0=[${MULTILIB_USEDEP}] )
30 llvm-libunwind? ( llvm-runtimes/libunwind:0=[${MULTILIB_USEDEP}] )
31 !llvm-libunwind? ( sys-libs/libunwind:0=[${MULTILIB_USEDEP}] )
34 test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )"
37 "${FILESDIR}/${P}-IsGoogleLoggingInitialized_public.patch"
38 "${FILESDIR}/${P}-vmodule_levels_changeability.patch"
43 -DBUILD_TESTING=$(usex test ON OFF)
44 -DWITH_CUSTOM_PREFIX=ON
45 -DWITH_GFLAGS=$(usex gflags ON OFF)
46 -DWITH_GTEST=$(usex test ON OFF)
47 -DWITH_UNWIND=$(usex libunwind ON OFF)
49 if use libunwind; then
51 -DUnwind_PLATFORM_LIBRARY="${ESYSROOT}/usr/$(get_libdir)/libunwind.so"
55 cmake-multilib_src_configure
60 cmake-multilib_src_test -j1