blob: 16bc1b83e82e5acd63fc316e6033e4b2fada8f0f [file] [log] [blame]
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
CROS_WORKON_COMMIT="d4eda099ca7bffda59aadffd75f659bfbab00389"
CROS_WORKON_TREE="2c23783ae82ce32e066d88e1a905796d30646001"
CROS_WORKON_PROJECT="chromiumos/third_party/virglrenderer"
inherit autotools cros-fuzzer cros-sanitizers eutils flag-o-matic toolchain-funcs cros-workon
DESCRIPTION="library used implement a virtual 3D GPU used by qemu"
HOMEPAGE="https://virgil3d.github.io/"
LICENSE="MIT"
SLOT="0"
KEYWORDS="*"
IUSE="fuzzer profiling static-libs test"
RDEPEND="
>=x11-libs/libdrm-2.4.50
media-libs/libepoxy
fuzzer? (
media-libs/mesa
media-libs/minigbm
)
"
# We need autoconf-archive for @CODE_COVERAGE_RULES@. #568624
DEPEND="${RDEPEND}
sys-devel/autoconf-archive
test? ( >=dev-libs/check-0.9.4 )"
PATCHES=(
)
src_prepare() {
default
[[ -e configure ]] || eautoreconf
}
src_configure() {
sanitizers-setup-env
if use profiling; then
append-flags -fprofile-instr-generate -fcoverage-mapping
append-ldflags -fprofile-instr-generate -fcoverage-mapping
fi
econf \
--disable-glx \
$(use_enable static-libs static) \
$(use_enable test tests) \
$(use_enable fuzzer)
}
src_install() {
default
fuzzer_install "${FILESDIR}/fuzzer-OWNERS" tests/fuzzer/.libs/virgl_fuzzer \
--options "${FILESDIR}/virgl_fuzzer.options"
fuzzer_install "${FILESDIR}/fuzzer-OWNERS" vtest/.libs/vtest_fuzzer \
--options "${FILESDIR}/vtest_fuzzer.options"
find "${ED}"/usr -name 'lib*.la' -delete
}