blob: 0a802ef425597beb7e49cfd1d06a80498f92a97a [file] [log] [blame]
# Copyright 2014 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: libchrome.eclass
# @MAINTAINER:
# ChromiumOS Build Team
# @BUGREPORTS:
# Please report bugs via http://crbug.com/new (with label Build)
# @VCSURL: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/HEAD/eclass/@ECLASS@
# @BLURB: helper eclass for managing dependencies on libchrome
# @DESCRIPTION:
# Our base library libchrome is slotted and is used by a lot of packages. All
# the version numbers need to be updated whenever we uprev libchrome. This
# eclass centralizes the logic used to depend on libchrome and sets up the
# environment variables to reduce the amount of change needed.
inherit cros-debug libchrome-version
# Compiling libchrome with the ipcz flag enabled causes it to export the
# ENABLE_IPCZ_ON_CHROMEOS define. This define is used by other packages
# in order to conditionally support ipcz. We add the ipcz flag to IUSE
# to ensure that packages that depend on libchrome are always built
# against the appropriate variant of libchrome (ipcz enabled/disabled).
IUSE="ipcz"
# Require a recent one from time to time to help keep people up-to-date.
# shellcheck disable=SC2154
RDEPEND="
>=chromeos-base/libchrome-0.0.1-r${REQUIRED_LIBCHROME_EBUILD_VERSION}:0=[cros-debug=,ipcz=]
"
DEPEND="${RDEPEND}
dev-cpp/gtest:=
"
# @FUNCTION: libchrome_ver
# @DESCRIPTION:
# Output current libchrome BASE_VER, from SYSROOT-installed BASE_VER file.
# LIBCHROME_SYSROOT can be set.
# If LIBCHROME_SYSROOT is set, it read $LIBCHROME_SYSROOT-installed BASE_VER
# file.
libchrome_ver() {
local basever_file="${SYSROOT}/usr/share/libchrome/BASE_VER"
if [[ -n "${LIBCHROME_SYSROOT}" ]]; then
basever_file="${LIBCHROME_SYSROOT}/usr/share/libchrome/BASE_VER"
fi
cat "${basever_file}" || die "cat ${basever_file} error."
}
OSZAR »