1DESCRIPTION = "The glog library implements application-level logging. This \
2library provides logging APIs based on C++-style streams and various helper \
3macros."
4HOMEPAGE = "https://github.com/google/glog"
5
6LICENSE = "BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://COPYING;md5=dc9db360e0bbd4e46672f3fd91dd6c4b"
8
9SRC_URI = " \
10    git://github.com/google/glog.git;nobranch=1;protocol=https \
11    file://libexecinfo.patch \
12    file://0001-Change-SleepForMilliseconds-parameter-from-unsigned-.patch \
13"
14
15SRCREV = "b33e3bad4c46c8a6345525fd822af355e5ef9446"
16
17S = "${WORKDIR}/git"
18
19inherit cmake
20
21PACKAGECONFIG ?= "shared unwind 64bit-atomics"
22PACKAGECONFIG:remove:riscv64 = "unwind"
23PACKAGECONFIG:remove:riscv32 = "unwind 64bit-atomics"
24PACKAGECONFIG:remove:mipsarch = "64bit-atomics"
25
26PACKAGECONFIG:append:libc-musl:riscv64 = " execinfo"
27PACKAGECONFIG:append:libc-musl:riscv32 = " execinfo"
28
29PACKAGECONFIG[unwind] = "-DWITH_UNWIND=ON,-DWITH_UNWIND=OFF,libunwind,libunwind"
30PACKAGECONFIG[execinfo] = ",,libexecinfo"
31PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,,"
32PACKAGECONFIG[64bit-atomics] = ",-DCMAKE_CXX_STANDARD_LIBRARIES='-latomic',,"
33
34do_configure:append() {
35    # remove WORKDIR info to improve reproducibility
36    if [ -f  "${B}/config.h" ] ; then
37        sed -i 's/'$(echo ${WORKDIR} | sed 's_/_\\/_g')'/../g' ${B}/config.h
38    fi
39}
40