| # Copyright 2014 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI="5" |
| |
| CROS_WORKON_COMMIT=("cbd49ae409608324b54a545e4e7fbc3261a1aa43" "62b7538a31c4c5a88dcd2ef4d8a60a783ec6b6f7") |
| CROS_WORKON_TREE=("59995a05a50902a432a1f996701a8b0a93f9042f" "0c2aca9211a622d718bfa2e469ff5276a0ef7cd9") |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_USE_VCSID=1 |
| CROS_WORKON_LOCALNAME=("platform2" "aosp/external/libbrillo") |
| CROS_WORKON_PROJECT=("chromiumos/platform2" "aosp/platform/external/libbrillo") |
| CROS_WORKON_DESTDIR=("${S}/platform2" "${S}/platform2/libbrillo") |
| |
| PLATFORM_SUBDIR="libbrillo" |
| PLATFORM_NATIVE_TEST="yes" |
| |
| inherit cros-workon libchrome multilib platform |
| |
| DESCRIPTION="Base library for Chromium OS" |
| HOMEPAGE="http://dev.chromium.org/chromium-os/platform" |
| SRC_URI="" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="*" |
| IUSE="cros_host +dbus" |
| |
| COMMON_DEPEND=" |
| chromeos-base/minijail |
| dbus? ( dev-libs/dbus-glib ) |
| dev-libs/openssl |
| dev-libs/protobuf:= |
| net-misc/curl |
| sys-apps/rootdev |
| " |
| RDEPEND=" |
| ${COMMON_DEPEND} |
| !cros_host? ( chromeos-base/libchromeos-use-flags ) |
| chromeos-base/chromeos-ca-certificates |
| !chromeos-base/libchromeos |
| " |
| DEPEND=" |
| ${COMMON_DEPEND} |
| chromeos-base/protofiles |
| chromeos-base/system_api |
| dev-libs/modp_b64 |
| " |
| |
| src_install() { |
| local v |
| insinto "/usr/$(get_libdir)/pkgconfig" |
| for v in "${LIBCHROME_VERS[@]}"; do |
| ./platform2_preinstall.sh "${OUT}" "${v}" |
| dolib.so "${OUT}"/lib/lib{brillo,installattributes,policy}*-"${v}".so |
| dolib.a "${OUT}"/libbrillo*-"${v}".a |
| doins "${OUT}"/lib/libbrillo*-"${v}".pc |
| done |
| |
| # Install all the header files from libbrillo/brillo/*.h into |
| # /usr/include/brillo (recursively, with sub-directories). |
| local dir |
| while read -d $'\0' -r dir; do |
| insinto "/usr/include/${dir}" |
| doins "${dir}"/*.h |
| done < <(find brillo -type d -print0) |
| |
| insinto /usr/include/policy |
| doins policy/*.h |
| insinto /usr/include/install_attributes |
| doins install_attributes/libinstallattributes.h |
| } |
| |
| platform_pkg_test() { |
| local v |
| for v in "${LIBCHROME_VERS[@]}"; do |
| platform_test "run" "${OUT}/libbrillo-${v}_unittests" |
| platform_test "run" "${OUT}/libinstallattributes-${v}_unittests" |
| platform_test "run" "${OUT}/libpolicy-${v}_unittests" |
| done |
| } |