| # Copyright 2016 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI="5" |
| CROS_WORKON_COMMIT="34df6966e1e8f4efeddd41fb9f320a85540172c3" |
| CROS_WORKON_TREE="d9b9ae772c7a236b2ac410b18ef24b3fc63b8145" |
| CROS_WORKON_PROJECT="chromiumos/platform/minigbm" |
| CROS_WORKON_LOCALNAME="../platform/minigbm" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| |
| inherit multilib-minimal arc-build cros-workon |
| |
| DESCRIPTION="ChromeOS gralloc implementation" |
| HOMEPAGE="${CROS_GIT_HOST_URL}/${CROS_WORKON_PROJECT}" |
| SRC_URI="" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="*" |
| |
| VIDEO_CARDS="exynos intel marvell mediatek rockchip tegra" |
| IUSE="$(printf 'video_cards_%s ' ${VIDEO_CARDS})" |
| |
| RDEPEND=" |
| x11-libs/arc-libdrm[${MULTILIB_USEDEP}] |
| " |
| DEPEND="${RDEPEND}" |
| |
| src_configure() { |
| # Use arc-build base class to select the right compiler |
| arc-build-select-gcc |
| |
| BUILD_DIR="$(cros-workon_get_build_dir)" |
| |
| append-lfs-flags |
| |
| # TODO(gsingh): use pkgconfig |
| if use video_cards_intel; then |
| export DRV_I915=1 |
| append-cppflags -DDRV_I915 |
| fi |
| |
| if use video_cards_rockchip; then |
| export DRV_ROCKCHIP=1 |
| append-cppflags -DDRV_ROCKCHIP |
| fi |
| |
| if use video_cards_mediatek; then |
| export DRV_MEDIATEK=1 |
| append-cppflags -DDRV_MEDIATEK |
| fi |
| |
| multilib-minimal_src_configure |
| } |
| |
| multilib_src_compile() { |
| export TARGET_DIR="${BUILD_DIR}/" |
| cd "${S}/cros_gralloc/" |
| emake |
| } |
| |
| multilib_src_install() { |
| exeinto "${ARC_PREFIX}/vendor/$(get_libdir)/hw/" |
| doexe "${BUILD_DIR}"/gralloc.cros.so |
| } |