blob: 3c5da8c30f728238bed5ce70d143b9f9b66ad490 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
EAPI=6
CROS_WORKON_COMMIT=("a9b6a98b093af51514e7c25b62981b9aad3ffd7c" "ba2b2a9c0c6874f90d1a72accc7b14f9e5b5adf7")
CROS_WORKON_TREE=("8d4f0a176280a2748eba9800ba25f1bfe8c390c6" "8d7545bc9bae9fc17f8e752b353624c72868d1a6 ")
inherit cros-constants
CROS_WORKON_INCREMENTAL_BUILD="1"
CROS_WORKON_LOCALNAME=("../platform2" "../aosp/external/puffin")
CROS_WORKON_PROJECT=("chromiumos/platform2" "platform/external/puffin")
CROS_WORKON_DESTDIR=("${S}/platform2" "${S}/platform2/puffin")
CROS_WORKON_REPO=("${CROS_GIT_HOST_URL}" "${CROS_GIT_AOSP_URL}")
CROS_WORKON_SUBTREE=("common-mk .gn" "")
CROS_WORKON_BLACKLIST=1
PLATFORM_SUBDIR="puffin"
inherit cros-workon platform
DESCRIPTION="Puffin: Deterministic patching tool for deflate streams"
HOMEPAGE="https://android.googlesource.com/platform/external/puffin/"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
IUSE="asan fuzzer"
RDEPEND="
chromeos-base/libbrillo[asan?,fuzzer?]
dev-libs/protobuf:=
dev-util/bsdiff
"
DEPEND="${RDEPEND}"
src_install() {
if use cros_host; then
dobin "${OUT}"/puffin
fi
dolib.a "${OUT}"/libpuffpatch.a
dolib.a "${OUT}"/libpuffdiff.a
insinto /usr/include
doins -r src/include/puffin
insinto "/usr/$(get_libdir)/pkgconfig"
doins libpuffdiff.pc libpuffpatch.pc
for f in "huff" "puff" "puffpatch"; do
platform_fuzzer_install "${S}"/OWNERS "${OUT}/puffin_${f}_fuzzer"
done
}
platform_pkg_test() {
platform_test "run" "${OUT}/puffin_test"
# Run fuzzers.
for f in "huff" "puff" "puffpatch"; do
platform_fuzzer_test "${OUT}/puffin_${f}_fuzzer"
done
}